From 3da06e4c3c565f5c354c4f09640bc4d14e127d72 Mon Sep 17 00:00:00 2001 From: Dawid Dzhafarov Date: Tue, 20 Feb 2024 10:26:17 +0000 Subject: [PATCH 01/52] DXE-3422 Changelog boilerplate --- CHANGELOG.md | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b555a894..6a915c3e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,90 @@ # RELEASE NOTES + +## X.X.X (X X, X) + +#### BREAKING CHANGES: + + + + + + + + + + + + + + + + + + + + + + + + +#### FEATURES/ENHANCEMENTS: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#### BUG FIXES: + + + + + + + + + + + + + + + + + + + + + + + + + + + ## 5.6.0 (Feb 19, 2024) From 253d394da07ddcb096d8453ac68794220a4d1be1 Mon Sep 17 00:00:00 2001 From: Rahul Bhatvedekar Date: Tue, 20 Feb 2024 11:29:47 +0000 Subject: [PATCH 02/52] Pull request #1283: DXE-3327 Incorrect state after failing on rollout Merge in DEVEXP/terraform-provider-akamai from feature/DXE-3327 to develop --- CHANGELOG.md | 4 + .../resource_akamai_imaging_policy_image.go | 22 +- ...source_akamai_imaging_policy_image_test.go | 241 +++++++++++------- .../resource_akamai_imaging_policy_video.go | 10 +- ...source_akamai_imaging_policy_video_test.go | 210 +++++++++------ 5 files changed, 323 insertions(+), 164 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a915c3e3..6d5a18f57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,10 @@ #### FEATURES/ENHANCEMENTS: +* IMAGING + * In the event of an API failure during a policy update, reverting to the previous state. + * When performing the read operation, if `activate_on_production` is true, fetch the policy state from the production network; otherwise, obtain it from the staging environment. + diff --git a/pkg/providers/imaging/resource_akamai_imaging_policy_image.go b/pkg/providers/imaging/resource_akamai_imaging_policy_image.go index fc43c20a1..6d525010f 100644 --- a/pkg/providers/imaging/resource_akamai_imaging_policy_image.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_image.go @@ -148,6 +148,9 @@ func upsertPolicyImage(ctx context.Context, d *schema.ResourceData, m interface{ } _, err := client.UpsertPolicy(ctx, upsertPolicyRequest) if err != nil { + if errRestore := tf.RestoreOldValues(d, []string{"json"}); errRestore != nil { + return diag.Errorf("%s\n%s: %s", err.Error(), "Failed to restore old state", errRestore.Error()) + } return diag.FromErr(err) } } @@ -177,8 +180,11 @@ func resourcePolicyImageRead(ctx context.Context, d *schema.ResourceData, m inte if err != nil { return diag.FromErr(err) } - - policy, err := getPolicyImage(ctx, client, policyID, contractID, policysetID, imaging.PolicyNetworkStaging) + network, err := getPolicyNetwork(d) + if err != nil { + return diag.FromErr(err) + } + policy, err := getPolicyImage(ctx, client, policyID, contractID, policysetID, network) if err != nil { return diag.FromErr(err) } @@ -216,6 +222,18 @@ func resourcePolicyImageRead(ctx context.Context, d *schema.ResourceData, m inte return nil } +func getPolicyNetwork(d *schema.ResourceData) (networkType imaging.PolicyNetwork, err error) { + network := imaging.PolicyNetworkStaging + activateOnProduction, err := tf.GetBoolValue("activate_on_production", d) + if err != nil { + return "", err + } + if activateOnProduction { + network = imaging.PolicyNetworkProduction + } + return network, nil +} + var extractRolloutDuration = func(input imaging.PolicyInputImage) *int { return input.RolloutDuration } diff --git a/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go b/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go index 357d0b7dc..9c42a813b 100644 --- a/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go @@ -1,6 +1,7 @@ package imaging import ( + "errors" "fmt" "net/http" "regexp" @@ -126,7 +127,7 @@ func TestResourcePolicyImage(t *testing.T) { Video: tools.BoolPtr(false), } - expectUpsertPolicy = func(_ *testing.T, client *imaging.Mock, policyID string, network imaging.PolicyNetwork, contractID string, policySetID string, policy imaging.PolicyInput) { + expectUpsertPolicy = func(client *imaging.Mock, policyID, policySetID, contractID string, network imaging.PolicyNetwork, policy imaging.PolicyInput) { policyResponse := &imaging.PolicyResponse{ OperationPerformed: "UPDATED", Description: fmt.Sprintf("Policy %s updated.", policyID), @@ -141,7 +142,17 @@ func TestResourcePolicyImage(t *testing.T) { }).Return(policyResponse, nil).Once() } - expectReadPolicy = func(t *testing.T, client *imaging.Mock, policyID string, network imaging.PolicyNetwork, contractID string, policySetID string, policyOutput imaging.PolicyOutput, times int) { + expectUpsertPolicyFailure = func(client *imaging.Mock, policyID, policySetID, contractID string, network imaging.PolicyNetwork, policy imaging.PolicyInput) { + client.On("UpsertPolicy", mock.Anything, imaging.UpsertPolicyRequest{ + PolicyID: policyID, + Network: network, + ContractID: contractID, + PolicySetID: policySetID, + PolicyInput: policy, + }).Return(nil, errors.New("API error: Conflict (409)")).Once() + } + + expectReadPolicy = func(client *imaging.Mock, policyID, policySetID, contractID string, network imaging.PolicyNetwork, policyOutput imaging.PolicyOutput, times int) { client.On("GetPolicy", mock.Anything, imaging.GetPolicyRequest{ PolicyID: policyID, Network: network, @@ -150,7 +161,7 @@ func TestResourcePolicyImage(t *testing.T) { }).Return(policyOutput, nil).Times(times) } - expectDeletePolicy = func(_ *testing.T, client *imaging.Mock, policyID string, network imaging.PolicyNetwork, contractID string, policySetID string) { + expectDeletePolicy = func(client *imaging.Mock, policyID, policySetID, contractID string, network imaging.PolicyNetwork) { response := imaging.PolicyResponse{} client.On("DeletePolicy", mock.Anything, imaging.DeletePolicyRequest{ PolicyID: policyID, @@ -160,7 +171,7 @@ func TestResourcePolicyImage(t *testing.T) { }).Return(&response, nil).Once() } - expectUpsertPolicyWithError = func(_ *testing.T, client *imaging.Mock, policyID string, network imaging.PolicyNetwork, contractID string, policySetID string, policy imaging.PolicyInput, err error) { + expectUpsertPolicyWithError = func(client *imaging.Mock, policyID, policySetID, contractID string, network imaging.PolicyNetwork, policy imaging.PolicyInput, err error) { client.On("UpsertPolicy", mock.Anything, imaging.UpsertPolicyRequest{ PolicyID: policyID, Network: network, @@ -207,12 +218,12 @@ func TestResourcePolicyImage(t *testing.T) { testDir := "testdata/TestResPolicyImage/regular_policy" client := new(imaging.Mock) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 2) + expectUpsertPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyInput) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyOutput, 2) - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set") + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging) // it is faster to attempt to delete on production than checking if there is policy on production first - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set") + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ @@ -237,14 +248,15 @@ func TestResourcePolicyImage(t *testing.T) { testDir := "testdata/TestResPolicyImage/regular_policy" client := new(imaging.Mock) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 5) + expectUpsertPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyInput) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyOutput, 3) // `activate_on_production` should not trigger Upsert for staging if the policy has not changed - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set", &policyInput) + expectUpsertPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction, &policyInput) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction, &policyOutput, 2) - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set") - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set") + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging) + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ @@ -279,23 +291,23 @@ func TestResourcePolicyImage(t *testing.T) { testDir := "testdata/TestResPolicyImage/regular_policy_activate_same_time" client := new(imaging.Mock) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 2) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction, &policyOutput, 2) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set", &policyInput) + expectUpsertPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyInput) + expectUpsertPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction, &policyInput) // update - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 1) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction, &policyOutput, 1) policyInputV2 := getPolicyInputV2(policyInput) policyOutputV2 := getPolicyOutputV2(policyOutput) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutputV2, 2) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInputV2) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set", &policyInputV2) + expectUpsertPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyInputV2) + expectUpsertPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction, &policyInputV2) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction, &policyOutputV2, 2) - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set") - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set") + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging) + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ @@ -326,24 +338,74 @@ func TestResourcePolicyImage(t *testing.T) { }) client.AssertExpectations(t) }) + t.Run("regular policy create with activate_on_production=true, update immediately, fails on production", func(t *testing.T) { + testDir := "testdata/TestResPolicyImage/regular_policy_activate_same_time" + + client := new(imaging.Mock) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction, &policyOutput, 2) + + expectUpsertPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyInput) + expectUpsertPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction, &policyInput) + + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction, &policyOutput, 1) + + // update + policyInputV2 := getPolicyInputV2(policyInput) + + expectUpsertPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyInputV2) + expectUpsertPolicyFailure(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction, &policyInputV2) + + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging) + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction) + + useClient(client, func() { + resource.UnitTest(t, resource.TestCase{ + ProviderFactories: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), + Check: checkPolicyAttributes(policyAttributes{ + version: "1", + policyID: "test_policy", + policySetID: "test_policy_set", + activateOnProduction: "true", + policyPath: fmt.Sprintf("%s/policy/policy_create.json", testDir), + }), + }, + { + Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_update.tf", testDir)), + ExpectError: regexp.MustCompile(`Error: API error: Conflict \(409\)`), + Check: checkPolicyAttributes(policyAttributes{ + version: "1", + policyID: "test_policy", + policySetID: "test_policy_set", + activateOnProduction: "true", + policyPath: fmt.Sprintf("%s/policy/policy_create.json", testDir), + }), + }, + }, + }) + }) + client.AssertExpectations(t) + }) t.Run("regular policy create and later change policy set id (force new)", func(t *testing.T) { testDir := "testdata/TestResPolicyImage/change_policyset_id" client := new(imaging.Mock) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 3) + expectUpsertPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyInput) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyOutput, 3) // remove original policy - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set") - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set") + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging) + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction) // update - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set_update", &policyInput) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set_update", &policyOutput, 2) + expectUpsertPolicy(client, "test_policy", "test_policy_set_update", "test_contract", imaging.PolicyNetworkStaging, &policyInput) + expectReadPolicy(client, "test_policy", "test_policy_set_update", "test_contract", imaging.PolicyNetworkStaging, &policyOutput, 2) // remove new policy - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set_update") - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set_update") + expectDeletePolicy(client, "test_policy", "test_policy_set_update", "test_contract", imaging.PolicyNetworkStaging) + expectDeletePolicy(client, "test_policy", "test_policy_set_update", "test_contract", imaging.PolicyNetworkProduction) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ @@ -378,20 +440,22 @@ func TestResourcePolicyImage(t *testing.T) { testDir := "testdata/TestResPolicyImage/regular_policy_update_staging" client := new(imaging.Mock) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 6) + + expectUpsertPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyInput) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyOutput, 3) // `activate_on_production` should not trigger Upsert for staging if the policy has not changed - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set", &policyInput) + expectUpsertPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction, &policyInput) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction, &policyOutput, 3) policyInputV2 := getPolicyInputV2(policyInput) policyOutputV2 := getPolicyOutputV2(policyOutput) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutputV2, 2) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInputV2) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyOutputV2, 2) + expectUpsertPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyInputV2) - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set") - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set") + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging) + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ @@ -436,11 +500,12 @@ func TestResourcePolicyImage(t *testing.T) { testDir := "testdata/TestResPolicyImage/auto_policy" client := new(imaging.Mock) - expectUpsertPolicy(t, client, ".auto", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) - expectReadPolicy(t, client, ".auto", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 5) + expectUpsertPolicy(client, ".auto", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyInput) + expectReadPolicy(client, ".auto", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyOutput, 3) // `activate_on_production` should not trigger Upsert for staging if the policy has not changed - expectUpsertPolicy(t, client, ".auto", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set", &policyInput) + expectUpsertPolicy(client, ".auto", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction, &policyInput) + expectReadPolicy(client, ".auto", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction, &policyOutput, 2) // .auto policy cannot be removed alone, only via removal of policy set @@ -477,14 +542,14 @@ func TestResourcePolicyImage(t *testing.T) { testDir := "testdata/TestResPolicyImage/diff_suppress/fields" client := new(imaging.Mock) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInputDiff) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutputDiff, 2) + expectUpsertPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyInputDiff) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyOutputDiff, 3) // remove original policy - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set") - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set") + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging) + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutputDiff, 2) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyOutputDiff, 1) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ @@ -533,14 +598,14 @@ func TestResourcePolicyImage(t *testing.T) { } client := new(imaging.Mock) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 2) + expectUpsertPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyInput) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyOutput, 2) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInputWithRollout) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 3) + expectUpsertPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyInputWithRollout) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyOutput, 3) - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set") - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set") + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging) + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ @@ -597,8 +662,8 @@ func TestResourcePolicyImage(t *testing.T) { } client := new(imaging.Mock) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 2) + expectUpsertPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyInput) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyOutput, 2) policyOutputAfterUpdate := imaging.PolicyOutputImage{ Breakpoints: &imaging.Breakpoints{ @@ -623,11 +688,11 @@ func TestResourcePolicyImage(t *testing.T) { Video: tools.BoolPtr(false), } - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInputWithServeStale) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutputAfterUpdate, 3) + expectUpsertPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyInputWithServeStale) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyOutputAfterUpdate, 3) - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set") - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set") + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging) + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ @@ -662,15 +727,17 @@ func TestResourcePolicyImage(t *testing.T) { testDir := "testdata/TestResPolicyImage/regular_policy" client := new(imaging.Mock) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set", &policyInput) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 5) + expectUpsertPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyInput) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyOutput, 3) + + expectUpsertPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction, &policyInput) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction, &policyOutput, 3) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set", &policyOutput, 1) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 2) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction, &policyOutput, 1) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyOutput, 1) - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set") - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set") + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging) + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ @@ -698,13 +765,13 @@ func TestResourcePolicyImage(t *testing.T) { policyOutputV2 := getPolicyOutputV2(policyOutput) client := new(imaging.Mock) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 3) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set", &policyOutputV2, 1) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 1) + expectUpsertPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyInput) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyOutput, 3) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction, &policyOutputV2, 1) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyOutput, 1) - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set") - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set") + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging) + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ @@ -728,18 +795,18 @@ func TestResourcePolicyImage(t *testing.T) { testDir := "testdata/TestResPolicyImage/regular_policy" client := new(imaging.Mock) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 3) + expectUpsertPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyInput) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyOutput, 3) client.On("GetPolicy", mock.Anything, imaging.GetPolicyRequest{ PolicyID: "test_policy", Network: imaging.PolicyNetworkProduction, ContractID: "test_contract", PolicySetID: "test_policy_set", }).Return(nil, fmt.Errorf("%s: %w", imaging.ErrGetPolicy, &imaging.Error{Status: http.StatusNotFound})).Once() - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 1) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyOutput, 1) - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set") - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set") + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging) + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ @@ -766,20 +833,20 @@ func TestResourcePolicyImage(t *testing.T) { policyInput.RolloutDuration = tools.IntPtr(3600) client := new(imaging.Mock) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 3) + expectUpsertPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyInput) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyOutput, 3) client.On("GetPolicy", mock.Anything, imaging.GetPolicyRequest{ PolicyID: "test_policy", Network: imaging.PolicyNetworkProduction, ContractID: "test_contract", PolicySetID: "test_policy_set", }).Return(nil, fmt.Errorf("%s: %w", imaging.ErrGetPolicy, &imaging.Error{Status: http.StatusNotFound})).Once() - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 1) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 1) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 1) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyOutput, 1) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyOutput, 1) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyOutput, 1) - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set") - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set") + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging) + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ @@ -852,7 +919,7 @@ func TestResourcePolicyImage(t *testing.T) { Detail: "Policy fails to be properly created by AkaImaging: Unrecognized transformation type: MaxColors2", ProblemID: "52a21f40-9861-4d35-95d0-a603c85cb2ad", } - expectUpsertPolicyWithError(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput, &withError) + expectUpsertPolicyWithError(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyInput, &withError) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ @@ -871,11 +938,11 @@ func TestResourcePolicyImage(t *testing.T) { testDir := "testdata/TestResPolicyImage/regular_policy" client := new(imaging.Mock) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 2) + expectUpsertPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyInput) + expectReadPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyOutput, 2) - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set") - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set") + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging) + expectDeletePolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ diff --git a/pkg/providers/imaging/resource_akamai_imaging_policy_video.go b/pkg/providers/imaging/resource_akamai_imaging_policy_video.go index 53177e8d7..b060513eb 100644 --- a/pkg/providers/imaging/resource_akamai_imaging_policy_video.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_video.go @@ -141,6 +141,9 @@ func upsertPolicyVideo(ctx context.Context, d *schema.ResourceData, m interface{ } _, err := client.UpsertPolicy(ctx, upsertPolicyRequest) if err != nil { + if errRestore := tf.RestoreOldValues(d, []string{"json"}); errRestore != nil { + return diag.Errorf("%s\n%s: %s", err.Error(), "Failed to restore old state", errRestore.Error()) + } return diag.FromErr(err) } } @@ -170,8 +173,11 @@ func resourcePolicyVideoRead(ctx context.Context, d *schema.ResourceData, m inte if err != nil { return diag.FromErr(err) } - - policy, err := getPolicyVideo(ctx, client, policyID, contractID, policysetID, imaging.PolicyNetworkStaging) + network, err := getPolicyNetwork(d) + if err != nil { + return diag.FromErr(err) + } + policy, err := getPolicyVideo(ctx, client, policyID, contractID, policysetID, network) if err != nil { return diag.FromErr(err) } diff --git a/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go b/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go index 58f5f5cac..3ca8b09dd 100644 --- a/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go @@ -1,6 +1,7 @@ package imaging import ( + "errors" "fmt" "net/http" "regexp" @@ -83,7 +84,7 @@ func TestResourcePolicyVideo(t *testing.T) { Video: tools.BoolPtr(true), } - expectUpsertPolicy = func(_ *testing.T, client *imaging.Mock, policyID string, network imaging.PolicyNetwork, contractID string, policySetID string, policy imaging.PolicyInput) { + expectUpsertPolicy = func(client *imaging.Mock, policyID, contractID, policySetID string, network imaging.PolicyNetwork, policy imaging.PolicyInput) { policyResponse := &imaging.PolicyResponse{ OperationPerformed: "UPDATED", Description: fmt.Sprintf("Policy %s updated.", policyID), @@ -98,7 +99,17 @@ func TestResourcePolicyVideo(t *testing.T) { }).Return(policyResponse, nil).Once() } - expectReadPolicy = func(t *testing.T, client *imaging.Mock, policyID string, network imaging.PolicyNetwork, contractID string, policySetID string, policyOutput imaging.PolicyOutput, times int) { + expectUpsertPolicyFailure = func(client *imaging.Mock, policyID, policySetID, contractID string, network imaging.PolicyNetwork, policy imaging.PolicyInput) { + client.On("UpsertPolicy", mock.Anything, imaging.UpsertPolicyRequest{ + PolicyID: policyID, + Network: network, + ContractID: contractID, + PolicySetID: policySetID, + PolicyInput: policy, + }).Return(nil, errors.New("API error: Conflict (409)")).Once() + } + + expectReadPolicy = func(client *imaging.Mock, policyID, contractID, policySetID string, network imaging.PolicyNetwork, policyOutput imaging.PolicyOutput, times int) { client.On("GetPolicy", mock.Anything, imaging.GetPolicyRequest{ PolicyID: policyID, Network: network, @@ -107,7 +118,7 @@ func TestResourcePolicyVideo(t *testing.T) { }).Return(policyOutput, nil).Times(times) } - expectDeletePolicy = func(_ *testing.T, client *imaging.Mock, policyID string, network imaging.PolicyNetwork, contractID string, policySetID string) { + expectDeletePolicy = func(client *imaging.Mock, policyID, contractID, policySetID string, network imaging.PolicyNetwork) { response := imaging.PolicyResponse{} client.On("DeletePolicy", mock.Anything, imaging.DeletePolicyRequest{ PolicyID: policyID, @@ -117,7 +128,7 @@ func TestResourcePolicyVideo(t *testing.T) { }).Return(&response, nil).Once() } - expectUpsertPolicyWithError = func(_ *testing.T, client *imaging.Mock, policyID string, network imaging.PolicyNetwork, contractID string, policySetID string, policy imaging.PolicyInput, err error) { + expectUpsertPolicyWithError = func(client *imaging.Mock, policyID, contractID, policySetID string, network imaging.PolicyNetwork, policy imaging.PolicyInput, err error) { client.On("UpsertPolicy", mock.Anything, imaging.UpsertPolicyRequest{ PolicyID: policyID, Network: network, @@ -164,12 +175,12 @@ func TestResourcePolicyVideo(t *testing.T) { testDir := "testdata/TestResPolicyVideo/regular_policy" client := new(imaging.Mock) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 2) + expectUpsertPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyInput) + expectReadPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyOutput, 2) - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set") + expectDeletePolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging) // it is faster to attempt to delete on production than checking if there is policy on production first - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set") + expectDeletePolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ @@ -194,14 +205,15 @@ func TestResourcePolicyVideo(t *testing.T) { testDir := "testdata/TestResPolicyVideo/regular_policy" client := new(imaging.Mock) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 5) + expectUpsertPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyInput) + expectReadPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyOutput, 3) // `activate_on_production` should not trigger Upsert for staging if the policy has not changed - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set", &policyInput) + expectUpsertPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction, &policyInput) + expectReadPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction, &policyOutput, 2) - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set") - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set") + expectDeletePolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging) + expectDeletePolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ @@ -236,23 +248,23 @@ func TestResourcePolicyVideo(t *testing.T) { testDir := "testdata/TestResPolicyVideo/regular_policy_activate_same_time" client := new(imaging.Mock) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 2) + expectReadPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction, &policyOutput, 2) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set", &policyInput) + expectUpsertPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyInput) + expectUpsertPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction, &policyInput) // update - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 1) + expectReadPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction, &policyOutput, 1) policyInputV2 := getPolicyInputVideoV2(policyInput) policyOutputV2 := getPolicyOutputVideoV2(policyOutput) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutputV2, 2) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInputV2) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set", &policyInputV2) + expectReadPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction, &policyOutputV2, 2) + expectUpsertPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyInputV2) + expectUpsertPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction, &policyInputV2) - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set") - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set") + expectDeletePolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging) + expectDeletePolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ @@ -283,24 +295,75 @@ func TestResourcePolicyVideo(t *testing.T) { }) client.AssertExpectations(t) }) + t.Run("regular policy create with activate_on_production=true, update immediately, fails on production", func(t *testing.T) { + testDir := "testdata/TestResPolicyVideo/regular_policy_activate_same_time" + + client := new(imaging.Mock) + expectReadPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction, &policyOutput, 2) + + expectUpsertPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyInput) + expectUpsertPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction, &policyInput) + + expectReadPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction, &policyOutput, 1) + + // update + policyInputV2 := getPolicyInputVideoV2(policyInput) + + expectUpsertPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyInputV2) + expectUpsertPolicyFailure(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkProduction, &policyInputV2) + + expectDeletePolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging) + expectDeletePolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction) + + useClient(client, func() { + resource.UnitTest(t, resource.TestCase{ + ProviderFactories: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), + Check: checkPolicyAttributes(policyAttributes{ + version: "1", + policyID: "test_policy", + policySetID: "test_policy_set", + activateOnProduction: "true", + policyPath: fmt.Sprintf("%s/policy/policy_create.json", testDir), + }), + }, + { + Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_update.tf", testDir)), + ExpectError: regexp.MustCompile(`Error: API error: Conflict \(409\)`), + Check: checkPolicyAttributes(policyAttributes{ + version: "1", + policyID: "test_policy", + policySetID: "test_policy_set", + activateOnProduction: "true", + policyPath: fmt.Sprintf("%s/policy/policy_create.json", testDir), + }), + }, + }, + }) + }) + client.AssertExpectations(t) + }) + t.Run("regular policy create and later change policy set id (force new)", func(t *testing.T) { testDir := "testdata/TestResPolicyVideo/change_policyset_id" client := new(imaging.Mock) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 3) + expectUpsertPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyInput) + expectReadPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyOutput, 3) // remove original policy - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set") - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set") + expectDeletePolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging) + expectDeletePolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction) // update - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set_update", &policyInput) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set_update", &policyOutput, 2) + expectUpsertPolicy(client, "test_policy", "test_contract", "test_policy_set_update", imaging.PolicyNetworkStaging, &policyInput) + expectReadPolicy(client, "test_policy", "test_contract", "test_policy_set_update", imaging.PolicyNetworkStaging, &policyOutput, 2) // remove new policy - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set_update") - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set_update") + expectDeletePolicy(client, "test_policy", "test_contract", "test_policy_set_update", imaging.PolicyNetworkStaging) + expectDeletePolicy(client, "test_policy", "test_contract", "test_policy_set_update", imaging.PolicyNetworkProduction) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ @@ -335,20 +398,21 @@ func TestResourcePolicyVideo(t *testing.T) { testDir := "testdata/TestResPolicyVideo/regular_policy_update_staging" client := new(imaging.Mock) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 6) + expectUpsertPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyInput) + expectReadPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyOutput, 3) // `activate_on_production` should not trigger Upsert for staging if the policy has not changed - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set", &policyInput) + expectUpsertPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction, &policyInput) + expectReadPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction, &policyOutput, 3) policyInputV2 := getPolicyInputVideoV2(policyInput) policyOutputV2 := getPolicyOutputVideoV2(policyOutput) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutputV2, 2) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInputV2) + expectReadPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyOutputV2, 2) + expectUpsertPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyInputV2) - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set") - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set") + expectDeletePolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging) + expectDeletePolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ @@ -393,11 +457,12 @@ func TestResourcePolicyVideo(t *testing.T) { testDir := "testdata/TestResPolicyVideo/auto_policy" client := new(imaging.Mock) - expectUpsertPolicy(t, client, ".auto", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) - expectReadPolicy(t, client, ".auto", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 5) + expectUpsertPolicy(client, ".auto", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyInput) + expectReadPolicy(client, ".auto", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyOutput, 3) // `activate_on_production` should not trigger Upsert for staging if the policy has not changed - expectUpsertPolicy(t, client, ".auto", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set", &policyInput) + expectUpsertPolicy(client, ".auto", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction, &policyInput) + expectReadPolicy(client, ".auto", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction, &policyOutput, 2) // .auto policy cannot be removed alone, only via removal of policy set @@ -434,15 +499,15 @@ func TestResourcePolicyVideo(t *testing.T) { testDir := "testdata/TestResPolicyVideo/regular_policy" client := new(imaging.Mock) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set", &policyInput) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 5) + expectUpsertPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyInput) + expectUpsertPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction, &policyInput) + expectReadPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyOutput, 3) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set", &policyOutput, 1) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 2) + expectReadPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction, &policyOutput, 4) + expectReadPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyOutput, 1) - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set") - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set") + expectDeletePolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging) + expectDeletePolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ @@ -469,14 +534,14 @@ func TestResourcePolicyVideo(t *testing.T) { testDir := "testdata/TestResPolicyVideo/diff_suppress/fields" client := new(imaging.Mock) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInputDiff) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutputDiff, 2) + expectUpsertPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyInputDiff) + expectReadPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyOutputDiff, 2) // remove original policy - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set") - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set") + expectDeletePolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging) + expectDeletePolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutputDiff, 2) + expectReadPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyOutputDiff, 2) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ @@ -506,13 +571,12 @@ func TestResourcePolicyVideo(t *testing.T) { policyOutputV2 := getPolicyOutputVideoV2(policyOutput) client := new(imaging.Mock) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 3) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set", &policyOutputV2, 1) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 1) - - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set") - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set") + expectUpsertPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyInput) + expectReadPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyOutput, 3) + expectReadPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction, &policyOutputV2, 1) + expectReadPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyOutput, 1) + expectDeletePolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging) + expectDeletePolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ @@ -536,18 +600,18 @@ func TestResourcePolicyVideo(t *testing.T) { testDir := "testdata/TestResPolicyVideo/regular_policy" client := new(imaging.Mock) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 3) + expectUpsertPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyInput) + expectReadPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyOutput, 3) client.On("GetPolicy", mock.Anything, imaging.GetPolicyRequest{ PolicyID: "test_policy", Network: imaging.PolicyNetworkProduction, ContractID: "test_contract", PolicySetID: "test_policy_set", }).Return(nil, fmt.Errorf("%s: %w", imaging.ErrGetPolicy, &imaging.Error{Status: http.StatusNotFound})).Once() - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 1) + expectReadPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyOutput, 1) - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set") - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set") + expectDeletePolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging) + expectDeletePolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ @@ -588,11 +652,11 @@ func TestResourcePolicyVideo(t *testing.T) { testDir := "testdata/TestResPolicyVideo/invalid_field_transformation_policy" client := new(imaging.Mock) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 2) + expectUpsertPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyInput) + expectReadPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyOutput, 2) - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set") - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set") + expectDeletePolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging) + expectDeletePolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ @@ -625,7 +689,7 @@ func TestResourcePolicyVideo(t *testing.T) { Detail: "Unable to parse element 'output' in JSON.", ProblemID: "52a21f40-9861-4d35-95d0-a603c85cb2ad", } - expectUpsertPolicyWithError(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput, &withError) + expectUpsertPolicyWithError(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyInput, &withError) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ @@ -644,11 +708,11 @@ func TestResourcePolicyVideo(t *testing.T) { testDir := "testdata/TestResPolicyVideo/regular_policy" client := new(imaging.Mock) - expectUpsertPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyInput) - expectReadPolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set", &policyOutput, 2) + expectUpsertPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyInput) + expectReadPolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging, &policyOutput, 2) - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkStaging, "test_contract", "test_policy_set") - expectDeletePolicy(t, client, "test_policy", imaging.PolicyNetworkProduction, "test_contract", "test_policy_set") + expectDeletePolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkStaging) + expectDeletePolicy(client, "test_policy", "test_contract", "test_policy_set", imaging.PolicyNetworkProduction) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ From 7b3acf8c7327159299b26909a9094fb2e29f36d7 Mon Sep 17 00:00:00 2001 From: Jakub Bilski Date: Tue, 20 Feb 2024 15:39:25 +0000 Subject: [PATCH 03/52] DXE-3485 Allows empty value for match rules `json` --- CHANGELOG.md | 11 ++++- ...cloudlets_api_prioritization_match_rule.go | 2 +- ...lets_api_prioritization_match_rule_test.go | 16 ++++---- ...ts_application_load_balancer_match_rule.go | 2 +- ...plication_load_balancer_match_rule_test.go | 20 +++++---- ...udlets_audience_segmentation_match_rule.go | 2 +- ...s_audience_segmentation_match_rule_test.go | 21 ++++++---- ...ai_cloudlets_edge_redirector_match_rule.go | 2 +- ...oudlets_edge_redirector_match_rule_test.go | 41 +++++++++++++++---- ...ai_cloudlets_forward_rewrite_match_rule.go | 2 +- ...oudlets_forward_rewrite_match_rule_test.go | 19 +++++---- ...mai_cloudlets_phased_release_match_rule.go | 2 +- ...loudlets_phased_release_match_rule_test.go | 17 ++++---- ...ai_cloudlets_request_control_match_rule.go | 2 +- ...oudlets_request_control_match_rule_test.go | 20 +++++---- ...dlets_visitor_prioritization_match_rule.go | 2 +- ..._visitor_prioritization_match_rule_test.go | 16 ++++---- pkg/providers/cloudlets/match_rules.go | 14 +++++++ .../no_match_rules.tf | 5 +++ .../no_match_rules.tf | 5 +++ .../no_match_rules.tf | 5 +++ .../no_match_rules.tf | 5 +++ .../no_match_rules.tf | 5 +++ .../no_match_rules.tf | 5 +++ .../no_match_rules.tf | 5 +++ .../no_match_rules.tf | 5 +++ 26 files changed, 179 insertions(+), 72 deletions(-) create mode 100644 pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/no_match_rules.tf create mode 100644 pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/no_match_rules.tf create mode 100644 pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/no_match_rules.tf create mode 100644 pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/no_match_rules.tf create mode 100644 pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/no_match_rules.tf create mode 100644 pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/no_match_rules.tf create mode 100644 pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/no_match_rules.tf create mode 100644 pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/no_match_rules.tf diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d5a18f57..cb395ac61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -63,7 +63,16 @@ #### BUG FIXES: - +* Cloudlets + * Allowed empty value for match rules `json` attribute for data sources: + * `akamai_cloudlets_api_prioritization_match_rule` + * `akamai_cloudlets_application_load_balancer_match_rule` + * `akamai_cloudlets_audience_segmentation_match_rule` + * `akamai_cloudlets_edge_redirector_match_rule` + * `akamai_cloudlets_forward_rewrite_match_rule` + * `akamai_cloudlets_phased_release_match_rule` + * `akamai_cloudlets_request_control_match_rule` + * `akamai_cloudlets_visitor_prioritization_match_rule` diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule.go b/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule.go index 121c7bc80..87d2e8b7b 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule.go @@ -192,7 +192,7 @@ func dataSourceCloudletsAPIPrioritizationMatchRule() *schema.Resource { func dataSourceCloudletsAPIPrioritizationMatchRuleRead(_ context.Context, d *schema.ResourceData, _ interface{}) diag.Diagnostics { matchRulesList, err := tf.GetListValue("match_rules", d) if err != nil { - return diag.FromErr(err) + return handleEmptyMatchRules(err, d, "data_akamai_cloudlets_api_prioritization_match_rule") } if err := setMatchRuleSchemaType(matchRulesList, cloudlets.MatchRuleTypeAP); err != nil { diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule_test.go index 696b6cc0b..fa5556912 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule_test.go @@ -17,6 +17,7 @@ func TestDataCloudletsAPIPrioritizationMatchRule(t *testing.T) { configPath string expectedJSONPath string matchRulesSize int + emptyRules bool }{ "valid all vars map": { configPath: fmt.Sprintf("%s/vars_map.tf", workdir), @@ -38,6 +39,10 @@ func TestDataCloudletsAPIPrioritizationMatchRule(t *testing.T) { expectedJSONPath: fmt.Sprintf("%s/rules/omv_object_rules.json", workdir), matchRulesSize: 1, }, + "no match rules": { + configPath: fmt.Sprintf("%s/no_match_rules.tf", workdir), + emptyRules: true, + }, } for name, test := range tests { t.Run(name, func(t *testing.T) { @@ -46,15 +51,8 @@ func TestDataCloudletsAPIPrioritizationMatchRule(t *testing.T) { Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), - Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttr( - "data.akamai_cloudlets_api_prioritization_match_rule.test", "json", - testutils.LoadFixtureString(t, test.expectedJSONPath)), - resource.TestCheckResourceAttr( - "data.akamai_cloudlets_api_prioritization_match_rule.test", "match_rules.0.type", "apMatchRule"), - resource.TestCheckResourceAttr( - "data.akamai_cloudlets_api_prioritization_match_rule.test", "match_rules.#", strconv.Itoa(test.matchRulesSize)), - ), + Check: checkMatchRulesAttr(t, "apMatchRule", "data.akamai_cloudlets_api_prioritization_match_rule.test", + test.expectedJSONPath, test.emptyRules, test.matchRulesSize), }, }, }) diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule.go b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule.go index 35f54f231..8ddbeff0e 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule.go @@ -210,7 +210,7 @@ func dataSourceCloudletsApplicationLoadBalancerMatchRule() *schema.Resource { func dataSourceCloudletsLoadBalancerMatchRuleRead(_ context.Context, d *schema.ResourceData, _ interface{}) diag.Diagnostics { matchRules, err := tf.GetListValue("match_rules", d) if err != nil { - return diag.FromErr(err) + return handleEmptyMatchRules(err, d, "data_akamai_cloudlets_application_load_balancer_match_rule") } err = setMatchRuleSchemaType(matchRules, cloudlets.MatchRuleTypeALB) diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule_test.go index 24db0a3ae..dd8af1a28 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule_test.go @@ -13,26 +13,37 @@ func TestDataCloudletsLoadBalancerMatchRule(t *testing.T) { tests := map[string]struct { configPath string expectedJSONPath string + matchRulesSize int + emptyRules bool }{ "basic valid rule set": { configPath: "testdata/TestDataCloudletsLoadBalancerMatchRule/basic.tf", expectedJSONPath: "testdata/TestDataCloudletsLoadBalancerMatchRule/rules/basic_rules.json", + matchRulesSize: 1, }, "match criteria ALB - ObjectMatchValue of Object type": { configPath: "testdata/TestDataCloudletsLoadBalancerMatchRule/omv_object.tf", expectedJSONPath: "testdata/TestDataCloudletsLoadBalancerMatchRule/rules/omv_object_rules.json", + matchRulesSize: 2, }, "match criteria ALB - ObjectMatchValue of Range type": { configPath: "testdata/TestDataCloudletsLoadBalancerMatchRule/omv_range.tf", expectedJSONPath: "testdata/TestDataCloudletsLoadBalancerMatchRule/rules/omv_range_rules.json", + matchRulesSize: 1, }, "match criteria ALB - ObjectMatchValue of Simple type": { configPath: "testdata/TestDataCloudletsLoadBalancerMatchRule/omv_simple.tf", expectedJSONPath: "testdata/TestDataCloudletsLoadBalancerMatchRule/rules/omv_simple_rules.json", + matchRulesSize: 2, }, "match criteria ALB - without ObjectMatchValue": { configPath: "testdata/TestDataCloudletsLoadBalancerMatchRule/omv_empty.tf", expectedJSONPath: "testdata/TestDataCloudletsLoadBalancerMatchRule/rules/omv_empty_rules.json", + matchRulesSize: 2, + }, + "no match rules": { + configPath: "testdata/TestDataCloudletsLoadBalancerMatchRule/no_match_rules.tf", + emptyRules: true, }, } @@ -43,13 +54,8 @@ func TestDataCloudletsLoadBalancerMatchRule(t *testing.T) { Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), - Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttr( - "data.akamai_cloudlets_application_load_balancer_match_rule.test", "json", - testutils.LoadFixtureString(t, test.expectedJSONPath)), - resource.TestCheckResourceAttr( - "data.akamai_cloudlets_application_load_balancer_match_rule.test", "match_rules.0.type", "albMatchRule"), - ), + Check: checkMatchRulesAttr(t, "albMatchRule", "data.akamai_cloudlets_application_load_balancer_match_rule.test", + test.expectedJSONPath, test.emptyRules, test.matchRulesSize), }, }, }) diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule.go b/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule.go index c1f6187b7..f6e0f132f 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule.go @@ -215,7 +215,7 @@ func dataSourceCloudletsAudienceSegmentationMatchRule() *schema.Resource { func dataSourceCloudletsAudienceSegmentationMatchRuleRead(_ context.Context, d *schema.ResourceData, _ interface{}) diag.Diagnostics { matchRulesList, err := tf.GetListValue("match_rules", d) if err != nil { - return diag.FromErr(err) + return handleEmptyMatchRules(err, d, "data_akamai_cloudlets_audience_segmentation_match_rule") } if err = setMatchRuleSchemaType(matchRulesList, cloudlets.MatchRuleTypeAS); err != nil { diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule_test.go index 9f21b6a0a..eb10e199c 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule_test.go @@ -12,30 +12,42 @@ func TestDataCloudletsAudienceSegmentationMatchRule(t *testing.T) { tests := map[string]struct { configPath string expectedJSONPath string + matchRulesSize int + emptyRules bool }{ "basic valid rule set": { configPath: "testdata/TestDataCloudletsAudienceSegmentationMatchRule/basic.tf", expectedJSONPath: "testdata/TestDataCloudletsAudienceSegmentationMatchRule/rules/basic_rules.json", + matchRulesSize: 1, }, "valid rule set with simple value": { configPath: "testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_simple.tf", expectedJSONPath: "testdata/TestDataCloudletsAudienceSegmentationMatchRule/rules/omv_simple_rules.json", + matchRulesSize: 1, }, "valid rule set with object value": { configPath: "testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_object.tf", expectedJSONPath: "testdata/TestDataCloudletsAudienceSegmentationMatchRule/rules/omv_object_rules.json", + matchRulesSize: 1, }, "valid rule set with range value": { configPath: "testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_range.tf", expectedJSONPath: "testdata/TestDataCloudletsAudienceSegmentationMatchRule/rules/omv_range_rules.json", + matchRulesSize: 1, }, "valid rule set without value": { configPath: "testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_empty.tf", expectedJSONPath: "testdata/TestDataCloudletsAudienceSegmentationMatchRule/rules/omv_empty_rules.json", + matchRulesSize: 1, }, "valid complex rule set": { configPath: "testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_complex.tf", expectedJSONPath: "testdata/TestDataCloudletsAudienceSegmentationMatchRule/rules/omv_complex_rules.json", + matchRulesSize: 3, + }, + "no match rules": { + configPath: "testdata/TestDataCloudletsAudienceSegmentationMatchRule/no_match_rules.tf", + emptyRules: true, }, } @@ -46,13 +58,8 @@ func TestDataCloudletsAudienceSegmentationMatchRule(t *testing.T) { Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), - Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttr( - "data.akamai_cloudlets_audience_segmentation_match_rule.test", "json", - testutils.LoadFixtureString(t, test.expectedJSONPath)), - resource.TestCheckResourceAttr( - "data.akamai_cloudlets_audience_segmentation_match_rule.test", "match_rules.0.type", "asMatchRule"), - ), + Check: checkMatchRulesAttr(t, "asMatchRule", "data.akamai_cloudlets_audience_segmentation_match_rule.test", + test.expectedJSONPath, test.emptyRules, test.matchRulesSize), }, }, }) diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule.go b/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule.go index b633e7c7b..b386d84f1 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule.go @@ -215,7 +215,7 @@ func dataSourceCloudletsEdgeRedirectorMatchRule() *schema.Resource { func akamaiCloudletsEdgeRedirectorMatchRuleRead(_ context.Context, d *schema.ResourceData, _ interface{}) diag.Diagnostics { matchRulesList, err := tf.GetListValue("match_rules", d) if err != nil { - return diag.FromErr(err) + return handleEmptyMatchRules(err, d, "data_akamai_cloudlets_edge_redirector_match_rule") } err = setMatchRuleSchemaType(matchRulesList, cloudlets.MatchRuleTypeER) diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule_test.go index d3e120846..e42575f9a 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule_test.go @@ -2,6 +2,7 @@ package cloudlets import ( "regexp" + "strconv" "testing" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" @@ -12,34 +13,47 @@ func TestDataCloudletsEdgeRedirectorMatchRule(t *testing.T) { tests := map[string]struct { configPath string expectedJSONPath string + matchRulesSize int + emptyRules bool }{ "valid all vars map": { configPath: "testdata/TestDataCloudletsEdgeRedirectorMatchRule/vars_map.tf", expectedJSONPath: "testdata/TestDataCloudletsEdgeRedirectorMatchRule/rules/rules_out.json", + matchRulesSize: 3, }, "valid minimal vars map": { configPath: "testdata/TestDataCloudletsEdgeRedirectorMatchRule/minimal_vars_map.tf", expectedJSONPath: "testdata/TestDataCloudletsEdgeRedirectorMatchRule/rules/minimal_rules_out.json", + matchRulesSize: 1, }, "valid vars map wth empty use_relative_url": { configPath: "testdata/TestDataCloudletsEdgeRedirectorMatchRule/empty_relative_url_vars_map.tf", expectedJSONPath: "testdata/TestDataCloudletsEdgeRedirectorMatchRule/rules/empty_relative_url_rules_out.json", + matchRulesSize: 2, }, "match criteria ER - without ObjectMatchValue": { configPath: "testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_empty.tf", expectedJSONPath: "testdata/TestDataCloudletsEdgeRedirectorMatchRule/rules/omv_empty_rules.json", + matchRulesSize: 1, }, "match criteria ER -ObjectMatchValue of Simple type": { configPath: "testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_simple.tf", expectedJSONPath: "testdata/TestDataCloudletsEdgeRedirectorMatchRule/rules/omv_simple_rules.json", + matchRulesSize: 1, }, "match criteria ER -ObjectMatchValue of Object type": { configPath: "testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_object.tf", expectedJSONPath: "testdata/TestDataCloudletsEdgeRedirectorMatchRule/rules/omv_object_rules.json", + matchRulesSize: 1, }, "matches always": { configPath: "testdata/TestDataCloudletsEdgeRedirectorMatchRule/matches_always.tf", expectedJSONPath: "testdata/TestDataCloudletsEdgeRedirectorMatchRule/rules/matches_always.json", + matchRulesSize: 1, + }, + "no match rules": { + configPath: "testdata/TestDataCloudletsEdgeRedirectorMatchRule/no_match_rules.tf", + emptyRules: true, }, } for name, test := range tests { @@ -49,13 +63,8 @@ func TestDataCloudletsEdgeRedirectorMatchRule(t *testing.T) { Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), - Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttr( - "data.akamai_cloudlets_edge_redirector_match_rule.test", "json", - testutils.LoadFixtureString(t, test.expectedJSONPath)), - resource.TestCheckResourceAttr( - "data.akamai_cloudlets_edge_redirector_match_rule.test", "match_rules.0.type", "erMatchRule"), - ), + Check: checkMatchRulesAttr(t, "erMatchRule", "data.akamai_cloudlets_edge_redirector_match_rule.test", + test.expectedJSONPath, test.emptyRules, test.matchRulesSize), }, }, }) @@ -119,3 +128,21 @@ func TestIncorrectDataCloudletsEdgeRedirectorMatchRule(t *testing.T) { }) } } + +func checkMatchRulesAttr(t *testing.T, matchRulesType, dataSourceName, jsonPath string, emptyRules bool, matchRuleSize int) resource.TestCheckFunc { + if emptyRules { + return resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr( + dataSourceName, "json", ""), + ) + } + return resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr( + dataSourceName, "json", + testutils.LoadFixtureString(t, jsonPath)), + resource.TestCheckResourceAttr( + dataSourceName, "match_rules.0.type", matchRulesType), + resource.TestCheckResourceAttr( + dataSourceName, "match_rules.#", strconv.Itoa(matchRuleSize)), + ) +} diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule.go b/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule.go index a501eb6c6..febd96391 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule.go @@ -215,7 +215,7 @@ func dataSourceCloudletsForwardRewriteMatchRule() *schema.Resource { func dataSourceCloudletsForwardRewriteMatchRuleRead(_ context.Context, d *schema.ResourceData, _ interface{}) diag.Diagnostics { matchRulesList, err := tf.GetListValue("match_rules", d) if err != nil { - return diag.FromErr(err) + return handleEmptyMatchRules(err, d, "data_akamai_cloudlets_forward_rewrite_match_rule") } if err = setMatchRuleSchemaType(matchRulesList, cloudlets.MatchRuleTypeFR); err != nil { diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule_test.go index 689dc8daf..42fbe4c66 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule_test.go @@ -13,22 +13,32 @@ func TestDataCloudletsForwardRewriteMatchRule(t *testing.T) { tests := map[string]struct { configPath string expectedJSONPath string + matchRulesSize int + emptyRules bool }{ "basic valid rule set": { configPath: "testdata/TestDataCloudletsForwardRewriteMatchRule/basic.tf", expectedJSONPath: "testdata/TestDataCloudletsForwardRewriteMatchRule/rules/basic_rules.json", + matchRulesSize: 1, }, "match criteria FR - ObjectMatchValue of Object type": { configPath: "testdata/TestDataCloudletsForwardRewriteMatchRule/omv_object.tf", expectedJSONPath: "testdata/TestDataCloudletsForwardRewriteMatchRule/rules/omv_object_rules.json", + matchRulesSize: 2, }, "match criteria FR - ObjectMatchValue of Simple type": { configPath: "testdata/TestDataCloudletsForwardRewriteMatchRule/omv_simple.tf", expectedJSONPath: "testdata/TestDataCloudletsForwardRewriteMatchRule/rules/omv_simple_rules.json", + matchRulesSize: 2, }, "match criteria FR - without ObjectMatchValue": { configPath: "testdata/TestDataCloudletsForwardRewriteMatchRule/omv_empty.tf", expectedJSONPath: "testdata/TestDataCloudletsForwardRewriteMatchRule/rules/omv_empty_rules.json", + matchRulesSize: 2, + }, + "no match rules": { + configPath: "testdata/TestDataCloudletsForwardRewriteMatchRule/no_match_rules.tf", + emptyRules: true, }, } @@ -39,13 +49,8 @@ func TestDataCloudletsForwardRewriteMatchRule(t *testing.T) { Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), - Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttr( - "data.akamai_cloudlets_forward_rewrite_match_rule.test", "json", - testutils.LoadFixtureString(t, test.expectedJSONPath)), - resource.TestCheckResourceAttr( - "data.akamai_cloudlets_forward_rewrite_match_rule.test", "match_rules.0.type", "frMatchRule"), - ), + Check: checkMatchRulesAttr(t, "frMatchRule", "data.akamai_cloudlets_forward_rewrite_match_rule.test", + test.expectedJSONPath, test.emptyRules, test.matchRulesSize), }, }, }) diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule.go b/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule.go index 036978747..0d6330360 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule.go @@ -213,7 +213,7 @@ func dataSourceCloudletsPhasedReleaseMatchRule() *schema.Resource { func dataSourcePhasedReleaseMatchRuleRead(_ context.Context, d *schema.ResourceData, _ interface{}) diag.Diagnostics { matchRulesList, err := tf.GetListValue("match_rules", d) if err != nil { - return diag.FromErr(err) + return handleEmptyMatchRules(err, d, "data_akamai_cloudlets_phased_release_match_rule") } if err = setMatchRuleSchemaType(matchRulesList, cloudlets.MatchRuleTypePR); err != nil { diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule_test.go index 25ea200eb..fffed79c5 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule_test.go @@ -2,7 +2,6 @@ package cloudlets import ( "regexp" - "strconv" "testing" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" @@ -15,6 +14,7 @@ func TestDataCloudletsPhasedReleaseMatchRule(t *testing.T) { configPath string expectedJSONPath string matchRulesSize int + emptyRules bool }{ "basic valid rule set": { configPath: "testdata/TestDataCloudletsPhasedReleaseMatchRule/basic.tf", @@ -36,6 +36,10 @@ func TestDataCloudletsPhasedReleaseMatchRule(t *testing.T) { expectedJSONPath: "testdata/TestDataCloudletsPhasedReleaseMatchRule/rules/omv_empty_rules.json", matchRulesSize: 2, }, + "no match rules": { + configPath: "testdata/TestDataCloudletsPhasedReleaseMatchRule/no_match_rules.tf", + emptyRules: true, + }, } for name, test := range tests { @@ -45,15 +49,8 @@ func TestDataCloudletsPhasedReleaseMatchRule(t *testing.T) { Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), - Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttr( - "data.akamai_cloudlets_phased_release_match_rule.test", "json", - testutils.LoadFixtureString(t, test.expectedJSONPath)), - resource.TestCheckResourceAttr( - "data.akamai_cloudlets_phased_release_match_rule.test", "match_rules.0.type", "cdMatchRule"), - resource.TestCheckResourceAttr( - "data.akamai_cloudlets_phased_release_match_rule.test", "match_rules.#", strconv.Itoa(test.matchRulesSize)), - ), + Check: checkMatchRulesAttr(t, "cdMatchRule", "data.akamai_cloudlets_phased_release_match_rule.test", + test.expectedJSONPath, test.emptyRules, test.matchRulesSize), }, }, }) diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule.go b/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule.go index 115c606c3..5643d4806 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule.go @@ -193,7 +193,7 @@ func dataSourceCloudletsRequestControlMatchRule() *schema.Resource { func dataSourceCloudletsRequestControlMatchRuleRead(_ context.Context, d *schema.ResourceData, _ interface{}) diag.Diagnostics { matchRulesList, err := tf.GetListValue("match_rules", d) if err != nil { - return diag.FromErr(err) + return handleEmptyMatchRules(err, d, "data_akamai_cloudlets_request_control_match_rule") } if err := setMatchRuleSchemaType(matchRulesList, cloudlets.MatchRuleTypeRC); err != nil { diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule_test.go index e8903f6dc..e055112ae 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule_test.go @@ -12,26 +12,37 @@ func TestDataCloudletsRequestControlMatchRule(t *testing.T) { tests := map[string]struct { configPath string expectedJSONPath string + matchRulesSize int + emptyRules bool }{ "basic valid rule set": { configPath: "testdata/TestDataCloudletsRequestControlMatchRule/basic.tf", expectedJSONPath: "testdata/TestDataCloudletsRequestControlMatchRule/rules/basic_rules.json", + matchRulesSize: 1, }, "valid rule set with simple value": { configPath: "testdata/TestDataCloudletsRequestControlMatchRule/omv_simple.tf", expectedJSONPath: "testdata/TestDataCloudletsRequestControlMatchRule/rules/omv_simple_rules.json", + matchRulesSize: 1, }, "valid rule set with object value": { configPath: "testdata/TestDataCloudletsRequestControlMatchRule/omv_object.tf", expectedJSONPath: "testdata/TestDataCloudletsRequestControlMatchRule/rules/omv_object_rules.json", + matchRulesSize: 1, }, "valid rule set without value": { configPath: "testdata/TestDataCloudletsRequestControlMatchRule/omv_empty.tf", expectedJSONPath: "testdata/TestDataCloudletsRequestControlMatchRule/rules/omv_empty_rules.json", + matchRulesSize: 1, }, "valid complex rule set": { configPath: "testdata/TestDataCloudletsRequestControlMatchRule/omv_complex.tf", expectedJSONPath: "testdata/TestDataCloudletsRequestControlMatchRule/rules/omv_complex_rules.json", + matchRulesSize: 2, + }, + "no match rules": { + configPath: "testdata/TestDataCloudletsRequestControlMatchRule/no_match_rules.tf", + emptyRules: true, }, } @@ -42,13 +53,8 @@ func TestDataCloudletsRequestControlMatchRule(t *testing.T) { Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), - Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttr( - "data.akamai_cloudlets_request_control_match_rule.test", "json", - testutils.LoadFixtureString(t, test.expectedJSONPath)), - resource.TestCheckResourceAttr( - "data.akamai_cloudlets_request_control_match_rule.test", "match_rules.0.type", "igMatchRule"), - ), + Check: checkMatchRulesAttr(t, "igMatchRule", "data.akamai_cloudlets_request_control_match_rule.test", + test.expectedJSONPath, test.emptyRules, test.matchRulesSize), }, }, }) diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule.go b/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule.go index 6c5d01955..a13e3ed35 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule.go @@ -192,7 +192,7 @@ func dataSourceCloudletsVisitorPrioritizationMatchRule() *schema.Resource { func dataSourceCloudletsVisitorPrioritizationMatchRuleRead(_ context.Context, d *schema.ResourceData, _ interface{}) diag.Diagnostics { matchRulesList, err := tf.GetListValue("match_rules", d) if err != nil { - return diag.FromErr(err) + return handleEmptyMatchRules(err, d, "data_akamai_cloudlets_visitor_prioritization_match_rule") } if err := setMatchRuleSchemaType(matchRulesList, cloudlets.MatchRuleTypeVP); err != nil { diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule_test.go index 8e8a99768..113198350 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule_test.go @@ -17,6 +17,7 @@ func TestDataCloudletsVisitorPrioritizationMatchRule(t *testing.T) { configPath string expectedJSONPath string matchRulesSize int + emptyRules bool }{ "valid all vars map": { configPath: fmt.Sprintf("%s/vars_map.tf", workdir), @@ -38,6 +39,10 @@ func TestDataCloudletsVisitorPrioritizationMatchRule(t *testing.T) { expectedJSONPath: fmt.Sprintf("%s/rules/omv_object_rules.json", workdir), matchRulesSize: 1, }, + "no match rules": { + configPath: fmt.Sprintf("%s/no_match_rules.tf", workdir), + emptyRules: true, + }, } for name, test := range tests { t.Run(name, func(t *testing.T) { @@ -46,15 +51,8 @@ func TestDataCloudletsVisitorPrioritizationMatchRule(t *testing.T) { Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), - Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttr( - "data.akamai_cloudlets_visitor_prioritization_match_rule.test", "json", - testutils.LoadFixtureString(t, test.expectedJSONPath)), - resource.TestCheckResourceAttr( - "data.akamai_cloudlets_visitor_prioritization_match_rule.test", "match_rules.0.type", "vpMatchRule"), - resource.TestCheckResourceAttr( - "data.akamai_cloudlets_visitor_prioritization_match_rule.test", "match_rules.#", strconv.Itoa(test.matchRulesSize)), - ), + Check: checkMatchRulesAttr(t, "vpMatchRule", "data.akamai_cloudlets_visitor_prioritization_match_rule.test", + test.expectedJSONPath, test.emptyRules, test.matchRulesSize), }, }, }) diff --git a/pkg/providers/cloudlets/match_rules.go b/pkg/providers/cloudlets/match_rules.go index 8758eba96..2a80023f1 100644 --- a/pkg/providers/cloudlets/match_rules.go +++ b/pkg/providers/cloudlets/match_rules.go @@ -3,10 +3,13 @@ package cloudlets import ( "crypto/sha1" "encoding/hex" + "errors" "fmt" "io" "strconv" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" @@ -176,6 +179,17 @@ func parseObjectMatchValue(criteriaMap map[string]interface{}, handler objectMat return nil, nil } +func handleEmptyMatchRules(err error, d *schema.ResourceData, dataSourceID string) diag.Diagnostics { + if errors.Is(err, tf.ErrNotFound) { + if err := d.Set("json", ""); err != nil { + return diag.Errorf("%v: %s", tf.ErrValueSet, err.Error()) + } + d.SetId(dataSourceID) + return nil + } + return diag.FromErr(err) +} + func getObjectMatchValueObjectOrSimpleOrRange(omv map[string]interface{}, t string) (interface{}, error) { if cloudlets.ObjectMatchValueObjectType(t) == cloudlets.Object { return getOMVObjectType(omv) diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/no_match_rules.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/no_match_rules.tf new file mode 100644 index 000000000..ed58c218a --- /dev/null +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/no_match_rules.tf @@ -0,0 +1,5 @@ +provider "akamai" { + edgerc = "../../test/edgerc" +} + +data "akamai_cloudlets_api_prioritization_match_rule" "test" {} \ No newline at end of file diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/no_match_rules.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/no_match_rules.tf new file mode 100644 index 000000000..007910461 --- /dev/null +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/no_match_rules.tf @@ -0,0 +1,5 @@ +provider "akamai" { + edgerc = "../../test/edgerc" +} + +data "akamai_cloudlets_audience_segmentation_match_rule" "test" {} \ No newline at end of file diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/no_match_rules.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/no_match_rules.tf new file mode 100644 index 000000000..7d96c1557 --- /dev/null +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/no_match_rules.tf @@ -0,0 +1,5 @@ +provider "akamai" { + edgerc = "../../test/edgerc" +} + +data "akamai_cloudlets_edge_redirector_match_rule" "test" {} \ No newline at end of file diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/no_match_rules.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/no_match_rules.tf new file mode 100644 index 000000000..a7b9b1f9c --- /dev/null +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/no_match_rules.tf @@ -0,0 +1,5 @@ +provider "akamai" { + edgerc = "../../test/edgerc" +} + +data "akamai_cloudlets_forward_rewrite_match_rule" "test" {} \ No newline at end of file diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/no_match_rules.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/no_match_rules.tf new file mode 100644 index 000000000..29977f246 --- /dev/null +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/no_match_rules.tf @@ -0,0 +1,5 @@ +provider "akamai" { + edgerc = "../../test/edgerc" +} + +data "akamai_cloudlets_application_load_balancer_match_rule" "test" {} \ No newline at end of file diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/no_match_rules.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/no_match_rules.tf new file mode 100644 index 000000000..e06765b6d --- /dev/null +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/no_match_rules.tf @@ -0,0 +1,5 @@ +provider "akamai" { + edgerc = "../../test/edgerc" +} + +data "akamai_cloudlets_phased_release_match_rule" "test" {} \ No newline at end of file diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/no_match_rules.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/no_match_rules.tf new file mode 100644 index 000000000..44d296a0e --- /dev/null +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/no_match_rules.tf @@ -0,0 +1,5 @@ +provider "akamai" { + edgerc = "../../test/edgerc" +} + +data "akamai_cloudlets_request_control_match_rule" "test" {} \ No newline at end of file diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/no_match_rules.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/no_match_rules.tf new file mode 100644 index 000000000..7faecc422 --- /dev/null +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/no_match_rules.tf @@ -0,0 +1,5 @@ +provider "akamai" { + edgerc = "../../test/edgerc" +} + +data "akamai_cloudlets_visitor_prioritization_match_rule" "test" {} \ No newline at end of file From 57190364e159ccfa236885e36752e2bcdaa4d5d0 Mon Sep 17 00:00:00 2001 From: Filip Antkowiak Date: Wed, 21 Feb 2024 10:33:26 +0000 Subject: [PATCH 04/52] DXE-3395 Improve datasource akamai_property --- CHANGELOG.md | 4 + .../property/data_akamai_property.go | 108 ++++++++- .../property/data_akamai_property_test.go | 215 +++++++++++++++++- 3 files changed, 306 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb395ac61..4a56db194 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,10 @@ #### FEATURES/ENHANCEMENTS: +* PAPI + * Added attributes to akamai_property datasource: + * `contract_id`, `group_id`, `latest_version`, `note`, `production_version`, `product_id`, `property_id`, `rule_format`, `staging_version` + * IMAGING * In the event of an API failure during a policy update, reverting to the previous state. * When performing the read operation, if `activate_on_production` is true, fetch the policy state from the production network; otherwise, obtain it from the staging environment. diff --git a/pkg/providers/property/data_akamai_property.go b/pkg/providers/property/data_akamai_property.go index f841ec896..b3cb3749a 100644 --- a/pkg/providers/property/data_akamai_property.go +++ b/pkg/providers/property/data_akamai_property.go @@ -19,16 +19,64 @@ func dataSourceProperty() *schema.Resource { ReadContext: dataPropertyRead, Schema: map[string]*schema.Schema{ "name": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: "The name of property.", }, "version": { - Type: schema.TypeInt, - Optional: true, + Type: schema.TypeInt, + Optional: true, + Description: "The current version of the property.", + }, + "contract_id": { + Type: schema.TypeString, + Computed: true, + Description: "Contract ID assigned to the property.", + }, + "group_id": { + Type: schema.TypeString, + Computed: true, + Description: "Group ID assigned to the property.", + }, + "latest_version": { + Type: schema.TypeInt, + Computed: true, + Description: "Property's current latest version.", + }, + "note": { + Type: schema.TypeString, + Computed: true, + Description: "The client property notes.", + }, + "production_version": { + Type: schema.TypeInt, + Computed: true, + Description: "Property's version currently activated in production (zero when not active in production).", + }, + "product_id": { + Type: schema.TypeString, + Computed: true, + Description: "Product ID assigned to the property.", + }, + "property_id": { + Type: schema.TypeString, + Computed: true, + Description: "The identifier of the property.", }, "rules": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: "Property rules as JSON.", + }, + "rule_format": { + Type: schema.TypeString, + Computed: true, + Description: "Rule format version.", + }, + "staging_version": { + Type: schema.TypeInt, + Computed: true, + Description: "Property's version currently activated in staging (zero when not active in staging).", }, }, } @@ -47,7 +95,6 @@ func dataPropertyRead(ctx context.Context, d *schema.ResourceData, m interface{} if err != nil { return diag.FromErr(err) } - version, err := tf.GetIntValue("version", d) if err != nil && !errors.Is(err, tf.ErrNotFound) { return diag.FromErr(err) @@ -58,7 +105,7 @@ func dataPropertyRead(ctx context.Context, d *schema.ResourceData, m interface{} rules, err := getRulesForProperty(ctx, prop, meta) if err != nil { - return diag.FromErr(fmt.Errorf("%w: %s", ErrRulesNotFound, err.Error())) + return diag.FromErr(err) } body, err := json.Marshal(rules) @@ -66,12 +113,39 @@ func dataPropertyRead(ctx context.Context, d *schema.ResourceData, m interface{} return diag.FromErr(err) } if err := d.Set("rules", string(body)); err != nil { - return diag.FromErr(fmt.Errorf("%w:%q", tf.ErrValueSet, err.Error())) + return diag.FromErr(fmt.Errorf("%w: %q", tf.ErrValueSet, err.Error())) + } + + propVersion, err := getPropertyVersion(ctx, meta, prop) + if err != nil { + return diag.FromErr(err) + } + + propertyAttr := getPropertyAttributes(prop, propVersion) + err = tf.SetAttrs(d, propertyAttr) + if err != nil { + return diag.FromErr(fmt.Errorf("%w: %q", tf.ErrValueSet, err.Error())) } + d.SetId(prop.PropertyID) return nil } +func getPropertyVersion(ctx context.Context, meta meta.Meta, property *papi.Property) (*papi.GetPropertyVersionsResponse, error) { + client := Client(meta) + req := papi.GetPropertyVersionRequest{ + PropertyID: property.PropertyID, + PropertyVersion: property.LatestVersion, + ContractID: property.ContractID, + GroupID: property.GroupID, + } + resp, err := client.GetPropertyVersion(ctx, req) + if err != nil { + return nil, fmt.Errorf("%w: %s", ErrPropertyVersionNotFound, err.Error()) + } + return resp, nil +} + func getRulesForProperty(ctx context.Context, property *papi.Property, meta meta.Meta) (*papi.GetRuleTreeResponse, error) { client := Client(meta) req := papi.GetRuleTreeRequest{ @@ -86,3 +160,19 @@ func getRulesForProperty(ctx context.Context, property *papi.Property, meta meta } return rules, nil } + +func getPropertyAttributes(propertyResponse *papi.Property, propertyVersionResponse *papi.GetPropertyVersionsResponse) map[string]interface{} { + propertyVersion := propertyVersionResponse.Version + property := map[string]interface{}{ + "contract_id": propertyResponse.ContractID, + "group_id": propertyResponse.GroupID, + "latest_version": propertyResponse.LatestVersion, + "note": propertyVersion.Note, + "product_id": propertyVersion.ProductID, + "production_version": decodeVersion(propertyResponse.ProductionVersion), + "property_id": propertyResponse.PropertyID, + "rule_format": propertyVersion.RuleFormat, + "staging_version": decodeVersion(propertyResponse.StagingVersion), + } + return property +} diff --git a/pkg/providers/property/data_akamai_property_test.go b/pkg/providers/property/data_akamai_property_test.go index e447cc18d..41f520bc0 100644 --- a/pkg/providers/property/data_akamai_property_test.go +++ b/pkg/providers/property/data_akamai_property_test.go @@ -10,6 +10,7 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" ) @@ -45,10 +46,12 @@ func TestDataProperty(t *testing.T) { }).Return(&papi.GetPropertyResponse{ Properties: papi.PropertiesItems{Items: []*papi.Property{ { - PropertyID: "prp_123", - LatestVersion: 1, - ContractID: "ctr_1", - GroupID: "grp_1", + ContractID: "ctr_1", + GroupID: "grp_1", + LatestVersion: 1, + ProductionVersion: tools.IntPtr(1), + PropertyID: "prp_123", + StagingVersion: tools.IntPtr(1), }, }}, }, nil) @@ -74,10 +77,31 @@ func TestDataProperty(t *testing.T) { CriteriaMustSatisfy: "all", }, }, nil) + m.On("GetPropertyVersion", mock.Anything, papi.GetPropertyVersionRequest{ + PropertyID: "prp_123", + PropertyVersion: 1, + ContractID: "ctr_1", + GroupID: "grp_1", + }).Return(&papi.GetPropertyVersionsResponse{ + Version: papi.PropertyVersionGetItem{ + Note: "note", + ProductID: "prd_1", + RuleFormat: "latest", + }, + }, nil) }, expectedAttributes: map[string]string{ - "name": "property_name", - "rules": compactJSON(testutils.LoadFixtureBytes(t, "testdata/TestDataProperty/no_version_rules.json")), + "name": "property_name", + "rules": compactJSON(testutils.LoadFixtureBytes(t, "testdata/TestDataProperty/no_version_rules.json")), + "contract_id": "ctr_1", + "group_id": "grp_1", + "latest_version": "1", + "note": "note", + "product_id": "prd_1", + "production_version": "1", + "property_id": "prp_123", + "rule_format": "latest", + "staging_version": "1", }, }, "valid rules, with version provided": { @@ -104,10 +128,12 @@ func TestDataProperty(t *testing.T) { }).Return(&papi.GetPropertyResponse{ Properties: papi.PropertiesItems{Items: []*papi.Property{ { - PropertyID: "prp_123", - LatestVersion: 1, - ContractID: "ctr_1", - GroupID: "grp_1", + ContractID: "ctr_1", + GroupID: "grp_1", + LatestVersion: 1, + ProductionVersion: tools.IntPtr(2), + PropertyID: "prp_123", + StagingVersion: tools.IntPtr(3), }, }}, }, nil) @@ -133,10 +159,111 @@ func TestDataProperty(t *testing.T) { CriteriaMustSatisfy: "all", }, }, nil) + m.On("GetPropertyVersion", mock.Anything, papi.GetPropertyVersionRequest{ + PropertyID: "prp_123", + PropertyVersion: 2, + ContractID: "ctr_1", + GroupID: "grp_1", + }).Return(&papi.GetPropertyVersionsResponse{ + Version: papi.PropertyVersionGetItem{ + Note: "note", + ProductID: "prd_1", + RuleFormat: "latest", + }, + }, nil) + }, + expectedAttributes: map[string]string{ + "name": "property_name", + "rules": compactJSON(testutils.LoadFixtureBytes(t, "testdata/TestDataProperty/with_version_rules.json")), + "contract_id": "ctr_1", + "group_id": "grp_1", + "latest_version": "2", + "note": "note", + "product_id": "prd_1", + "production_version": "2", + "property_id": "prp_123", + "rule_format": "latest", + "staging_version": "3", + }, + }, + "valid rules, no version provided, no staging & production version returned": { + givenTF: "no_version.tf", + init: func(m *papi.Mock) { + m.On("SearchProperties", mock.Anything, papi.SearchRequest{ + Key: papi.SearchKeyPropertyName, + Value: "property_name", + }).Return(&papi.SearchResponse{ + Versions: papi.SearchItems{ + Items: []papi.SearchItem{ + { + ContractID: "ctr_1", + GroupID: "grp_1", + PropertyID: "prp_123", + }, + }, + }, + }, nil) + m.On("GetProperty", mock.Anything, papi.GetPropertyRequest{ + ContractID: "ctr_1", + GroupID: "grp_1", + PropertyID: "prp_123", + }).Return(&papi.GetPropertyResponse{ + Properties: papi.PropertiesItems{Items: []*papi.Property{ + { + ContractID: "ctr_1", + GroupID: "grp_1", + LatestVersion: 1, + PropertyID: "prp_123", + }, + }}, + }, nil) + m.On("GetRuleTree", mock.Anything, papi.GetRuleTreeRequest{ + PropertyID: "prp_123", + PropertyVersion: 1, + ContractID: "ctr_1", + GroupID: "grp_1", + }).Return(&papi.GetRuleTreeResponse{ + Response: papi.Response{ + ContractID: "ctr_1", + GroupID: "grp_1", + }, + PropertyID: "prp_123", + PropertyVersion: 1, + Rules: papi.Rules{ + Behaviors: []papi.RuleBehavior{ + { + Name: "beh 1", + }, + }, + Name: "rule 1", + CriteriaMustSatisfy: "all", + }, + }, nil) + m.On("GetPropertyVersion", mock.Anything, papi.GetPropertyVersionRequest{ + PropertyID: "prp_123", + PropertyVersion: 1, + ContractID: "ctr_1", + GroupID: "grp_1", + }).Return(&papi.GetPropertyVersionsResponse{ + Version: papi.PropertyVersionGetItem{ + Note: "note", + ProductID: "prd_1", + RuleFormat: "latest", + }, + }, nil) }, expectedAttributes: map[string]string{ - "name": "property_name", - "rules": compactJSON(testutils.LoadFixtureBytes(t, "testdata/TestDataProperty/with_version_rules.json")), + "name": "property_name", + "rules": compactJSON(testutils.LoadFixtureBytes(t, "testdata/TestDataProperty/no_version_rules.json")), + "contract_id": "ctr_1", + "group_id": "grp_1", + "latest_version": "1", + "note": "note", + "product_id": "prd_1", + "production_version": "0", + "property_id": "prp_123", + "rule_format": "latest", + "staging_version": "0", }, }, "error searching for property": { @@ -233,6 +360,70 @@ func TestDataProperty(t *testing.T) { init: func(m *papi.Mock) {}, withError: regexp.MustCompile("Missing required argument"), }, + "error property version not found": { + givenTF: "no_version.tf", + init: func(m *papi.Mock) { + m.On("SearchProperties", mock.Anything, papi.SearchRequest{ + Key: papi.SearchKeyPropertyName, + Value: "property_name", + }).Return(&papi.SearchResponse{ + Versions: papi.SearchItems{ + Items: []papi.SearchItem{ + { + ContractID: "ctr_1", + GroupID: "grp_1", + PropertyID: "prp_123", + }, + }, + }, + }, nil) + m.On("GetProperty", mock.Anything, papi.GetPropertyRequest{ + ContractID: "ctr_1", + GroupID: "grp_1", + PropertyID: "prp_123", + }).Return(&papi.GetPropertyResponse{ + Properties: papi.PropertiesItems{Items: []*papi.Property{ + { + ContractID: "ctr_1", + GroupID: "grp_1", + LatestVersion: 1, + ProductionVersion: tools.IntPtr(1), + PropertyID: "prp_123", + StagingVersion: tools.IntPtr(1), + }, + }}, + }, nil) + m.On("GetRuleTree", mock.Anything, papi.GetRuleTreeRequest{ + PropertyID: "prp_123", + PropertyVersion: 1, + ContractID: "ctr_1", + GroupID: "grp_1", + }).Return(&papi.GetRuleTreeResponse{ + Response: papi.Response{ + ContractID: "ctr_1", + GroupID: "grp_1", + }, + PropertyID: "prp_123", + PropertyVersion: 1, + Rules: papi.Rules{ + Behaviors: []papi.RuleBehavior{ + { + Name: "beh 1", + }, + }, + Name: "rule 1", + CriteriaMustSatisfy: "all", + }, + }, nil) + m.On("GetPropertyVersion", mock.Anything, papi.GetPropertyVersionRequest{ + PropertyID: "prp_123", + PropertyVersion: 1, + ContractID: "ctr_1", + GroupID: "grp_1", + }).Return(nil, fmt.Errorf("oops")) + }, + withError: regexp.MustCompile("oops"), + }, } for name, test := range tests { t.Run(name, func(t *testing.T) { From 9779799184a4ac0f1e58bfb43f90e7b8339cab9f Mon Sep 17 00:00:00 2001 From: Dawid Dzhafarov Date: Wed, 21 Feb 2024 12:36:08 +0000 Subject: [PATCH 05/52] DXE-3261 Change CPS contact fields from required to optional --- CHANGELOG.md | 10 +++++++++- pkg/providers/cps/enrollments.go | 12 ++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a56db194..b01b70d18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -78,7 +78,15 @@ * `akamai_cloudlets_request_control_match_rule` * `akamai_cloudlets_visitor_prioritization_match_rule` - +* CPS + * Changed below fields from required to optional in `akamai_cps_dv_enrollment` and `akamai_cps_third_party_enrollment` + for `admin_contact` and `tech_contact` attributes: + * `organization` + * `address_line_one` + * `city` + * `region` + * `postal_code` + * `country_code` diff --git a/pkg/providers/cps/enrollments.go b/pkg/providers/cps/enrollments.go index cb80dad59..35ffd67bc 100644 --- a/pkg/providers/cps/enrollments.go +++ b/pkg/providers/cps/enrollments.go @@ -57,7 +57,7 @@ var ( }, "organization": { Type: schema.TypeString, - Required: true, + Optional: true, Description: "Organization where contact is hired", }, "email": { @@ -72,7 +72,7 @@ var ( }, "address_line_one": { Type: schema.TypeString, - Required: true, + Optional: true, Description: "The address of the contact", }, "address_line_two": { @@ -82,22 +82,22 @@ var ( }, "city": { Type: schema.TypeString, - Required: true, + Optional: true, Description: "City of residence of the contact", }, "region": { Type: schema.TypeString, - Required: true, + Optional: true, Description: "The region of the contact", }, "postal_code": { Type: schema.TypeString, - Required: true, + Optional: true, Description: "Postal code of the contact", }, "country_code": { Type: schema.TypeString, - Required: true, + Optional: true, Description: "Country code of the contact", }, }, From c829e3691e4886ca791668db0303bb468d4fbfbc Mon Sep 17 00:00:00 2001 From: Dawid Dzhafarov Date: Wed, 20 Sep 2023 07:10:47 +0000 Subject: [PATCH 06/52] DXE-2928 Migrate terraform protocol from version 5 to 6 --- main.go | 28 +++-- pkg/akamai/framework_provider_test.go | 34 +++--- pkg/akamai/plugin_provider.go | 20 +++- pkg/common/testutils/testutils.go | 36 ++++++ ...ed_settings_attack_payload_logging_test.go | 8 +- ...vanced_settings_evasive_path_match_test.go | 4 +- ...i_appsec_advanced_settings_logging_test.go | 4 +- ...sec_advanced_settings_pii_learning_test.go | 8 +- ...ai_appsec_advanced_settings_pragma_test.go | 4 +- ..._appsec_advanced_settings_prefetch_test.go | 4 +- ...sec_advanced_settings_request_body_test.go | 8 +- .../data_akamai_appsec_api_endpoints_test.go | 4 +- ...pi_hostname_coverage_match_targets_test.go | 4 +- ..._api_hostname_coverage_overlapping_test.go | 4 +- ...kamai_appsec_api_hostname_coverage_test.go | 4 +- ...mai_appsec_api_request_constraints_test.go | 4 +- .../data_akamai_appsec_attack_groups_test.go | 4 +- ...akamai_appsec_bypass_network_lists_test.go | 4 +- .../data_akamai_appsec_configuration_test.go | 8 +- ...kamai_appsec_configuration_version_test.go | 4 +- ...ata_akamai_appsec_contracts_groups_test.go | 4 +- .../data_akamai_appsec_custom_deny_test.go | 4 +- ..._akamai_appsec_custom_rule_actions_test.go | 4 +- .../data_akamai_appsec_custom_rules_test.go | 4 +- .../data_akamai_appsec_eval_groups_test.go | 8 +- ...ata_akamai_appsec_eval_penalty_box_test.go | 4 +- .../data_akamai_appsec_eval_rules_test.go | 4 +- .../appsec/data_akamai_appsec_eval_test.go | 4 +- ...akamai_appsec_export_configuration_test.go | 4 +- ...a_akamai_appsec_failover_hostnames_test.go | 4 +- .../appsec/data_akamai_appsec_ip_geo_test.go | 4 +- ...kamai_appsec_malware_content_types_test.go | 4 +- ...ata_akamai_appsec_malware_policies_test.go | 8 +- ...amai_appsec_malware_policy_actions_test.go | 4 +- .../data_akamai_appsec_match_targets_test.go | 4 +- .../data_akamai_appsec_penalty_box_test.go | 4 +- .../data_akamai_appsec_rate_policies_test.go | 4 +- ..._akamai_appsec_rate_policy_actions_test.go | 4 +- ..._akamai_appsec_reputation_analysis_test.go | 4 +- ..._appsec_reputation_profile_actions_test.go | 4 +- ..._akamai_appsec_reputation_profiles_test.go | 4 +- .../data_akamai_appsec_rule_upgrade_test.go | 4 +- .../appsec/data_akamai_appsec_rules_test.go | 4 +- ...appsec_security_policy_protections_test.go | 4 +- ...data_akamai_appsec_security_policy_test.go | 4 +- ...akamai_appsec_selectable_hostnames_test.go | 4 +- ...a_akamai_appsec_selected_hostnames_test.go | 4 +- ...ata_akamai_appsec_siem_definitions_test.go | 4 +- .../data_akamai_appsec_siem_settings_test.go | 4 +- ...psec_slow_post_protection_settings_test.go | 4 +- .../data_akamai_appsec_threat_intel_test.go | 8 +- ...amai_appsec_tuning_recommendations_test.go | 8 +- .../data_akamai_appsec_version_notes_test.go | 4 +- .../data_akamai_appsec_waf_mode_test.go | 4 +- ...amai_appsec_wap_selected_hostnames_test.go | 12 +- pkg/providers/appsec/provider_test.go | 35 ++++-- ...resource_akamai_appsec_activations_test.go | 12 +- ...ed_settings_attack_payload_logging_test.go | 12 +- ...vanced_settings_evasive_path_match_test.go | 4 +- ...i_appsec_advanced_settings_logging_test.go | 4 +- ...sec_advanced_settings_pii_learning_test.go | 8 +- ...ai_appsec_advanced_settings_pragma_test.go | 4 +- ..._appsec_advanced_settings_prefetch_test.go | 4 +- ...sec_advanced_settings_request_body_test.go | 12 +- ..._appsec_api_constraints_protection_test.go | 4 +- ...mai_appsec_api_request_constraints_test.go | 4 +- ...esource_akamai_appsec_attack_group_test.go | 8 +- ...akamai_appsec_bypass_network_lists_test.go | 4 +- ...akamai_appsec_configuration_rename_test.go | 4 +- ...source_akamai_appsec_configuration_test.go | 8 +- ...resource_akamai_appsec_custom_deny_test.go | 4 +- ...e_akamai_appsec_custom_rule_action_test.go | 4 +- ...resource_akamai_appsec_custom_rule_test.go | 8 +- .../resource_akamai_appsec_eval_group_test.go | 8 +- ...rce_akamai_appsec_eval_penalty_box_test.go | 4 +- .../resource_akamai_appsec_eval_rule_test.go | 4 +- .../resource_akamai_appsec_eval_test.go | 4 +- ...ce_akamai_appsec_ip_geo_protection_test.go | 4 +- .../resource_akamai_appsec_ip_geo_test.go | 20 ++-- ...kamai_appsec_malware_policy_action_test.go | 4 +- ...amai_appsec_malware_policy_actions_test.go | 4 +- ...ource_akamai_appsec_malware_policy_test.go | 4 +- ...e_akamai_appsec_malware_protection_test.go | 4 +- ...kamai_appsec_match_target_sequence_test.go | 4 +- ...esource_akamai_appsec_match_target_test.go | 4 +- ...resource_akamai_appsec_penalty_box_test.go | 4 +- ...e_akamai_appsec_rate_policy_action_test.go | 4 +- ...resource_akamai_appsec_rate_policy_test.go | 4 +- ...urce_akamai_appsec_rate_protection_test.go | 4 +- ..._akamai_appsec_reputation_analysis_test.go | 4 +- ...i_appsec_reputation_profile_action_test.go | 4 +- ...e_akamai_appsec_reputation_profile_test.go | 4 +- ...kamai_appsec_reputation_protection_test.go | 4 +- .../resource_akamai_appsec_rule_test.go | 4 +- ...esource_akamai_appsec_rule_upgrade_test.go | 4 +- ...ecurity_policy_default_protections_test.go | 8 +- ...amai_appsec_security_policy_rename_test.go | 4 +- ...urce_akamai_appsec_security_policy_test.go | 4 +- ...ce_akamai_appsec_selected_hostname_test.go | 4 +- ...source_akamai_appsec_siem_settings_test.go | 4 +- ...ppsec_slow_post_protection_setting_test.go | 4 +- ..._akamai_appsec_slowpost_protection_test.go | 4 +- ...esource_akamai_appsec_threat_intel_test.go | 4 +- ...source_akamai_appsec_version_notes_test.go | 4 +- .../resource_akamai_appsec_waf_mode_test.go | 4 +- ...ource_akamai_appsec_waf_protection_test.go | 4 +- ...amai_appsec_wap_selected_hostnames_test.go | 8 +- ..._botman_akamai_bot_category_action_test.go | 8 +- ..._akamai_botman_akamai_bot_category_test.go | 8 +- ...a_akamai_botman_akamai_defined_bot_test.go | 8 +- ...akamai_botman_bot_analytics_cookie_test.go | 4 +- ...botman_bot_analytics_cookie_values_test.go | 4 +- ...amai_botman_bot_category_exception_test.go | 4 +- ...akamai_botman_bot_detection_action_test.go | 8 +- .../data_akamai_botman_bot_detection_test.go | 8 +- ...otman_bot_endpoint_coverage_report_test.go | 16 +-- ...mai_botman_bot_management_settings_test.go | 4 +- ...ata_akamai_botman_challenge_action_test.go | 8 +- ...i_botman_challenge_injection_rules_test.go | 4 +- ...otman_challenge_interception_rules_test.go | 4 +- ...akamai_botman_client_side_security_test.go | 4 +- ...a_akamai_botman_conditional_action_test.go | 8 +- ..._botman_custom_bot_category_action_test.go | 8 +- ...otman_custom_bot_category_sequence_test.go | 4 +- ..._akamai_botman_custom_bot_category_test.go | 8 +- ...amai_botman_custom_client_sequence_test.go | 4 +- .../data_akamai_botman_custom_client_test.go | 8 +- ...a_akamai_botman_custom_defined_bot_test.go | 8 +- ...a_akamai_botman_custom_deny_action_test.go | 8 +- ...akamai_botman_javascript_injection_test.go | 4 +- ...n_recategorized_akamai_defined_bot_test.go | 8 +- ...data_akamai_botman_response_action_test.go | 8 +- ...amai_botman_serve_alternate_action_test.go | 8 +- ..._transactional_endpoint_protection_test.go | 4 +- ...amai_botman_transactional_endpoint_test.go | 8 +- pkg/providers/botman/provider_test.go | 34 ++++-- ..._botman_akamai_bot_category_action_test.go | 4 +- ...akamai_botman_bot_analytics_cookie_test.go | 4 +- ...amai_botman_bot_category_exception_test.go | 4 +- ...akamai_botman_bot_detection_action_test.go | 4 +- ...mai_botman_bot_management_settings_test.go | 4 +- ...rce_akamai_botman_challenge_action_test.go | 4 +- ...i_botman_challenge_injection_rules_test.go | 4 +- ...otman_challenge_interception_rules_test.go | 4 +- ...akamai_botman_client_side_security_test.go | 4 +- ...e_akamai_botman_conditional_action_test.go | 4 +- ..._botman_custom_bot_category_action_test.go | 4 +- ...otman_custom_bot_category_sequence_test.go | 4 +- ..._akamai_botman_custom_bot_category_test.go | 4 +- ...amai_botman_custom_client_sequence_test.go | 4 +- ...source_akamai_botman_custom_client_test.go | 4 +- ...e_akamai_botman_custom_defined_bot_test.go | 4 +- ...e_akamai_botman_custom_deny_action_test.go | 4 +- ...akamai_botman_javascript_injection_test.go | 4 +- ...n_recategorized_akamai_defined_bot_test.go | 4 +- ...amai_botman_serve_alternate_action_test.go | 4 +- ..._transactional_endpoint_protection_test.go | 4 +- ...amai_botman_transactional_endpoint_test.go | 4 +- .../data_akamai_clientlist_lists_test.go | 4 +- pkg/providers/clientlists/provider_test.go | 37 +++++-- ...akamai_clientlists_list_activation_test.go | 14 +-- .../resource_akamai_clientlists_list_test.go | 20 ++-- ...lets_api_prioritization_match_rule_test.go | 4 +- ...plication_load_balancer_match_rule_test.go | 4 +- ...loudlets_application_load_balancer_test.go | 2 +- ...s_audience_segmentation_match_rule_test.go | 4 +- ...oudlets_edge_redirector_match_rule_test.go | 4 +- ...oudlets_forward_rewrite_match_rule_test.go | 4 +- ...loudlets_phased_release_match_rule_test.go | 4 +- .../data_akamai_cloudlets_policy_test.go | 8 +- ...oudlets_request_control_match_rule_test.go | 4 +- ..._visitor_prioritization_match_rule_test.go | 4 +- pkg/providers/cloudlets/provider_test.go | 28 +++-- ...plication_load_balancer_activation_test.go | 2 +- ...loudlets_application_load_balancer_test.go | 34 +++--- ...akamai_cloudlets_policy_activation_test.go | 2 +- .../resource_akamai_cloudlets_policy_test.go | 38 +++---- ...ata_akamai_cloudwrapper_capacities_test.go | 2 +- ..._akamai_cloudwrapper_configuration_test.go | 2 +- ...akamai_cloudwrapper_configurations_test.go | 2 +- .../data_akamai_cloudwrapper_location_test.go | 2 +- ...data_akamai_cloudwrapper_locations_test.go | 2 +- ...ata_akamai_cloudwrapper_properties_test.go | 2 +- pkg/providers/cloudwrapper/provider_test.go | 16 +-- ...rce_akamai_cloudwrapper_activation_test.go | 2 +- ..._akamai_cloudwrapper_configuration_test.go | 104 +++++++++++++++--- pkg/providers/cps/data_akamai_cps_csr_test.go | 4 +- .../cps/data_akamai_cps_deployments_test.go | 2 +- .../cps/data_akamai_cps_enrollment_test.go | 6 +- .../cps/data_akamai_cps_enrollments_test.go | 6 +- .../cps/data_akamai_cps_warnings_test.go | 4 +- pkg/providers/cps/provider_test.go | 38 +++++-- .../resource_akamai_cps_dv_enrollment_test.go | 24 ++-- .../resource_akamai_cps_dv_validation_test.go | 6 +- ..._akamai_cps_third_party_enrollment_test.go | 36 +++--- ...urce_akamai_cps_upload_certificate_test.go | 26 ++--- ...amai_datastream_activation_history_test.go | 5 +- ...a_akamai_datastream_dataset_fields_test.go | 4 +- .../data_akamai_datastreams_test.go | 6 +- pkg/providers/datastream/provider_test.go | 37 +++++-- .../resource_akamai_datastream_test.go | 25 ++--- .../dns/data_authorities_set_test.go | 6 +- pkg/providers/dns/data_dns_record_set_test.go | 4 +- pkg/providers/dns/provider_test.go | 36 ++++-- .../dns/resource_akamai_dns_record_test.go | 4 +- .../dns/resource_akamai_dns_zone_test.go | 2 +- .../data_akamai_edgekv_group_items_test.go | 20 ++-- .../data_akamai_edgekv_groups_test.go | 16 +-- .../data_akamai_edgeworker_activation_test.go | 4 +- .../data_akamai_edgeworker_test.go | 4 +- ..._akamai_edgeworkers_property_rules_test.go | 2 +- ...a_akamai_edgeworkers_resource_tier_test.go | 6 +- pkg/providers/edgeworkers/provider_test.go | 37 +++++-- ...resource_akamai_edgekv_group_items_test.go | 14 +-- .../resource_akamai_edgekv_test.go | 14 +-- .../resource_akamai_edgeworker_test.go | 20 ++-- ...urce_akamai_edgeworkers_activation_test.go | 6 +- .../gtm/data_akamai_gtm_datacenter_test.go | 4 +- .../gtm/data_akamai_gtm_datacenters_test.go | 4 +- ...data_akamai_gtm_default_datacenter_test.go | 2 +- pkg/providers/gtm/provider_test.go | 42 +++++-- .../gtm/resource_akamai_gtm_asmap_test.go | 12 +- .../gtm/resource_akamai_gtm_cidrmap_test.go | 10 +- .../resource_akamai_gtm_datacenter_test.go | 6 +- .../gtm/resource_akamai_gtm_domain_test.go | 14 +-- .../gtm/resource_akamai_gtm_geomap_test.go | 10 +- .../gtm/resource_akamai_gtm_property_test.go | 18 +-- .../gtm/resource_akamai_gtm_resource_test.go | 10 +- .../iam/data_akamai_iam_contact_types_test.go | 11 +- .../iam/data_akamai_iam_countries_test.go | 11 +- .../data_akamai_iam_grantable_roles_test.go | 8 +- .../iam/data_akamai_iam_groups_test.go | 9 +- .../iam/data_akamai_iam_roles_test.go | 8 +- .../iam/data_akamai_iam_states_test.go | 13 +-- .../data_akamai_iam_supported_langs_test.go | 11 +- .../data_akamai_iam_timeout_policies_test.go | 13 +-- .../iam/data_akamai_iam_timezones_test.go | 8 +- pkg/providers/iam/provider_test.go | 35 ++++-- ...akamai_iam_blocked_user_properties_test.go | 6 +- .../iam/resource_akamai_iam_group_test.go | 6 +- .../iam/resource_akamai_iam_role_test.go | 12 +- .../iam/resource_akamai_iam_user_test.go | 11 +- .../data_akamai_imaging_policy_image_test.go | 2 +- .../data_akamai_imaging_policy_video_test.go | 2 +- pkg/providers/imaging/provider_test.go | 36 ++++-- ...source_akamai_imaging_policy_image_test.go | 32 +++--- ...resource_akamai_imaging_policy_set_test.go | 4 +- ...source_akamai_imaging_policy_video_test.go | 28 ++--- ...a_akamai_networklist_network_lists_test.go | 8 +- pkg/providers/networklists/provider_test.go | 36 ++++-- ...rce_akamai_networklist_activations_test.go | 8 +- ...tworklist_network_list_description_test.go | 4 +- ...worklist_network_list_subscription_test.go | 4 +- ...ce_akamai_networklist_network_list_test.go | 4 +- .../property/data_akamai_contracts_test.go | 2 +- .../property/data_akamai_cp_code_test.go | 12 +- .../data_akamai_properties_search_test.go | 4 +- .../property/data_akamai_properties_test.go | 6 +- .../data_akamai_property_activation_test.go | 2 +- .../data_akamai_property_hostnames_test.go | 8 +- ...akamai_property_include_activation_test.go | 2 +- ...ta_akamai_property_include_parents_test.go | 2 +- ...data_akamai_property_include_rules_test.go | 2 +- .../data_akamai_property_include_test.go | 2 +- .../data_akamai_property_includes_test.go | 2 +- .../data_akamai_property_products_test.go | 4 +- .../data_akamai_property_rule_formats_test.go | 2 +- ...data_akamai_property_rules_builder_test.go | 14 +-- ...ata_akamai_property_rules_template_test.go | 34 +++--- .../data_akamai_property_rules_test.go | 22 ++-- .../property/data_akamai_property_test.go | 2 +- .../data_property_akamai_contract_test.go | 2 +- .../data_property_akamai_group_test.go | 2 +- .../data_property_akamai_groups_test.go | 4 +- pkg/providers/property/provider_test.go | 26 ++++- .../property/resource_akamai_cp_code_test.go | 26 ++--- .../resource_akamai_edge_hostname_test.go | 4 +- ...esource_akamai_property_activation_test.go | 2 +- ...akamai_property_include_activation_test.go | 18 +-- .../resource_akamai_property_include_test.go | 2 +- .../property/resource_akamai_property_test.go | 24 ++-- terraform-provider-manifest.json | 2 +- 282 files changed, 1414 insertions(+), 1040 deletions(-) diff --git a/main.go b/main.go index dd0d1077f..d95b5f314 100644 --- a/main.go +++ b/main.go @@ -7,14 +7,13 @@ import ( "log" "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" - // Load the providers - _ "github.com/akamai/terraform-provider-akamai/v5/pkg/providers" + _ "github.com/akamai/terraform-provider-akamai/v5/pkg/providers" // Load the providers "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" "github.com/hashicorp/go-hclog" "github.com/hashicorp/terraform-plugin-framework/providerserver" - "github.com/hashicorp/terraform-plugin-go/tfprotov5" - "github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server" - "github.com/hashicorp/terraform-plugin-mux/tf5muxserver" + "github.com/hashicorp/terraform-plugin-go/tfprotov6" + "github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server" + "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" ) func main() { @@ -26,25 +25,30 @@ func main() { // Anything lower and we risk losing those values to the ether hclog.Default().SetLevel(hclog.Trace) - providers := []func() tfprotov5.ProviderServer{ - akamai.NewPluginProvider(registry.PluginSubproviders()...)().GRPCProvider, - providerserver.NewProtocol5( + upgradedPluginProvider, err := akamai.NewProtoV6PluginProvider(registry.PluginSubproviders()) + if err != nil { + log.Fatal(err) + } + + providers := []func() tfprotov6.ProviderServer{ + upgradedPluginProvider, + providerserver.NewProtocol6( akamai.NewFrameworkProvider(registry.FrameworkSubproviders()...)(), ), } - muxServer, err := tf5muxserver.NewMuxServer(context.Background(), providers...) + muxServer, err := tf6muxserver.NewMuxServer(context.Background(), providers...) if err != nil { log.Fatal(err) } - var serveOpts []tf5server.ServeOpt + var serveOpts []tf6server.ServeOpt if debugMode { - serveOpts = append(serveOpts, tf5server.WithManagedDebug()) + serveOpts = append(serveOpts, tf6server.WithManagedDebug()) } - if err = tf5server.Serve(akamai.ProviderRegistryPath, muxServer.ProviderServer, serveOpts...); err != nil { + if err = tf6server.Serve(akamai.ProviderRegistryPath, muxServer.ProviderServer, serveOpts...); err != nil { log.Fatal(err) } } diff --git a/pkg/akamai/framework_provider_test.go b/pkg/akamai/framework_provider_test.go index 9e9562c35..0de228acf 100644 --- a/pkg/akamai/framework_provider_test.go +++ b/pkg/akamai/framework_provider_test.go @@ -12,8 +12,8 @@ import ( "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" "github.com/hashicorp/terraform-plugin-framework/provider" "github.com/hashicorp/terraform-plugin-framework/providerserver" - "github.com/hashicorp/terraform-plugin-go/tfprotov5" - "github.com/hashicorp/terraform-plugin-mux/tf5muxserver" + "github.com/hashicorp/terraform-plugin-go/tfprotov6" + "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/assert" ) @@ -49,7 +49,7 @@ func TestFramework_ConfigureCache_EnabledInContext(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: newProtoV5ProviderFactory(dummy{}), + ProtoV6ProviderFactories: newProtoV6ProviderFactory(dummy{}), Steps: []resource.TestStep{ { Config: fmt.Sprintf(` @@ -92,7 +92,7 @@ func TestFramework_ConfigureEdgercInContext(t *testing.T) { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: newProtoV5ProviderFactory(dummy{}), + ProtoV6ProviderFactories: newProtoV6ProviderFactory(dummy{}), Steps: []resource.TestStep{ { ExpectError: testcase.expectedError, @@ -141,7 +141,7 @@ func TestFramework_EdgercValidate(t *testing.T) { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: newProtoV5ProviderFactory(dummy{}), + ProtoV6ProviderFactories: newProtoV6ProviderFactory(dummy{}), Steps: []resource.TestStep{ { ExpectError: testcase.expectedError, @@ -211,7 +211,7 @@ func TestFramework_EdgercFromConfig(t *testing.T) { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: newProtoV5ProviderFactory(dummy{}), + ProtoV6ProviderFactories: newProtoV6ProviderFactory(dummy{}), Steps: []resource.TestStep{ { ExpectError: testcase.expectedError, @@ -236,7 +236,7 @@ func TestFramework_EdgercFromConfig(t *testing.T) { func TestFramework_EdgercFromConfig_missing_required_attributes(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: newProtoV5ProviderFactory(dummy{}), + ProtoV6ProviderFactories: newProtoV6ProviderFactory(dummy{}), Steps: []resource.TestStep{ { ExpectError: regexp.MustCompile("The argument \"host\" is required, but no definition was found"), @@ -290,18 +290,24 @@ func TestFramework_EdgercFromConfig_missing_required_attributes(t *testing.T) { }) } -func newProtoV5ProviderFactory(subproviders ...subprovider.Framework) map[string]func() (tfprotov5.ProviderServer, error) { - return map[string]func() (tfprotov5.ProviderServer, error){ - "akamai": func() (tfprotov5.ProviderServer, error) { +func newProtoV6ProviderFactory(subproviders ...subprovider.Framework) map[string]func() (tfprotov6.ProviderServer, error) { + return map[string]func() (tfprotov6.ProviderServer, error){ + "akamai": func() (tfprotov6.ProviderServer, error) { ctx := context.Background() - providers := []func() tfprotov5.ProviderServer{ - akamai.NewPluginProvider()().GRPCProvider, - providerserver.NewProtocol5( + + pluginProviderV6, err := akamai.NewProtoV6PluginProvider(registry.PluginSubproviders()) + if err != nil { + return nil, err + } + + providers := []func() tfprotov6.ProviderServer{ + pluginProviderV6, + providerserver.NewProtocol6( akamai.NewFrameworkProvider(subproviders...)(), ), } - muxServer, err := tf5muxserver.NewMuxServer(ctx, providers...) + muxServer, err := tf6muxserver.NewMuxServer(ctx, providers...) if err != nil { return nil, err } diff --git a/pkg/akamai/plugin_provider.go b/pkg/akamai/plugin_provider.go index 2dfe742b3..bf540d0d6 100644 --- a/pkg/akamai/plugin_provider.go +++ b/pkg/akamai/plugin_provider.go @@ -7,14 +7,15 @@ import ( "os" "strconv" - "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/plugin" - "github.com/akamai/terraform-provider-akamai/v5/pkg/cache" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/collections" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/hashicorp/terraform-plugin-go/tfprotov6" + "github.com/hashicorp/terraform-plugin-mux/tf5to6server" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/plugin" ) // NewPluginProvider returns the provider function to terraform @@ -174,3 +175,14 @@ func configureProviderContext(p *schema.Provider) schema.ConfigureContextFunc { return meta, nil } } + +// NewProtoV6PluginProvider upgrades plugin provider from protocol version 5 to 6 +func NewProtoV6PluginProvider(subproviders []subprovider.Plugin) (func() tfprotov6.ProviderServer, error) { + pluginProvider, err := tf5to6server.UpgradeServer( + context.Background(), + NewPluginProvider(subproviders...)().GRPCProvider, + ) + return func() tfprotov6.ProviderServer { + return pluginProvider + }, err +} diff --git a/pkg/common/testutils/testutils.go b/pkg/common/testutils/testutils.go index d6d13ef75..370ea89b1 100644 --- a/pkg/common/testutils/testutils.go +++ b/pkg/common/testutils/testutils.go @@ -2,11 +2,17 @@ package testutils import ( + "context" "fmt" "io/ioutil" "os" "testing" + "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" + "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/hashicorp/terraform-plugin-go/tfprotov6" + "github.com/hashicorp/terraform-plugin-mux/tf5to6server" + "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" "github.com/stretchr/testify/require" ) @@ -47,3 +53,33 @@ func LoadFixtureBytes(t *testing.T, path string) []byte { func LoadFixtureString(t *testing.T, format string, args ...interface{}) string { return string(LoadFixtureBytes(t, fmt.Sprintf(format, args...))) } + +// NewPluginProviderFactories provides protocol v6 plugin provider for test purposes +func NewPluginProviderFactories(subprovider subprovider.Plugin) map[string]func() (tfprotov6.ProviderServer, error) { + testAccPluginProvider := akamai.NewPluginProvider(subprovider)() + testAccProviders := map[string]func() (tfprotov6.ProviderServer, error){ + "akamai": func() (tfprotov6.ProviderServer, error) { + upgradedPluginProvider, err := tf5to6server.UpgradeServer( + context.Background(), + testAccPluginProvider.GRPCProvider, + ) + if err != nil { + return nil, err + } + + providers := []func() tfprotov6.ProviderServer{ + func() tfprotov6.ProviderServer { + return upgradedPluginProvider + }, + } + + muxServer, err := tf6muxserver.NewMuxServer(context.Background(), providers...) + if err != nil { + return nil, err + } + + return muxServer.ProviderServer(), nil + }, + } + return testAccProviders +} diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_attack_payload_logging_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_attack_payload_logging_test.go index 7bb864b1e..df4bda6b8 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_attack_payload_logging_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_attack_payload_logging_test.go @@ -35,8 +35,8 @@ func TestAkamaiAdvancedSettingsAttackPayloadLoggingDataBasic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSAdvancedSettingsAttackPayloadLogging/match_by_id.tf"), @@ -77,8 +77,8 @@ func TestAkamaiAdvancedSettingsAttackPayloadLoggingDataBasicPolicyId(t *testing. useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSAdvancedSettingsAttackPayloadLogging/match_by_policy_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_evasive_path_match_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_evasive_path_match_test.go index ac99ce580..5ca4944c5 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_evasive_path_match_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_evasive_path_match_test.go @@ -35,8 +35,8 @@ func TestAkamaiAdvancedSettingsEvasivePathMatch_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSAdvancedSettingsEvasivePathMatch/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_logging_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_logging_test.go index ffa78b827..496176709 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_logging_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_logging_test.go @@ -35,8 +35,8 @@ func TestAkamaiAdvancedSettingsLogging_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSAdvancedSettingsLogging/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pii_learning_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pii_learning_test.go index e40e942c6..db49eb28c 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pii_learning_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pii_learning_test.go @@ -55,8 +55,8 @@ func TestAkamaiAdvancedSettingsPIILearning_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSAdvancedSettingsPIILearning/match_by_id.tf"), @@ -108,8 +108,8 @@ func TestAkamaiAdvancedSettingsPIILearning_data_missing_parameter(t *testing.T) useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSAdvancedSettingsPIILearning/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pragma_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pragma_test.go index f56282d14..cade98fa2 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pragma_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pragma_test.go @@ -35,8 +35,8 @@ func TestAkamaiAdvancedSettingsPragma_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSAdvancedSettingsPragma/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_prefetch_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_prefetch_test.go index 607d5a312..e5b96c0d1 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_prefetch_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_prefetch_test.go @@ -35,8 +35,8 @@ func TestAkamaiAdvancedSettingsPrefetch_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSAdvancedSettingsPrefetch/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_request_body_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_request_body_test.go index 5484686a7..d25ca2f56 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_request_body_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_request_body_test.go @@ -35,8 +35,8 @@ func TestAkamaiAdvancedSettingsRequestBodyDataBasic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSAdvancedSettingsRequestBody/match_by_id.tf"), @@ -77,8 +77,8 @@ func TestAkamaiAdvancedSettingsRequestBodyDataBasicPolicyID(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSAdvancedSettingsRequestBody/match_by_policy_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_api_endpoints_test.go b/pkg/providers/appsec/data_akamai_appsec_api_endpoints_test.go index 1593bf3ae..b7bd92116 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_endpoints_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_endpoints_test.go @@ -35,8 +35,8 @@ func TestAkamaiApiEndpoints_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSApiEndpoints/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_match_targets_test.go b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_match_targets_test.go index d0d2bccc4..1bf670949 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_match_targets_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_match_targets_test.go @@ -35,8 +35,8 @@ func TestAkamaiApiHostnameCoverageMatchTargets_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSApiHostnameCoverageMatchTargets/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_overlapping_test.go b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_overlapping_test.go index bbcf91fdf..a6d701af4 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_overlapping_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_overlapping_test.go @@ -35,8 +35,8 @@ func TestAkamaiApiHostnameCoverageOverlapping_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSApiHostnameCoverageOverlapping/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_test.go b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_test.go index 8092e1194..058268679 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_test.go @@ -26,8 +26,8 @@ func TestAkamaiApiHostnameCoverage_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSApiHostnameCoverage/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_api_request_constraints_test.go b/pkg/providers/appsec/data_akamai_appsec_api_request_constraints_test.go index 399449a7a..90966c696 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_request_constraints_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_request_constraints_test.go @@ -35,8 +35,8 @@ func TestAkamaiApiRequestConstraints_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSApiRequestConstraints/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_attack_groups_test.go b/pkg/providers/appsec/data_akamai_appsec_attack_groups_test.go index 349e14d10..28c0851bc 100644 --- a/pkg/providers/appsec/data_akamai_appsec_attack_groups_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_attack_groups_test.go @@ -35,8 +35,8 @@ func TestAkamaiAttackGroups_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSAttackGroups/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_bypass_network_lists_test.go b/pkg/providers/appsec/data_akamai_appsec_bypass_network_lists_test.go index 5fd374ff4..7c8415ac0 100644 --- a/pkg/providers/appsec/data_akamai_appsec_bypass_network_lists_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_bypass_network_lists_test.go @@ -35,8 +35,8 @@ func TestAkamaiBypassNetworkLists_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSBypassNetworkLists/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_configuration_test.go b/pkg/providers/appsec/data_akamai_appsec_configuration_test.go index 8656d9e22..60c332a45 100644 --- a/pkg/providers/appsec/data_akamai_appsec_configuration_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_configuration_test.go @@ -28,8 +28,8 @@ func TestAkamaiConfiguration_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSConfiguration/match_by_id.tf"), @@ -60,8 +60,8 @@ func TestAkamaiConfiguration_data_nonexistentConfig(t *testing.T) { ).Return(nil, fmt.Errorf("configuration 'Nonexistent' not found")) useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSConfiguration/nonexistent_config.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_configuration_version_test.go b/pkg/providers/appsec/data_akamai_appsec_configuration_version_test.go index 84f8e3146..cf66be9d5 100644 --- a/pkg/providers/appsec/data_akamai_appsec_configuration_version_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_configuration_version_test.go @@ -26,8 +26,8 @@ func TestAkamaiConfigurationVersion_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSConfigurationVersion/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_contracts_groups_test.go b/pkg/providers/appsec/data_akamai_appsec_contracts_groups_test.go index 3f39e9e16..53646e8e4 100644 --- a/pkg/providers/appsec/data_akamai_appsec_contracts_groups_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_contracts_groups_test.go @@ -26,8 +26,8 @@ func TestAkamaiContractsGroups_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSContractsGroups/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_custom_deny_test.go b/pkg/providers/appsec/data_akamai_appsec_custom_deny_test.go index b02a09409..cc9b2909b 100644 --- a/pkg/providers/appsec/data_akamai_appsec_custom_deny_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_custom_deny_test.go @@ -35,8 +35,8 @@ func TestAkamaiCustomDeny_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSCustomDeny/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_custom_rule_actions_test.go b/pkg/providers/appsec/data_akamai_appsec_custom_rule_actions_test.go index 3316385af..2194cb6f7 100644 --- a/pkg/providers/appsec/data_akamai_appsec_custom_rule_actions_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_custom_rule_actions_test.go @@ -35,8 +35,8 @@ func TestAkamaiCustomRuleActions_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSCustomRuleActions/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_custom_rules_test.go b/pkg/providers/appsec/data_akamai_appsec_custom_rules_test.go index 37dc7daef..c2fe911e3 100644 --- a/pkg/providers/appsec/data_akamai_appsec_custom_rules_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_custom_rules_test.go @@ -26,8 +26,8 @@ func TestAkamaiCustomRules_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSCustomRules/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_groups_test.go b/pkg/providers/appsec/data_akamai_appsec_eval_groups_test.go index 58840e3d6..f9e7fa229 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval_groups_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval_groups_test.go @@ -33,8 +33,8 @@ func TestAkamaiEvalGroups_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSEvalGroups/match_by_id.tf"), @@ -71,8 +71,8 @@ func TestAkamaiEvalGroups_data_error_retrieving_eval_groups(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSEvalGroups/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_test.go b/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_test.go index 2b7e300e0..4d6411132 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_test.go @@ -35,8 +35,8 @@ func TestAkamaiEvalPenaltyBox_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSEvalPenaltyBox/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_rules_test.go b/pkg/providers/appsec/data_akamai_appsec_eval_rules_test.go index 599cce06a..714b6fe53 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval_rules_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval_rules_test.go @@ -35,8 +35,8 @@ func TestAkamaiEvalRules_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSEvalRules/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_test.go b/pkg/providers/appsec/data_akamai_appsec_eval_test.go index 9a99b82bf..a49a2fe4b 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval_test.go @@ -35,8 +35,8 @@ func TestAkamaiEval_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSEval/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_export_configuration_test.go b/pkg/providers/appsec/data_akamai_appsec_export_configuration_test.go index 95c82c0ae..6eb505204 100644 --- a/pkg/providers/appsec/data_akamai_appsec_export_configuration_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_export_configuration_test.go @@ -28,8 +28,8 @@ func TestAkamaiExportConfiguration_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSExportConfiguration/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_failover_hostnames_test.go b/pkg/providers/appsec/data_akamai_appsec_failover_hostnames_test.go index c10a87b1f..705a5bc80 100644 --- a/pkg/providers/appsec/data_akamai_appsec_failover_hostnames_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_failover_hostnames_test.go @@ -26,8 +26,8 @@ func TestAkamaiFailoverHostnames_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSFailoverHostnames/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_ip_geo_test.go b/pkg/providers/appsec/data_akamai_appsec_ip_geo_test.go index 0f22c63ab..eb2c7122c 100644 --- a/pkg/providers/appsec/data_akamai_appsec_ip_geo_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_ip_geo_test.go @@ -35,8 +35,8 @@ func TestAkamaiIPGeo_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSIPGeo/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_malware_content_types_test.go b/pkg/providers/appsec/data_akamai_appsec_malware_content_types_test.go index 1e98298f9..8253b3f9e 100644 --- a/pkg/providers/appsec/data_akamai_appsec_malware_content_types_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_malware_content_types_test.go @@ -35,8 +35,8 @@ func TestAkamaiMalwareContentTypes_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSMalwareContentTypes/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_malware_policies_test.go b/pkg/providers/appsec/data_akamai_appsec_malware_policies_test.go index b5e7579e0..611ea317c 100644 --- a/pkg/providers/appsec/data_akamai_appsec_malware_policies_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_malware_policies_test.go @@ -35,8 +35,8 @@ func TestAkamaiMalwarePolicies_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSMalwarePolicies/match_by_id.tf"), @@ -77,8 +77,8 @@ func TestAkamaiMalwarePolicies_data_single_policy(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSMalwarePolicies/match_by_id_single_policy.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_malware_policy_actions_test.go b/pkg/providers/appsec/data_akamai_appsec_malware_policy_actions_test.go index 6d922bfff..fb1fe0304 100644 --- a/pkg/providers/appsec/data_akamai_appsec_malware_policy_actions_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_malware_policy_actions_test.go @@ -35,8 +35,8 @@ func TestAkamaiMalwarePolicyActions_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSMalwarePolicyActions/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_match_targets_test.go b/pkg/providers/appsec/data_akamai_appsec_match_targets_test.go index e2b2a5339..f66c8f8e6 100644 --- a/pkg/providers/appsec/data_akamai_appsec_match_targets_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_match_targets_test.go @@ -35,8 +35,8 @@ func TestAkamaiMatchTargets_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: false, - ProviderFactories: testAccProviders, + IsUnitTest: false, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSMatchTargets/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_penalty_box_test.go b/pkg/providers/appsec/data_akamai_appsec_penalty_box_test.go index 7b2a0a586..7fa13fe6e 100644 --- a/pkg/providers/appsec/data_akamai_appsec_penalty_box_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_penalty_box_test.go @@ -35,8 +35,8 @@ func TestAkamaiPenaltyBox_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSPenaltyBox/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_rate_policies_test.go b/pkg/providers/appsec/data_akamai_appsec_rate_policies_test.go index 9b061136c..066b0c0d0 100644 --- a/pkg/providers/appsec/data_akamai_appsec_rate_policies_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_rate_policies_test.go @@ -35,8 +35,8 @@ func TestAkamaiRatePolicies_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRatePolicies/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_rate_policy_actions_test.go b/pkg/providers/appsec/data_akamai_appsec_rate_policy_actions_test.go index d71f16f6a..3c7c1f047 100644 --- a/pkg/providers/appsec/data_akamai_appsec_rate_policy_actions_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_rate_policy_actions_test.go @@ -35,8 +35,8 @@ func TestAkamaiRatePolicyActions_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRatePolicyActions/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_reputation_analysis_test.go b/pkg/providers/appsec/data_akamai_appsec_reputation_analysis_test.go index ec62d83f8..fc6cc8300 100644 --- a/pkg/providers/appsec/data_akamai_appsec_reputation_analysis_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_reputation_analysis_test.go @@ -35,8 +35,8 @@ func TestAkamaiReputationAnalysis_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSReputationAnalysis/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_reputation_profile_actions_test.go b/pkg/providers/appsec/data_akamai_appsec_reputation_profile_actions_test.go index 5a95a3573..f131297a6 100644 --- a/pkg/providers/appsec/data_akamai_appsec_reputation_profile_actions_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_reputation_profile_actions_test.go @@ -35,8 +35,8 @@ func TestAkamaiReputationProfileActions_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSReputationProfileActions/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_reputation_profiles_test.go b/pkg/providers/appsec/data_akamai_appsec_reputation_profiles_test.go index 871899d7d..b96d3d04e 100644 --- a/pkg/providers/appsec/data_akamai_appsec_reputation_profiles_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_reputation_profiles_test.go @@ -35,8 +35,8 @@ func TestAkamaiReputationProfiles_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSReputationProfiles/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_rule_upgrade_test.go b/pkg/providers/appsec/data_akamai_appsec_rule_upgrade_test.go index 0b89bc566..e711438b9 100644 --- a/pkg/providers/appsec/data_akamai_appsec_rule_upgrade_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_rule_upgrade_test.go @@ -35,8 +35,8 @@ func TestAkamaiRuleUpgrade_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRuleUpgrade/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_rules_test.go b/pkg/providers/appsec/data_akamai_appsec_rules_test.go index 259d7d622..b9b5fabfe 100644 --- a/pkg/providers/appsec/data_akamai_appsec_rules_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_rules_test.go @@ -47,8 +47,8 @@ func TestAkamaiRules_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRules/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_security_policy_protections_test.go b/pkg/providers/appsec/data_akamai_appsec_security_policy_protections_test.go index 6ee402bd4..41526f7c7 100644 --- a/pkg/providers/appsec/data_akamai_appsec_security_policy_protections_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_security_policy_protections_test.go @@ -35,8 +35,8 @@ func TestAkamaiPolicyProtections_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSPolicyProtections/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_security_policy_test.go b/pkg/providers/appsec/data_akamai_appsec_security_policy_test.go index 18ca96c3f..65a106d81 100644 --- a/pkg/providers/appsec/data_akamai_appsec_security_policy_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_security_policy_test.go @@ -43,8 +43,8 @@ func TestAkamaiSecurityPolicy_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSSecurityPolicy/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_selectable_hostnames_test.go b/pkg/providers/appsec/data_akamai_appsec_selectable_hostnames_test.go index ff33896d3..d363e1495 100644 --- a/pkg/providers/appsec/data_akamai_appsec_selectable_hostnames_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_selectable_hostnames_test.go @@ -35,8 +35,8 @@ func TestAkamaiSelectableHostnames_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSSelectableHostnames/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_selected_hostnames_test.go b/pkg/providers/appsec/data_akamai_appsec_selected_hostnames_test.go index a1259f5a1..d23e2663f 100644 --- a/pkg/providers/appsec/data_akamai_appsec_selected_hostnames_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_selected_hostnames_test.go @@ -35,8 +35,8 @@ func TestAkamaiSelectedHostnames_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSSelectedHostnames/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_siem_definitions_test.go b/pkg/providers/appsec/data_akamai_appsec_siem_definitions_test.go index 0342b1b72..483b37266 100644 --- a/pkg/providers/appsec/data_akamai_appsec_siem_definitions_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_siem_definitions_test.go @@ -26,8 +26,8 @@ func TestAkamaiSiemDefinitions_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSSiemDefinitions/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_siem_settings_test.go b/pkg/providers/appsec/data_akamai_appsec_siem_settings_test.go index bd5fb37c1..d8ad70c36 100644 --- a/pkg/providers/appsec/data_akamai_appsec_siem_settings_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_siem_settings_test.go @@ -35,8 +35,8 @@ func TestAkamaiSiemSettings_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSSiemSettings/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_slow_post_protection_settings_test.go b/pkg/providers/appsec/data_akamai_appsec_slow_post_protection_settings_test.go index 9134f8a3a..574b84ff7 100644 --- a/pkg/providers/appsec/data_akamai_appsec_slow_post_protection_settings_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_slow_post_protection_settings_test.go @@ -35,8 +35,8 @@ func TestAkamaiSlowPostProtectionSettings_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSSlowPostProtectionSettings/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_threat_intel_test.go b/pkg/providers/appsec/data_akamai_appsec_threat_intel_test.go index 13e8d49bf..036998967 100644 --- a/pkg/providers/appsec/data_akamai_appsec_threat_intel_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_threat_intel_test.go @@ -37,8 +37,8 @@ func TestAkamaiThreatIntel_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSThreatIntel/match_by_id.tf"), @@ -79,8 +79,8 @@ func TestAkamaiThreatIntel_data_error_retrieving_threat_intel(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSThreatIntel/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_tuning_recommendations_test.go b/pkg/providers/appsec/data_akamai_appsec_tuning_recommendations_test.go index 09c4dc948..a2acfdc96 100644 --- a/pkg/providers/appsec/data_akamai_appsec_tuning_recommendations_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_tuning_recommendations_test.go @@ -55,8 +55,8 @@ func TestAkamaiTuningRecommendationsDataBasic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSTuningRecommendations/match_by_id.tf"), @@ -115,8 +115,8 @@ func TestAkamaiTuningRecommenadationsDataErrorRetrievingTuningRecommenadations(t useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSTuningRecommendations/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_version_notes_test.go b/pkg/providers/appsec/data_akamai_appsec_version_notes_test.go index 20a9847d8..a2e556b09 100644 --- a/pkg/providers/appsec/data_akamai_appsec_version_notes_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_version_notes_test.go @@ -35,8 +35,8 @@ func TestAkamaiVersionNotes_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSVersionNotes/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_waf_mode_test.go b/pkg/providers/appsec/data_akamai_appsec_waf_mode_test.go index e38a8aaf8..dfee987bc 100644 --- a/pkg/providers/appsec/data_akamai_appsec_waf_mode_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_waf_mode_test.go @@ -35,8 +35,8 @@ func TestAkamaiWAFMode_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSWAFMode/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_wap_selected_hostnames_test.go b/pkg/providers/appsec/data_akamai_appsec_wap_selected_hostnames_test.go index e9ee1a88e..cb6750c6e 100644 --- a/pkg/providers/appsec/data_akamai_appsec_wap_selected_hostnames_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_wap_selected_hostnames_test.go @@ -37,8 +37,8 @@ func TestAkamaiWAPSelectedHostnames_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSWAPSelectedHostnames/match_by_id.tf"), @@ -79,8 +79,8 @@ func TestAkamaiWAPSelectedHostnames_data_error_retrieving_hostnames(t *testing.T useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSWAPSelectedHostnames/match_by_id.tf"), @@ -131,8 +131,8 @@ func TestAkamaiWAPSelectedHostnames_NonWAP_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSWAPSelectedHostnames/match_by_id.tf"), diff --git a/pkg/providers/appsec/provider_test.go b/pkg/providers/appsec/provider_test.go index a9ebaa2c1..361bf8a14 100644 --- a/pkg/providers/appsec/provider_test.go +++ b/pkg/providers/appsec/provider_test.go @@ -1,6 +1,7 @@ package appsec import ( + "context" "log" "os" "sync" @@ -9,17 +10,37 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-go/tfprotov6" + "github.com/hashicorp/terraform-plugin-mux/tf5to6server" + "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" ) -var testAccProviders map[string]func() (*schema.Provider, error) -var testAccProvider *schema.Provider +var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) func TestMain(m *testing.M) { - testAccProvider = akamai.NewPluginProvider(NewSubprovider())() - testAccProviders = map[string]func() (*schema.Provider, error){ - "akamai": func() (*schema.Provider, error) { - return testAccProvider, nil + testAccPluginProvider := akamai.NewPluginProvider(NewSubprovider())() + testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ + "akamai": func() (tfprotov6.ProviderServer, error) { + upgradedPluginProvider, err := tf5to6server.UpgradeServer( + context.Background(), + testAccPluginProvider.GRPCProvider, + ) + if err != nil { + return nil, err + } + + providers := []func() tfprotov6.ProviderServer{ + func() tfprotov6.ProviderServer { + return upgradedPluginProvider + }, + } + + muxServer, err := tf6muxserver.NewMuxServer(context.Background(), providers...) + if err != nil { + return nil, err + } + + return muxServer.ProviderServer(), nil }, } diff --git a/pkg/providers/appsec/resource_akamai_appsec_activations_test.go b/pkg/providers/appsec/resource_akamai_appsec_activations_test.go index 074e12269..135f657b7 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_activations_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_activations_test.go @@ -75,8 +75,8 @@ func TestAkamaiActivations_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResActivations/match_by_id.tf"), @@ -158,8 +158,8 @@ func TestAkamaiActivations_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResActivations/match_by_id.tf"), @@ -287,8 +287,8 @@ func TestAkamaiActivations_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResActivations/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_attack_payload_logging_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_attack_payload_logging_test.go index 9dddf5597..d34dfb85c 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_attack_payload_logging_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_attack_payload_logging_test.go @@ -83,8 +83,8 @@ func TestAkamaiAdvancedSettingsAttackPayloadLoggingConfig(t *testing.T) { removeAttackPayloadLogging(t, removeAttackPayloadLoggingRequest, client, 1) useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsAttackPayloadLogging/match_by_id.tf"), @@ -123,7 +123,7 @@ func TestAkamaiAdvancedSettingsAttackPayloadLoggingConfig(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsAttackPayloadLogging/match_by_id.tf"), @@ -163,7 +163,7 @@ func TestAkamaiAdvancedSettingsAttackPayloadLoggingConfig(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsAttackPayloadLogging/update_by_policy_id.tf"), @@ -203,8 +203,8 @@ func TestAkamaiAdvancedSettingsAttackPayloadLoggingConfig(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsAttackPayloadLogging/update_by_policy_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_evasive_path_match_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_evasive_path_match_test.go index 282802d79..4a7cd4435 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_evasive_path_match_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_evasive_path_match_test.go @@ -53,8 +53,8 @@ func TestAkamaiAdvancedSettingsEvasivePathMatch_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsEvasivePathMatch/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_logging_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_logging_test.go index 52f73be5d..ee65f42fc 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_logging_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_logging_test.go @@ -54,8 +54,8 @@ func TestAkamaiAdvancedSettingsLogging_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsLogging/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pii_learning_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pii_learning_test.go index d48656ac4..7fc5fe70d 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pii_learning_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pii_learning_test.go @@ -74,8 +74,8 @@ func TestAkamaiAdvancedSettingsPIILearning_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsPIILearning/match_by_id.tf"), @@ -134,8 +134,8 @@ func TestAkamaiAdvancedSettingsPIILearning_res_api_call_failure(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsPIILearning/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pragma_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pragma_test.go index efe17cede..0e3db1ccf 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pragma_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pragma_test.go @@ -53,8 +53,8 @@ func TestAkamaiAdvancedSettingsPragma_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsPragma/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_prefetch_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_prefetch_test.go index 13b2ee976..8825c07a6 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_prefetch_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_prefetch_test.go @@ -53,8 +53,8 @@ func TestAkamaiAdvancedSettingsPrefetch_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsPrefetch/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_request_body_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_request_body_test.go index d440e04de..e59be356a 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_request_body_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_request_body_test.go @@ -75,8 +75,8 @@ func TestAkamaiAdvancedSettingsRequestBodyResConfig(t *testing.T) { removeRequestBody(t, removeRequestBodyRequest, client, 1) useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsRequestBody/match_by_id.tf"), @@ -107,7 +107,7 @@ func TestAkamaiAdvancedSettingsRequestBodyResConfig(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsRequestBody/match_by_id.tf"), @@ -140,7 +140,7 @@ func TestAkamaiAdvancedSettingsRequestBodyResConfig(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsRequestBody/update_by_policy_id.tf"), @@ -173,8 +173,8 @@ func TestAkamaiAdvancedSettingsRequestBodyResConfig(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsRequestBody/update_by_policy_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_api_constraints_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_api_constraints_protection_test.go index 742395ae5..8e934ed4a 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_api_constraints_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_api_constraints_protection_test.go @@ -89,8 +89,8 @@ func TestAkamaiAPICoProtection_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAPIConstraintsProtection/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_api_request_constraints_test.go b/pkg/providers/appsec/resource_akamai_appsec_api_request_constraints_test.go index 44db99332..755060973 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_api_request_constraints_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_api_request_constraints_test.go @@ -53,8 +53,8 @@ func TestAkamaiApiRequestConstraints_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResApiRequestConstraints/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_attack_group_test.go b/pkg/providers/appsec/resource_akamai_appsec_attack_group_test.go index 21b5eb0d7..beab7d82e 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_attack_group_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_attack_group_test.go @@ -54,8 +54,8 @@ func TestAkamaiAttackGroup_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAttackGroup/match_by_id.tf"), @@ -103,8 +103,8 @@ func TestAkamaiAttackGroup_res_error_updating_attack_group(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAttackGroup/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_bypass_network_lists_test.go b/pkg/providers/appsec/resource_akamai_appsec_bypass_network_lists_test.go index 603150921..d4389095c 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_bypass_network_lists_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_bypass_network_lists_test.go @@ -53,8 +53,8 @@ func TestAkamaiBypassNetworkLists_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResBypassNetworkLists/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_configuration_rename_test.go b/pkg/providers/appsec/resource_akamai_appsec_configuration_rename_test.go index fb3ce3e6b..208f45ea2 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_configuration_rename_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_configuration_rename_test.go @@ -35,8 +35,8 @@ func TestAkamaiConfigurationRename_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResConfigurationRename/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_configuration_test.go b/pkg/providers/appsec/resource_akamai_appsec_configuration_test.go index d661b11d8..09631cce2 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_configuration_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_configuration_test.go @@ -64,8 +64,8 @@ func TestAkamaiConfiguration_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResConfiguration/match_by_id.tf"), @@ -137,8 +137,8 @@ func TestAkamaiConfiguration_res_error_updating_configuration(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResConfiguration/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_custom_deny_test.go b/pkg/providers/appsec/resource_akamai_appsec_custom_deny_test.go index 223acac04..fdd83e198 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_custom_deny_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_custom_deny_test.go @@ -67,8 +67,8 @@ func TestAkamaiCustomDeny_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCustomDeny/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_custom_rule_action_test.go b/pkg/providers/appsec/resource_akamai_appsec_custom_rule_action_test.go index 89200ee33..e6c75d1c2 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_custom_rule_action_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_custom_rule_action_test.go @@ -41,8 +41,8 @@ func TestAkamaiCustomRuleAction_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCustomRuleAction/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_custom_rule_test.go b/pkg/providers/appsec/resource_akamai_appsec_custom_rule_test.go index 19f68b45b..ac1064ad6 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_custom_rule_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_custom_rule_test.go @@ -77,8 +77,8 @@ func TestAkamaiCustomRule_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCustomRule/match_by_id.tf"), @@ -165,8 +165,8 @@ func TestAkamaiCustomRule_res_error_removing_active_rule(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCustomRule/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_group_test.go b/pkg/providers/appsec/resource_akamai_appsec_eval_group_test.go index 44bc3bbc9..847b42ba9 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval_group_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_group_test.go @@ -54,8 +54,8 @@ func TestAkamaiEvalGroup_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResEvalGroup/match_by_id.tf"), @@ -103,8 +103,8 @@ func TestAkamaiEvalGroup_res_error_updating_eval_group(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResEvalGroup/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_test.go b/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_test.go index df68067bb..32286e390 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_test.go @@ -44,8 +44,8 @@ func TestAkamaiEvalPenaltyBox_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResEvalPenaltyBox/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_rule_test.go b/pkg/providers/appsec/resource_akamai_appsec_eval_rule_test.go index 1dab46cda..e41a771e9 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval_rule_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_rule_test.go @@ -53,8 +53,8 @@ func TestAkamaiEvalRule_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResEvalRule/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_test.go b/pkg/providers/appsec/resource_akamai_appsec_eval_test.go index ced514c53..2683b65c1 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_test.go @@ -53,8 +53,8 @@ func TestAkamaiEval_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResEval/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_ip_geo_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_ip_geo_protection_test.go index 7a33ec54f..fec2998db 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_ip_geo_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_ip_geo_protection_test.go @@ -89,8 +89,8 @@ func TestAkamaiIPGeoProtection_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResIPGeoProtection/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_ip_geo_test.go b/pkg/providers/appsec/resource_akamai_appsec_ip_geo_test.go index 5333fdc2a..c682bf474 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_ip_geo_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_ip_geo_test.go @@ -109,8 +109,8 @@ func TestAkamaiIPGeo_res_block(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResIPGeo/match_by_id.tf"), @@ -173,8 +173,8 @@ func TestAkamaiIPGeo_res_block(t *testing.T) { updateIPGeoProtectionResponseAllProtectionsFalse(t, 43253, 7, "AAAA_81230", "testdata/TestResIPGeoProtection/PolicyProtections.json", client) useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResIPGeo/ukraine_match_by_id.tf"), @@ -214,8 +214,8 @@ func TestAkamaiIPGeo_res_block(t *testing.T) { updateIPGeoProtectionResponseAllProtectionsFalse(t, 43253, 7, "AAAA_81230", "testdata/TestResIPGeoProtection/PolicyProtections.json", client) useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResIPGeo/allow.tf"), @@ -247,8 +247,8 @@ func TestAkamaiIPGeo_res_block(t *testing.T) { updateIPGeoProtectionResponseAllProtectionsFalse(t, 43253, 7, "AAAA_81230", "testdata/TestResIPGeoProtection/PolicyProtections.json", client) useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResIPGeo/block_with_empty_lists.tf"), @@ -281,8 +281,8 @@ func TestAkamaiIPGeo_res_block(t *testing.T) { updateIPGeoProtectionResponseAllProtectionsFalse(t, 43253, 7, "AAAA_81230", "testdata/TestResIPGeoProtection/PolicyProtections.json", client) useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResIPGeo/allow_with_empty_lists.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_action_test.go b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_action_test.go index 99c8d300c..c535a43d3 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_action_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_action_test.go @@ -94,8 +94,8 @@ func TestAkamaiMalwarePolicyAction_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResMalwarePolicyAction/create.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_actions_test.go b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_actions_test.go index 9615c8d39..a1ac96cb4 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_actions_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_actions_test.go @@ -34,8 +34,8 @@ func TestAkamaiMalwarePolicyActions_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: false, - ProviderFactories: testAccProviders, + IsUnitTest: false, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResMalwarePolicyActions/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_test.go b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_test.go index ecdfabebd..29c9964f7 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_test.go @@ -70,8 +70,8 @@ func TestAkamaiMalwarePolicy_res_basic(t *testing.T) { ).Return(nil) useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResMalwarePolicy/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_malware_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_malware_protection_test.go index f4e23dc23..80cef6291 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_malware_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_malware_protection_test.go @@ -68,8 +68,8 @@ func TestAkamaiMalwareProtection_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResMalwareProtection/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_match_target_sequence_test.go b/pkg/providers/appsec/resource_akamai_appsec_match_target_sequence_test.go index c782ff282..1cd2fd209 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_match_target_sequence_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_match_target_sequence_test.go @@ -44,8 +44,8 @@ func TestAkamaiMatchTargetSequence_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResMatchTargetSequence/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_match_target_test.go b/pkg/providers/appsec/resource_akamai_appsec_match_target_test.go index cf7cacd9b..428dc1e9f 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_match_target_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_match_target_test.go @@ -74,8 +74,8 @@ func TestAkamaiMatchTarget_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResMatchTarget/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_penalty_box_test.go b/pkg/providers/appsec/resource_akamai_appsec_penalty_box_test.go index bfde39952..2eb65968f 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_penalty_box_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_penalty_box_test.go @@ -44,8 +44,8 @@ func TestAkamaiPenaltyBox_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResPenaltyBox/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_rate_policy_action_test.go b/pkg/providers/appsec/resource_akamai_appsec_rate_policy_action_test.go index 0b2741bda..792d8f385 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rate_policy_action_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rate_policy_action_test.go @@ -94,8 +94,8 @@ func TestAkamaiRatePolicyAction_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResRatePolicyAction/create.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_rate_policy_test.go b/pkg/providers/appsec/resource_akamai_appsec_rate_policy_test.go index 7fa936196..769e6d885 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rate_policy_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rate_policy_test.go @@ -75,8 +75,8 @@ func TestAkamaiRatePolicy_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResRatePolicy/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_rate_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_rate_protection_test.go index 7c8e4d331..1ba939f73 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rate_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rate_protection_test.go @@ -89,8 +89,8 @@ func TestAkamaiRateProtection_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResRateProtection/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_reputation_analysis_test.go b/pkg/providers/appsec/resource_akamai_appsec_reputation_analysis_test.go index cf6d6100f..b1b0aa57f 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_reputation_analysis_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_reputation_analysis_test.go @@ -53,8 +53,8 @@ func TestAkamaiReputationAnalysis_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResReputationAnalysis/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_action_test.go b/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_action_test.go index b9cc7abe9..246899bba 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_action_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_action_test.go @@ -44,8 +44,8 @@ func TestAkamaiReputationProfileAction_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResReputationProfileAction/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_test.go b/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_test.go index 80035258d..63d3776ab 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_test.go @@ -53,8 +53,8 @@ func TestAkamaiReputationProfile_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: false, - ProviderFactories: testAccProviders, + IsUnitTest: false, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResReputationProfile/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_reputation_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_reputation_protection_test.go index 49979613a..2f5d80a08 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_reputation_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_reputation_protection_test.go @@ -89,8 +89,8 @@ func TestAkamaiReputationProtection_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResReputationProtection/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_rule_test.go b/pkg/providers/appsec/resource_akamai_appsec_rule_test.go index cfd0b569d..6fe3adbd3 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rule_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rule_test.go @@ -54,8 +54,8 @@ func TestAkamaiRule_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResRule/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_rule_upgrade_test.go b/pkg/providers/appsec/resource_akamai_appsec_rule_upgrade_test.go index 223b9123e..e658aa29a 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rule_upgrade_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rule_upgrade_test.go @@ -44,8 +44,8 @@ func TestAkamaiRuleUpgrade_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResRuleUpgrade/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_security_policy_default_protections_test.go b/pkg/providers/appsec/resource_akamai_appsec_security_policy_default_protections_test.go index 768a92789..bf59e9e6b 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_security_policy_default_protections_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_security_policy_default_protections_test.go @@ -73,8 +73,8 @@ func TestAkamaiSecurityPolicyDefaultProtections_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResSecurityPolicyDefaultProtections/match_by_id.tf"), @@ -117,8 +117,8 @@ func TestAkamaiSecurityPolicyDefaultProtections_res_failure_creating_policy(t *t useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResSecurityPolicyDefaultProtections/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_security_policy_rename_test.go b/pkg/providers/appsec/resource_akamai_appsec_security_policy_rename_test.go index 24eddcd90..355757666 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_security_policy_rename_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_security_policy_rename_test.go @@ -44,8 +44,8 @@ func TestAkamaiSecurityPolicyRename_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResSecurityPolicyRename/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_security_policy_test.go b/pkg/providers/appsec/resource_akamai_appsec_security_policy_test.go index 7d6e085b8..7328ee5ef 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_security_policy_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_security_policy_test.go @@ -53,8 +53,8 @@ func TestAkamaiSecurityPolicy_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResSecurityPolicy/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_selected_hostname_test.go b/pkg/providers/appsec/resource_akamai_appsec_selected_hostname_test.go index 368366429..224207fff 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_selected_hostname_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_selected_hostname_test.go @@ -56,8 +56,8 @@ func TestAkamaiSelectedHostname_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResSelectedHostname/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_siem_settings_test.go b/pkg/providers/appsec/resource_akamai_appsec_siem_settings_test.go index e9433c5cf..a62655e78 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_siem_settings_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_siem_settings_test.go @@ -53,8 +53,8 @@ func TestAkamaiSiemSettings_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResSiemSettings/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_slow_post_protection_setting_test.go b/pkg/providers/appsec/resource_akamai_appsec_slow_post_protection_setting_test.go index d1ed74d42..9ecc79f56 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_slow_post_protection_setting_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_slow_post_protection_setting_test.go @@ -54,8 +54,8 @@ func TestAkamaiSlowPostProtectionSetting_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResSlowPostProtectionSetting/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_slowpost_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_slowpost_protection_test.go index ef222c6ac..328cebee3 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_slowpost_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_slowpost_protection_test.go @@ -68,8 +68,8 @@ func TestAkamaiSlowPostProtection_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResSlowPostProtection/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_threat_intel_test.go b/pkg/providers/appsec/resource_akamai_appsec_threat_intel_test.go index 91fc722de..282816485 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_threat_intel_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_threat_intel_test.go @@ -44,8 +44,8 @@ func TestAkamaiThreatIntel_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThreatIntel/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_version_notes_test.go b/pkg/providers/appsec/resource_akamai_appsec_version_notes_test.go index fe9edff1d..3b74a1e1c 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_version_notes_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_version_notes_test.go @@ -44,8 +44,8 @@ func TestAkamaiVersionNotes_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResVersionNotes/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_waf_mode_test.go b/pkg/providers/appsec/resource_akamai_appsec_waf_mode_test.go index 57e93ac21..c324849cb 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_waf_mode_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_waf_mode_test.go @@ -44,8 +44,8 @@ func TestAkamaiWAFMode_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResWAFMode/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_waf_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_waf_protection_test.go index 19139a2c8..1d4c4a9c6 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_waf_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_waf_protection_test.go @@ -68,8 +68,8 @@ func TestAkamaiWAFProtection_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResWAFProtection/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_wap_selected_hostnames_test.go b/pkg/providers/appsec/resource_akamai_appsec_wap_selected_hostnames_test.go index 518883098..e646db9ee 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_wap_selected_hostnames_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_wap_selected_hostnames_test.go @@ -53,8 +53,8 @@ func TestAkamaiWAPSelectedHostnames_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResWAPSelectedHostnames/match_by_id.tf"), @@ -111,8 +111,8 @@ func TestAkamaiWAPSelectedHostnames_res_error_retrieving_hostnames(t *testing.T) useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResWAPSelectedHostnames/match_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action_test.go b/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action_test.go index 8eaec348f..301b993d6 100644 --- a/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action_test.go @@ -40,8 +40,8 @@ func TestDataAkamaiBotCategoryAction(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataAkamaiBotCategoryAction/basic.tf"), @@ -76,8 +76,8 @@ func TestDataAkamaiBotCategoryAction(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataAkamaiBotCategoryAction/filter_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_akamai_bot_category_test.go b/pkg/providers/botman/data_akamai_botman_akamai_bot_category_test.go index 42bff636c..58187133c 100644 --- a/pkg/providers/botman/data_akamai_botman_akamai_bot_category_test.go +++ b/pkg/providers/botman/data_akamai_botman_akamai_bot_category_test.go @@ -38,8 +38,8 @@ func TestDataAkamaiBotCategory(t *testing.T) { ).Return(&response, nil) useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataAkamaiBotCategory/basic.tf"), @@ -72,8 +72,8 @@ func TestDataAkamaiBotCategory(t *testing.T) { ).Return(&response, nil) useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataAkamaiBotCategory/filter_by_name.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_akamai_defined_bot_test.go b/pkg/providers/botman/data_akamai_botman_akamai_defined_bot_test.go index a6eee13f8..c0493420d 100644 --- a/pkg/providers/botman/data_akamai_botman_akamai_defined_bot_test.go +++ b/pkg/providers/botman/data_akamai_botman_akamai_defined_bot_test.go @@ -38,8 +38,8 @@ func TestDataAkamaiDefinedBot(t *testing.T) { ).Return(&response, nil) useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataAkamaiDefinedBot/basic.tf"), @@ -72,8 +72,8 @@ func TestDataAkamaiDefinedBot(t *testing.T) { ).Return(&response, nil) useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataAkamaiDefinedBot/filter_by_name.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_test.go b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_test.go index cdc134e77..e0da5e8ca 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_test.go @@ -23,8 +23,8 @@ func TestDataBotAnalyticsCookie(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataBotAnalyticsCookie/basic.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values_test.go b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values_test.go index 91f6b53ba..0453d3f14 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values_test.go @@ -37,8 +37,8 @@ func TestDataBotAnalyticsCookieValue(t *testing.T) { ).Return(response, nil) useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataBotAnalyticsCookieValues/basic.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_bot_category_exception_test.go b/pkg/providers/botman/data_akamai_botman_bot_category_exception_test.go index 7f321903a..b0a1e5fcc 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_category_exception_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_category_exception_test.go @@ -23,8 +23,8 @@ func TestDataBotCategoryException(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataBotCategoryException/basic.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_bot_detection_action_test.go b/pkg/providers/botman/data_akamai_botman_bot_detection_action_test.go index 245aa485b..28733e000 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_detection_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_detection_action_test.go @@ -40,8 +40,8 @@ func TestDataBotDetectionAction(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataBotDetectionAction/basic.tf"), @@ -76,8 +76,8 @@ func TestDataBotDetectionAction(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataBotDetectionAction/filter_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_bot_detection_test.go b/pkg/providers/botman/data_akamai_botman_bot_detection_test.go index e9dd6e1d5..779bd9d5f 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_detection_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_detection_test.go @@ -38,8 +38,8 @@ func TestDataBotDetection(t *testing.T) { ).Return(&response, nil) useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataBotDetection/basic.tf"), @@ -72,8 +72,8 @@ func TestDataBotDetection(t *testing.T) { ).Return(&response, nil) useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataBotDetection/filter_by_name.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report_test.go b/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report_test.go index 644f7d5d3..056947c70 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report_test.go @@ -40,8 +40,8 @@ func TestDataBotEndpointCoverageReport(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataBotEndpointCoverageReport/basic.tf"), @@ -76,8 +76,8 @@ func TestDataBotEndpointCoverageReport(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataBotEndpointCoverageReport/filter_by_id.tf"), @@ -120,8 +120,8 @@ func TestDataBotEndpointCoverageReport(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataBotEndpointCoverageReport/with_config.tf"), @@ -156,8 +156,8 @@ func TestDataBotEndpointCoverageReport(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataBotEndpointCoverageReport/with_config_filter_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_bot_management_settings_test.go b/pkg/providers/botman/data_akamai_botman_bot_management_settings_test.go index 36dcbbc04..0683652de 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_management_settings_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_management_settings_test.go @@ -23,8 +23,8 @@ func TestDataBotManagementSettings(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataBotManagementSettings/basic.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_challenge_action_test.go b/pkg/providers/botman/data_akamai_botman_challenge_action_test.go index db325a52d..2d3e20624 100644 --- a/pkg/providers/botman/data_akamai_botman_challenge_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_challenge_action_test.go @@ -40,8 +40,8 @@ func TestDataChallengeAction(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataChallengeAction/basic.tf"), @@ -76,8 +76,8 @@ func TestDataChallengeAction(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataChallengeAction/filter_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_challenge_injection_rules_test.go b/pkg/providers/botman/data_akamai_botman_challenge_injection_rules_test.go index ea36f67fe..9cda30ba3 100644 --- a/pkg/providers/botman/data_akamai_botman_challenge_injection_rules_test.go +++ b/pkg/providers/botman/data_akamai_botman_challenge_injection_rules_test.go @@ -23,8 +23,8 @@ func TestDataChallengeInjectionRules(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataChallengeInjectionRules/basic.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_challenge_interception_rules_test.go b/pkg/providers/botman/data_akamai_botman_challenge_interception_rules_test.go index c2713ba26..f8e536f1c 100644 --- a/pkg/providers/botman/data_akamai_botman_challenge_interception_rules_test.go +++ b/pkg/providers/botman/data_akamai_botman_challenge_interception_rules_test.go @@ -23,8 +23,8 @@ func TestDataChallengeInterceptionRules(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataChallengeInterceptionRules/basic.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_client_side_security_test.go b/pkg/providers/botman/data_akamai_botman_client_side_security_test.go index 415eb1a1c..8aa8231f7 100644 --- a/pkg/providers/botman/data_akamai_botman_client_side_security_test.go +++ b/pkg/providers/botman/data_akamai_botman_client_side_security_test.go @@ -23,8 +23,8 @@ func TestDataClientSideSecurity(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataClientSideSecurity/basic.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_conditional_action_test.go b/pkg/providers/botman/data_akamai_botman_conditional_action_test.go index bd5733acf..079f935aa 100644 --- a/pkg/providers/botman/data_akamai_botman_conditional_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_conditional_action_test.go @@ -40,8 +40,8 @@ func TestDataConditionalAction(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataConditionalAction/basic.tf"), @@ -76,8 +76,8 @@ func TestDataConditionalAction(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataConditionalAction/filter_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_custom_bot_category_action_test.go b/pkg/providers/botman/data_akamai_botman_custom_bot_category_action_test.go index 343b3ee45..c331fc9cd 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_bot_category_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_bot_category_action_test.go @@ -40,8 +40,8 @@ func TestDataCustomBotCategoryAction(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataCustomBotCategoryAction/basic.tf"), @@ -76,8 +76,8 @@ func TestDataCustomBotCategoryAction(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataCustomBotCategoryAction/filter_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence_test.go b/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence_test.go index fb656bd9c..2a4f9a15c 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence_test.go @@ -24,8 +24,8 @@ func TestDataCustomBotCategorySequence(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataCustomBotCategorySequence/basic.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_custom_bot_category_test.go b/pkg/providers/botman/data_akamai_botman_custom_bot_category_test.go index 1b0b408e2..2d90a9051 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_bot_category_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_bot_category_test.go @@ -40,8 +40,8 @@ func TestDataCustomBotCategory(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataCustomBotCategory/basic.tf"), @@ -76,8 +76,8 @@ func TestDataCustomBotCategory(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataCustomBotCategory/filter_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_custom_client_sequence_test.go b/pkg/providers/botman/data_akamai_botman_custom_client_sequence_test.go index 94fc0966f..e9acaad80 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_client_sequence_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_client_sequence_test.go @@ -24,8 +24,8 @@ func TestDataCustomClientSequence(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataCustomClientSequence/basic.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_custom_client_test.go b/pkg/providers/botman/data_akamai_botman_custom_client_test.go index 3a092e9c5..f1949bb4b 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_client_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_client_test.go @@ -40,8 +40,8 @@ func TestDataCustomClient(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataCustomClient/basic.tf"), @@ -76,8 +76,8 @@ func TestDataCustomClient(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataCustomClient/filter_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_custom_defined_bot_test.go b/pkg/providers/botman/data_akamai_botman_custom_defined_bot_test.go index dd088e115..761cd54ad 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_defined_bot_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_defined_bot_test.go @@ -40,8 +40,8 @@ func TestDataCustomDefinedBot(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataCustomDefinedBot/basic.tf"), @@ -76,8 +76,8 @@ func TestDataCustomDefinedBot(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataCustomDefinedBot/filter_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_custom_deny_action_test.go b/pkg/providers/botman/data_akamai_botman_custom_deny_action_test.go index ca2d5476c..810386a45 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_deny_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_deny_action_test.go @@ -40,8 +40,8 @@ func TestDataCustomDenyAction(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataCustomDenyAction/basic.tf"), @@ -76,8 +76,8 @@ func TestDataCustomDenyAction(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataCustomDenyAction/filter_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_javascript_injection_test.go b/pkg/providers/botman/data_akamai_botman_javascript_injection_test.go index 9b023ce25..942d343b9 100644 --- a/pkg/providers/botman/data_akamai_botman_javascript_injection_test.go +++ b/pkg/providers/botman/data_akamai_botman_javascript_injection_test.go @@ -23,8 +23,8 @@ func TestDataJavascriptInjection(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataJavascriptInjection/basic.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot_test.go b/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot_test.go index dc9958ddd..17f6c9dfe 100644 --- a/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot_test.go +++ b/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot_test.go @@ -40,8 +40,8 @@ func TestDataRecategorizedAkamaiDefinedBot(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataRecategorizedAkamaiDefinedBot/basic.tf"), @@ -76,8 +76,8 @@ func TestDataRecategorizedAkamaiDefinedBot(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataRecategorizedAkamaiDefinedBot/filter_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_response_action_test.go b/pkg/providers/botman/data_akamai_botman_response_action_test.go index 2bef29f50..691ca41b6 100644 --- a/pkg/providers/botman/data_akamai_botman_response_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_response_action_test.go @@ -40,8 +40,8 @@ func TestDataResponseAction(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataResponseAction/basic.tf"), @@ -76,8 +76,8 @@ func TestDataResponseAction(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataResponseAction/filter_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_serve_alternate_action_test.go b/pkg/providers/botman/data_akamai_botman_serve_alternate_action_test.go index 3e1ae617f..faae3657d 100644 --- a/pkg/providers/botman/data_akamai_botman_serve_alternate_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_serve_alternate_action_test.go @@ -40,8 +40,8 @@ func TestDataServeAlternateAction(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataServeAlternateAction/basic.tf"), @@ -76,8 +76,8 @@ func TestDataServeAlternateAction(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataServeAlternateAction/filter_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection_test.go b/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection_test.go index d1a0e10f4..cdbdb7931 100644 --- a/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection_test.go +++ b/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection_test.go @@ -23,8 +23,8 @@ func TestDataTransactionalEndpointProtection(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataTransactionalEndpointProtection/basic.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_transactional_endpoint_test.go b/pkg/providers/botman/data_akamai_botman_transactional_endpoint_test.go index 67fba03fe..71f3bc81b 100644 --- a/pkg/providers/botman/data_akamai_botman_transactional_endpoint_test.go +++ b/pkg/providers/botman/data_akamai_botman_transactional_endpoint_test.go @@ -40,8 +40,8 @@ func TestDataTransactionalEndpoint(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataTransactionalEndpoint/basic.tf"), @@ -76,8 +76,8 @@ func TestDataTransactionalEndpoint(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataTransactionalEndpoint/filter_by_id.tf"), diff --git a/pkg/providers/botman/provider_test.go b/pkg/providers/botman/provider_test.go index 13eb4ccb2..4cf790f3c 100644 --- a/pkg/providers/botman/provider_test.go +++ b/pkg/providers/botman/provider_test.go @@ -12,17 +12,37 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-go/tfprotov6" + "github.com/hashicorp/terraform-plugin-mux/tf5to6server" + "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" ) -var testAccProviders map[string]func() (*schema.Provider, error) -var testAccProvider *schema.Provider +var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) func TestMain(m *testing.M) { - testAccProvider = akamai.NewPluginProvider(NewSubprovider())() - testAccProviders = map[string]func() (*schema.Provider, error){ - "akamai": func() (*schema.Provider, error) { - return testAccProvider, nil + testAccPluginProvider := akamai.NewPluginProvider(NewSubprovider())() + testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ + "akamai": func() (tfprotov6.ProviderServer, error) { + upgradedPluginProvider, err := tf5to6server.UpgradeServer( + context.Background(), + testAccPluginProvider.GRPCProvider, + ) + if err != nil { + return nil, err + } + + providers := []func() tfprotov6.ProviderServer{ + func() tfprotov6.ProviderServer { + return upgradedPluginProvider + }, + } + + muxServer, err := tf6muxserver.NewMuxServer(context.Background(), providers...) + if err != nil { + return nil, err + } + + return muxServer.ProviderServer(), nil }, } diff --git a/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action_test.go b/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action_test.go index 4e650394e..5ff7be374 100644 --- a/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action_test.go @@ -65,8 +65,8 @@ func TestResourceAkamaiBotCategoryAction(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceAkamaiBotCategoryAction/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie_test.go b/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie_test.go index 21f405355..a6318497a 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie_test.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie_test.go @@ -56,8 +56,8 @@ func TestResourceBotAnalyticsCookie(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceBotAnalyticsCookie/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_bot_category_exception_test.go b/pkg/providers/botman/resource_akamai_botman_bot_category_exception_test.go index bdd701917..623346599 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_category_exception_test.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_category_exception_test.go @@ -60,8 +60,8 @@ func TestResourceBotCategoryException(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceBotCategoryException/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_bot_detection_action_test.go b/pkg/providers/botman/resource_akamai_botman_bot_detection_action_test.go index 51b438792..d42a73bbc 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_detection_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_detection_action_test.go @@ -65,8 +65,8 @@ func TestResourceBotDetectionAction(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceBotDetectionAction/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_bot_management_settings_test.go b/pkg/providers/botman/resource_akamai_botman_bot_management_settings_test.go index 8d39b1700..81cc5fe91 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_management_settings_test.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_management_settings_test.go @@ -60,8 +60,8 @@ func TestResourceBotManagementSettings(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceBotManagementSettings/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_challenge_action_test.go b/pkg/providers/botman/resource_akamai_botman_challenge_action_test.go index e28b284a2..ee9569db7 100644 --- a/pkg/providers/botman/resource_akamai_botman_challenge_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_challenge_action_test.go @@ -69,8 +69,8 @@ func TestResourceChallengeAction(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceChallengeAction/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules_test.go b/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules_test.go index 8921d5124..015b13bb0 100644 --- a/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules_test.go +++ b/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules_test.go @@ -56,8 +56,8 @@ func TestResourceChallengeInjectionRules(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceChallengeInjectionRules/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules_test.go b/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules_test.go index 025d32af8..e004c0e40 100644 --- a/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules_test.go +++ b/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules_test.go @@ -56,8 +56,8 @@ func TestResourceChallengeInterceptionRules(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceChallengeInterceptionRules/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_client_side_security_test.go b/pkg/providers/botman/resource_akamai_botman_client_side_security_test.go index bc021cdfc..ee01269f0 100644 --- a/pkg/providers/botman/resource_akamai_botman_client_side_security_test.go +++ b/pkg/providers/botman/resource_akamai_botman_client_side_security_test.go @@ -56,8 +56,8 @@ func TestResourceClientSideSecurity(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceClientSideSecurity/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_conditional_action_test.go b/pkg/providers/botman/resource_akamai_botman_conditional_action_test.go index 28b8a857d..cda509e09 100644 --- a/pkg/providers/botman/resource_akamai_botman_conditional_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_conditional_action_test.go @@ -69,8 +69,8 @@ func TestResourceConditionalAction(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceConditionalAction/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action_test.go b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action_test.go index 8b8e1aba8..ac5cbb974 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action_test.go @@ -65,8 +65,8 @@ func TestResourceCustomBotCategoryAction(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceCustomBotCategoryAction/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence_test.go b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence_test.go index 91d52771b..aa6507ef8 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence_test.go @@ -55,8 +55,8 @@ func TestResourceCustomBotCategorySequence(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceCustomBotCategorySequence/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_test.go b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_test.go index b206bc62e..4e2c64c3b 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_test.go @@ -69,8 +69,8 @@ func TestResourceCustomBotCategory(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceCustomBotCategory/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_custom_client_sequence_test.go b/pkg/providers/botman/resource_akamai_botman_custom_client_sequence_test.go index e9d9b9c1e..8651c4750 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_client_sequence_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_client_sequence_test.go @@ -55,8 +55,8 @@ func TestResourceCustomClientSequence(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceCustomClientSequence/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_custom_client_test.go b/pkg/providers/botman/resource_akamai_botman_custom_client_test.go index 66af90b27..712ab6c6d 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_client_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_client_test.go @@ -69,8 +69,8 @@ func TestResourceCustomClient(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceCustomClient/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_custom_defined_bot_test.go b/pkg/providers/botman/resource_akamai_botman_custom_defined_bot_test.go index 3a148020a..82b34f201 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_defined_bot_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_defined_bot_test.go @@ -69,8 +69,8 @@ func TestResourceCustomDefinedBot(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceCustomDefinedBot/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_custom_deny_action_test.go b/pkg/providers/botman/resource_akamai_botman_custom_deny_action_test.go index e7c9aa98f..3f61ce80f 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_deny_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_deny_action_test.go @@ -69,8 +69,8 @@ func TestResourceCustomDenyAction(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceCustomDenyAction/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_javascript_injection_test.go b/pkg/providers/botman/resource_akamai_botman_javascript_injection_test.go index 72c750a85..34dbd5af6 100644 --- a/pkg/providers/botman/resource_akamai_botman_javascript_injection_test.go +++ b/pkg/providers/botman/resource_akamai_botman_javascript_injection_test.go @@ -60,8 +60,8 @@ func TestResourceJavascriptInjection(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceJavascriptInjection/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot_test.go b/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot_test.go index 238e9abf6..9795599ea 100644 --- a/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot_test.go +++ b/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot_test.go @@ -65,8 +65,8 @@ func TestResourceRecategorizedAkamaiDefinedBot(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceRecategorizedAkamaiDefinedBot/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_serve_alternate_action_test.go b/pkg/providers/botman/resource_akamai_botman_serve_alternate_action_test.go index 5010bcd70..89a31d200 100644 --- a/pkg/providers/botman/resource_akamai_botman_serve_alternate_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_serve_alternate_action_test.go @@ -69,8 +69,8 @@ func TestResourceServeAlternateAction(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceServeAlternateAction/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection_test.go b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection_test.go index 789bb0344..7eee58533 100644 --- a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection_test.go +++ b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection_test.go @@ -56,8 +56,8 @@ func TestResourceTransactionalEndpointProtection(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceTransactionalEndpointProtection/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_test.go b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_test.go index 6e168b0de..371425c77 100644 --- a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_test.go +++ b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_test.go @@ -74,8 +74,8 @@ func TestResourceTransactionalEndpoint(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceTransactionalEndpoint/create.tf"), diff --git a/pkg/providers/clientlists/data_akamai_clientlist_lists_test.go b/pkg/providers/clientlists/data_akamai_clientlist_lists_test.go index 6ea1778b8..70810ff20 100644 --- a/pkg/providers/clientlists/data_akamai_clientlist_lists_test.go +++ b/pkg/providers/clientlists/data_akamai_clientlist_lists_test.go @@ -92,8 +92,8 @@ func TestClientList_data_all_lists(t *testing.T) { } resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.config, diff --git a/pkg/providers/clientlists/provider_test.go b/pkg/providers/clientlists/provider_test.go index c6ff1f012..fa2c0ed1c 100644 --- a/pkg/providers/clientlists/provider_test.go +++ b/pkg/providers/clientlists/provider_test.go @@ -1,6 +1,7 @@ package clientlists import ( + "context" "io/ioutil" "log" "os" @@ -10,20 +11,40 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/clientlists" "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-go/tfprotov6" + "github.com/hashicorp/terraform-plugin-mux/tf5to6server" + "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" ) -var testAccProviders map[string]func() (*schema.Provider, error) - -var testAccProvider *schema.Provider +var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) func TestMain(m *testing.M) { - testAccProvider = akamai.NewPluginProvider(NewSubprovider())() - testAccProviders = map[string]func() (*schema.Provider, error){ - "akamai": func() (*schema.Provider, error) { - return testAccProvider, nil + testAccPluginProvider := akamai.NewPluginProvider(NewSubprovider())() + testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ + "akamai": func() (tfprotov6.ProviderServer, error) { + upgradedPluginProvider, err := tf5to6server.UpgradeServer( + context.Background(), + testAccPluginProvider.GRPCProvider, + ) + if err != nil { + return nil, err + } + + providers := []func() tfprotov6.ProviderServer{ + func() tfprotov6.ProviderServer { + return upgradedPluginProvider + }, + } + + muxServer, err := tf6muxserver.NewMuxServer(context.Background(), providers...) + if err != nil { + return nil, err + } + + return muxServer.ProviderServer(), nil }, } + if err := testutils.TFTestSetup(); err != nil { log.Fatal(err) } diff --git a/pkg/providers/clientlists/resource_akamai_clientlists_list_activation_test.go b/pkg/providers/clientlists/resource_akamai_clientlists_list_activation_test.go index 28057c2ff..e3d41ea7d 100644 --- a/pkg/providers/clientlists/resource_akamai_clientlists_list_activation_test.go +++ b/pkg/providers/clientlists/resource_akamai_clientlists_list_activation_test.go @@ -155,7 +155,7 @@ func TestClientListActivationResource(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/activation_create.tf", testDir)), @@ -220,7 +220,7 @@ func TestClientListActivationResource(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/activation_create.tf", testDir)), @@ -296,7 +296,7 @@ func TestClientListActivationResource(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/activation_create.tf", testDir)), @@ -352,7 +352,7 @@ func TestClientListActivationResource(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/activation_create.tf", testDir)), @@ -402,7 +402,7 @@ func TestClientListActivationResource(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/activation_create.tf", testDir)), @@ -437,7 +437,7 @@ func TestClientListActivationResource(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/activation_missing_param.tf", testDir)), @@ -465,7 +465,7 @@ func TestClientListActivationResource(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/activation_create.tf", testDir)), diff --git a/pkg/providers/clientlists/resource_akamai_clientlists_list_test.go b/pkg/providers/clientlists/resource_akamai_clientlists_list_test.go index e8a90907c..e6c977d9e 100644 --- a/pkg/providers/clientlists/resource_akamai_clientlists_list_test.go +++ b/pkg/providers/clientlists/resource_akamai_clientlists_list_test.go @@ -180,7 +180,7 @@ func TestResourceClientList(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/list_create.tf", testDir)), @@ -228,7 +228,7 @@ func TestResourceClientList(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/list_create.tf", testDir)), @@ -280,7 +280,7 @@ func TestResourceClientList(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/list_create_empty_tags.tf", testDir)), @@ -340,7 +340,7 @@ func TestResourceClientList(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/list_create.tf", testDir)), @@ -399,7 +399,7 @@ func TestResourceClientList(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/list_and_items_create.tf", testDir)), @@ -504,7 +504,7 @@ func TestResourceClientList(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/list_and_items_create.tf", testDir)), @@ -616,7 +616,7 @@ func TestResourceClientList(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/list_and_items_create.tf", testDir)), @@ -691,7 +691,7 @@ func TestResourceClientList(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/list_and_items_create_one_item.tf", testDir)), @@ -755,7 +755,7 @@ func TestResourceClientList(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/list_and_items_create_one_item.tf", testDir)), @@ -780,7 +780,7 @@ func TestResourceClientList(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/list_and_duplicate_items_create.tf", testDir)), diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule_test.go index fa5556912..34b1ef87a 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule_test.go @@ -47,7 +47,7 @@ func TestDataCloudletsAPIPrioritizationMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -105,7 +105,7 @@ func TestIncorrectDataCloudletsAPIPrioritizationMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule_test.go index dd8af1a28..0db6ef8f7 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule_test.go @@ -50,7 +50,7 @@ func TestDataCloudletsLoadBalancerMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -100,7 +100,7 @@ func TestIncorrectDataCloudletsLoadBalancerMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_test.go index 4d7ad3c0b..3c1dddd76 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_test.go @@ -164,7 +164,7 @@ func TestDataApplicationLoadBalancer(t *testing.T) { test.init(client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule_test.go index eb10e199c..6afab37f4 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule_test.go @@ -54,7 +54,7 @@ func TestDataCloudletsAudienceSegmentationMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -112,7 +112,7 @@ func TestIncorrectDataCloudletsAudienceSegmentationMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule_test.go index e42575f9a..22601f24a 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule_test.go @@ -59,7 +59,7 @@ func TestDataCloudletsEdgeRedirectorMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -113,7 +113,7 @@ func TestIncorrectDataCloudletsEdgeRedirectorMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule_test.go index 42fbe4c66..b9af6e2ce 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule_test.go @@ -45,7 +45,7 @@ func TestDataCloudletsForwardRewriteMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -91,7 +91,7 @@ func TestIncorrectDataCloudletsForwardRewriteMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule_test.go index fffed79c5..79952f0e3 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule_test.go @@ -45,7 +45,7 @@ func TestDataCloudletsPhasedReleaseMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -95,7 +95,7 @@ func TestIncorrectDataPhasedReleaseDeploymentMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_policy_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_policy_test.go index 3ddaf49a0..b0176a44a 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_policy_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_policy_test.go @@ -4,12 +4,10 @@ import ( "regexp" "testing" - "github.com/stretchr/testify/mock" - - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/stretchr/testify/mock" ) func TestDataCloudletsPolicy(t *testing.T) { @@ -283,7 +281,7 @@ func TestDataCloudletsPolicy(t *testing.T) { client.On("GetPolicy", mock.Anything, mock.Anything).Return(&test.getPolicyReturn, nil) client.On("GetPolicyVersion", mock.Anything, mock.Anything).Return(&test.getPolicyVersionReturn, nil) resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule_test.go index e055112ae..fa4366e78 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule_test.go @@ -49,7 +49,7 @@ func TestDataCloudletsRequestControlMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -107,7 +107,7 @@ func TestIncorrectDataCloudletsRequestControlMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule_test.go index 113198350..8917082b5 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule_test.go @@ -47,7 +47,7 @@ func TestDataCloudletsVisitorPrioritizationMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -102,7 +102,7 @@ func TestIncorrectDataCloudletsVisitorPrioritizationMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/cloudlets/provider_test.go b/pkg/providers/cloudlets/provider_test.go index 58a915600..e4056ef02 100644 --- a/pkg/providers/cloudlets/provider_test.go +++ b/pkg/providers/cloudlets/provider_test.go @@ -7,21 +7,22 @@ import ( "sync" "testing" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" "github.com/hashicorp/terraform-plugin-framework/provider" "github.com/hashicorp/terraform-plugin-framework/providerserver" - "github.com/hashicorp/terraform-plugin-go/tfprotov5" - "github.com/hashicorp/terraform-plugin-mux/tf5muxserver" "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/hashicorp/terraform-plugin-go/tfprotov6" + "github.com/hashicorp/terraform-plugin-mux/tf5to6server" + "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets/v3" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) var ( - testAccProviders map[string]func() (tfprotov5.ProviderServer, error) + testAccProviders map[string]func() (tfprotov6.ProviderServer, error) testAccPluginProvider *schema.Provider testAccFrameworkProvider provider.Provider ) @@ -30,17 +31,26 @@ func TestMain(m *testing.M) { testAccPluginProvider = akamai.NewPluginProvider(NewPluginSubprovider())() testAccFrameworkProvider = akamai.NewFrameworkProvider(NewFrameworkSubprovider())() - testAccProviders = map[string]func() (tfprotov5.ProviderServer, error){ - "akamai": func() (tfprotov5.ProviderServer, error) { + testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ + "akamai": func() (tfprotov6.ProviderServer, error) { ctx := context.Background() - providers := []func() tfprotov5.ProviderServer{ + upgradedPluginProvider, err := tf5to6server.UpgradeServer( + context.Background(), testAccPluginProvider.GRPCProvider, - providerserver.NewProtocol5( + ) + if err != nil { + return nil, err + } + providers := []func() tfprotov6.ProviderServer{ + func() tfprotov6.ProviderServer { + return upgradedPluginProvider + }, + providerserver.NewProtocol6( testAccFrameworkProvider, ), } - muxServer, err := tf5muxserver.NewMuxServer(ctx, providers...) + muxServer, err := tf6muxserver.NewMuxServer(ctx, providers...) if err != nil { return nil, err } diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_activation_test.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_activation_test.go index f45d487f1..6fd454fa0 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_activation_test.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_activation_test.go @@ -474,7 +474,7 @@ func TestResourceCloudletsApplicationLoadBalancerActivation(t *testing.T) { test.init(client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, IsUnitTest: true, Steps: test.steps, }) diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_test.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_test.go index 489d343b6..d877daa90 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_test.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_test.go @@ -235,7 +235,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -275,7 +275,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -315,7 +315,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -355,7 +355,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -402,7 +402,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -447,7 +447,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -513,7 +513,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -539,7 +539,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -580,7 +580,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -626,7 +626,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -650,7 +650,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -679,7 +679,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -706,7 +706,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -737,7 +737,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -771,7 +771,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -805,7 +805,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -827,7 +827,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_test.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_test.go index 060fa0b10..02f543ac9 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_test.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_test.go @@ -1027,7 +1027,7 @@ func TestResourceCloudletsPolicyActivation(t *testing.T) { test.init(client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, IsUnitTest: true, Steps: test.steps, }) diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go index 92266e10d..84b9ffd13 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go @@ -277,7 +277,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -415,7 +415,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -473,7 +473,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -540,7 +540,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -607,7 +607,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -683,7 +683,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -745,7 +745,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -808,7 +808,7 @@ func TestResourcePolicyV2(t *testing.T) { expectRemovePolicy(t, client, 2, 1, 0) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -877,7 +877,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -978,7 +978,7 @@ func TestResourcePolicyV2(t *testing.T) { testCases[i].Expectations(client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -1002,7 +1002,7 @@ func TestResourcePolicyV2(t *testing.T) { expectRemovePolicy(t, client, 2, 1, 0) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -1029,7 +1029,7 @@ func TestResourcePolicyV2(t *testing.T) { expectRemovePolicy(t, client, 2, 1, 0) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -1086,7 +1086,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -1185,7 +1185,7 @@ func TestResourcePolicyV2(t *testing.T) { testCases[i].Expectations(client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -1207,7 +1207,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -1259,7 +1259,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -1333,7 +1333,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -1402,7 +1402,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -1435,7 +1435,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_capacities_test.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_capacities_test.go index c65087b21..1b3797244 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_capacities_test.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_capacities_test.go @@ -105,7 +105,7 @@ func TestCapacitiesDataSource(t *testing.T) { } resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: newProviderFactory(withMockClient(client)), + ProtoV6ProviderFactories: newProviderFactory(withMockClient(client)), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configuration_test.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configuration_test.go index 191f2d40f..0b091c644 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configuration_test.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configuration_test.go @@ -172,7 +172,7 @@ func TestConfigurationDataSource(t *testing.T) { } resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: newProviderFactory(withMockClient(client)), + ProtoV6ProviderFactories: newProviderFactory(withMockClient(client)), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configurations_test.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configurations_test.go index b9d692ab5..4249e01b5 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configurations_test.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configurations_test.go @@ -72,7 +72,7 @@ func TestDataConfigurations(t *testing.T) { } resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: newProviderFactory(withMockClient(client)), + ProtoV6ProviderFactories: newProviderFactory(withMockClient(client)), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_location_test.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_location_test.go index 3e78f86bd..772acddea 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_location_test.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_location_test.go @@ -102,7 +102,7 @@ func TestDataLocation(t *testing.T) { } resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: newProviderFactory(withMockClient(client)), + ProtoV6ProviderFactories: newProviderFactory(withMockClient(client)), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_locations_test.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_locations_test.go index 43e3c5b22..f9e4036f6 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_locations_test.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_locations_test.go @@ -90,7 +90,7 @@ func TestDataLocations(t *testing.T) { } resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: newProviderFactory(withMockClient(client)), + ProtoV6ProviderFactories: newProviderFactory(withMockClient(client)), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_properties_test.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_properties_test.go index c19657927..417144668 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_properties_test.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_properties_test.go @@ -108,7 +108,7 @@ func TestDataProperty(t *testing.T) { } resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: newProviderFactory(withMockClient(client)), + ProtoV6ProviderFactories: newProviderFactory(withMockClient(client)), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/cloudwrapper/provider_test.go b/pkg/providers/cloudwrapper/provider_test.go index 5ee6270ed..d141385ff 100644 --- a/pkg/providers/cloudwrapper/provider_test.go +++ b/pkg/providers/cloudwrapper/provider_test.go @@ -13,8 +13,8 @@ import ( "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/providerserver" "github.com/hashicorp/terraform-plugin-framework/resource" - "github.com/hashicorp/terraform-plugin-go/tfprotov5" - "github.com/hashicorp/terraform-plugin-mux/tf5muxserver" + "github.com/hashicorp/terraform-plugin-go/tfprotov6" + "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" ) type ( @@ -110,19 +110,19 @@ func TestMain(m *testing.M) { os.Exit(exitCode) } -func newProviderFactory(opts ...testSubproviderOption) map[string]func() (tfprotov5.ProviderServer, error) { +func newProviderFactory(opts ...testSubproviderOption) map[string]func() (tfprotov6.ProviderServer, error) { testAccProvider := akamai.NewFrameworkProvider(newTestSubprovider(opts...))() - return map[string]func() (tfprotov5.ProviderServer, error){ - "akamai": func() (tfprotov5.ProviderServer, error) { + return map[string]func() (tfprotov6.ProviderServer, error){ + "akamai": func() (tfprotov6.ProviderServer, error) { ctx := context.Background() - providers := []func() tfprotov5.ProviderServer{ - providerserver.NewProtocol5( + providers := []func() tfprotov6.ProviderServer{ + providerserver.NewProtocol6( testAccProvider, ), } - muxServer, err := tf5muxserver.NewMuxServer(ctx, providers...) + muxServer, err := tf6muxserver.NewMuxServer(ctx, providers...) if err != nil { return nil, err } diff --git a/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_activation_test.go b/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_activation_test.go index 66eea0df3..89b04d569 100644 --- a/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_activation_test.go +++ b/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_activation_test.go @@ -199,7 +199,7 @@ func TestActivation(t *testing.T) { client := test.init() resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: newProviderFactory(withMockClient(client), withInterval(time.Second)), + ProtoV6ProviderFactories: newProviderFactory(withMockClient(client), withInterval(time.Second)), Steps: test.steps, }) client.AssertExpectations(t) diff --git a/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration_test.go b/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration_test.go index c891d939d..827cf2693 100644 --- a/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration_test.go +++ b/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration_test.go @@ -48,7 +48,7 @@ func TestConfigurationResource(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: newProviderFactory(withMockClient(client)), + ProtoV6ProviderFactories: newProviderFactory(withMockClient(client)), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResConfiguration/create.tf"), @@ -106,7 +106,7 @@ func TestConfigurationResource(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: newProviderFactory(withMockClient(client)), + ProtoV6ProviderFactories: newProviderFactory(withMockClient(client)), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResConfiguration/computed_email.tf"), @@ -155,7 +155,7 @@ func TestConfigurationResource(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: newProviderFactory(withMockClient(client)), + ProtoV6ProviderFactories: newProviderFactory(withMockClient(client)), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResConfiguration/computed_email.tf"), @@ -233,7 +233,7 @@ func TestConfigurationResource(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: newProviderFactory(withMockClient(client)), + ProtoV6ProviderFactories: newProviderFactory(withMockClient(client)), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResConfiguration/create.tf"), @@ -318,7 +318,7 @@ func TestConfigurationResource(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: newProviderFactory(withMockClient(client)), + ProtoV6ProviderFactories: newProviderFactory(withMockClient(client)), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResConfiguration/create.tf"), @@ -405,7 +405,7 @@ func TestConfigurationResource(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: newProviderFactory(withMockClient(client)), + ProtoV6ProviderFactories: newProviderFactory(withMockClient(client)), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResConfiguration/create.tf"), @@ -466,7 +466,7 @@ func TestConfigurationResource(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: newProviderFactory(withMockClient(client)), + ProtoV6ProviderFactories: newProviderFactory(withMockClient(client)), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResConfiguration/create.tf"), @@ -573,7 +573,7 @@ func TestConfigurationResource(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: newProviderFactory(withMockClient(client)), + ProtoV6ProviderFactories: newProviderFactory(withMockClient(client)), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResConfiguration/create.tf"), @@ -605,6 +605,82 @@ func TestConfigurationResource(t *testing.T) { }, }) }) + t.Run("update comments - expect an error", func(t *testing.T) { + t.Parallel() + client := &cloudwrapper.Mock{} + + configuration := cloudwrapper.CreateConfigurationRequest{ + Body: cloudwrapper.CreateConfigurationBody{ + Comments: "test", + ContractID: "ctr_123", + Locations: []cloudwrapper.ConfigLocationReq{ + { + Comments: "test", + TrafficTypeID: 1, + Capacity: cloudwrapper.Capacity{ + Value: 1, + Unit: cloudwrapper.UnitGB, + }, + }, + }, + NotificationEmails: []string{"test@akamai.com"}, + ConfigName: "testname", + PropertyIDs: []string{"200200200"}, + RetainIdleObjects: false, + }, + } + + expecter := newExpecter(t, client) + + expecter.ExpectCreate(configuration) + + expecter.ExpectRefresh() + + configUpdate := cloudwrapper.UpdateConfigurationRequest{ + ConfigID: expecter.config.ConfigID, + Body: cloudwrapper.UpdateConfigurationBody{ + Comments: "test-updated", + Locations: []cloudwrapper.ConfigLocationReq{ + { + Comments: "test", + TrafficTypeID: 1, + Capacity: cloudwrapper.Capacity{ + Value: 1, + Unit: cloudwrapper.UnitGB, + }, + }, + }, + NotificationEmails: []string{"test@akamai.com"}, + PropertyIDs: []string{"200200200"}, + RetainIdleObjects: false, + }, + } + + expecter.ExpectRefresh() + expecter.ExpectUpdate(configUpdate) + + expecter.ExpectRefresh() + expecter.ExpectDelete() + + resource.Test(t, resource.TestCase{ + IsUnitTest: true, + ProtoV6ProviderFactories: newProviderFactory(withMockClient(client)), + Steps: []resource.TestStep{ + { + Config: testutils.LoadFixtureString(t, "testdata/TestResConfiguration/create.tf"), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("akamai_cloudwrapper_configuration.test", "id", "123"), + resource.TestCheckResourceAttr("akamai_cloudwrapper_configuration.test", "config_name", "testname"), + resource.TestCheckResourceAttr("akamai_cloudwrapper_configuration.test", "contract_id", "ctr_123"), + ), + }, + { + Config: testutils.LoadFixtureString(t, "testdata/TestResConfiguration/update_comments_error.tf"), + ExpectError: regexp.MustCompile("updating field `comments` is not possible"), + }, + }, + }) + }) t.Run("drift - config got removed", func(t *testing.T) { t.Parallel() client := &cloudwrapper.Mock{} @@ -644,7 +720,7 @@ func TestConfigurationResource(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: newProviderFactory(withMockClient(client)), + ProtoV6ProviderFactories: newProviderFactory(withMockClient(client)), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResConfiguration/create.tf"), @@ -706,7 +782,7 @@ func TestConfigurationResource(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: newProviderFactory(withMockClient(client)), + ProtoV6ProviderFactories: newProviderFactory(withMockClient(client)), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResConfiguration/create.tf"), @@ -805,7 +881,7 @@ func TestConfigurationResource(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: newProviderFactory(withMockClient(client)), + ProtoV6ProviderFactories: newProviderFactory(withMockClient(client)), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResConfiguration/property_ids_with_prefix.tf"), @@ -883,7 +959,7 @@ func TestConfigurationResource(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: newProviderFactory(withMockClient(client)), + ProtoV6ProviderFactories: newProviderFactory(withMockClient(client)), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResConfiguration/property_ids_with_prefix.tf"), @@ -962,7 +1038,7 @@ func TestConfigurationResource(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: newProviderFactory(withMockClient(client)), + ProtoV6ProviderFactories: newProviderFactory(withMockClient(client)), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResConfiguration/create.tf"), @@ -1040,7 +1116,7 @@ func TestConfigurationResource(t *testing.T) { t.Parallel() resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: fact, + ProtoV6ProviderFactories: fact, Steps: []resource.TestStep{ { Config: tc.config, diff --git a/pkg/providers/cps/data_akamai_cps_csr_test.go b/pkg/providers/cps/data_akamai_cps_csr_test.go index 7b3a25e0e..c0bf8bb8b 100644 --- a/pkg/providers/cps/data_akamai_cps_csr_test.go +++ b/pkg/providers/cps/data_akamai_cps_csr_test.go @@ -439,8 +439,8 @@ func TestDataCPSCSR(t *testing.T) { test.init(t, client, test.mockData) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/cps/data_akamai_cps_deployments_test.go b/pkg/providers/cps/data_akamai_cps_deployments_test.go index c1b74681e..1bb783aff 100644 --- a/pkg/providers/cps/data_akamai_cps_deployments_test.go +++ b/pkg/providers/cps/data_akamai_cps_deployments_test.go @@ -240,7 +240,7 @@ func TestDataCPSDeployments(t *testing.T) { test.init(client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/cps/data_akamai_cps_enrollment_test.go b/pkg/providers/cps/data_akamai_cps_enrollment_test.go index f13a9f25e..931464b39 100644 --- a/pkg/providers/cps/data_akamai_cps_enrollment_test.go +++ b/pkg/providers/cps/data_akamai_cps_enrollment_test.go @@ -485,9 +485,9 @@ func TestDataEnrollment(t *testing.T) { test.init(t, client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, - Steps: test.steps, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, + Steps: test.steps, }) }) client.AssertExpectations(t) diff --git a/pkg/providers/cps/data_akamai_cps_enrollments_test.go b/pkg/providers/cps/data_akamai_cps_enrollments_test.go index d1aab7fcd..a91de907a 100644 --- a/pkg/providers/cps/data_akamai_cps_enrollments_test.go +++ b/pkg/providers/cps/data_akamai_cps_enrollments_test.go @@ -101,9 +101,9 @@ func TestDataEnrollments(t *testing.T) { test.init(t, client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, - Steps: test.steps, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, + Steps: test.steps, }) }) client.AssertExpectations(t) diff --git a/pkg/providers/cps/data_akamai_cps_warnings_test.go b/pkg/providers/cps/data_akamai_cps_warnings_test.go index 315768298..81caedaad 100644 --- a/pkg/providers/cps/data_akamai_cps_warnings_test.go +++ b/pkg/providers/cps/data_akamai_cps_warnings_test.go @@ -10,8 +10,8 @@ import ( func TestDataWarnings(t *testing.T) { t.Run("run warning datasource", func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDataWarnings/warnings.tf"), diff --git a/pkg/providers/cps/provider_test.go b/pkg/providers/cps/provider_test.go index 2ac3e3e39..1d12b0164 100644 --- a/pkg/providers/cps/provider_test.go +++ b/pkg/providers/cps/provider_test.go @@ -1,26 +1,46 @@ package cps import ( + "context" "log" "os" "sync" "testing" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-go/tfprotov6" + "github.com/hashicorp/terraform-plugin-mux/tf5to6server" + "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" ) -var testAccProviders map[string]func() (*schema.Provider, error) -var testAccProvider *schema.Provider +var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) func TestMain(m *testing.M) { - testAccProvider = akamai.NewPluginProvider(NewSubprovider())() - testAccProviders = map[string]func() (*schema.Provider, error){ - "akamai": func() (*schema.Provider, error) { - return testAccProvider, nil + testAccPluginProvider := akamai.NewPluginProvider(NewSubprovider())() + testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ + "akamai": func() (tfprotov6.ProviderServer, error) { + upgradedPluginProvider, err := tf5to6server.UpgradeServer( + context.Background(), + testAccPluginProvider.GRPCProvider, + ) + if err != nil { + return nil, err + } + + providers := []func() tfprotov6.ProviderServer{ + func() tfprotov6.ProviderServer { + return upgradedPluginProvider + }, + } + + muxServer, err := tf6muxserver.NewMuxServer(context.Background(), providers...) + if err != nil { + return nil, err + } + + return muxServer.ProviderServer(), nil }, } diff --git a/pkg/providers/cps/resource_akamai_cps_dv_enrollment_test.go b/pkg/providers/cps/resource_akamai_cps_dv_enrollment_test.go index 8cd92c685..aae2d0b2f 100644 --- a/pkg/providers/cps/resource_akamai_cps_dv_enrollment_test.go +++ b/pkg/providers/cps/resource_akamai_cps_dv_enrollment_test.go @@ -276,7 +276,7 @@ func TestResourceDVEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVEnrollment/lifecycle/create_enrollment.tf"), @@ -478,7 +478,7 @@ func TestResourceDVEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVEnrollment/empty_sans/create_enrollment.tf"), @@ -688,7 +688,7 @@ func TestResourceDVEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVEnrollment/client_mutual_auth/create_enrollment.tf"), @@ -879,7 +879,7 @@ func TestResourceDVEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVEnrollment/lifecycle_cn_in_sans/create_enrollment.tf"), @@ -1037,7 +1037,7 @@ func TestResourceDVEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVEnrollment/lifecycle/create_enrollment.tf"), @@ -1250,7 +1250,7 @@ func TestResourceDVEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVEnrollment/no_acknowledge_warnings/create_enrollment.tf"), @@ -1439,7 +1439,7 @@ func TestResourceDVEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVEnrollment/acknowledge_warnings/create_enrollment.tf"), @@ -1625,7 +1625,7 @@ func TestResourceDVEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVEnrollment/allow_duplicate_cn/create_enrollment.tf"), @@ -1761,7 +1761,7 @@ func TestResourceDVEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVEnrollment/no_acknowledge_warnings/create_enrollment.tf"), @@ -1844,7 +1844,7 @@ func TestResourceDVEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVEnrollment/no_acknowledge_warnings/create_enrollment.tf"), @@ -1997,7 +1997,7 @@ func TestResourceDVEnrollmentImport(t *testing.T) { }, nil).Once() useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVEnrollment/import/import_enrollment.tf"), @@ -2034,7 +2034,7 @@ func TestResourceDVEnrollmentImport(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVEnrollment/import/import_enrollment.tf"), diff --git a/pkg/providers/cps/resource_akamai_cps_dv_validation_test.go b/pkg/providers/cps/resource_akamai_cps_dv_validation_test.go index aa3e222f3..175ec24d6 100644 --- a/pkg/providers/cps/resource_akamai_cps_dv_validation_test.go +++ b/pkg/providers/cps/resource_akamai_cps_dv_validation_test.go @@ -96,7 +96,7 @@ func TestDVValidation(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVValidation/create_validation.tf"), @@ -167,7 +167,7 @@ func TestDVValidation(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVValidation/create_validation.tf"), @@ -207,7 +207,7 @@ func TestDVValidation(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVValidation/create_validation_with_timeout.tf"), diff --git a/pkg/providers/cps/resource_akamai_cps_third_party_enrollment_test.go b/pkg/providers/cps/resource_akamai_cps_third_party_enrollment_test.go index 2e9211cfc..de9b0b6aa 100644 --- a/pkg/providers/cps/resource_akamai_cps_third_party_enrollment_test.go +++ b/pkg/providers/cps/resource_akamai_cps_third_party_enrollment_test.go @@ -137,7 +137,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/lifecycle/create_enrollment.tf"), @@ -270,7 +270,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/lifecycle_no_sans/create_enrollment.tf"), @@ -365,7 +365,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/empty_sans/create_enrollment.tf"), @@ -479,7 +479,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/client_mutual_auth/create_enrollment.tf"), @@ -569,7 +569,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/lifecycle_cn_in_sans/create_enrollment.tf"), @@ -668,7 +668,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/lifecycle_no_cn_in_sans/create_enrollment.tf"), @@ -734,7 +734,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/lifecycle/create_enrollment.tf"), @@ -825,7 +825,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/no_acknowledge_warnings/create_enrollment.tf"), @@ -935,7 +935,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/acknowledge_warnings/create_enrollment.tf"), @@ -1022,7 +1022,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/allow_duplicate_cn/create_enrollment.tf"), @@ -1097,7 +1097,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/no_acknowledge_warnings/create_enrollment.tf"), @@ -1137,7 +1137,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/no_acknowledge_warnings/create_enrollment.tf"), @@ -1239,7 +1239,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/auto_approve_warnings/create_enrollment.tf"), @@ -1313,7 +1313,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/auto_approve_warnings/create_enrollment.tf"), @@ -1391,7 +1391,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/auto_approve_warnings/create_enrollment.tf"), @@ -1474,7 +1474,7 @@ func TestResourceThirdPartyEnrollmentImport(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/import/import_enrollment.tf"), @@ -1511,7 +1511,7 @@ func TestResourceThirdPartyEnrollmentImport(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/import/import_enrollment.tf"), @@ -1615,7 +1615,7 @@ func TestSuppressingSignatureAlgorithm(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/lifecycle/create_enrollment.tf"), diff --git a/pkg/providers/cps/resource_akamai_cps_upload_certificate_test.go b/pkg/providers/cps/resource_akamai_cps_upload_certificate_test.go index ef98239e8..203344fcf 100644 --- a/pkg/providers/cps/resource_akamai_cps_upload_certificate_test.go +++ b/pkg/providers/cps/resource_akamai_cps_upload_certificate_test.go @@ -72,8 +72,8 @@ func TestResourceCPSUploadCertificate(t *testing.T) { test.init(t, client, test.enrollment, test.enrollmentID, test.changeID) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPathForCreate), @@ -173,8 +173,8 @@ func TestResourceCPSUploadCertificateWithThirdPartyEnrollmentDependency(t *testi test.init(t, client, &test.enrollment, test.enrollmentID, test.changeID) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -280,8 +280,8 @@ func TestResourceCPSUploadCertificateLifecycle(t *testing.T) { test.init(t, client, test.enrollment, test.enrollmentUpdated, test.enrollmentID, test.changeID, test.changeIDUpdated) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPathForCreate), @@ -673,8 +673,8 @@ func TestCreateCPSUploadCertificate(t *testing.T) { test.init(t, client, test.enrollment, test.enrollmentID, test.changeID) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -788,8 +788,8 @@ func TestReadCPSUploadCertificate(t *testing.T) { test.init(t, client, test.enrollment, test.enrollmentID, test.changeID) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -1101,8 +1101,8 @@ func TestUpdateCPSUploadCertificate(t *testing.T) { test.init(t, client, test.enrollment, test.enrollmentUpdated, test.enrollmentID, test.changeID, test.changeIDUpdated) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPathForCreate), @@ -1180,7 +1180,7 @@ func TestResourceUploadCertificateImport(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCPSUploadCertificate/import/import_upload.tf"), diff --git a/pkg/providers/datastream/data_akamai_datastream_activation_history_test.go b/pkg/providers/datastream/data_akamai_datastream_activation_history_test.go index 2bf306ec2..f4ca666ce 100644 --- a/pkg/providers/datastream/data_akamai_datastream_activation_history_test.go +++ b/pkg/providers/datastream/data_akamai_datastream_activation_history_test.go @@ -8,9 +8,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/datastream" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/stretchr/testify/mock" - "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/stretchr/testify/mock" ) func TestDataAkamaiDatastreamActivationHistoryRead(t *testing.T) { @@ -77,7 +76,7 @@ func TestDataAkamaiDatastreamActivationHistoryRead(t *testing.T) { client.On("GetActivationHistory", mock.Anything, mock.Anything).Return(test.getActivationHistoryReturn, nil) } resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/datastream/data_akamai_datastream_dataset_fields_test.go b/pkg/providers/datastream/data_akamai_datastream_dataset_fields_test.go index ad5415486..8997636f4 100644 --- a/pkg/providers/datastream/data_akamai_datastream_dataset_fields_test.go +++ b/pkg/providers/datastream/data_akamai_datastream_dataset_fields_test.go @@ -93,7 +93,7 @@ func TestDataSourceDatasetFieldsRead(t *testing.T) { useClient(client, func() { if test.withError == nil { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -105,7 +105,7 @@ func TestDataSourceDatasetFieldsRead(t *testing.T) { }) } else { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/datastream/data_akamai_datastreams_test.go b/pkg/providers/datastream/data_akamai_datastreams_test.go index 8f1b34516..df1d14c46 100644 --- a/pkg/providers/datastream/data_akamai_datastreams_test.go +++ b/pkg/providers/datastream/data_akamai_datastreams_test.go @@ -144,9 +144,9 @@ func TestDataDatastreams(t *testing.T) { test.init(t, client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, - Steps: test.steps, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, + Steps: test.steps, }) }) client.AssertExpectations(t) diff --git a/pkg/providers/datastream/provider_test.go b/pkg/providers/datastream/provider_test.go index cd6d5ffdc..def12ae31 100644 --- a/pkg/providers/datastream/provider_test.go +++ b/pkg/providers/datastream/provider_test.go @@ -1,6 +1,7 @@ package datastream import ( + "context" "log" "os" "sync" @@ -9,20 +10,40 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/datastream" "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-go/tfprotov6" + "github.com/hashicorp/terraform-plugin-mux/tf5to6server" + "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" ) -var testAccProviders map[string]func() (*schema.Provider, error) - -var testAccProvider *schema.Provider +var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) func TestMain(m *testing.M) { - testAccProvider = akamai.NewPluginProvider(NewSubprovider())() - testAccProviders = map[string]func() (*schema.Provider, error){ - "akamai": func() (*schema.Provider, error) { - return testAccProvider, nil + testAccPluginProvider := akamai.NewPluginProvider(NewSubprovider())() + testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ + "akamai": func() (tfprotov6.ProviderServer, error) { + upgradedPluginProvider, err := tf5to6server.UpgradeServer( + context.Background(), + testAccPluginProvider.GRPCProvider, + ) + if err != nil { + return nil, err + } + + providers := []func() tfprotov6.ProviderServer{ + func() tfprotov6.ProviderServer { + return upgradedPluginProvider + }, + } + + muxServer, err := tf6muxserver.NewMuxServer(context.Background(), providers...) + if err != nil { + return nil, err + } + + return muxServer.ProviderServer(), nil }, } + if err := testutils.TFTestSetup(); err != nil { log.Fatal(err) } diff --git a/pkg/providers/datastream/resource_akamai_datastream_test.go b/pkg/providers/datastream/resource_akamai_datastream_test.go index 2621739c3..63a90448e 100644 --- a/pkg/providers/datastream/resource_akamai_datastream_test.go +++ b/pkg/providers/datastream/resource_akamai_datastream_test.go @@ -8,13 +8,12 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "github.com/tj/assert" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/datastream" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + "github.com/tj/assert" ) const ( @@ -369,7 +368,7 @@ func TestResourceStream(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResourceStream/lifecycle/create_stream.tf"), @@ -705,7 +704,7 @@ func TestResourceUpdate(t *testing.T) { useClient(m, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("testdata/TestResourceStream/update_resource/create_stream_%s.tf", createStreamFilenameSuffix)), @@ -782,7 +781,7 @@ func TestResourceStreamErrors(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.tfFile), @@ -842,7 +841,7 @@ func TestResourceStreamCustomDiff(t *testing.T) { t.Run(name, func(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.tfFile), @@ -1000,7 +999,7 @@ func TestEmailIDs(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("testdata/TestResourceStream/email_ids/%s", test.Filename)), @@ -1199,7 +1198,7 @@ func TestDatasetIDsDiff(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.preConfig), @@ -1503,7 +1502,7 @@ func TestCustomHeaders(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("testdata/TestResourceStream/custom_headers/%s", test.Filename)), @@ -1732,7 +1731,7 @@ func TestMTLS(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("testdata/TestResourceStream/mtls/%s", test.Filename)), @@ -2047,7 +2046,7 @@ func TestUrlSuppressor(t *testing.T) { useClient(m, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: test.Steps, }) @@ -2205,7 +2204,7 @@ func TestConnectors(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("testdata/TestResourceStream/connectors/%s", test.Filename)), diff --git a/pkg/providers/dns/data_authorities_set_test.go b/pkg/providers/dns/data_authorities_set_test.go index 2684b2433..ddc8f5609 100644 --- a/pkg/providers/dns/data_authorities_set_test.go +++ b/pkg/providers/dns/data_authorities_set_test.go @@ -28,7 +28,7 @@ func TestDataSourceAuthoritiesSet_basic(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDataSetAuthorities/basic.tf"), @@ -53,7 +53,7 @@ func TestDataSourceAuthoritiesSet_basic(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDataSetAuthorities/missing_contract.tf"), @@ -76,7 +76,7 @@ func TestDataSourceAuthoritiesSet_basic(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDataSetAuthorities/basic.tf"), diff --git a/pkg/providers/dns/data_dns_record_set_test.go b/pkg/providers/dns/data_dns_record_set_test.go index e815cba7f..f0a6588a2 100644 --- a/pkg/providers/dns/data_dns_record_set_test.go +++ b/pkg/providers/dns/data_dns_record_set_test.go @@ -31,7 +31,7 @@ func TestDataSourceDNSRecordSet_basic(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDataDnsRecordSet/basic.tf"), @@ -63,7 +63,7 @@ func TestDataSourceDNSRecordSet_basic(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDataDnsRecordSet/basic.tf"), diff --git a/pkg/providers/dns/provider_test.go b/pkg/providers/dns/provider_test.go index 61e794a5e..0f5119f9f 100644 --- a/pkg/providers/dns/provider_test.go +++ b/pkg/providers/dns/provider_test.go @@ -1,6 +1,7 @@ package dns import ( + "context" "log" "os" "sync" @@ -9,19 +10,40 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/dns" "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-go/tfprotov6" + "github.com/hashicorp/terraform-plugin-mux/tf5to6server" + "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" ) -var testAccProviders map[string]func() (*schema.Provider, error) -var testAccProvider *schema.Provider +var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) func TestMain(m *testing.M) { - testAccProvider = akamai.NewPluginProvider(NewSubprovider())() - testAccProviders = map[string]func() (*schema.Provider, error){ - "akamai": func() (*schema.Provider, error) { - return testAccProvider, nil + testAccPluginProvider := akamai.NewPluginProvider(NewSubprovider())() + testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ + "akamai": func() (tfprotov6.ProviderServer, error) { + upgradedPluginProvider, err := tf5to6server.UpgradeServer( + context.Background(), + testAccPluginProvider.GRPCProvider, + ) + if err != nil { + return nil, err + } + + providers := []func() tfprotov6.ProviderServer{ + func() tfprotov6.ProviderServer { + return upgradedPluginProvider + }, + } + + muxServer, err := tf6muxserver.NewMuxServer(context.Background(), providers...) + if err != nil { + return nil, err + } + + return muxServer.ProviderServer(), nil }, } + if err := testutils.TFTestSetup(); err != nil { log.Fatal(err) } diff --git a/pkg/providers/dns/resource_akamai_dns_record_test.go b/pkg/providers/dns/resource_akamai_dns_record_test.go index 0deb3f28c..3fa52cda9 100644 --- a/pkg/providers/dns/resource_akamai_dns_record_test.go +++ b/pkg/providers/dns/resource_akamai_dns_record_test.go @@ -89,7 +89,7 @@ func TestResDnsRecord(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDnsRecord/create_basic.tf"), @@ -187,7 +187,7 @@ func TestResDnsRecord(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDnsRecord/create_basic_txt.tf"), diff --git a/pkg/providers/dns/resource_akamai_dns_zone_test.go b/pkg/providers/dns/resource_akamai_dns_zone_test.go index d8b685dbc..dd42ffb67 100644 --- a/pkg/providers/dns/resource_akamai_dns_zone_test.go +++ b/pkg/providers/dns/resource_akamai_dns_zone_test.go @@ -245,7 +245,7 @@ func TestResDnsZone(t *testing.T) { }() useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDnsZone/create_primary.tf"), diff --git a/pkg/providers/edgeworkers/data_akamai_edgekv_group_items_test.go b/pkg/providers/edgeworkers/data_akamai_edgekv_group_items_test.go index cb25c530c..850d74446 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgekv_group_items_test.go +++ b/pkg/providers/edgeworkers/data_akamai_edgekv_group_items_test.go @@ -35,8 +35,8 @@ func TestEdgeKVGroupItems(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataEdgeKVGroupItems/basic.tf"), @@ -59,8 +59,8 @@ func TestEdgeKVGroupItems(t *testing.T) { t.Run("missed required `namespace_name` field", func(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataEdgeKVGroupItems/missed_namespace_name.tf"), @@ -76,8 +76,8 @@ func TestEdgeKVGroupItems(t *testing.T) { t.Run("missed required `network` field", func(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataEdgeKVGroupItems/missed_network.tf"), @@ -93,8 +93,8 @@ func TestEdgeKVGroupItems(t *testing.T) { t.Run("missed required `group_name` field", func(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataEdgeKVGroupItems/missed_group.tf"), @@ -110,8 +110,8 @@ func TestEdgeKVGroupItems(t *testing.T) { t.Run("incorrect `network` field", func(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataEdgeKVGroupItems/incorrect_network.tf"), diff --git a/pkg/providers/edgeworkers/data_akamai_edgekv_groups_test.go b/pkg/providers/edgeworkers/data_akamai_edgekv_groups_test.go index ddb8117c5..42d02ba22 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgekv_groups_test.go +++ b/pkg/providers/edgeworkers/data_akamai_edgekv_groups_test.go @@ -21,8 +21,8 @@ func TestEdgeKVGroups(t *testing.T) { Return([]string{"TestImportGroup", "TestGroup1", "TestGroup2", "TestGroup3", "TestGroup4"}, nil).Times(5) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataEdgeKVNamespaceGroups/basic.tf"), @@ -47,8 +47,8 @@ func TestEdgeKVGroups(t *testing.T) { t.Run("missed required `namespace_name` field", func(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataEdgeKVNamespaceGroups/missed_namespace_name.tf"), @@ -64,8 +64,8 @@ func TestEdgeKVGroups(t *testing.T) { t.Run("missed required `network` field", func(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataEdgeKVNamespaceGroups/missed_network.tf"), @@ -81,8 +81,8 @@ func TestEdgeKVGroups(t *testing.T) { t.Run("incorrect `network` field", func(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataEdgeKVNamespaceGroups/incorrect_network.tf"), diff --git a/pkg/providers/edgeworkers/data_akamai_edgeworker_activation_test.go b/pkg/providers/edgeworkers/data_akamai_edgeworker_activation_test.go index fab0ca51a..ae281d59f 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgeworker_activation_test.go +++ b/pkg/providers/edgeworkers/data_akamai_edgeworker_activation_test.go @@ -194,8 +194,8 @@ func TestDataEdgeWorkersActivation(t *testing.T) { test.init(t, client, test.mockData) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/edgeworkers/data_akamai_edgeworker_test.go b/pkg/providers/edgeworkers/data_akamai_edgeworker_test.go index f0a77d5df..fb24a95d0 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgeworker_test.go +++ b/pkg/providers/edgeworkers/data_akamai_edgeworker_test.go @@ -327,8 +327,8 @@ func TestDataEdgeWorkersEdgeWorker(t *testing.T) { test.init(t, client, test.mockData) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/edgeworkers/data_akamai_edgeworkers_property_rules_test.go b/pkg/providers/edgeworkers/data_akamai_edgeworkers_property_rules_test.go index be2a28293..49124d1f3 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgeworkers_property_rules_test.go +++ b/pkg/providers/edgeworkers/data_akamai_edgeworkers_property_rules_test.go @@ -21,7 +21,7 @@ func TestDataEdgeworkersPropertyRules(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/edgeworkers/data_akamai_edgeworkers_resource_tier_test.go b/pkg/providers/edgeworkers/data_akamai_edgeworkers_resource_tier_test.go index 8f58049ea..f25c0ebd7 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgeworkers_resource_tier_test.go +++ b/pkg/providers/edgeworkers/data_akamai_edgeworkers_resource_tier_test.go @@ -164,9 +164,9 @@ func TestDataEdgeworkersResourceTier(t *testing.T) { test.init(client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, - Steps: test.steps, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, + Steps: test.steps, }) }) client.AssertExpectations(t) diff --git a/pkg/providers/edgeworkers/provider_test.go b/pkg/providers/edgeworkers/provider_test.go index 6526b27db..86a63dd72 100644 --- a/pkg/providers/edgeworkers/provider_test.go +++ b/pkg/providers/edgeworkers/provider_test.go @@ -1,6 +1,7 @@ package edgeworkers import ( + "context" "log" "os" "sync" @@ -9,20 +10,40 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-go/tfprotov6" + "github.com/hashicorp/terraform-plugin-mux/tf5to6server" + "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" ) -var testAccProviders map[string]func() (*schema.Provider, error) - -var testAccProvider *schema.Provider +var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) func TestMain(m *testing.M) { - testAccProvider = akamai.NewPluginProvider(NewSubprovider())() - testAccProviders = map[string]func() (*schema.Provider, error){ - "akamai": func() (*schema.Provider, error) { - return testAccProvider, nil + testAccPluginProvider := akamai.NewPluginProvider(NewSubprovider())() + testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ + "akamai": func() (tfprotov6.ProviderServer, error) { + upgradedPluginProvider, err := tf5to6server.UpgradeServer( + context.Background(), + testAccPluginProvider.GRPCProvider, + ) + if err != nil { + return nil, err + } + + providers := []func() tfprotov6.ProviderServer{ + func() tfprotov6.ProviderServer { + return upgradedPluginProvider + }, + } + + muxServer, err := tf6muxserver.NewMuxServer(context.Background(), providers...) + if err != nil { + return nil, err + } + + return muxServer.ProviderServer(), nil }, } + if err := testutils.TFTestSetup(); err != nil { log.Fatal(err) } diff --git a/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items_test.go b/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items_test.go index 31bb65663..60519dd4c 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items_test.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items_test.go @@ -191,7 +191,7 @@ func TestCreateEdgeKVGroupItems(t *testing.T) { test.init(client, test.attrs) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -356,7 +356,7 @@ func TestReadEdgeKVGroupItems(t *testing.T) { test.init(client, test.attrsForCreate, test.attrsForUpdate) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPathForCreate), @@ -842,8 +842,8 @@ func TestUpdateEdgeKVGroupItems(t *testing.T) { test.init(client, test.attrsForCreate, test.attrsForUpdate) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { PlanOnly: test.planOnly, @@ -917,7 +917,7 @@ func TestDeleteEdgeKVGroupItems(t *testing.T) { test.init(client, test.attrs) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -989,8 +989,8 @@ func TestImportEdgeKVGroupItems(t *testing.T) { test.init(client, test.attrs) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/edgeworkers/resource_akamai_edgekv_test.go b/pkg/providers/edgeworkers/resource_akamai_edgekv_test.go index e9cfe2ebf..f6d9fc33c 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgekv_test.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgekv_test.go @@ -9,16 +9,12 @@ import ( "testing" "time" - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" - + "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" - - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" ) func Test_populateEKV(t *testing.T) { @@ -498,9 +494,9 @@ func TestResourceEdgeKV(t *testing.T) { test.init(client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, - Steps: test.steps, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, + Steps: test.steps, }) }) client.AssertExpectations(t) diff --git a/pkg/providers/edgeworkers/resource_akamai_edgeworker_test.go b/pkg/providers/edgeworkers/resource_akamai_edgeworker_test.go index 576f4910e..47156b1ba 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgeworker_test.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgeworker_test.go @@ -386,7 +386,7 @@ func TestResourceEdgeWorkersEdgeWorker(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/edgeworker_create.tf", testDir)), @@ -465,7 +465,7 @@ func TestResourceEdgeWorkersEdgeWorker(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/edgeworker_no_bundle.tf", testDir)), @@ -501,7 +501,7 @@ func TestResourceEdgeWorkersEdgeWorker(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/edgeworker_create.tf", testDir)), @@ -571,7 +571,7 @@ func TestResourceEdgeWorkersEdgeWorker(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { PreConfig: prepareTempBundleLink(t, bundlePathForCreate, tempBundlePath), @@ -620,7 +620,7 @@ func TestResourceEdgeWorkersEdgeWorker(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/edgeworker_create.tf", testDir)), @@ -663,7 +663,7 @@ func TestResourceEdgeWorkersEdgeWorker(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/edgeworker_create.tf", testDir)), @@ -710,7 +710,7 @@ func TestResourceEdgeWorkersEdgeWorker(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/edgeworker_create.tf", testDir)), @@ -794,7 +794,7 @@ func TestResourceEdgeWorkersEdgeWorker(t *testing.T) { client.On("DeleteEdgeWorkerID", mock.Anything, edgeWorkerDeleteReq).Return(nil).Once() useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/edgeworker_create.tf", testDir)), @@ -858,7 +858,7 @@ func TestResourceEdgeWorkersEdgeWorker(t *testing.T) { client.On("DeleteEdgeWorkerID", mock.Anything, edgeWorkerDeleteReq).Return(nil).Once() useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/edgeworker_create.tf", testDir)), @@ -891,7 +891,7 @@ func TestResourceEdgeWorkersEdgeWorker(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/edgeworker_create.tf", testDir)), diff --git a/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation_test.go b/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation_test.go index 360e10e17..3189c5b12 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation_test.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation_test.go @@ -1356,9 +1356,9 @@ func TestResourceEdgeworkersActivation(t *testing.T) { test.init(client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, - Steps: test.steps, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, + Steps: test.steps, }) }) client.AssertExpectations(t) diff --git a/pkg/providers/gtm/data_akamai_gtm_datacenter_test.go b/pkg/providers/gtm/data_akamai_gtm_datacenter_test.go index 97a4953f9..dfedb75da 100644 --- a/pkg/providers/gtm/data_akamai_gtm_datacenter_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_datacenter_test.go @@ -67,8 +67,8 @@ func TestDataGTMDatacenter(t *testing.T) { test.init(t, client, test.mockData) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + IsUnitTest: true, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/gtm/data_akamai_gtm_datacenters_test.go b/pkg/providers/gtm/data_akamai_gtm_datacenters_test.go index 17205e406..8e1f915cd 100644 --- a/pkg/providers/gtm/data_akamai_gtm_datacenters_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_datacenters_test.go @@ -62,8 +62,8 @@ func TestDataGTMDatacenters(t *testing.T) { test.init(t, client, test.mockData) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + IsUnitTest: true, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go b/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go index 43638ceb8..200cb83a1 100644 --- a/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go @@ -30,7 +30,7 @@ func TestAccDataSourceGTMDefaultDatacenter_basic(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDataDefaultDatacenter/basic.tf"), diff --git a/pkg/providers/gtm/provider_test.go b/pkg/providers/gtm/provider_test.go index 4a372ce3f..d9d904eff 100644 --- a/pkg/providers/gtm/provider_test.go +++ b/pkg/providers/gtm/provider_test.go @@ -10,14 +10,17 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + + "github.com/hashicorp/terraform-plugin-go/tfprotov6" + "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" + "github.com/hashicorp/terraform-plugin-mux/tf5to6server" + "github.com/hashicorp/terraform-plugin-framework/provider" "github.com/hashicorp/terraform-plugin-framework/providerserver" - "github.com/hashicorp/terraform-plugin-go/tfprotov5" - "github.com/hashicorp/terraform-plugin-mux/tf5muxserver" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -var testAccProvidersProtoV5 map[string]func() (tfprotov5.ProviderServer, error) +var testAccProvidersProtoV5 map[string]func() (tfprotov6.ProviderServer, error) var testAccProviders map[string]func() (*schema.Provider, error) var testAccFrameworkProvider provider.Provider var testAccProvider *schema.Provider @@ -28,19 +31,38 @@ func TestMain(m *testing.M) { testAccProviders = map[string]func() (*schema.Provider, error){ "akamai": func() (*schema.Provider, error) { - return testAccProvider, nil + upgradedPluginProvider, err := tf5to6server.UpgradeServer( + context.Background(), + testAccProvider.GRPCProvider, + ) + if err != nil { + return nil, err + } + + providers := []func() tfprotov6.ProviderServer{ + func() tfprotov6.ProviderServer { + return upgradedPluginProvider + }, + } + + muxServer, err := tf6muxserver.NewMuxServer(context.Background(), providers...) + if err != nil { + return nil, err + } + + return muxServer.ProviderServer(), nil }, } - testAccProvidersProtoV5 = map[string]func() (tfprotov5.ProviderServer, error){ - "akamai": func() (tfprotov5.ProviderServer, error) { + testAccProvidersProtoV5 = map[string]func() (tfprotov6.ProviderServer, error){ + "akamai": func() (tfprotov6.ProviderServer, error) { ctx := context.Background() - providers := []func() tfprotov5.ProviderServer{ - providerserver.NewProtocol5( + providers := []func() tfprotov6.ProviderServer{ + providerserver.NewProtocol6( testAccFrameworkProvider, ), } - muxServer, err := tf5muxserver.NewMuxServer(ctx, providers...) + muxServer, err := tf6muxserver.NewMuxServer(ctx, providers...) if err != nil { return nil, err } diff --git a/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go b/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go index 09966d9f2..9f4eb22b7 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go @@ -76,7 +76,7 @@ func TestResGtmAsmap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmAsmap/create_basic.tf"), @@ -121,7 +121,7 @@ func TestResGtmAsmap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmAsmap/create_basic.tf"), @@ -159,7 +159,7 @@ func TestResGtmAsmap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmAsmap/create_basic.tf"), @@ -220,7 +220,7 @@ func TestResGtmAsmap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmAsmap/import_basic.tf"), @@ -320,8 +320,8 @@ func TestGTMAsMapOrder(t *testing.T) { t.Run(name, func(t *testing.T) { useClient(test.client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + IsUnitTest: true, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.pathForCreate), diff --git a/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go b/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go index d81651678..ad20993be 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go @@ -68,7 +68,7 @@ func TestResGtmCidrmap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmCidrmap/create_basic.tf"), @@ -113,7 +113,7 @@ func TestResGtmCidrmap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmCidrmap/create_basic.tf"), @@ -151,7 +151,7 @@ func TestResGtmCidrmap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmCidrmap/create_basic.tf"), @@ -242,8 +242,8 @@ func TestGTMCidrMapOrder(t *testing.T) { t.Run(name, func(t *testing.T) { useClient(test.client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + IsUnitTest: true, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.pathForCreate), diff --git a/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go b/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go index 44b9b433d..e75df7484 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go @@ -86,7 +86,7 @@ func TestResGtmDatacenter(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmDatacenter/create_basic.tf"), @@ -126,7 +126,7 @@ func TestResGtmDatacenter(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmDatacenter/create_basic.tf"), @@ -157,7 +157,7 @@ func TestResGtmDatacenter(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmDatacenter/create_basic.tf"), diff --git a/pkg/providers/gtm/resource_akamai_gtm_domain_test.go b/pkg/providers/gtm/resource_akamai_gtm_domain_test.go index 35689ea9d..6fa2a3699 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_domain_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_domain_test.go @@ -60,7 +60,7 @@ func TestResGtmDomain(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmDomain/create_basic.tf"), @@ -124,7 +124,7 @@ func TestResGtmDomain(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmDomain/create_basic.tf"), @@ -164,7 +164,7 @@ func TestResGtmDomain(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmDomain/create_basic.tf"), @@ -197,7 +197,7 @@ func TestResGtmDomain(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmDomain/create_basic.tf"), @@ -249,7 +249,7 @@ func TestResGtmDomain(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmDomain/create_basic.tf"), @@ -303,8 +303,8 @@ func TestGTMDomainOrder(t *testing.T) { t.Run(name, func(t *testing.T) { useClient(test.client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + IsUnitTest: true, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.pathForCreate), diff --git a/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go b/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go index db846d01c..bcb36208c 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go @@ -73,7 +73,7 @@ func TestResGtmGeomap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmGeomap/create_basic.tf"), @@ -118,7 +118,7 @@ func TestResGtmGeomap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmGeomap/create_basic.tf"), @@ -156,7 +156,7 @@ func TestResGtmGeomap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmGeomap/create_basic.tf"), @@ -240,8 +240,8 @@ func TestGTMGeoMapOrder(t *testing.T) { t.Run(name, func(t *testing.T) { useClient(test.client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + IsUnitTest: true, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.pathForCreate), diff --git a/pkg/providers/gtm/resource_akamai_gtm_property_test.go b/pkg/providers/gtm/resource_akamai_gtm_property_test.go index 1e1ea5c72..6ceab9d5a 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_property_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_property_test.go @@ -227,7 +227,7 @@ func TestResGtmProperty(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/create_basic.tf"), @@ -298,7 +298,7 @@ func TestResGtmProperty(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/create_basic.tf"), @@ -360,7 +360,7 @@ func TestResGtmProperty(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/create_basic.tf"), @@ -558,7 +558,7 @@ func TestResGtmProperty(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/test_object/test_object_not_required.tf"), @@ -586,7 +586,7 @@ func TestResGtmProperty(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/test_object/test_object_protocol_ftp.tf"), @@ -604,7 +604,7 @@ func TestResGtmProperty(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/test_object/test_object_protocol_http.tf"), @@ -622,7 +622,7 @@ func TestResGtmProperty(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/test_object/test_object_protocol_https.tf"), @@ -735,8 +735,8 @@ func TestResourceGTMTrafficTargetOrder(t *testing.T) { t.Run(name, func(t *testing.T) { useClient(test.client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + IsUnitTest: true, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.pathForCreate), diff --git a/pkg/providers/gtm/resource_akamai_gtm_resource_test.go b/pkg/providers/gtm/resource_akamai_gtm_resource_test.go index 187dca436..65d7777d6 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_resource_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_resource_test.go @@ -85,7 +85,7 @@ func TestResGtmResource(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmResource/create_basic.tf"), @@ -148,7 +148,7 @@ func TestResGtmResource(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmResource/create_basic.tf"), @@ -202,7 +202,7 @@ func TestResGtmResource(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmResource/create_basic.tf"), @@ -272,8 +272,8 @@ func TestGTMResourceOrder(t *testing.T) { t.Run(name, func(t *testing.T) { useClient(test.client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + IsUnitTest: true, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.pathForCreate), diff --git a/pkg/providers/iam/data_akamai_iam_contact_types_test.go b/pkg/providers/iam/data_akamai_iam_contact_types_test.go index 7cc4c2685..6b7a639c5 100644 --- a/pkg/providers/iam/data_akamai_iam_contact_types_test.go +++ b/pkg/providers/iam/data_akamai_iam_contact_types_test.go @@ -6,10 +6,9 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" - - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" ) func TestDataContactTypes(t *testing.T) { @@ -20,8 +19,8 @@ func TestDataContactTypes(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/%s/step0.tf", t.Name()), @@ -47,8 +46,8 @@ func TestDataContactTypes(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/%v/step0.tf", t.Name()), diff --git a/pkg/providers/iam/data_akamai_iam_countries_test.go b/pkg/providers/iam/data_akamai_iam_countries_test.go index 36e25a02f..cb042e01c 100644 --- a/pkg/providers/iam/data_akamai_iam_countries_test.go +++ b/pkg/providers/iam/data_akamai_iam_countries_test.go @@ -6,10 +6,9 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" - - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" ) func TestDataCountries(t *testing.T) { @@ -20,8 +19,8 @@ func TestDataCountries(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/%s/step0.tf", t.Name()), @@ -47,8 +46,8 @@ func TestDataCountries(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/%s/step0.tf", t.Name()), diff --git a/pkg/providers/iam/data_akamai_iam_grantable_roles_test.go b/pkg/providers/iam/data_akamai_iam_grantable_roles_test.go index 2da24e136..817ae685e 100644 --- a/pkg/providers/iam/data_akamai_iam_grantable_roles_test.go +++ b/pkg/providers/iam/data_akamai_iam_grantable_roles_test.go @@ -22,8 +22,8 @@ func TestGrantableRoles(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/%s/step0.tf", t.Name()), @@ -52,8 +52,8 @@ func TestGrantableRoles(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/%s/step0.tf", t.Name()), diff --git a/pkg/providers/iam/data_akamai_iam_groups_test.go b/pkg/providers/iam/data_akamai_iam_groups_test.go index 71ec2af8a..885f5705b 100644 --- a/pkg/providers/iam/data_akamai_iam_groups_test.go +++ b/pkg/providers/iam/data_akamai_iam_groups_test.go @@ -5,13 +5,12 @@ import ( "regexp" "testing" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" ) func TestDataGroups(t *testing.T) { @@ -39,7 +38,7 @@ func TestDataGroups(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/%s/step0.tf", t.Name()), @@ -90,7 +89,7 @@ func TestDataGroups(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/%s/step0.tf", t.Name()), diff --git a/pkg/providers/iam/data_akamai_iam_roles_test.go b/pkg/providers/iam/data_akamai_iam_roles_test.go index 915bd10fa..4e8f6bc7a 100644 --- a/pkg/providers/iam/data_akamai_iam_roles_test.go +++ b/pkg/providers/iam/data_akamai_iam_roles_test.go @@ -33,8 +33,8 @@ func TestDataRoles(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/%s.tf", t.Name()), @@ -66,8 +66,8 @@ func TestDataRoles(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/%s/step0.tf", t.Name()), diff --git a/pkg/providers/iam/data_akamai_iam_states_test.go b/pkg/providers/iam/data_akamai_iam_states_test.go index bf4a9aaf4..e6e3313df 100644 --- a/pkg/providers/iam/data_akamai_iam_states_test.go +++ b/pkg/providers/iam/data_akamai_iam_states_test.go @@ -5,11 +5,10 @@ import ( "regexp" "testing" - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/stretchr/testify/mock" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/stretchr/testify/mock" ) func TestDataStates(t *testing.T) { @@ -22,8 +21,8 @@ func TestDataStates(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/%s/step0.tf", t.Name()), @@ -50,8 +49,8 @@ func TestDataStates(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/%s/step0.tf", t.Name()), diff --git a/pkg/providers/iam/data_akamai_iam_supported_langs_test.go b/pkg/providers/iam/data_akamai_iam_supported_langs_test.go index 664312c21..29f6793d9 100644 --- a/pkg/providers/iam/data_akamai_iam_supported_langs_test.go +++ b/pkg/providers/iam/data_akamai_iam_supported_langs_test.go @@ -6,10 +6,9 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" - - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" ) func TestDataSupportedLangs(t *testing.T) { @@ -20,8 +19,8 @@ func TestDataSupportedLangs(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/%s/step0.tf", t.Name()), @@ -46,8 +45,8 @@ func TestDataSupportedLangs(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/%s/step0.tf", t.Name()), diff --git a/pkg/providers/iam/data_akamai_iam_timeout_policies_test.go b/pkg/providers/iam/data_akamai_iam_timeout_policies_test.go index 33b22d9ae..f7a9ea794 100644 --- a/pkg/providers/iam/data_akamai_iam_timeout_policies_test.go +++ b/pkg/providers/iam/data_akamai_iam_timeout_policies_test.go @@ -5,11 +5,10 @@ import ( "regexp" "testing" - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/stretchr/testify/mock" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/stretchr/testify/mock" ) func TestDataTimeoutPolicies(t *testing.T) { @@ -26,8 +25,8 @@ func TestDataTimeoutPolicies(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/%s/step0.tf", t.Name()), @@ -53,8 +52,8 @@ func TestDataTimeoutPolicies(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/%s/step0.tf", t.Name()), diff --git a/pkg/providers/iam/data_akamai_iam_timezones_test.go b/pkg/providers/iam/data_akamai_iam_timezones_test.go index fcace85a4..6cdfa3d37 100644 --- a/pkg/providers/iam/data_akamai_iam_timezones_test.go +++ b/pkg/providers/iam/data_akamai_iam_timezones_test.go @@ -41,8 +41,8 @@ func TestDataTimezones(t *testing.T) { useClient(client, func() { resourceName := "data.akamai_iam_timezones.test" resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/%s/timezones.tf", workDir), @@ -77,8 +77,8 @@ func TestDataTimezones(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, Steps: []resource.TestStep{ { Config: test.Fixture("testdata/%s/timezones.tf", workDir), diff --git a/pkg/providers/iam/provider_test.go b/pkg/providers/iam/provider_test.go index 01b0d1788..73aacb868 100644 --- a/pkg/providers/iam/provider_test.go +++ b/pkg/providers/iam/provider_test.go @@ -1,6 +1,7 @@ package iam import ( + "context" "log" "os" "sync" @@ -9,17 +10,37 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-go/tfprotov6" + "github.com/hashicorp/terraform-plugin-mux/tf5to6server" + "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" ) -var testAccProviders map[string]func() (*schema.Provider, error) -var testAccProvider *schema.Provider +var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) func TestMain(m *testing.M) { - testAccProvider = akamai.NewPluginProvider(NewSubprovider())() - testAccProviders = map[string]func() (*schema.Provider, error){ - "akamai": func() (*schema.Provider, error) { - return testAccProvider, nil + testAccPluginProvider := akamai.NewPluginProvider(NewSubprovider())() + testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ + "akamai": func() (tfprotov6.ProviderServer, error) { + upgradedPluginProvider, err := tf5to6server.UpgradeServer( + context.Background(), + testAccPluginProvider.GRPCProvider, + ) + if err != nil { + return nil, err + } + + providers := []func() tfprotov6.ProviderServer{ + func() tfprotov6.ProviderServer { + return upgradedPluginProvider + }, + } + + muxServer, err := tf6muxserver.NewMuxServer(context.Background(), providers...) + if err != nil { + return nil, err + } + + return muxServer.ProviderServer(), nil }, } diff --git a/pkg/providers/iam/resource_akamai_iam_blocked_user_properties_test.go b/pkg/providers/iam/resource_akamai_iam_blocked_user_properties_test.go index f6652e8c4..57d02a93a 100644 --- a/pkg/providers/iam/resource_akamai_iam_blocked_user_properties_test.go +++ b/pkg/providers/iam/resource_akamai_iam_blocked_user_properties_test.go @@ -171,9 +171,9 @@ func TestResourceIAMBlockedUserProperties(t *testing.T) { test.init(client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, - Steps: test.steps, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, + Steps: test.steps, }) }) client.AssertExpectations(t) diff --git a/pkg/providers/iam/resource_akamai_iam_group_test.go b/pkg/providers/iam/resource_akamai_iam_group_test.go index c62877b7d..7be407e67 100644 --- a/pkg/providers/iam/resource_akamai_iam_group_test.go +++ b/pkg/providers/iam/resource_akamai_iam_group_test.go @@ -143,9 +143,9 @@ func TestResourceGroup(t *testing.T) { test.init(client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, - Steps: test.steps, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, + Steps: test.steps, }) }) client.AssertExpectations(t) diff --git a/pkg/providers/iam/resource_akamai_iam_role_test.go b/pkg/providers/iam/resource_akamai_iam_role_test.go index 532c647f8..775ba0758 100644 --- a/pkg/providers/iam/resource_akamai_iam_role_test.go +++ b/pkg/providers/iam/resource_akamai_iam_role_test.go @@ -135,7 +135,7 @@ func TestResourceIAMRole(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/role_create.tf", testDir)), @@ -164,7 +164,7 @@ func TestResourceIAMRole(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/role_create.tf", testDir)), @@ -198,7 +198,7 @@ func TestResourceIAMRole(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/role_create.tf", testDir)), @@ -235,7 +235,7 @@ func TestResourceIAMRole(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/role_create.tf", testDir)), @@ -268,7 +268,7 @@ func TestResourceIAMRole(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/role_create.tf", testDir)), @@ -298,7 +298,7 @@ func TestResourceIAMRole(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/role_create.tf", testDir)), diff --git a/pkg/providers/iam/resource_akamai_iam_user_test.go b/pkg/providers/iam/resource_akamai_iam_user_test.go index 5f6742f12..45ce6353d 100644 --- a/pkg/providers/iam/resource_akamai_iam_user_test.go +++ b/pkg/providers/iam/resource_akamai_iam_user_test.go @@ -7,12 +7,11 @@ import ( "strings" "testing" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" - "github.com/stretchr/testify/assert" - - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) @@ -634,9 +633,9 @@ func TestResourceUser(t *testing.T) { test.init(client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - IsUnitTest: true, - Steps: test.steps, + ProtoV6ProviderFactories: testAccProviders, + IsUnitTest: true, + Steps: test.steps, }) }) client.AssertExpectations(t) diff --git a/pkg/providers/imaging/data_akamai_imaging_policy_image_test.go b/pkg/providers/imaging/data_akamai_imaging_policy_image_test.go index de7708a3b..baeb8bfeb 100644 --- a/pkg/providers/imaging/data_akamai_imaging_policy_image_test.go +++ b/pkg/providers/imaging/data_akamai_imaging_policy_image_test.go @@ -37,7 +37,7 @@ func TestDataPolicyImage(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/imaging/data_akamai_imaging_policy_video_test.go b/pkg/providers/imaging/data_akamai_imaging_policy_video_test.go index 85929656e..fcd18eee4 100644 --- a/pkg/providers/imaging/data_akamai_imaging_policy_video_test.go +++ b/pkg/providers/imaging/data_akamai_imaging_policy_video_test.go @@ -25,7 +25,7 @@ func TestDataPolicyVideo(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/imaging/provider_test.go b/pkg/providers/imaging/provider_test.go index 5427f970e..da7f9f946 100644 --- a/pkg/providers/imaging/provider_test.go +++ b/pkg/providers/imaging/provider_test.go @@ -1,6 +1,7 @@ package imaging import ( + "context" "log" "os" "sync" @@ -9,19 +10,38 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/imaging" "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-go/tfprotov6" + "github.com/hashicorp/terraform-plugin-mux/tf5to6server" + "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" ) -var testAccProviders map[string]func() (*schema.Provider, error) -var testAccProvider *schema.Provider +var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) func TestMain(m *testing.M) { PolicyDepth = 4 - testAccProvider = akamai.NewPluginProvider(NewSubprovider())() - testAccProviders = map[string]func() (*schema.Provider, error){ - "akamai": func() (*schema.Provider, error) { - return testAccProvider, nil + testAccPluginProvider := akamai.NewPluginProvider(NewSubprovider())() + testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ + "akamai": func() (tfprotov6.ProviderServer, error) { + upgradedPluginProvider, err := tf5to6server.UpgradeServer( + context.Background(), + testAccPluginProvider.GRPCProvider, + ) + if err != nil { + return nil, err + } + + providers := []func() tfprotov6.ProviderServer{ + func() tfprotov6.ProviderServer { + return upgradedPluginProvider + }, + } + + muxServer, err := tf6muxserver.NewMuxServer(context.Background(), providers...) + if err != nil { + return nil, err + } + + return muxServer.ProviderServer(), nil }, } diff --git a/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go b/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go index 9c42a813b..9a4412511 100644 --- a/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go @@ -227,7 +227,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -260,7 +260,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -311,7 +311,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -409,7 +409,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -459,7 +459,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -511,7 +511,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -553,7 +553,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/default.tf", testDir)), @@ -609,7 +609,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -741,7 +741,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -775,7 +775,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -810,7 +810,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -850,7 +850,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -879,7 +879,7 @@ func TestResourcePolicyImage(t *testing.T) { client := new(imaging.Mock) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -896,7 +896,7 @@ func TestResourcePolicyImage(t *testing.T) { client := new(imaging.Mock) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -923,7 +923,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -946,7 +946,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), diff --git a/pkg/providers/imaging/resource_akamai_imaging_policy_set_test.go b/pkg/providers/imaging/resource_akamai_imaging_policy_set_test.go index 57f620f9b..799faea40 100644 --- a/pkg/providers/imaging/resource_akamai_imaging_policy_set_test.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_set_test.go @@ -344,8 +344,8 @@ func TestResourceImagingPolicySet(t *testing.T) { test.init(client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, - Steps: test.steps, + ProtoV6ProviderFactories: testAccProviders, + Steps: test.steps, }) }) client.AssertExpectations(t) diff --git a/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go b/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go index 3ca8b09dd..51ce960e3 100644 --- a/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go @@ -184,7 +184,7 @@ func TestResourcePolicyVideo(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -217,7 +217,7 @@ func TestResourcePolicyVideo(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -268,7 +268,7 @@ func TestResourcePolicyVideo(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -367,7 +367,7 @@ func TestResourcePolicyVideo(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -416,7 +416,7 @@ func TestResourcePolicyVideo(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -468,7 +468,7 @@ func TestResourcePolicyVideo(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -511,7 +511,7 @@ func TestResourcePolicyVideo(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -545,7 +545,7 @@ func TestResourcePolicyVideo(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/default.tf", testDir)), @@ -580,7 +580,7 @@ func TestResourcePolicyVideo(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -615,7 +615,7 @@ func TestResourcePolicyVideo(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -637,7 +637,7 @@ func TestResourcePolicyVideo(t *testing.T) { client := new(imaging.Mock) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -660,7 +660,7 @@ func TestResourcePolicyVideo(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -693,7 +693,7 @@ func TestResourcePolicyVideo(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -716,7 +716,7 @@ func TestResourcePolicyVideo(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), diff --git a/pkg/providers/networklists/data_akamai_networklist_network_lists_test.go b/pkg/providers/networklists/data_akamai_networklist_network_lists_test.go index 88152196e..f92d2a65b 100644 --- a/pkg/providers/networklists/data_akamai_networklist_network_lists_test.go +++ b/pkg/providers/networklists/data_akamai_networklist_network_lists_test.go @@ -26,8 +26,8 @@ func TestAccAkamaiNetworkList_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSNetworkList/match_by_id.tf"), @@ -58,8 +58,8 @@ func TestAccAkamaiNetworkList_data_by_uniqueID(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSNetworkList/match_by_uniqueid.tf"), diff --git a/pkg/providers/networklists/provider_test.go b/pkg/providers/networklists/provider_test.go index 70fefd6b7..ea9c186dc 100644 --- a/pkg/providers/networklists/provider_test.go +++ b/pkg/providers/networklists/provider_test.go @@ -1,6 +1,7 @@ package networklists import ( + "context" "log" "os" "sync" @@ -9,19 +10,40 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/networklists" "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-go/tfprotov6" + "github.com/hashicorp/terraform-plugin-mux/tf5to6server" + "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" ) -var testAccProviders map[string]func() (*schema.Provider, error) -var testAccProvider *schema.Provider +var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) func TestMain(m *testing.M) { - testAccProvider = akamai.NewPluginProvider(NewSubprovider())() - testAccProviders = map[string]func() (*schema.Provider, error){ - "akamai": func() (*schema.Provider, error) { - return testAccProvider, nil + testAccPluginProvider := akamai.NewPluginProvider(NewSubprovider())() + testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ + "akamai": func() (tfprotov6.ProviderServer, error) { + upgradedPluginProvider, err := tf5to6server.UpgradeServer( + context.Background(), + testAccPluginProvider.GRPCProvider, + ) + if err != nil { + return nil, err + } + + providers := []func() tfprotov6.ProviderServer{ + func() tfprotov6.ProviderServer { + return upgradedPluginProvider + }, + } + + muxServer, err := tf6muxserver.NewMuxServer(context.Background(), providers...) + if err != nil { + return nil, err + } + + return muxServer.ProviderServer(), nil }, } + if err := testutils.TFTestSetup(); err != nil { log.Fatal(err) } diff --git a/pkg/providers/networklists/resource_akamai_networklist_activations_test.go b/pkg/providers/networklists/resource_akamai_networklist_activations_test.go index 4c53ece3a..064e9ce77 100644 --- a/pkg/providers/networklists/resource_akamai_networklist_activations_test.go +++ b/pkg/providers/networklists/resource_akamai_networklist_activations_test.go @@ -53,8 +53,8 @@ func TestAccAkamaiActivations_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResActivations/match_by_id.tf"), @@ -119,8 +119,8 @@ func TestAccAkamaiActivations_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResActivations/match_by_id.tf"), diff --git a/pkg/providers/networklists/resource_akamai_networklist_network_list_description_test.go b/pkg/providers/networklists/resource_akamai_networklist_network_list_description_test.go index 5c77afb02..1add7652f 100644 --- a/pkg/providers/networklists/resource_akamai_networklist_network_list_description_test.go +++ b/pkg/providers/networklists/resource_akamai_networklist_network_list_description_test.go @@ -35,8 +35,8 @@ func TestAccAkamaiNetworkListDescription_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: false, - ProviderFactories: testAccProviders, + IsUnitTest: false, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResNetworkListDescription/match_by_id.tf"), diff --git a/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription_test.go b/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription_test.go index fe0ed1371..0967bb9fa 100644 --- a/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription_test.go +++ b/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription_test.go @@ -44,8 +44,8 @@ func TestAccAkamaiNetworkListSubscription_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResNetworkListSubscription/match_by_id.tf"), diff --git a/pkg/providers/networklists/resource_akamai_networklist_network_list_test.go b/pkg/providers/networklists/resource_akamai_networklist_network_list_test.go index c9b15d0f4..ab11a46df 100644 --- a/pkg/providers/networklists/resource_akamai_networklist_network_list_test.go +++ b/pkg/providers/networklists/resource_akamai_networklist_network_list_test.go @@ -73,8 +73,8 @@ func TestAccAkamaiNetworkList_res_basic(t *testing.T) { t.Run("match by NetworkList ID", func(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResNetworkList/match_by_id.tf"), diff --git a/pkg/providers/property/data_akamai_contracts_test.go b/pkg/providers/property/data_akamai_contracts_test.go index 8e9643869..4035fca42 100644 --- a/pkg/providers/property/data_akamai_contracts_test.go +++ b/pkg/providers/property/data_akamai_contracts_test.go @@ -30,7 +30,7 @@ func TestDataContracts(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDataContracts/contracts.tf"), Check: resource.ComposeAggregateTestCheckFunc( diff --git a/pkg/providers/property/data_akamai_cp_code_test.go b/pkg/providers/property/data_akamai_cp_code_test.go index fac59e7a2..64de3a09a 100644 --- a/pkg/providers/property/data_akamai_cp_code_test.go +++ b/pkg/providers/property/data_akamai_cp_code_test.go @@ -28,7 +28,7 @@ func TestDSCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSCPCode/match_by_name.tf"), Check: resource.ComposeAggregateTestCheckFunc( @@ -60,7 +60,7 @@ func TestDSCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSCPCode/match_by_name_output_products.tf"), Check: resource.ComposeAggregateTestCheckFunc( @@ -94,7 +94,7 @@ func TestDSCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSCPCode/match_by_full_id.tf"), Check: resource.ComposeAggregateTestCheckFunc( @@ -126,7 +126,7 @@ func TestDSCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSCPCode/match_by_unprefixed_id.tf"), Check: resource.ComposeAggregateTestCheckFunc( @@ -155,7 +155,7 @@ func TestDSCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSCPCode/match_by_unprefixed_id.tf"), ExpectError: regexp.MustCompile(`cp code not found`), @@ -179,7 +179,7 @@ func TestDSCPCode(t *testing.T) { }}, nil).Times(3) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, IsUnitTest: true, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSGroupNotFound/cp_code.tf"), diff --git a/pkg/providers/property/data_akamai_properties_search_test.go b/pkg/providers/property/data_akamai_properties_search_test.go index af75414c6..db72b2d05 100644 --- a/pkg/providers/property/data_akamai_properties_search_test.go +++ b/pkg/providers/property/data_akamai_properties_search_test.go @@ -55,7 +55,7 @@ func TestDSPropertiesSearch(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertiesSearch/match_by_hostname.tf"), Check: resource.ComposeAggregateTestCheckFunc( @@ -96,7 +96,7 @@ func TestDSPropertiesSearch(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertiesSearch/match_by_hostname.tf"), ExpectError: regexp.MustCompile("searching for properties"), diff --git a/pkg/providers/property/data_akamai_properties_test.go b/pkg/providers/property/data_akamai_properties_test.go index 646e08369..5824e7336 100644 --- a/pkg/providers/property/data_akamai_properties_test.go +++ b/pkg/providers/property/data_akamai_properties_test.go @@ -24,7 +24,7 @@ func TestDataProperties(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDataProperties/properties.tf"), Check: buildAggregatedTest(properties, "grp_testctr_test", "grp_test", "ctr_test"), @@ -47,7 +47,7 @@ func TestDataProperties(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDataProperties/properties_no_group_prefix.tf"), Check: buildAggregatedTest(properties, "grp_testctr_test", "test", "ctr_test"), @@ -70,7 +70,7 @@ func TestDataProperties(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDataProperties/properties_no_contract_prefix.tf"), Check: buildAggregatedTest(properties, "grp_testctr_test", "grp_test", "test"), diff --git a/pkg/providers/property/data_akamai_property_activation_test.go b/pkg/providers/property/data_akamai_property_activation_test.go index c8a055712..4315533c4 100644 --- a/pkg/providers/property/data_akamai_property_activation_test.go +++ b/pkg/providers/property/data_akamai_property_activation_test.go @@ -140,7 +140,7 @@ func TestDataSourcePAPIPropertyActivation(t *testing.T) { } useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, IsUnitTest: true, Steps: test.steps, }) diff --git a/pkg/providers/property/data_akamai_property_hostnames_test.go b/pkg/providers/property/data_akamai_property_hostnames_test.go index 54082058e..be1ea3b28 100644 --- a/pkg/providers/property/data_akamai_property_hostnames_test.go +++ b/pkg/providers/property/data_akamai_property_hostnames_test.go @@ -49,7 +49,7 @@ func TestDataPropertyHostnames(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDataPropertyHostnames/property_hostnames.tf"), Check: buildAggregatedHostnamesTest(hostnameItems, "prp_test1", "grp_test", "ctr_test", "prp_test", 1), @@ -96,7 +96,7 @@ func TestDataPropertyHostnames(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDataPropertyHostnames/property_hostnames_no_group_prefix.tf"), Check: buildAggregatedHostnamesTest(hostnameItems, "prp_test1", "test", "ctr_test", "prp_test", 1), @@ -143,7 +143,7 @@ func TestDataPropertyHostnames(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDataPropertyHostnames/property_hostnames_no_contract_prefix.tf"), Check: buildAggregatedHostnamesTest(hostnameItems, "prp_test1", "grp_test", "test", "prp_test", 1), @@ -190,7 +190,7 @@ func TestDataPropertyHostnames(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDataPropertyHostnames/property_hostnames_no_property_prefix.tf"), Check: buildAggregatedHostnamesTest(hostnameItems, "prp_test1", "grp_test", "ctr_test", "prp_test", 1), diff --git a/pkg/providers/property/data_akamai_property_include_activation_test.go b/pkg/providers/property/data_akamai_property_include_activation_test.go index a9e8271db..b29b46c3e 100644 --- a/pkg/providers/property/data_akamai_property_include_activation_test.go +++ b/pkg/providers/property/data_akamai_property_include_activation_test.go @@ -163,7 +163,7 @@ func TestDataPropertyIncludeActivation(t *testing.T) { test.init(t, client, test.attrs) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, IsUnitTest: true, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/property/data_akamai_property_include_parents_test.go b/pkg/providers/property/data_akamai_property_include_parents_test.go index a0967c016..c5d463284 100644 --- a/pkg/providers/property/data_akamai_property_include_parents_test.go +++ b/pkg/providers/property/data_akamai_property_include_parents_test.go @@ -161,7 +161,7 @@ func TestDataPropertyIncludeParents(t *testing.T) { useClient(client, nil, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, fmt.Sprintf("testdata/TestDataPropertyIncludeParents/%s", test.givenTF)), Check: resource.ComposeAggregateTestCheckFunc(checkFuncs...), diff --git a/pkg/providers/property/data_akamai_property_include_rules_test.go b/pkg/providers/property/data_akamai_property_include_rules_test.go index 5ce28b885..edaf2ac6e 100644 --- a/pkg/providers/property/data_akamai_property_include_rules_test.go +++ b/pkg/providers/property/data_akamai_property_include_rules_test.go @@ -162,7 +162,7 @@ func TestDataPropertyIncludeRules(t *testing.T) { test.init(t, client, test.mockData) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/property/data_akamai_property_include_test.go b/pkg/providers/property/data_akamai_property_include_test.go index 49ffe3266..bde277cae 100644 --- a/pkg/providers/property/data_akamai_property_include_test.go +++ b/pkg/providers/property/data_akamai_property_include_test.go @@ -137,7 +137,7 @@ func TestDataPropertyInclude(t *testing.T) { useClient(client, nil, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, fmt.Sprintf("testdata/TestDataPropertyInclude/%s", test.givenTF)), Check: resource.ComposeAggregateTestCheckFunc(checkFuncs...), diff --git a/pkg/providers/property/data_akamai_property_includes_test.go b/pkg/providers/property/data_akamai_property_includes_test.go index 9c39ef927..4cb1c17ae 100644 --- a/pkg/providers/property/data_akamai_property_includes_test.go +++ b/pkg/providers/property/data_akamai_property_includes_test.go @@ -297,7 +297,7 @@ func TestDataPropertyIncludes(t *testing.T) { test.init(t, client, test.attrs) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, IsUnitTest: true, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/property/data_akamai_property_products_test.go b/pkg/providers/property/data_akamai_property_products_test.go index 3e996ce97..1ba7417e9 100644 --- a/pkg/providers/property/data_akamai_property_products_test.go +++ b/pkg/providers/property/data_akamai_property_products_test.go @@ -14,7 +14,7 @@ import ( func TestVerifyProductsDataSourceSchema(t *testing.T) { t.Run("akamai_property_products - test data source required contract", func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, IsUnitTest: true, Steps: []resource.TestStep{{ Config: testConfig(""), @@ -38,7 +38,7 @@ func TestOutputProductsDataSource(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, IsUnitTest: true, Steps: []resource.TestStep{{ Config: testConfig("contract_id = \"ctr_test\""), diff --git a/pkg/providers/property/data_akamai_property_rule_formats_test.go b/pkg/providers/property/data_akamai_property_rule_formats_test.go index 165fb09f0..d4c6018ad 100644 --- a/pkg/providers/property/data_akamai_property_rule_formats_test.go +++ b/pkg/providers/property/data_akamai_property_rule_formats_test.go @@ -23,7 +23,7 @@ func Test_readPropertyRuleFormats(t *testing.T) { ).Return(&papi.GetRuleFormatsResponse{RuleFormats: ruleFormats}, nil) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRuleFormats/rule_formats.tf"), Check: resource.ComposeAggregateTestCheckFunc( diff --git a/pkg/providers/property/data_akamai_property_rules_builder_test.go b/pkg/providers/property/data_akamai_property_rules_builder_test.go index 416f72a0a..82e309d2f 100644 --- a/pkg/providers/property/data_akamai_property_rules_builder_test.go +++ b/pkg/providers/property/data_akamai_property_rules_builder_test.go @@ -15,7 +15,7 @@ func TestDataPropertyRulesBuilder(t *testing.T) { t.Run("valid rule with 3 children - v2023-01-05", func(t *testing.T) { useClient(nil, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRulesBuilder/rules_v2023_01_05.tf"), Check: resource.ComposeAggregateTestCheckFunc( @@ -54,7 +54,7 @@ func TestDataPropertyRulesBuilder(t *testing.T) { t.Run("valid rule with 3 children - v2023-05-30", func(t *testing.T) { useClient(nil, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRulesBuilder/rules_v2023_05_30.tf"), Check: resource.ComposeAggregateTestCheckFunc( @@ -210,7 +210,7 @@ func TestDataPropertyRulesBuilder(t *testing.T) { t.Run("invalid rule with 3 children with different versions", func(t *testing.T) { useClient(nil, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRulesBuilder/rules_mixed_versions.tf"), ExpectError: regexp.MustCompile(`child rule is using different rule format \(rules_v2023_05_30\) than expected \(rules_v2023_01_05\)`), @@ -221,7 +221,7 @@ func TestDataPropertyRulesBuilder(t *testing.T) { t.Run("fails on rule with more than one behavior in one block", func(t *testing.T) { useClient(nil, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRulesBuilder/rules_error_too_many_elements.tf"), ExpectError: regexp.MustCompile(`expected 1 element\(s\), got 2`), @@ -232,7 +232,7 @@ func TestDataPropertyRulesBuilder(t *testing.T) { t.Run("fails on rule with is_secure outside default rule", func(t *testing.T) { useClient(nil, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRulesBuilder/rules_with_is_secure_outside_default.tf"), ExpectError: regexp.MustCompile(`cannot be used outside 'default' rule: is_secure`), @@ -243,7 +243,7 @@ func TestDataPropertyRulesBuilder(t *testing.T) { t.Run("fails on rule with variable outside default rule", func(t *testing.T) { useClient(nil, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRulesBuilder/rules_with_variable_outside_default.tf"), ExpectError: regexp.MustCompile(`cannot be used outside 'default' rule: variable`), @@ -254,7 +254,7 @@ func TestDataPropertyRulesBuilder(t *testing.T) { t.Run("valid rule with one child and some values are variables", func(t *testing.T) { useClient(nil, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRulesBuilder/rules_variables.tf"), Check: resource.ComposeAggregateTestCheckFunc( diff --git a/pkg/providers/property/data_akamai_property_rules_template_test.go b/pkg/providers/property/data_akamai_property_rules_template_test.go index fd7ababbf..f35454337 100644 --- a/pkg/providers/property/data_akamai_property_rules_template_test.go +++ b/pkg/providers/property/data_akamai_property_rules_template_test.go @@ -19,7 +19,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_vars_map.tf"), @@ -41,7 +41,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_vars_map_ns.tf"), @@ -63,7 +63,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_null_values.tf"), @@ -101,7 +101,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_vars_file.tf"), @@ -123,7 +123,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_file_data_conflict.tf"), @@ -141,7 +141,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_missing_data.tf"), @@ -159,7 +159,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_vars_conflict.tf"), @@ -173,7 +173,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_vars_invalid_type.tf"), @@ -187,7 +187,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_var_not_found.tf"), @@ -201,7 +201,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_vars_invalid_value.tf"), @@ -215,7 +215,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_vars_file_not_found.tf"), @@ -229,7 +229,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_invalid_json.tf"), @@ -243,7 +243,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_file_not_found.tf"), @@ -258,7 +258,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_file_is_empty.tf"), @@ -674,7 +674,7 @@ func TestVariablesNesting(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -708,7 +708,7 @@ func TestVariablesAndIncludesNestingCyclicDependency(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -726,7 +726,7 @@ func TestMultipleTemplates(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_multiple_templates.tf"), diff --git a/pkg/providers/property/data_akamai_property_rules_test.go b/pkg/providers/property/data_akamai_property_rules_test.go index 02ec6cd7d..42bc3ff77 100644 --- a/pkg/providers/property/data_akamai_property_rules_test.go +++ b/pkg/providers/property/data_akamai_property_rules_test.go @@ -51,7 +51,7 @@ func TestDSPropertyRulesRead(t *testing.T) { mockImpl(client) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRules/ds_property_rules.tf"), @@ -127,7 +127,7 @@ func TestDSPropertyRulesRead(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configFile), @@ -157,7 +157,7 @@ func TestDSPropertyRulesRead(t *testing.T) { mockImpl(client) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRules/with_versioned_rule_format.tf"), @@ -176,7 +176,7 @@ func TestDSPropertyRulesRead(t *testing.T) { mockImpl(client) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRules/with_versioned_rule_format.tf"), @@ -191,7 +191,7 @@ func TestDSPropertyRulesRead(t *testing.T) { client := &papi.Mock{} useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRules/missing_group_id.tf"), @@ -206,7 +206,7 @@ func TestDSPropertyRulesRead(t *testing.T) { client := &papi.Mock{} useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRules/missing_contract_id.tf"), @@ -221,7 +221,7 @@ func TestDSPropertyRulesRead(t *testing.T) { client := &papi.Mock{} useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRules/empty_contract_id.tf"), @@ -236,7 +236,7 @@ func TestDSPropertyRulesRead(t *testing.T) { client := &papi.Mock{} useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRules/empty_group_id.tf"), @@ -259,7 +259,7 @@ func TestDSPropertyRulesRead(t *testing.T) { mockImpl(client) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRules/ds_property_rules.tf"), @@ -296,7 +296,7 @@ func TestDSPropertyRulesRead(t *testing.T) { mockImpl(client) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRules/ds_property_rules.tf"), @@ -311,7 +311,7 @@ func TestDSPropertyRulesRead(t *testing.T) { func TestDSPropertyRulesRead_Fail(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRules/always_fails.tf"), ExpectError: regexp.MustCompile(`Error: provided value cannot be blank`), diff --git a/pkg/providers/property/data_akamai_property_test.go b/pkg/providers/property/data_akamai_property_test.go index 41f520bc0..f30656b0b 100644 --- a/pkg/providers/property/data_akamai_property_test.go +++ b/pkg/providers/property/data_akamai_property_test.go @@ -436,7 +436,7 @@ func TestDataProperty(t *testing.T) { useClient(client, nil, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, fmt.Sprintf("testdata/TestDataProperty/%s", test.givenTF)), Check: resource.ComposeAggregateTestCheckFunc(checkFuncs...), diff --git a/pkg/providers/property/data_property_akamai_contract_test.go b/pkg/providers/property/data_property_akamai_contract_test.go index d2e60c00a..21d29c4bb 100644 --- a/pkg/providers/property/data_property_akamai_contract_test.go +++ b/pkg/providers/property/data_property_akamai_contract_test.go @@ -191,7 +191,7 @@ func Test_DSReadContract(t *testing.T) { test.init(t, client, test.mockData) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/property/data_property_akamai_group_test.go b/pkg/providers/property/data_property_akamai_group_test.go index eb9d33373..8e2ef1086 100644 --- a/pkg/providers/property/data_property_akamai_group_test.go +++ b/pkg/providers/property/data_property_akamai_group_test.go @@ -151,7 +151,7 @@ func Test_DSReadGroup(t *testing.T) { test.init(t, client, test.mockData) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/property/data_property_akamai_groups_test.go b/pkg/providers/property/data_property_akamai_groups_test.go index 1a39ad8bd..e5c4207a8 100644 --- a/pkg/providers/property/data_property_akamai_groups_test.go +++ b/pkg/providers/property/data_property_akamai_groups_test.go @@ -31,7 +31,7 @@ func TestDataSourceMultipleGroups_basic(t *testing.T) { }}}}, nil) useClient(client, nil, func() { resource.ParallelTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, CheckDestroy: testAccCheckAkamaiMultipleGroupsDestroy, IsUnitTest: true, Steps: []resource.TestStep{ @@ -70,7 +70,7 @@ func TestGroup_ContractNotFoundInState(t *testing.T) { }}}}, nil) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, IsUnitTest: true, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSContractRequired/groups.tf"), diff --git a/pkg/providers/property/provider_test.go b/pkg/providers/property/provider_test.go index 405c14998..915edd320 100644 --- a/pkg/providers/property/provider_test.go +++ b/pkg/providers/property/provider_test.go @@ -15,6 +15,9 @@ import ( "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/provider" "github.com/hashicorp/terraform-plugin-framework/providerserver" + "github.com/hashicorp/terraform-plugin-go/tfprotov6" + "github.com/hashicorp/terraform-plugin-mux/tf5to6server" + "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-go/tfprotov5" "github.com/hashicorp/terraform-plugin-mux/tf5muxserver" @@ -22,7 +25,7 @@ import ( ) var ( - testAccProviders map[string]func() (tfprotov5.ProviderServer, error) + testAccProviders map[string]func() (tfprotov6.ProviderServer, error) testAccPluginProvider *schema.Provider testAccFrameworkProvider provider.Provider ) @@ -31,17 +34,28 @@ func TestMain(m *testing.M) { testAccPluginProvider = akamai.NewPluginProvider(NewPluginSubprovider())() testAccFrameworkProvider = akamai.NewFrameworkProvider(NewFrameworkSubprovider())() - testAccProviders = map[string]func() (tfprotov5.ProviderServer, error){ - "akamai": func() (tfprotov5.ProviderServer, error) { + testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ + "akamai": func() (tfprotov6.ProviderServer, error) { ctx := context.Background() - providers := []func() tfprotov5.ProviderServer{ + + upgradedSdkProvider, err := tf5to6server.UpgradeServer( + context.Background(), testAccPluginProvider.GRPCProvider, - providerserver.NewProtocol5( + ) + if err != nil { + return nil, err + } + + providers := []func() tfprotov6.ProviderServer{ + func() tfprotov6.ProviderServer { + return upgradedSdkProvider + }, + providerserver.NewProtocol6( testAccFrameworkProvider, ), } - muxServer, err := tf5muxserver.NewMuxServer(ctx, providers...) + muxServer, err := tf6muxserver.NewMuxServer(ctx, providers...) if err != nil { return nil, err } diff --git a/pkg/providers/property/resource_akamai_cp_code_test.go b/pkg/providers/property/resource_akamai_cp_code_test.go index e0efb21cf..a7856f66e 100644 --- a/pkg/providers/property/resource_akamai_cp_code_test.go +++ b/pkg/providers/property/resource_akamai_cp_code_test.go @@ -155,7 +155,7 @@ func TestResCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestResCPCode/create_new_cp_code.tf"), Check: resource.ComposeAggregateTestCheckFunc( @@ -192,7 +192,7 @@ func TestResCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestResCPCode/use_existing_cp_code.tf"), Check: resource.ComposeAggregateTestCheckFunc( @@ -229,7 +229,7 @@ func TestResCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestResCPCode/use_existing_cp_code.tf"), Check: resource.ComposeAggregateTestCheckFunc( @@ -265,7 +265,7 @@ func TestResCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestResCPCode/use_existing_cp_code.tf"), ExpectError: regexp.MustCompile("Couldn't find product id on the CP Code"), @@ -296,7 +296,7 @@ func TestResCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCPCode/change_name_step0.tf"), @@ -326,7 +326,7 @@ func TestResCPCode(t *testing.T) { expectGetCPCode(client, "ctr_1", "grp_2", 0, &CPCodes, nil).Times(4) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCPCode/import_cp_code.tf"), @@ -359,7 +359,7 @@ func TestResCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCPCode/import_cp_code.tf"), @@ -380,7 +380,7 @@ func TestResCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCPCode/import_cp_code.tf"), @@ -411,7 +411,7 @@ func TestResCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCPCode/change_name_step0.tf"), @@ -479,7 +479,7 @@ func TestResCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCPCode/change_name_step0.tf"), @@ -516,7 +516,7 @@ func TestResCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCPCode/change_name_step0.tf"), @@ -566,7 +566,7 @@ func TestResCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCPCode/change_name_step0.tf"), @@ -588,7 +588,7 @@ func TestResCPCode(t *testing.T) { expectedErr := regexp.MustCompile("`product_id` must be specified for creation") resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCPCode/missing_product.tf"), diff --git a/pkg/providers/property/resource_akamai_edge_hostname_test.go b/pkg/providers/property/resource_akamai_edge_hostname_test.go index 2160d5492..41d376ad5 100644 --- a/pkg/providers/property/resource_akamai_edge_hostname_test.go +++ b/pkg/providers/property/resource_akamai_edge_hostname_test.go @@ -1053,7 +1053,7 @@ func TestResourceEdgeHostname(t *testing.T) { test.init(client, clientHapi) useClient(client, clientHapi, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: test.steps, }) }) @@ -1135,7 +1135,7 @@ func TestResourceEdgeHostnames_WithImport(t *testing.T) { expectGetEdgeHostnames(client, "ctr_1", "grp_2") useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { // please note that import does not support product id, that why we only define it in config for creation diff --git a/pkg/providers/property/resource_akamai_property_activation_test.go b/pkg/providers/property/resource_akamai_property_activation_test.go index 575bdd3d3..a7b617007 100644 --- a/pkg/providers/property/resource_akamai_property_activation_test.go +++ b/pkg/providers/property/resource_akamai_property_activation_test.go @@ -659,7 +659,7 @@ func TestResourcePAPIPropertyActivation(t *testing.T) { } useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, IsUnitTest: true, Steps: test.steps, }) diff --git a/pkg/providers/property/resource_akamai_property_include_activation_test.go b/pkg/providers/property/resource_akamai_property_include_activation_test.go index f60720dbc..0eecd09b5 100644 --- a/pkg/providers/property/resource_akamai_property_include_activation_test.go +++ b/pkg/providers/property/resource_akamai_property_include_activation_test.go @@ -304,7 +304,7 @@ func TestResourcePropertyIncludeActivation(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/property_include_activation.tf", testDir)), @@ -424,7 +424,7 @@ func TestResourcePropertyIncludeActivation(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/property_include_activation.tf", testDir)), @@ -482,7 +482,7 @@ func TestResourcePropertyIncludeActivation(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/property_include_activation.tf", testDir)), @@ -530,7 +530,7 @@ func TestResourcePropertyIncludeActivation(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/property_include_activation.tf", testDir)), @@ -580,7 +580,7 @@ func TestResourcePropertyIncludeActivation(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/no_compliance_record_on_production.tf", testDir)), @@ -635,7 +635,7 @@ func TestResourcePropertyIncludeActivation(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/property_include_activation.tf", testDir)), @@ -691,7 +691,7 @@ func TestResourcePropertyIncludeActivation(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/property_include_activation.tf", testDir)), @@ -731,7 +731,7 @@ func TestResourcePropertyIncludeActivation(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/property_include_activation.tf", testDir)), @@ -799,7 +799,7 @@ func TestResourcePropertyIncludeActivation(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/property_include_activation.tf", testDir)), diff --git a/pkg/providers/property/resource_akamai_property_include_test.go b/pkg/providers/property/resource_akamai_property_include_test.go index 1b9d1bce6..5c8d5d217 100644 --- a/pkg/providers/property/resource_akamai_property_include_test.go +++ b/pkg/providers/property/resource_akamai_property_include_test.go @@ -972,7 +972,7 @@ func TestResourcePropertyInclude(t *testing.T) { useClient(client, &hapi.Mock{}, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, IsUnitTest: true, Steps: testCase.steps, }) diff --git a/pkg/providers/property/resource_akamai_property_test.go b/pkg/providers/property/resource_akamai_property_test.go index 6ad837a91..6f7a537b2 100644 --- a/pkg/providers/property/resource_akamai_property_test.go +++ b/pkg/providers/property/resource_akamai_property_test.go @@ -767,7 +767,7 @@ func TestResProperty(t *testing.T) { return func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestResProperty/ConfigError/%s.tf", fixtureName), ExpectError: regexp.MustCompile(rx), @@ -791,7 +791,7 @@ func TestResProperty(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, IsUnitTest: true, Steps: tc.Steps(State, fixturePrefix), }) @@ -886,7 +886,7 @@ func TestResProperty(t *testing.T) { tc.ClientSetup(State) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: tc.Steps(State, ""), }) }) @@ -998,7 +998,7 @@ func TestResProperty(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/%s-step0.tf", t.Name()), @@ -1047,7 +1047,7 @@ func TestResProperty(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/%s/step0.tf", t.Name()), @@ -1098,7 +1098,7 @@ func TestResProperty(t *testing.T) { ExpectRemoveProperty(client, "prp_1", "", "") useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResProperty/property_update_with_validation_error_for_rules.tf"), @@ -1265,7 +1265,7 @@ func TestResProperty(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResProperty/CreationUpdateNoHostnames/creation/property_create.tf"), @@ -1321,7 +1321,7 @@ func TestResProperty(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResProperty/CreationUpdateNoHostnames/creation/property_create.tf"), @@ -1369,7 +1369,7 @@ func TestResProperty(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResProperty/CreationUpdateNoHostnames/creation/property_create.tf"), @@ -1412,7 +1412,7 @@ func TestResProperty(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestResProperty/Creation/property.tf"), ExpectError: regexp.MustCompile("group not found: grp_0"), @@ -1439,7 +1439,7 @@ func TestResProperty(t *testing.T) { client.On("CreateProperty", AnyCTX, req).Return(nil, fmt.Errorf("given property name is not unique")) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/%s.tf", t.Name()), @@ -1658,7 +1658,7 @@ func TestResProperty(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testAccProviders, Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResProperty/CreationUpdateIncorrectEdgeHostname/create/property.tf"), diff --git a/terraform-provider-manifest.json b/terraform-provider-manifest.json index 1931b0e00..fec2a5691 100644 --- a/terraform-provider-manifest.json +++ b/terraform-provider-manifest.json @@ -1,6 +1,6 @@ { "version": 1, "metadata": { - "protocol_versions": ["5.0"] + "protocol_versions": ["6.0"] } } From 34b25d3db4e001229890991603c57f1daa4dce4b Mon Sep 17 00:00:00 2001 From: Darek Stopka Date: Wed, 20 Sep 2023 14:15:47 +0200 Subject: [PATCH 07/52] DXE-3107 Rename Plugin references to SDK --- main.go | 4 ++-- pkg/akamai/framework_provider_test.go | 4 ++-- .../{plugin_provider.go => sdk_provider.go} | 10 +++++----- ...gin_provider_test.go => sdk_provider_test.go} | 10 +++++----- pkg/common/testutils/testutils.go | 12 ++++++------ pkg/providers/appsec/appsec.go | 2 +- pkg/providers/appsec/provider.go | 2 +- pkg/providers/appsec/provider_test.go | 8 ++++---- pkg/providers/botman/botman.go | 2 +- pkg/providers/botman/provider.go | 2 +- pkg/providers/botman/provider_test.go | 8 ++++---- pkg/providers/clientlists/clientlists.go | 2 +- pkg/providers/clientlists/provider_test.go | 8 ++++---- pkg/providers/cloudlets/cloudlets.go | 2 +- pkg/providers/cps/cps.go | 2 +- pkg/providers/cps/provider.go | 2 +- pkg/providers/cps/provider_test.go | 8 ++++---- pkg/providers/datastream/datastream.go | 2 +- pkg/providers/datastream/provider.go | 2 +- pkg/providers/datastream/provider_test.go | 8 ++++---- pkg/providers/dns/dns.go | 2 +- pkg/providers/dns/provider.go | 2 +- pkg/providers/dns/provider_test.go | 8 ++++---- pkg/providers/edgeworkers/edgeworkers.go | 2 +- pkg/providers/edgeworkers/provider.go | 2 +- pkg/providers/edgeworkers/provider_test.go | 8 ++++---- .../gtm/data_akamai_gtm_datacenter_test.go | 2 +- .../gtm/data_akamai_gtm_datacenters_test.go | 2 +- .../data_akamai_gtm_default_datacenter_test.go | 2 +- .../gtm/resource_akamai_gtm_asmap_test.go | 10 +++++----- .../gtm/resource_akamai_gtm_cidrmap_test.go | 8 ++++---- .../gtm/resource_akamai_gtm_datacenter_test.go | 6 +++--- .../gtm/resource_akamai_gtm_domain_test.go | 12 ++++++------ .../gtm/resource_akamai_gtm_geomap_test.go | 8 ++++---- .../gtm/resource_akamai_gtm_property_test.go | 16 ++++++++-------- .../gtm/resource_akamai_gtm_resource_test.go | 8 ++++---- pkg/providers/iam/iam.go | 2 +- pkg/providers/iam/provider.go | 2 +- pkg/providers/iam/provider_test.go | 8 ++++---- pkg/providers/imaging/imaging.go | 2 +- pkg/providers/imaging/provider.go | 2 +- pkg/providers/imaging/provider_test.go | 8 ++++---- pkg/providers/networklists/networklists.go | 2 +- pkg/providers/networklists/provider.go | 2 +- pkg/providers/networklists/provider_test.go | 8 ++++---- pkg/providers/property/property.go | 2 +- pkg/providers/property/provider.go | 2 +- pkg/providers/registry/registry.go | 16 ++++++++-------- pkg/subprovider/subprovider.go | 4 ++-- 49 files changed, 129 insertions(+), 129 deletions(-) rename pkg/akamai/{plugin_provider.go => sdk_provider.go} (92%) rename pkg/akamai/{plugin_provider_test.go => sdk_provider_test.go} (95%) diff --git a/main.go b/main.go index d95b5f314..e3c211b42 100644 --- a/main.go +++ b/main.go @@ -25,13 +25,13 @@ func main() { // Anything lower and we risk losing those values to the ether hclog.Default().SetLevel(hclog.Trace) - upgradedPluginProvider, err := akamai.NewProtoV6PluginProvider(registry.PluginSubproviders()) + sdkProviderV6, err := akamai.NewProtoV6SDKProvider(registry.SDKSubproviders()) if err != nil { log.Fatal(err) } providers := []func() tfprotov6.ProviderServer{ - upgradedPluginProvider, + sdkProviderV6, providerserver.NewProtocol6( akamai.NewFrameworkProvider(registry.FrameworkSubproviders()...)(), ), diff --git a/pkg/akamai/framework_provider_test.go b/pkg/akamai/framework_provider_test.go index 0de228acf..1574fe999 100644 --- a/pkg/akamai/framework_provider_test.go +++ b/pkg/akamai/framework_provider_test.go @@ -295,13 +295,13 @@ func newProtoV6ProviderFactory(subproviders ...subprovider.Framework) map[string "akamai": func() (tfprotov6.ProviderServer, error) { ctx := context.Background() - pluginProviderV6, err := akamai.NewProtoV6PluginProvider(registry.PluginSubproviders()) + sdkProviderV6, err := akamai.NewProtoV6SDKProvider(registry.SDKSubproviders()) if err != nil { return nil, err } providers := []func() tfprotov6.ProviderServer{ - pluginProviderV6, + sdkProviderV6, providerserver.NewProtocol6( akamai.NewFrameworkProvider(subproviders...)(), ), diff --git a/pkg/akamai/plugin_provider.go b/pkg/akamai/sdk_provider.go similarity index 92% rename from pkg/akamai/plugin_provider.go rename to pkg/akamai/sdk_provider.go index bf540d0d6..ff324ae37 100644 --- a/pkg/akamai/plugin_provider.go +++ b/pkg/akamai/sdk_provider.go @@ -18,8 +18,8 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/plugin" ) -// NewPluginProvider returns the provider function to terraform -func NewPluginProvider(subprovs ...subprovider.Plugin) plugin.ProviderFunc { +// NewSDKProvider returns the provider function to terraform +func NewSDKProvider(subprovs ...subprovider.SDK) plugin.ProviderFunc { prov := &schema.Provider{ Schema: map[string]*schema.Schema{ "edgerc": { @@ -176,11 +176,11 @@ func configureProviderContext(p *schema.Provider) schema.ConfigureContextFunc { } } -// NewProtoV6PluginProvider upgrades plugin provider from protocol version 5 to 6 -func NewProtoV6PluginProvider(subproviders []subprovider.Plugin) (func() tfprotov6.ProviderServer, error) { +// NewProtoV6SDKProvider upgrades SDK provider from protocol version 5 to 6 +func NewProtoV6SDKProvider(subproviders []subprovider.SDK) (func() tfprotov6.ProviderServer, error) { pluginProvider, err := tf5to6server.UpgradeServer( context.Background(), - NewPluginProvider(subproviders...)().GRPCProvider, + NewSDKProvider(subproviders...)().GRPCProvider, ) return func() tfprotov6.ProviderServer { return pluginProvider diff --git a/pkg/akamai/plugin_provider_test.go b/pkg/akamai/sdk_provider_test.go similarity index 95% rename from pkg/akamai/plugin_provider_test.go rename to pkg/akamai/sdk_provider_test.go index fdc9e6194..1b046526c 100644 --- a/pkg/akamai/plugin_provider_test.go +++ b/pkg/akamai/sdk_provider_test.go @@ -18,10 +18,10 @@ import ( "github.com/stretchr/testify/require" ) -func TestPluginProvider(t *testing.T) { +func TestSDKProvider(t *testing.T) { t.Parallel() - provider := akamai.NewPluginProvider(registry.PluginSubproviders()...)() + provider := akamai.NewSDKProvider(registry.SDKSubproviders()...)() err := provider.InternalValidate() assert.NoError(t, err) } @@ -43,7 +43,7 @@ func TestConfigureCache_EnabledInContext(t *testing.T) { for name, test := range tests { ctx := context.Background() t.Run(name, func(t *testing.T) { - prov := akamai.NewPluginProvider() + prov := akamai.NewSDKProvider() _, diagnostics := prov().ConfigureContextFunc(ctx, test.resourceLocalData) require.False(t, diagnostics.HasError(), fmt.Sprintf("unexpected error in diagnostics: %v", diagnostics)) @@ -78,7 +78,7 @@ func TestConfigureEdgercInContext(t *testing.T) { for name, test := range tests { ctx := context.Background() t.Run(name, func(t *testing.T) { - prov := akamai.NewPluginProvider() + prov := akamai.NewSDKProvider() meta, diagnostics := prov().ConfigureContextFunc(ctx, test.resourceLocalData) if test.withError { @@ -168,7 +168,7 @@ func TestEdgercValidate(t *testing.T) { } resourceData := schema.TestResourceDataRaw(t, resourceSchema, resourceDataMap) - prov := akamai.NewPluginProvider() + prov := akamai.NewSDKProvider() configuredContext, diagnostics := prov().ConfigureContextFunc(ctx, resourceData) assert.Nil(t, configuredContext) diff --git a/pkg/common/testutils/testutils.go b/pkg/common/testutils/testutils.go index 370ea89b1..c99eeaf2a 100644 --- a/pkg/common/testutils/testutils.go +++ b/pkg/common/testutils/testutils.go @@ -54,14 +54,14 @@ func LoadFixtureString(t *testing.T, format string, args ...interface{}) string return string(LoadFixtureBytes(t, fmt.Sprintf(format, args...))) } -// NewPluginProviderFactories provides protocol v6 plugin provider for test purposes -func NewPluginProviderFactories(subprovider subprovider.Plugin) map[string]func() (tfprotov6.ProviderServer, error) { - testAccPluginProvider := akamai.NewPluginProvider(subprovider)() +// NewSDKProviderFactories uses provided SDK subprovider to create provider factories for test purposes +func NewSDKProviderFactories(subprovider subprovider.SDK) map[string]func() (tfprotov6.ProviderServer, error) { + testAccSDKProvider := akamai.NewSDKProvider(subprovider)() testAccProviders := map[string]func() (tfprotov6.ProviderServer, error){ "akamai": func() (tfprotov6.ProviderServer, error) { - upgradedPluginProvider, err := tf5to6server.UpgradeServer( + sdkProviderV6, err := tf5to6server.UpgradeServer( context.Background(), - testAccPluginProvider.GRPCProvider, + testAccSDKProvider.GRPCProvider, ) if err != nil { return nil, err @@ -69,7 +69,7 @@ func NewPluginProviderFactories(subprovider subprovider.Plugin) map[string]func( providers := []func() tfprotov6.ProviderServer{ func() tfprotov6.ProviderServer { - return upgradedPluginProvider + return sdkProviderV6 }, } diff --git a/pkg/providers/appsec/appsec.go b/pkg/providers/appsec/appsec.go index 57c0b2c08..74b233363 100644 --- a/pkg/providers/appsec/appsec.go +++ b/pkg/providers/appsec/appsec.go @@ -8,5 +8,5 @@ import ( const SubproviderName = "appsec" func init() { - registry.RegisterPluginSubprovider(NewSubprovider()) + registry.RegisterSDKSubprovider(NewSubprovider()) } diff --git a/pkg/providers/appsec/provider.go b/pkg/providers/appsec/provider.go index 9880c20f1..ee868ffc3 100644 --- a/pkg/providers/appsec/provider.go +++ b/pkg/providers/appsec/provider.go @@ -25,7 +25,7 @@ var ( inst *Subprovider ) -var _ subprovider.Plugin = &Subprovider{} +var _ subprovider.SDK = &Subprovider{} // NewSubprovider returns a core sub provider func NewSubprovider(opts ...option) *Subprovider { diff --git a/pkg/providers/appsec/provider_test.go b/pkg/providers/appsec/provider_test.go index 361bf8a14..90c5973a2 100644 --- a/pkg/providers/appsec/provider_test.go +++ b/pkg/providers/appsec/provider_test.go @@ -18,12 +18,12 @@ import ( var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) func TestMain(m *testing.M) { - testAccPluginProvider := akamai.NewPluginProvider(NewSubprovider())() + testAccSDKProvider := akamai.NewSDKProvider(NewSubprovider())() testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ "akamai": func() (tfprotov6.ProviderServer, error) { - upgradedPluginProvider, err := tf5to6server.UpgradeServer( + sdkProviderV6, err := tf5to6server.UpgradeServer( context.Background(), - testAccPluginProvider.GRPCProvider, + testAccSDKProvider.GRPCProvider, ) if err != nil { return nil, err @@ -31,7 +31,7 @@ func TestMain(m *testing.M) { providers := []func() tfprotov6.ProviderServer{ func() tfprotov6.ProviderServer { - return upgradedPluginProvider + return sdkProviderV6 }, } diff --git a/pkg/providers/botman/botman.go b/pkg/providers/botman/botman.go index 077f553b9..d57029186 100644 --- a/pkg/providers/botman/botman.go +++ b/pkg/providers/botman/botman.go @@ -6,5 +6,5 @@ import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" const SubproviderName = "botman" func init() { - registry.RegisterPluginSubprovider(NewSubprovider()) + registry.RegisterSDKSubprovider(NewSubprovider()) } diff --git a/pkg/providers/botman/provider.go b/pkg/providers/botman/provider.go index 4d142b542..a303a47d1 100644 --- a/pkg/providers/botman/provider.go +++ b/pkg/providers/botman/provider.go @@ -29,7 +29,7 @@ var ( getModifiableConfigVersion = appsec.GetModifiableConfigVersion ) -var _ subprovider.Plugin = &Subprovider{} +var _ subprovider.SDK = &Subprovider{} // NewSubprovider returns a core sub provider func NewSubprovider(opts ...option) *Subprovider { diff --git a/pkg/providers/botman/provider_test.go b/pkg/providers/botman/provider_test.go index 4cf790f3c..1d9aca1df 100644 --- a/pkg/providers/botman/provider_test.go +++ b/pkg/providers/botman/provider_test.go @@ -20,12 +20,12 @@ import ( var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) func TestMain(m *testing.M) { - testAccPluginProvider := akamai.NewPluginProvider(NewSubprovider())() + testAccSDKProvider := akamai.NewSDKProvider(NewSubprovider())() testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ "akamai": func() (tfprotov6.ProviderServer, error) { - upgradedPluginProvider, err := tf5to6server.UpgradeServer( + sdkProviderV6, err := tf5to6server.UpgradeServer( context.Background(), - testAccPluginProvider.GRPCProvider, + testAccSDKProvider.GRPCProvider, ) if err != nil { return nil, err @@ -33,7 +33,7 @@ func TestMain(m *testing.M) { providers := []func() tfprotov6.ProviderServer{ func() tfprotov6.ProviderServer { - return upgradedPluginProvider + return sdkProviderV6 }, } diff --git a/pkg/providers/clientlists/clientlists.go b/pkg/providers/clientlists/clientlists.go index 6bf74b7e3..a310a2737 100644 --- a/pkg/providers/clientlists/clientlists.go +++ b/pkg/providers/clientlists/clientlists.go @@ -3,5 +3,5 @@ package clientlists import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" func init() { - registry.RegisterPluginSubprovider(NewSubprovider()) + registry.RegisterSDKSubprovider(NewSubprovider()) } diff --git a/pkg/providers/clientlists/provider_test.go b/pkg/providers/clientlists/provider_test.go index fa2c0ed1c..9551d9bf3 100644 --- a/pkg/providers/clientlists/provider_test.go +++ b/pkg/providers/clientlists/provider_test.go @@ -19,12 +19,12 @@ import ( var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) func TestMain(m *testing.M) { - testAccPluginProvider := akamai.NewPluginProvider(NewSubprovider())() + testAccSDKProvider := akamai.NewSDKProvider(NewSubprovider())() testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ "akamai": func() (tfprotov6.ProviderServer, error) { - upgradedPluginProvider, err := tf5to6server.UpgradeServer( + sdkProviderV6, err := tf5to6server.UpgradeServer( context.Background(), - testAccPluginProvider.GRPCProvider, + testAccSDKProvider.GRPCProvider, ) if err != nil { return nil, err @@ -32,7 +32,7 @@ func TestMain(m *testing.M) { providers := []func() tfprotov6.ProviderServer{ func() tfprotov6.ProviderServer { - return upgradedPluginProvider + return sdkProviderV6 }, } diff --git a/pkg/providers/cloudlets/cloudlets.go b/pkg/providers/cloudlets/cloudlets.go index 5e63118c8..fc4f7783f 100644 --- a/pkg/providers/cloudlets/cloudlets.go +++ b/pkg/providers/cloudlets/cloudlets.go @@ -3,6 +3,6 @@ package cloudlets import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" func init() { - registry.RegisterPluginSubprovider(NewPluginSubprovider()) + registry.RegisterSDKSubprovider(NewPluginSubprovider()) registry.RegisterFrameworkSubprovider(NewFrameworkSubprovider()) } diff --git a/pkg/providers/cps/cps.go b/pkg/providers/cps/cps.go index 255f35523..5f564c65d 100644 --- a/pkg/providers/cps/cps.go +++ b/pkg/providers/cps/cps.go @@ -3,5 +3,5 @@ package cps import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" func init() { - registry.RegisterPluginSubprovider(NewSubprovider()) + registry.RegisterSDKSubprovider(NewSubprovider()) } diff --git a/pkg/providers/cps/provider.go b/pkg/providers/cps/provider.go index 56ed749b1..1fee36203 100644 --- a/pkg/providers/cps/provider.go +++ b/pkg/providers/cps/provider.go @@ -26,7 +26,7 @@ var ( inst *Subprovider ) -var _ subprovider.Plugin = &Subprovider{} +var _ subprovider.SDK = &Subprovider{} // NewSubprovider returns a core sub provider func NewSubprovider(opts ...option) *Subprovider { diff --git a/pkg/providers/cps/provider_test.go b/pkg/providers/cps/provider_test.go index 1d12b0164..1be8fedba 100644 --- a/pkg/providers/cps/provider_test.go +++ b/pkg/providers/cps/provider_test.go @@ -18,12 +18,12 @@ import ( var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) func TestMain(m *testing.M) { - testAccPluginProvider := akamai.NewPluginProvider(NewSubprovider())() + testAccSDKProvider := akamai.NewSDKProvider(NewSubprovider())() testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ "akamai": func() (tfprotov6.ProviderServer, error) { - upgradedPluginProvider, err := tf5to6server.UpgradeServer( + sdkProviderV6, err := tf5to6server.UpgradeServer( context.Background(), - testAccPluginProvider.GRPCProvider, + testAccSDKProvider.GRPCProvider, ) if err != nil { return nil, err @@ -31,7 +31,7 @@ func TestMain(m *testing.M) { providers := []func() tfprotov6.ProviderServer{ func() tfprotov6.ProviderServer { - return upgradedPluginProvider + return sdkProviderV6 }, } diff --git a/pkg/providers/datastream/datastream.go b/pkg/providers/datastream/datastream.go index becedf3a0..77f9a2097 100644 --- a/pkg/providers/datastream/datastream.go +++ b/pkg/providers/datastream/datastream.go @@ -3,5 +3,5 @@ package datastream import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" func init() { - registry.RegisterPluginSubprovider(NewSubprovider()) + registry.RegisterSDKSubprovider(NewSubprovider()) } diff --git a/pkg/providers/datastream/provider.go b/pkg/providers/datastream/provider.go index 252dec826..4a4b99028 100644 --- a/pkg/providers/datastream/provider.go +++ b/pkg/providers/datastream/provider.go @@ -25,7 +25,7 @@ var ( inst *Subprovider ) -var _ subprovider.Plugin = &Subprovider{} +var _ subprovider.SDK = &Subprovider{} // NewSubprovider returns a core sub provider func NewSubprovider(opts ...option) *Subprovider { diff --git a/pkg/providers/datastream/provider_test.go b/pkg/providers/datastream/provider_test.go index def12ae31..46cc40053 100644 --- a/pkg/providers/datastream/provider_test.go +++ b/pkg/providers/datastream/provider_test.go @@ -18,12 +18,12 @@ import ( var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) func TestMain(m *testing.M) { - testAccPluginProvider := akamai.NewPluginProvider(NewSubprovider())() + testAccSDKProvider := akamai.NewSDKProvider(NewSubprovider())() testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ "akamai": func() (tfprotov6.ProviderServer, error) { - upgradedPluginProvider, err := tf5to6server.UpgradeServer( + sdkProviderV6, err := tf5to6server.UpgradeServer( context.Background(), - testAccPluginProvider.GRPCProvider, + testAccSDKProvider.GRPCProvider, ) if err != nil { return nil, err @@ -31,7 +31,7 @@ func TestMain(m *testing.M) { providers := []func() tfprotov6.ProviderServer{ func() tfprotov6.ProviderServer { - return upgradedPluginProvider + return sdkProviderV6 }, } diff --git a/pkg/providers/dns/dns.go b/pkg/providers/dns/dns.go index a8f1284d9..406bc8c59 100644 --- a/pkg/providers/dns/dns.go +++ b/pkg/providers/dns/dns.go @@ -3,5 +3,5 @@ package dns import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" func init() { - registry.RegisterPluginSubprovider(NewSubprovider()) + registry.RegisterSDKSubprovider(NewSubprovider()) } diff --git a/pkg/providers/dns/provider.go b/pkg/providers/dns/provider.go index eac1dae49..0c196bb03 100644 --- a/pkg/providers/dns/provider.go +++ b/pkg/providers/dns/provider.go @@ -25,7 +25,7 @@ var ( inst *Subprovider ) -var _ subprovider.Plugin = &Subprovider{} +var _ subprovider.SDK = &Subprovider{} // NewSubprovider returns a core sub provider func NewSubprovider() *Subprovider { diff --git a/pkg/providers/dns/provider_test.go b/pkg/providers/dns/provider_test.go index 0f5119f9f..bc5ec4208 100644 --- a/pkg/providers/dns/provider_test.go +++ b/pkg/providers/dns/provider_test.go @@ -18,12 +18,12 @@ import ( var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) func TestMain(m *testing.M) { - testAccPluginProvider := akamai.NewPluginProvider(NewSubprovider())() + testAccSDKProvider := akamai.NewSDKProvider(NewSubprovider())() testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ "akamai": func() (tfprotov6.ProviderServer, error) { - upgradedPluginProvider, err := tf5to6server.UpgradeServer( + sdkProviderV6, err := tf5to6server.UpgradeServer( context.Background(), - testAccPluginProvider.GRPCProvider, + testAccSDKProvider.GRPCProvider, ) if err != nil { return nil, err @@ -31,7 +31,7 @@ func TestMain(m *testing.M) { providers := []func() tfprotov6.ProviderServer{ func() tfprotov6.ProviderServer { - return upgradedPluginProvider + return sdkProviderV6 }, } diff --git a/pkg/providers/edgeworkers/edgeworkers.go b/pkg/providers/edgeworkers/edgeworkers.go index e8105bb5d..8e797267d 100644 --- a/pkg/providers/edgeworkers/edgeworkers.go +++ b/pkg/providers/edgeworkers/edgeworkers.go @@ -3,5 +3,5 @@ package edgeworkers import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" func init() { - registry.RegisterPluginSubprovider(NewSubprovider()) + registry.RegisterSDKSubprovider(NewSubprovider()) } diff --git a/pkg/providers/edgeworkers/provider.go b/pkg/providers/edgeworkers/provider.go index 33e22b653..2d6ecb614 100644 --- a/pkg/providers/edgeworkers/provider.go +++ b/pkg/providers/edgeworkers/provider.go @@ -25,7 +25,7 @@ var ( inst *Subprovider ) -var _ subprovider.Plugin = &Subprovider{} +var _ subprovider.SDK = &Subprovider{} // NewSubprovider returns a core sub provider func NewSubprovider(opts ...option) *Subprovider { diff --git a/pkg/providers/edgeworkers/provider_test.go b/pkg/providers/edgeworkers/provider_test.go index 86a63dd72..bd80d6998 100644 --- a/pkg/providers/edgeworkers/provider_test.go +++ b/pkg/providers/edgeworkers/provider_test.go @@ -18,12 +18,12 @@ import ( var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) func TestMain(m *testing.M) { - testAccPluginProvider := akamai.NewPluginProvider(NewSubprovider())() + testAccSDKProvider := akamai.NewSDKProvider(NewSubprovider())() testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ "akamai": func() (tfprotov6.ProviderServer, error) { - upgradedPluginProvider, err := tf5to6server.UpgradeServer( + sdkProviderV6, err := tf5to6server.UpgradeServer( context.Background(), - testAccPluginProvider.GRPCProvider, + testAccSDKProvider.GRPCProvider, ) if err != nil { return nil, err @@ -31,7 +31,7 @@ func TestMain(m *testing.M) { providers := []func() tfprotov6.ProviderServer{ func() tfprotov6.ProviderServer { - return upgradedPluginProvider + return sdkProviderV6 }, } diff --git a/pkg/providers/gtm/data_akamai_gtm_datacenter_test.go b/pkg/providers/gtm/data_akamai_gtm_datacenter_test.go index dfedb75da..2534d4d03 100644 --- a/pkg/providers/gtm/data_akamai_gtm_datacenter_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_datacenter_test.go @@ -67,7 +67,7 @@ func TestDataGTMDatacenter(t *testing.T) { test.init(t, client, test.mockData) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/gtm/data_akamai_gtm_datacenters_test.go b/pkg/providers/gtm/data_akamai_gtm_datacenters_test.go index 8e1f915cd..fce882fde 100644 --- a/pkg/providers/gtm/data_akamai_gtm_datacenters_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_datacenters_test.go @@ -62,7 +62,7 @@ func TestDataGTMDatacenters(t *testing.T) { test.init(t, client, test.mockData) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go b/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go index 200cb83a1..8dd11c2cf 100644 --- a/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go @@ -30,7 +30,7 @@ func TestAccDataSourceGTMDefaultDatacenter_basic(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDataDefaultDatacenter/basic.tf"), diff --git a/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go b/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go index 9f4eb22b7..ba9a40824 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go @@ -76,7 +76,7 @@ func TestResGtmAsmap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmAsmap/create_basic.tf"), @@ -121,7 +121,7 @@ func TestResGtmAsmap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmAsmap/create_basic.tf"), @@ -159,7 +159,7 @@ func TestResGtmAsmap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmAsmap/create_basic.tf"), @@ -220,7 +220,7 @@ func TestResGtmAsmap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmAsmap/import_basic.tf"), @@ -320,7 +320,7 @@ func TestGTMAsMapOrder(t *testing.T) { t.Run(name, func(t *testing.T) { useClient(test.client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go b/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go index ad20993be..bb1e9a8a0 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go @@ -68,7 +68,7 @@ func TestResGtmCidrmap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmCidrmap/create_basic.tf"), @@ -113,7 +113,7 @@ func TestResGtmCidrmap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmCidrmap/create_basic.tf"), @@ -151,7 +151,7 @@ func TestResGtmCidrmap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmCidrmap/create_basic.tf"), @@ -242,7 +242,7 @@ func TestGTMCidrMapOrder(t *testing.T) { t.Run(name, func(t *testing.T) { useClient(test.client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go b/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go index e75df7484..ee0d9f016 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go @@ -86,7 +86,7 @@ func TestResGtmDatacenter(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmDatacenter/create_basic.tf"), @@ -126,7 +126,7 @@ func TestResGtmDatacenter(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmDatacenter/create_basic.tf"), @@ -157,7 +157,7 @@ func TestResGtmDatacenter(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmDatacenter/create_basic.tf"), diff --git a/pkg/providers/gtm/resource_akamai_gtm_domain_test.go b/pkg/providers/gtm/resource_akamai_gtm_domain_test.go index 6fa2a3699..33d3b8ee4 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_domain_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_domain_test.go @@ -60,7 +60,7 @@ func TestResGtmDomain(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmDomain/create_basic.tf"), @@ -124,7 +124,7 @@ func TestResGtmDomain(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmDomain/create_basic.tf"), @@ -164,7 +164,7 @@ func TestResGtmDomain(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmDomain/create_basic.tf"), @@ -197,7 +197,7 @@ func TestResGtmDomain(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmDomain/create_basic.tf"), @@ -249,7 +249,7 @@ func TestResGtmDomain(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmDomain/create_basic.tf"), @@ -303,7 +303,7 @@ func TestGTMDomainOrder(t *testing.T) { t.Run(name, func(t *testing.T) { useClient(test.client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go b/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go index bcb36208c..bec37c3ea 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go @@ -73,7 +73,7 @@ func TestResGtmGeomap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmGeomap/create_basic.tf"), @@ -118,7 +118,7 @@ func TestResGtmGeomap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmGeomap/create_basic.tf"), @@ -156,7 +156,7 @@ func TestResGtmGeomap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmGeomap/create_basic.tf"), @@ -240,7 +240,7 @@ func TestGTMGeoMapOrder(t *testing.T) { t.Run(name, func(t *testing.T) { useClient(test.client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/gtm/resource_akamai_gtm_property_test.go b/pkg/providers/gtm/resource_akamai_gtm_property_test.go index 6ceab9d5a..feaac5e90 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_property_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_property_test.go @@ -227,7 +227,7 @@ func TestResGtmProperty(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/create_basic.tf"), @@ -298,7 +298,7 @@ func TestResGtmProperty(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/create_basic.tf"), @@ -360,7 +360,7 @@ func TestResGtmProperty(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/create_basic.tf"), @@ -558,7 +558,7 @@ func TestResGtmProperty(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/test_object/test_object_not_required.tf"), @@ -586,7 +586,7 @@ func TestResGtmProperty(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/test_object/test_object_protocol_ftp.tf"), @@ -604,7 +604,7 @@ func TestResGtmProperty(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/test_object/test_object_protocol_http.tf"), @@ -622,7 +622,7 @@ func TestResGtmProperty(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/test_object/test_object_protocol_https.tf"), @@ -735,7 +735,7 @@ func TestResourceGTMTrafficTargetOrder(t *testing.T) { t.Run(name, func(t *testing.T) { useClient(test.client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/gtm/resource_akamai_gtm_resource_test.go b/pkg/providers/gtm/resource_akamai_gtm_resource_test.go index 65d7777d6..0e90d91fc 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_resource_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_resource_test.go @@ -85,7 +85,7 @@ func TestResGtmResource(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmResource/create_basic.tf"), @@ -148,7 +148,7 @@ func TestResGtmResource(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmResource/create_basic.tf"), @@ -202,7 +202,7 @@ func TestResGtmResource(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmResource/create_basic.tf"), @@ -272,7 +272,7 @@ func TestGTMResourceOrder(t *testing.T) { t.Run(name, func(t *testing.T) { useClient(test.client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewPluginProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/iam/iam.go b/pkg/providers/iam/iam.go index d077d8193..1f2a1f51b 100644 --- a/pkg/providers/iam/iam.go +++ b/pkg/providers/iam/iam.go @@ -3,5 +3,5 @@ package iam import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" func init() { - registry.RegisterPluginSubprovider(NewSubprovider()) + registry.RegisterSDKSubprovider(NewSubprovider()) } diff --git a/pkg/providers/iam/provider.go b/pkg/providers/iam/provider.go index 7468575da..6c793b277 100644 --- a/pkg/providers/iam/provider.go +++ b/pkg/providers/iam/provider.go @@ -25,7 +25,7 @@ var ( inst *Subprovider ) -var _ subprovider.Plugin = &Subprovider{} +var _ subprovider.SDK = &Subprovider{} // NewSubprovider returns a core sub provider func NewSubprovider() *Subprovider { diff --git a/pkg/providers/iam/provider_test.go b/pkg/providers/iam/provider_test.go index 73aacb868..8cc31dc2e 100644 --- a/pkg/providers/iam/provider_test.go +++ b/pkg/providers/iam/provider_test.go @@ -18,12 +18,12 @@ import ( var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) func TestMain(m *testing.M) { - testAccPluginProvider := akamai.NewPluginProvider(NewSubprovider())() + testAccSDKProvider := akamai.NewSDKProvider(NewSubprovider())() testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ "akamai": func() (tfprotov6.ProviderServer, error) { - upgradedPluginProvider, err := tf5to6server.UpgradeServer( + sdkProviderV6, err := tf5to6server.UpgradeServer( context.Background(), - testAccPluginProvider.GRPCProvider, + testAccSDKProvider.GRPCProvider, ) if err != nil { return nil, err @@ -31,7 +31,7 @@ func TestMain(m *testing.M) { providers := []func() tfprotov6.ProviderServer{ func() tfprotov6.ProviderServer { - return upgradedPluginProvider + return sdkProviderV6 }, } diff --git a/pkg/providers/imaging/imaging.go b/pkg/providers/imaging/imaging.go index 606ded9d9..42718a730 100644 --- a/pkg/providers/imaging/imaging.go +++ b/pkg/providers/imaging/imaging.go @@ -3,5 +3,5 @@ package imaging import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" func init() { - registry.RegisterPluginSubprovider(NewSubprovider()) + registry.RegisterSDKSubprovider(NewSubprovider()) } diff --git a/pkg/providers/imaging/provider.go b/pkg/providers/imaging/provider.go index 926b6703c..7eef4b95b 100644 --- a/pkg/providers/imaging/provider.go +++ b/pkg/providers/imaging/provider.go @@ -25,7 +25,7 @@ var ( inst *Subprovider ) -var _ subprovider.Plugin = &Subprovider{} +var _ subprovider.SDK = &Subprovider{} // NewSubprovider returns a core sub provider func NewSubprovider(opts ...option) *Subprovider { diff --git a/pkg/providers/imaging/provider_test.go b/pkg/providers/imaging/provider_test.go index da7f9f946..d793b13a7 100644 --- a/pkg/providers/imaging/provider_test.go +++ b/pkg/providers/imaging/provider_test.go @@ -19,12 +19,12 @@ var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) func TestMain(m *testing.M) { PolicyDepth = 4 - testAccPluginProvider := akamai.NewPluginProvider(NewSubprovider())() + testAccSDKProvider := akamai.NewSDKProvider(NewSubprovider())() testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ "akamai": func() (tfprotov6.ProviderServer, error) { - upgradedPluginProvider, err := tf5to6server.UpgradeServer( + sdkProviderV6, err := tf5to6server.UpgradeServer( context.Background(), - testAccPluginProvider.GRPCProvider, + testAccSDKProvider.GRPCProvider, ) if err != nil { return nil, err @@ -32,7 +32,7 @@ func TestMain(m *testing.M) { providers := []func() tfprotov6.ProviderServer{ func() tfprotov6.ProviderServer { - return upgradedPluginProvider + return sdkProviderV6 }, } diff --git a/pkg/providers/networklists/networklists.go b/pkg/providers/networklists/networklists.go index 8082284e7..8cc9207c9 100644 --- a/pkg/providers/networklists/networklists.go +++ b/pkg/providers/networklists/networklists.go @@ -3,5 +3,5 @@ package networklists import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" func init() { - registry.RegisterPluginSubprovider(NewSubprovider()) + registry.RegisterSDKSubprovider(NewSubprovider()) } diff --git a/pkg/providers/networklists/provider.go b/pkg/providers/networklists/provider.go index 403df8f7a..8e82f9586 100644 --- a/pkg/providers/networklists/provider.go +++ b/pkg/providers/networklists/provider.go @@ -26,7 +26,7 @@ var ( inst *Subprovider ) -var _ subprovider.Plugin = &Subprovider{} +var _ subprovider.SDK = &Subprovider{} // NewSubprovider returns a core sub provider func NewSubprovider(opts ...option) *Subprovider { diff --git a/pkg/providers/networklists/provider_test.go b/pkg/providers/networklists/provider_test.go index ea9c186dc..ef7fd8c10 100644 --- a/pkg/providers/networklists/provider_test.go +++ b/pkg/providers/networklists/provider_test.go @@ -18,12 +18,12 @@ import ( var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) func TestMain(m *testing.M) { - testAccPluginProvider := akamai.NewPluginProvider(NewSubprovider())() + testAccSDKProvider := akamai.NewSDKProvider(NewSubprovider())() testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ "akamai": func() (tfprotov6.ProviderServer, error) { - upgradedPluginProvider, err := tf5to6server.UpgradeServer( + sdkProviderV6, err := tf5to6server.UpgradeServer( context.Background(), - testAccPluginProvider.GRPCProvider, + testAccSDKProvider.GRPCProvider, ) if err != nil { return nil, err @@ -31,7 +31,7 @@ func TestMain(m *testing.M) { providers := []func() tfprotov6.ProviderServer{ func() tfprotov6.ProviderServer { - return upgradedPluginProvider + return sdkProviderV6 }, } diff --git a/pkg/providers/property/property.go b/pkg/providers/property/property.go index ee4127c1b..93fcba6f0 100644 --- a/pkg/providers/property/property.go +++ b/pkg/providers/property/property.go @@ -6,6 +6,6 @@ import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" const SubproviderName = "property" func init() { - registry.RegisterPluginSubprovider(NewPluginSubprovider()) + registry.RegisterSDKSubprovider(NewPluginSubprovider()) registry.RegisterFrameworkSubprovider(NewFrameworkSubprovider()) } diff --git a/pkg/providers/property/provider.go b/pkg/providers/property/provider.go index 067b6b996..01f0e28df 100644 --- a/pkg/providers/property/provider.go +++ b/pkg/providers/property/provider.go @@ -29,7 +29,7 @@ var ( hapiClient hapi.HAPI ) -var _ subprovider.Plugin = &PluginSubprovider{} +var _ subprovider.SDK = &PluginSubprovider{} var _ subprovider.Framework = &FrameworkSubprovider{} // NewPluginSubprovider returns a core SDKv2 based sub provider diff --git a/pkg/providers/registry/registry.go b/pkg/providers/registry/registry.go index 70ab59b29..7e744b600 100644 --- a/pkg/providers/registry/registry.go +++ b/pkg/providers/registry/registry.go @@ -10,25 +10,25 @@ import ( var ( lock sync.Mutex - pluginSubproviders []subprovider.Plugin + sdkSubproviders []subprovider.SDK frameworkSubproviders []subprovider.Framework ) -// RegisterPluginSubprovider registers a terraform-plugin-sdk sub-provider -func RegisterPluginSubprovider(p subprovider.Plugin) { +// RegisterSDKSubprovider registers a terraform-plugin-sdk sub-provider +func RegisterSDKSubprovider(p subprovider.SDK) { lock.Lock() defer lock.Unlock() - pluginSubproviders = append(pluginSubproviders, p) + sdkSubproviders = append(sdkSubproviders, p) } -// PluginSubproviders returns all of the registered terraform-plugin-sdk sub-providers -func PluginSubproviders() []subprovider.Plugin { +// SDKSubproviders returns all of the registered terraform-plugin-sdk sub-providers +func SDKSubproviders() []subprovider.SDK { lock.Lock() defer lock.Unlock() - out := make([]subprovider.Plugin, len(pluginSubproviders)) - copy(out, pluginSubproviders) + out := make([]subprovider.SDK, len(sdkSubproviders)) + copy(out, sdkSubproviders) return out } diff --git a/pkg/subprovider/subprovider.go b/pkg/subprovider/subprovider.go index 5ef4d0288..f0a9fecd7 100644 --- a/pkg/subprovider/subprovider.go +++ b/pkg/subprovider/subprovider.go @@ -7,8 +7,8 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -// Plugin is the interface implemented by the sub-providers using terraform-plugin-sdk -type Plugin interface { +// SDK is the interface implemented by the sub-providers using terraform-plugin-sdk +type SDK interface { // Resources returns the resources for the sub-provider Resources() map[string]*schema.Resource From 312a206536e23e1d5fbf8cdcff23aabe7275e673 Mon Sep 17 00:00:00 2001 From: Darek Stopka Date: Wed, 20 Sep 2023 15:27:32 +0200 Subject: [PATCH 08/52] DXE-3107 Combine subprovider.SDK and subprovider.Framework --- main.go | 4 +-- pkg/akamai/akamai_test.go | 29 +++++++++++------ pkg/akamai/framework_provider.go | 8 ++--- pkg/akamai/framework_provider_test.go | 6 ++-- pkg/akamai/sdk_provider.go | 8 ++--- pkg/akamai/sdk_provider_test.go | 2 +- pkg/common/testutils/testutils.go | 4 +-- pkg/providers/appsec/appsec.go | 2 +- pkg/providers/appsec/provider.go | 26 +++++++++++---- pkg/providers/botman/botman.go | 2 +- pkg/providers/botman/provider.go | 26 +++++++++++---- pkg/providers/clientlists/clientlists.go | 2 +- pkg/providers/clientlists/provider.go | 24 ++++++++++---- pkg/providers/cloudwrapper/cloudwrapper.go | 2 +- pkg/providers/cloudwrapper/provider.go | 25 ++++++++++---- pkg/providers/cloudwrapper/provider_test.go | 19 +++++++---- pkg/providers/cps/cps.go | 2 +- pkg/providers/cps/provider.go | 26 +++++++++++---- pkg/providers/datastream/datastream.go | 2 +- pkg/providers/datastream/provider.go | 26 +++++++++++---- pkg/providers/dns/dns.go | 2 +- pkg/providers/dns/provider.go | 24 ++++++++++---- pkg/providers/edgeworkers/edgeworkers.go | 2 +- pkg/providers/edgeworkers/provider.go | 24 ++++++++++---- pkg/providers/iam/iam.go | 2 +- pkg/providers/iam/provider.go | 26 +++++++++++---- pkg/providers/imaging/imaging.go | 2 +- pkg/providers/imaging/provider.go | 24 ++++++++++---- pkg/providers/networklists/networklists.go | 2 +- pkg/providers/networklists/provider.go | 26 +++++++++++---- pkg/providers/property/property.go | 3 +- pkg/providers/registry/registry.go | 36 +++++---------------- pkg/subprovider/subprovider.go | 23 ++++++------- 33 files changed, 283 insertions(+), 158 deletions(-) diff --git a/main.go b/main.go index e3c211b42..e5f1c953a 100644 --- a/main.go +++ b/main.go @@ -25,7 +25,7 @@ func main() { // Anything lower and we risk losing those values to the ether hclog.Default().SetLevel(hclog.Trace) - sdkProviderV6, err := akamai.NewProtoV6SDKProvider(registry.SDKSubproviders()) + sdkProviderV6, err := akamai.NewProtoV6SDKProvider(registry.Subproviders()) if err != nil { log.Fatal(err) } @@ -33,7 +33,7 @@ func main() { providers := []func() tfprotov6.ProviderServer{ sdkProviderV6, providerserver.NewProtocol6( - akamai.NewFrameworkProvider(registry.FrameworkSubproviders()...)(), + akamai.NewFrameworkProvider(registry.Subproviders()...)(), ), } diff --git a/pkg/akamai/akamai_test.go b/pkg/akamai/akamai_test.go index eba9f54c5..a0e208654 100644 --- a/pkg/akamai/akamai_test.go +++ b/pkg/akamai/akamai_test.go @@ -8,9 +8,10 @@ import ( "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" "github.com/hashicorp/terraform-plugin-framework/datasource" - "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + dataschema "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func TestMain(m *testing.M) { @@ -32,10 +33,20 @@ func TestMain(m *testing.M) { type dummy struct { } -var _ subprovider.Framework = dummy{} +// SDKDataSources implements subprovider.Subprovider. +func (dummy) SDKDataSources() map[string]*schema.Resource { + return nil +} + +// SDKResources implements subprovider.Subprovider. +func (dummy) SDKResources() map[string]*schema.Resource { + return nil +} + +var _ subprovider.Subprovider = dummy{} -// DataSources implements subprovider.Framework. -func (dummy) DataSources() []func() datasource.DataSource { +// FrameworkDataSources implements subprovider.Subprovider. +func (dummy) FrameworkDataSources() []func() datasource.DataSource { return []func() datasource.DataSource{ func() datasource.DataSource { return dummyDataSource{} @@ -43,8 +54,8 @@ func (dummy) DataSources() []func() datasource.DataSource { } } -// Resources implements subprovider.Framework. -func (dummy) Resources() []func() resource.Resource { +// FrameworkResources implements subprovider.Subprovider. +func (dummy) FrameworkResources() []func() resource.Resource { return nil } @@ -75,9 +86,9 @@ func (dummyDataSource) Read(ctx context.Context, req datasource.ReadRequest, res // Schema implements datasource.DataSource. func (dummyDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { - resp.Schema = schema.Schema{ - Attributes: map[string]schema.Attribute{ - "id": schema.StringAttribute{ + resp.Schema = dataschema.Schema{ + Attributes: map[string]dataschema.Attribute{ + "id": dataschema.StringAttribute{ Computed: true, Description: "id", }, diff --git a/pkg/akamai/framework_provider.go b/pkg/akamai/framework_provider.go index 946f3fa32..fcd1eeaf5 100644 --- a/pkg/akamai/framework_provider.go +++ b/pkg/akamai/framework_provider.go @@ -21,7 +21,7 @@ var _ provider.Provider = &Provider{} // Provider is the implementation of akamai terraform provider which uses terraform-plugin-framework type Provider struct { - subproviders []subprovider.Framework + subproviders []subprovider.Subprovider } // ProviderModel represents the model of Provider configuration @@ -44,7 +44,7 @@ type ConfigModel struct { } // NewFrameworkProvider returns a function returning Provider as provider.Provider -func NewFrameworkProvider(subproviders ...subprovider.Framework) func() provider.Provider { +func NewFrameworkProvider(subproviders ...subprovider.Subprovider) func() provider.Provider { return func() provider.Provider { return &Provider{ subproviders: subproviders, @@ -190,7 +190,7 @@ func (p *Provider) Resources(_ context.Context) []func() resource.Resource { resources := make([]func() resource.Resource, 0) for _, subprovider := range p.subproviders { - resources = append(resources, subprovider.Resources()...) + resources = append(resources, subprovider.FrameworkResources()...) } return resources @@ -201,7 +201,7 @@ func (p *Provider) DataSources(_ context.Context) []func() datasource.DataSource dataSources := make([]func() datasource.DataSource, 0) for _, subprovider := range p.subproviders { - dataSources = append(dataSources, subprovider.DataSources()...) + dataSources = append(dataSources, subprovider.FrameworkDataSources()...) } return dataSources diff --git a/pkg/akamai/framework_provider_test.go b/pkg/akamai/framework_provider_test.go index 1574fe999..78b6f8581 100644 --- a/pkg/akamai/framework_provider_test.go +++ b/pkg/akamai/framework_provider_test.go @@ -22,7 +22,7 @@ func TestFrameworkProvider(t *testing.T) { t.Parallel() resp := provider.SchemaResponse{} - prov := akamai.NewFrameworkProvider(registry.FrameworkSubproviders()...)() + prov := akamai.NewFrameworkProvider(registry.Subproviders()...)() prov.Schema(context.Background(), provider.SchemaRequest{}, &resp) assert.False(t, resp.Diagnostics.HasError()) @@ -290,12 +290,12 @@ func TestFramework_EdgercFromConfig_missing_required_attributes(t *testing.T) { }) } -func newProtoV6ProviderFactory(subproviders ...subprovider.Framework) map[string]func() (tfprotov6.ProviderServer, error) { +func newProtoV6ProviderFactory(subproviders ...subprovider.Subprovider) map[string]func() (tfprotov6.ProviderServer, error) { return map[string]func() (tfprotov6.ProviderServer, error){ "akamai": func() (tfprotov6.ProviderServer, error) { ctx := context.Background() - sdkProviderV6, err := akamai.NewProtoV6SDKProvider(registry.SDKSubproviders()) + sdkProviderV6, err := akamai.NewProtoV6SDKProvider(registry.Subproviders()) if err != nil { return nil, err } diff --git a/pkg/akamai/sdk_provider.go b/pkg/akamai/sdk_provider.go index ff324ae37..a8fb3d6e0 100644 --- a/pkg/akamai/sdk_provider.go +++ b/pkg/akamai/sdk_provider.go @@ -19,7 +19,7 @@ import ( ) // NewSDKProvider returns the provider function to terraform -func NewSDKProvider(subprovs ...subprovider.SDK) plugin.ProviderFunc { +func NewSDKProvider(subprovs ...subprovider.Subprovider) plugin.ProviderFunc { prov := &schema.Provider{ Schema: map[string]*schema.Schema{ "edgerc": { @@ -80,11 +80,11 @@ func NewSDKProvider(subprovs ...subprovider.SDK) plugin.ProviderFunc { } for _, subprov := range subprovs { - if err := collections.AddMap(prov.ResourcesMap, subprov.Resources()); err != nil { + if err := collections.AddMap(prov.ResourcesMap, subprov.SDKResources()); err != nil { panic(err) } - if err := collections.AddMap(prov.DataSourcesMap, subprov.DataSources()); err != nil { + if err := collections.AddMap(prov.DataSourcesMap, subprov.SDKDataSources()); err != nil { panic(err) } } @@ -177,7 +177,7 @@ func configureProviderContext(p *schema.Provider) schema.ConfigureContextFunc { } // NewProtoV6SDKProvider upgrades SDK provider from protocol version 5 to 6 -func NewProtoV6SDKProvider(subproviders []subprovider.SDK) (func() tfprotov6.ProviderServer, error) { +func NewProtoV6SDKProvider(subproviders []subprovider.Subprovider) (func() tfprotov6.ProviderServer, error) { pluginProvider, err := tf5to6server.UpgradeServer( context.Background(), NewSDKProvider(subproviders...)().GRPCProvider, diff --git a/pkg/akamai/sdk_provider_test.go b/pkg/akamai/sdk_provider_test.go index 1b046526c..e8670d820 100644 --- a/pkg/akamai/sdk_provider_test.go +++ b/pkg/akamai/sdk_provider_test.go @@ -21,7 +21,7 @@ import ( func TestSDKProvider(t *testing.T) { t.Parallel() - provider := akamai.NewSDKProvider(registry.SDKSubproviders()...)() + provider := akamai.NewSDKProvider(registry.Subproviders()...)() err := provider.InternalValidate() assert.NoError(t, err) } diff --git a/pkg/common/testutils/testutils.go b/pkg/common/testutils/testutils.go index c99eeaf2a..96183fda9 100644 --- a/pkg/common/testutils/testutils.go +++ b/pkg/common/testutils/testutils.go @@ -54,8 +54,8 @@ func LoadFixtureString(t *testing.T, format string, args ...interface{}) string return string(LoadFixtureBytes(t, fmt.Sprintf(format, args...))) } -// NewSDKProviderFactories uses provided SDK subprovider to create provider factories for test purposes -func NewSDKProviderFactories(subprovider subprovider.SDK) map[string]func() (tfprotov6.ProviderServer, error) { +// NewSDKProviderFactories uses provided subprovider to create provider factories for test purposes +func NewSDKProviderFactories(subprovider subprovider.Subprovider) map[string]func() (tfprotov6.ProviderServer, error) { testAccSDKProvider := akamai.NewSDKProvider(subprovider)() testAccProviders := map[string]func() (tfprotov6.ProviderServer, error){ "akamai": func() (tfprotov6.ProviderServer, error) { diff --git a/pkg/providers/appsec/appsec.go b/pkg/providers/appsec/appsec.go index 74b233363..eb5388e8a 100644 --- a/pkg/providers/appsec/appsec.go +++ b/pkg/providers/appsec/appsec.go @@ -8,5 +8,5 @@ import ( const SubproviderName = "appsec" func init() { - registry.RegisterSDKSubprovider(NewSubprovider()) + registry.RegisterSubprovider(NewSubprovider()) } diff --git a/pkg/providers/appsec/provider.go b/pkg/providers/appsec/provider.go index ee868ffc3..1564ce630 100644 --- a/pkg/providers/appsec/provider.go +++ b/pkg/providers/appsec/provider.go @@ -7,6 +7,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -25,9 +27,9 @@ var ( inst *Subprovider ) -var _ subprovider.SDK = &Subprovider{} +var _ subprovider.Subprovider = &Subprovider{} -// NewSubprovider returns a core sub provider +// NewSubprovider returns a new appsec subprovider func NewSubprovider(opts ...option) *Subprovider { once.Do(func() { inst = &Subprovider{} @@ -46,7 +48,7 @@ func withClient(c appsec.APPSEC) option { } } -// Client returns the PAPI interface +// Client returns the APPSEC interface func (p *Subprovider) Client(meta meta.Meta) appsec.APPSEC { if p.client != nil { return p.client @@ -54,8 +56,8 @@ func (p *Subprovider) Client(meta meta.Meta) appsec.APPSEC { return appsec.Client(meta.Session()) } -// Resources returns terraform resources for appsec -func (p *Subprovider) Resources() map[string]*schema.Resource { +// SDKResources returns the appsec resources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKResources() map[string]*schema.Resource { return map[string]*schema.Resource{ "akamai_appsec_activations": resourceActivations(), "akamai_appsec_advanced_settings_attack_payload_logging": resourceAdvancedSettingsAttackPayloadLogging(), @@ -111,8 +113,8 @@ func (p *Subprovider) Resources() map[string]*schema.Resource { } } -// DataSources returns terraform data sources for appsec -func (p *Subprovider) DataSources() map[string]*schema.Resource { +// SDKDataSources returns the appsec data sources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKDataSources() map[string]*schema.Resource { return map[string]*schema.Resource{ "akamai_appsec_advanced_settings_attack_payload_logging": dataSourceAdvancedSettingsAttackPayloadLogging(), "akamai_appsec_advanced_settings_evasive_path_match": dataSourceAdvancedSettingsEvasivePathMatch(), @@ -167,3 +169,13 @@ func (p *Subprovider) DataSources() map[string]*schema.Resource { "akamai_appsec_wap_selected_hostnames": dataSourceWAPSelectedHostnames(), } } + +// FrameworkResources returns the appsec resources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkResources() []func() resource.Resource { + return []func() resource.Resource{} +} + +// FrameworkDataSources returns the appsec data sources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkDataSources() []func() datasource.DataSource { + return []func() datasource.DataSource{} +} diff --git a/pkg/providers/botman/botman.go b/pkg/providers/botman/botman.go index d57029186..fca4e13c3 100644 --- a/pkg/providers/botman/botman.go +++ b/pkg/providers/botman/botman.go @@ -6,5 +6,5 @@ import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" const SubproviderName = "botman" func init() { - registry.RegisterSDKSubprovider(NewSubprovider()) + registry.RegisterSubprovider(NewSubprovider()) } diff --git a/pkg/providers/botman/provider.go b/pkg/providers/botman/provider.go index a303a47d1..a85266b32 100644 --- a/pkg/providers/botman/provider.go +++ b/pkg/providers/botman/provider.go @@ -8,6 +8,8 @@ import ( "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -29,9 +31,9 @@ var ( getModifiableConfigVersion = appsec.GetModifiableConfigVersion ) -var _ subprovider.SDK = &Subprovider{} +var _ subprovider.Subprovider = &Subprovider{} -// NewSubprovider returns a core sub provider +// NewSubprovider returns a new botman subprovider func NewSubprovider(opts ...option) *Subprovider { once.Do(func() { inst = &Subprovider{} @@ -50,7 +52,7 @@ func withClient(c botman.BotMan) option { } } -// Client returns the PAPI interface +// Client returns the BotMan interface func (p *Subprovider) Client(meta meta.Meta) botman.BotMan { if p.client != nil { return p.client @@ -58,8 +60,8 @@ func (p *Subprovider) Client(meta meta.Meta) botman.BotMan { return botman.Client(meta.Session()) } -// Resources returns terraform resources for botman -func (p *Subprovider) Resources() map[string]*schema.Resource { +// SDKResources returns the botman resources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKResources() map[string]*schema.Resource { return map[string]*schema.Resource{ "akamai_botman_akamai_bot_category_action": resourceAkamaiBotCategoryAction(), "akamai_botman_bot_analytics_cookie": resourceBotAnalyticsCookie(), @@ -87,8 +89,8 @@ func (p *Subprovider) Resources() map[string]*schema.Resource { } } -// DataSources returns terraform data sources for botman -func (p *Subprovider) DataSources() map[string]*schema.Resource { +// SDKDataSources returns the botman data sources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKDataSources() map[string]*schema.Resource { return map[string]*schema.Resource{ "akamai_botman_akamai_bot_category": dataSourceAkamaiBotCategory(), "akamai_botman_akamai_bot_category_action": dataSourceAkamaiBotCategoryAction(), @@ -121,3 +123,13 @@ func (p *Subprovider) DataSources() map[string]*schema.Resource { "akamai_botman_transactional_endpoint_protection": dataSourceTransactionalEndpointProtection(), } } + +// FrameworkResources returns the botman resources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkResources() []func() resource.Resource { + return []func() resource.Resource{} +} + +// FrameworkDataSources returns the botman data sources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkDataSources() []func() datasource.DataSource { + return []func() datasource.DataSource{} +} diff --git a/pkg/providers/clientlists/clientlists.go b/pkg/providers/clientlists/clientlists.go index a310a2737..e5108b998 100644 --- a/pkg/providers/clientlists/clientlists.go +++ b/pkg/providers/clientlists/clientlists.go @@ -3,5 +3,5 @@ package clientlists import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" func init() { - registry.RegisterSDKSubprovider(NewSubprovider()) + registry.RegisterSubprovider(NewSubprovider()) } diff --git a/pkg/providers/clientlists/provider.go b/pkg/providers/clientlists/provider.go index 1eb341320..3b006385b 100644 --- a/pkg/providers/clientlists/provider.go +++ b/pkg/providers/clientlists/provider.go @@ -7,6 +7,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/clientlists" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -25,7 +27,7 @@ var ( inst *Subprovider ) -// NewSubprovider returns a core sub provider +// NewSubprovider returns a new clientlists subprovider func NewSubprovider(opts ...Option) *Subprovider { once.Do(func() { inst = &Subprovider{} @@ -45,7 +47,7 @@ func WithClient(c clientlists.ClientLists) Option { } } -// Client returns the CLIENTLISTS interface +// Client returns the ClientLists interface func (p *Subprovider) Client(meta meta.Meta) clientlists.ClientLists { if p.client != nil { return p.client @@ -53,17 +55,27 @@ func (p *Subprovider) Client(meta meta.Meta) clientlists.ClientLists { return clientlists.Client(meta.Session()) } -// Resources returns terraform resources for clientlists -func (p *Subprovider) Resources() map[string]*schema.Resource { +// SDKResources returns the clientlists resources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKResources() map[string]*schema.Resource { return map[string]*schema.Resource{ "akamai_clientlist_activation": resourceClientListActivation(), "akamai_clientlist_list": resourceClientList(), } } -// DataSources returns terraform data sources for clientlists -func (p *Subprovider) DataSources() map[string]*schema.Resource { +// SDKDataSources returns the clientlists data sources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKDataSources() map[string]*schema.Resource { return map[string]*schema.Resource{ "akamai_clientlist_lists": dataSourceClientLists(), } } + +// FrameworkResources returns the clientlists resources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkResources() []func() resource.Resource { + return []func() resource.Resource{} +} + +// FrameworkDataSources returns the clientlists data sources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkDataSources() []func() datasource.DataSource { + return []func() datasource.DataSource{} +} diff --git a/pkg/providers/cloudwrapper/cloudwrapper.go b/pkg/providers/cloudwrapper/cloudwrapper.go index b12e1a328..a75241894 100644 --- a/pkg/providers/cloudwrapper/cloudwrapper.go +++ b/pkg/providers/cloudwrapper/cloudwrapper.go @@ -3,5 +3,5 @@ package cloudwrapper import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" func init() { - registry.RegisterFrameworkSubprovider(NewSubprovider()) + registry.RegisterSubprovider(NewSubprovider()) } diff --git a/pkg/providers/cloudwrapper/provider.go b/pkg/providers/cloudwrapper/provider.go index b915b8223..9c959b4bf 100644 --- a/pkg/providers/cloudwrapper/provider.go +++ b/pkg/providers/cloudwrapper/provider.go @@ -5,32 +5,43 @@ import ( "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) type ( - // Subprovider gathers cloud wrapper resources and data sources written using terraform-plugin-framework + // Subprovider gathers cloudwrapper resources and data sources Subprovider struct{} ) var ( - _ subprovider.Framework = &Subprovider{} + _ subprovider.Subprovider = &Subprovider{} ) -// NewSubprovider returns a core Framework based sub provider +// NewSubprovider returns a new cloudwrapper subprovider func NewSubprovider() *Subprovider { return &Subprovider{} } -// Resources returns terraform resources for cloudwrapper -func (p *Subprovider) Resources() []func() resource.Resource { +// SDKResources returns the cloudwrapper resources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKResources() map[string]*schema.Resource { + return map[string]*schema.Resource{} +} + +// SDKDataSources returns the cloudwrapper data sources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKDataSources() map[string]*schema.Resource { + return map[string]*schema.Resource{} +} + +// FrameworkResources returns the cloudwrapper resources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkResources() []func() resource.Resource { return []func() resource.Resource{ NewActivationResource, NewConfigurationResource, } } -// DataSources returns terraform data sources for cloudwrapper -func (p *Subprovider) DataSources() []func() datasource.DataSource { +// FrameworkDataSources returns the cloudwrapper data sources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkDataSources() []func() datasource.DataSource { return []func() datasource.DataSource{ NewCapacitiesDataSource, NewConfigurationDataSource, diff --git a/pkg/providers/cloudwrapper/provider_test.go b/pkg/providers/cloudwrapper/provider_test.go index d141385ff..1a9e03f9d 100644 --- a/pkg/providers/cloudwrapper/provider_test.go +++ b/pkg/providers/cloudwrapper/provider_test.go @@ -15,6 +15,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-go/tfprotov6" "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) type ( @@ -53,8 +54,8 @@ func newTestSubprovider(opts ...testSubproviderOption) *TestSubprovider { s := NewSubprovider() ts := &TestSubprovider{ - resources: s.Resources(), - datasources: s.DataSources(), + resources: s.FrameworkResources(), + datasources: s.FrameworkDataSources(), } for _, opt := range opts { @@ -64,8 +65,15 @@ func newTestSubprovider(opts ...testSubproviderOption) *TestSubprovider { return ts } -// Resources returns terraform resources for cloudwrapper -func (ts *TestSubprovider) Resources() []func() resource.Resource { +func (ts *TestSubprovider) SDKResources() map[string]*schema.Resource { + return nil +} + +func (ts *TestSubprovider) SDKDataSources() map[string]*schema.Resource { + return nil +} + +func (ts *TestSubprovider) FrameworkResources() []func() resource.Resource { for i, fn := range ts.resources { // decorate fn := fn @@ -83,8 +91,7 @@ func (ts *TestSubprovider) Resources() []func() resource.Resource { return ts.resources } -// DataSources returns terraform data sources for cloudwrapper -func (ts *TestSubprovider) DataSources() []func() datasource.DataSource { +func (ts *TestSubprovider) FrameworkDataSources() []func() datasource.DataSource { for i, fn := range ts.datasources { fn := fn // decorate diff --git a/pkg/providers/cps/cps.go b/pkg/providers/cps/cps.go index 5f564c65d..93faa7f2d 100644 --- a/pkg/providers/cps/cps.go +++ b/pkg/providers/cps/cps.go @@ -3,5 +3,5 @@ package cps import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" func init() { - registry.RegisterSDKSubprovider(NewSubprovider()) + registry.RegisterSubprovider(NewSubprovider()) } diff --git a/pkg/providers/cps/provider.go b/pkg/providers/cps/provider.go index 1fee36203..91c1f237d 100644 --- a/pkg/providers/cps/provider.go +++ b/pkg/providers/cps/provider.go @@ -4,6 +4,8 @@ package cps import ( "sync" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" @@ -12,7 +14,7 @@ import ( ) type ( - // Subprovider gathers cps resources and data sources + // Subprovider gathers CPS resources and data sources Subprovider struct { client cps.CPS } @@ -26,9 +28,9 @@ var ( inst *Subprovider ) -var _ subprovider.SDK = &Subprovider{} +var _ subprovider.Subprovider = &Subprovider{} -// NewSubprovider returns a core sub provider +// NewSubprovider returns a new CPS subprovider func NewSubprovider(opts ...option) *Subprovider { once.Do(func() { inst = &Subprovider{} @@ -55,8 +57,8 @@ func (p *Subprovider) Client(meta meta.Meta) cps.CPS { return cps.Client(meta.Session()) } -// Resources returns terraform resources for cps -func (p *Subprovider) Resources() map[string]*schema.Resource { +// SDKResources returns the CPS resources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKResources() map[string]*schema.Resource { return map[string]*schema.Resource{ "akamai_cps_dv_enrollment": resourceCPSDVEnrollment(), "akamai_cps_dv_validation": resourceCPSDVValidation(), @@ -65,8 +67,8 @@ func (p *Subprovider) Resources() map[string]*schema.Resource { } } -// DataSources returns terraform data sources for cps -func (p *Subprovider) DataSources() map[string]*schema.Resource { +// SDKDataSources returns the CPS data sources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKDataSources() map[string]*schema.Resource { return map[string]*schema.Resource{ "akamai_cps_csr": dataSourceCPSCSR(), "akamai_cps_deployments": dataSourceDeployments(), @@ -75,3 +77,13 @@ func (p *Subprovider) DataSources() map[string]*schema.Resource { "akamai_cps_warnings": dataSourceCPSWarnings(), } } + +// FrameworkResources returns the CPS resources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkResources() []func() resource.Resource { + return []func() resource.Resource{} +} + +// FrameworkDataSources returns the CPS data sources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkDataSources() []func() datasource.DataSource { + return []func() datasource.DataSource{} +} diff --git a/pkg/providers/datastream/datastream.go b/pkg/providers/datastream/datastream.go index 77f9a2097..9094abe3a 100644 --- a/pkg/providers/datastream/datastream.go +++ b/pkg/providers/datastream/datastream.go @@ -3,5 +3,5 @@ package datastream import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" func init() { - registry.RegisterSDKSubprovider(NewSubprovider()) + registry.RegisterSubprovider(NewSubprovider()) } diff --git a/pkg/providers/datastream/provider.go b/pkg/providers/datastream/provider.go index 4a4b99028..f8e7ae08d 100644 --- a/pkg/providers/datastream/provider.go +++ b/pkg/providers/datastream/provider.go @@ -7,6 +7,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/datastream" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -25,9 +27,9 @@ var ( inst *Subprovider ) -var _ subprovider.SDK = &Subprovider{} +var _ subprovider.Subprovider = &Subprovider{} -// NewSubprovider returns a core sub provider +// NewSubprovider returns a new datastream subprovider func NewSubprovider(opts ...option) *Subprovider { once.Do(func() { inst = &Subprovider{} @@ -46,7 +48,7 @@ func withClient(c datastream.DS) option { } } -// Client returns the ds interface +// Client returns the DS interface func (p *Subprovider) Client(meta meta.Meta) datastream.DS { if p.client != nil { return p.client @@ -54,18 +56,28 @@ func (p *Subprovider) Client(meta meta.Meta) datastream.DS { return datastream.Client(meta.Session()) } -// Resources returns terraform resources for datastream -func (p *Subprovider) Resources() map[string]*schema.Resource { +// SDKResources returns the datastream resources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKResources() map[string]*schema.Resource { return map[string]*schema.Resource{ "akamai_datastream": resourceDatastream(), } } -// DataSources returns terraform data sources for datastream -func (p *Subprovider) DataSources() map[string]*schema.Resource { +// SDKDataSources returns the datastream data sources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKDataSources() map[string]*schema.Resource { return map[string]*schema.Resource{ "akamai_datastream_activation_history": dataAkamaiDatastreamActivationHistory(), "akamai_datastream_dataset_fields": dataSourceDatasetFields(), "akamai_datastreams": dataAkamaiDatastreamStreams(), } } + +// FrameworkResources returns the datastream resources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkResources() []func() resource.Resource { + return []func() resource.Resource{} +} + +// FrameworkDataSources returns the datastream data sources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkDataSources() []func() datasource.DataSource { + return []func() datasource.DataSource{} +} diff --git a/pkg/providers/dns/dns.go b/pkg/providers/dns/dns.go index 406bc8c59..bae8dd391 100644 --- a/pkg/providers/dns/dns.go +++ b/pkg/providers/dns/dns.go @@ -3,5 +3,5 @@ package dns import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" func init() { - registry.RegisterSDKSubprovider(NewSubprovider()) + registry.RegisterSubprovider(NewSubprovider()) } diff --git a/pkg/providers/dns/provider.go b/pkg/providers/dns/provider.go index 0c196bb03..7c6dec03a 100644 --- a/pkg/providers/dns/provider.go +++ b/pkg/providers/dns/provider.go @@ -7,6 +7,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/dns" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -25,9 +27,9 @@ var ( inst *Subprovider ) -var _ subprovider.SDK = &Subprovider{} +var _ subprovider.Subprovider = &Subprovider{} -// NewSubprovider returns a core sub provider +// NewSubprovider returns a new DNS subprovider func NewSubprovider() *Subprovider { once.Do(func() { inst = &Subprovider{} @@ -50,18 +52,28 @@ func (p *Subprovider) Client(meta meta.Meta) dns.DNS { return dns.Client(meta.Session()) } -// Resources returns terraform resources for imadnsging -func (p *Subprovider) Resources() map[string]*schema.Resource { +// SDKResources returns the DNS resources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKResources() map[string]*schema.Resource { return map[string]*schema.Resource{ "akamai_dns_zone": resourceDNSv2Zone(), "akamai_dns_record": resourceDNSv2Record(), } } -// DataSources returns terraform data sources for dns -func (p *Subprovider) DataSources() map[string]*schema.Resource { +// SDKDataSources returns the DNS data sources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKDataSources() map[string]*schema.Resource { return map[string]*schema.Resource{ "akamai_authorities_set": dataSourceAuthoritiesSet(), "akamai_dns_record_set": dataSourceDNSRecordSet(), } } + +// FrameworkResources returns the DNS resources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkResources() []func() resource.Resource { + return []func() resource.Resource{} +} + +// FrameworkDataSources returns the DNS data sources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkDataSources() []func() datasource.DataSource { + return []func() datasource.DataSource{} +} diff --git a/pkg/providers/edgeworkers/edgeworkers.go b/pkg/providers/edgeworkers/edgeworkers.go index 8e797267d..2f616dd52 100644 --- a/pkg/providers/edgeworkers/edgeworkers.go +++ b/pkg/providers/edgeworkers/edgeworkers.go @@ -3,5 +3,5 @@ package edgeworkers import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" func init() { - registry.RegisterSDKSubprovider(NewSubprovider()) + registry.RegisterSubprovider(NewSubprovider()) } diff --git a/pkg/providers/edgeworkers/provider.go b/pkg/providers/edgeworkers/provider.go index 2d6ecb614..cee51c6d3 100644 --- a/pkg/providers/edgeworkers/provider.go +++ b/pkg/providers/edgeworkers/provider.go @@ -7,6 +7,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -25,9 +27,9 @@ var ( inst *Subprovider ) -var _ subprovider.SDK = &Subprovider{} +var _ subprovider.Subprovider = &Subprovider{} -// NewSubprovider returns a core sub provider +// NewSubprovider returns a new edgeworkers subprovider func NewSubprovider(opts ...option) *Subprovider { once.Do(func() { inst = &Subprovider{} @@ -54,8 +56,8 @@ func (p *Subprovider) Client(meta meta.Meta) edgeworkers.Edgeworkers { return edgeworkers.Client(meta.Session()) } -// Resources returns terraform resources for edgeworkers -func (p *Subprovider) Resources() map[string]*schema.Resource { +// SDKResources returns the edgeworkers resources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKResources() map[string]*schema.Resource { return map[string]*schema.Resource{ "akamai_edgekv": resourceEdgeKV(), "akamai_edgekv_group_items": resourceEdgeKVGroupItems(), @@ -64,8 +66,8 @@ func (p *Subprovider) Resources() map[string]*schema.Resource { } } -// DataSources returns terraform data sources for edgeworkers -func (p *Subprovider) DataSources() map[string]*schema.Resource { +// SDKDataSources returns the edgeworkers data sources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKDataSources() map[string]*schema.Resource { return map[string]*schema.Resource{ "akamai_edgekv_group_items": dataSourceEdgeKVGroupItems(), "akamai_edgekv_groups": dataSourceEdgeKVGroups(), @@ -75,3 +77,13 @@ func (p *Subprovider) DataSources() map[string]*schema.Resource { "akamai_edgeworker_activation": dataSourceEdgeWorkerActivation(), } } + +// FrameworkResources returns the edgeworkers resources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkResources() []func() resource.Resource { + return []func() resource.Resource{} +} + +// FrameworkDataSources returns the edgeworkers data sources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkDataSources() []func() datasource.DataSource { + return []func() datasource.DataSource{} +} diff --git a/pkg/providers/iam/iam.go b/pkg/providers/iam/iam.go index 1f2a1f51b..9f852beb5 100644 --- a/pkg/providers/iam/iam.go +++ b/pkg/providers/iam/iam.go @@ -3,5 +3,5 @@ package iam import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" func init() { - registry.RegisterSDKSubprovider(NewSubprovider()) + registry.RegisterSubprovider(NewSubprovider()) } diff --git a/pkg/providers/iam/provider.go b/pkg/providers/iam/provider.go index 6c793b277..f79b9a1cd 100644 --- a/pkg/providers/iam/provider.go +++ b/pkg/providers/iam/provider.go @@ -7,6 +7,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -25,9 +27,9 @@ var ( inst *Subprovider ) -var _ subprovider.SDK = &Subprovider{} +var _ subprovider.Subprovider = &Subprovider{} -// NewSubprovider returns a core sub provider +// NewSubprovider returns a new IAM subprovider func NewSubprovider() *Subprovider { once.Do(func() { inst = &Subprovider{} @@ -42,7 +44,7 @@ func withClient(c iam.IAM) option { } } -// Client returns the DNS interface +// Client returns the IAM interface func (p *Subprovider) Client(meta meta.Meta) iam.IAM { if p.client != nil { return p.client @@ -50,8 +52,8 @@ func (p *Subprovider) Client(meta meta.Meta) iam.IAM { return iam.Client(meta.Session()) } -// Resources returns terraform resources for IAM -func (p *Subprovider) Resources() map[string]*schema.Resource { +// SDKResources returns the IAM resources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKResources() map[string]*schema.Resource { return map[string]*schema.Resource{ "akamai_iam_blocked_user_properties": resourceIAMBlockedUserProperties(), "akamai_iam_group": resourceIAMGroup(), @@ -60,8 +62,8 @@ func (p *Subprovider) Resources() map[string]*schema.Resource { } } -// DataSources returns terraform data sources for IAM -func (p *Subprovider) DataSources() map[string]*schema.Resource { +// SDKDataSources returns the IAM data sources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKDataSources() map[string]*schema.Resource { return map[string]*schema.Resource{ "akamai_iam_contact_types": dataSourceIAMContactTypes(), "akamai_iam_countries": dataSourceIAMCountries(), @@ -74,3 +76,13 @@ func (p *Subprovider) DataSources() map[string]*schema.Resource { "akamai_iam_timezones": dataSourceIAMTimezones(), } } + +// FrameworkResources returns the IAM resources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkResources() []func() resource.Resource { + return []func() resource.Resource{} +} + +// FrameworkDataSources returns the IAM data sources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkDataSources() []func() datasource.DataSource { + return []func() datasource.DataSource{} +} diff --git a/pkg/providers/imaging/imaging.go b/pkg/providers/imaging/imaging.go index 42718a730..49b529094 100644 --- a/pkg/providers/imaging/imaging.go +++ b/pkg/providers/imaging/imaging.go @@ -3,5 +3,5 @@ package imaging import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" func init() { - registry.RegisterSDKSubprovider(NewSubprovider()) + registry.RegisterSubprovider(NewSubprovider()) } diff --git a/pkg/providers/imaging/provider.go b/pkg/providers/imaging/provider.go index 7eef4b95b..9f97dadbf 100644 --- a/pkg/providers/imaging/provider.go +++ b/pkg/providers/imaging/provider.go @@ -7,6 +7,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/imaging" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -25,9 +27,9 @@ var ( inst *Subprovider ) -var _ subprovider.SDK = &Subprovider{} +var _ subprovider.Subprovider = &Subprovider{} -// NewSubprovider returns a core sub provider +// NewSubprovider returns a new imaging subprovider func NewSubprovider(opts ...option) *Subprovider { once.Do(func() { inst = &Subprovider{} @@ -54,8 +56,8 @@ func (p *Subprovider) Client(meta meta.Meta) imaging.Imaging { return imaging.Client(meta.Session()) } -// Resources returns terraform resources for imaging -func (p *Subprovider) Resources() map[string]*schema.Resource { +// SDKResources returns the imaging resources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKResources() map[string]*schema.Resource { return map[string]*schema.Resource{ "akamai_imaging_policy_image": resourceImagingPolicyImage(), "akamai_imaging_policy_set": resourceImagingPolicySet(), @@ -63,10 +65,20 @@ func (p *Subprovider) Resources() map[string]*schema.Resource { } } -// DataSources returns terraform data sources for imaging -func (p *Subprovider) DataSources() map[string]*schema.Resource { +// SDKDataSources returns the imaging data sources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKDataSources() map[string]*schema.Resource { return map[string]*schema.Resource{ "akamai_imaging_policy_image": dataImagingPolicyImage(), "akamai_imaging_policy_video": dataImagingPolicyVideo(), } } + +// FrameworkResources returns the imaging resources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkResources() []func() resource.Resource { + return []func() resource.Resource{} +} + +// FrameworkDataSources returns the imaging data sources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkDataSources() []func() datasource.DataSource { + return []func() datasource.DataSource{} +} diff --git a/pkg/providers/networklists/networklists.go b/pkg/providers/networklists/networklists.go index 8cc9207c9..cd8b274ff 100644 --- a/pkg/providers/networklists/networklists.go +++ b/pkg/providers/networklists/networklists.go @@ -3,5 +3,5 @@ package networklists import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" func init() { - registry.RegisterSDKSubprovider(NewSubprovider()) + registry.RegisterSubprovider(NewSubprovider()) } diff --git a/pkg/providers/networklists/provider.go b/pkg/providers/networklists/provider.go index 8e82f9586..07e010b51 100644 --- a/pkg/providers/networklists/provider.go +++ b/pkg/providers/networklists/provider.go @@ -8,6 +8,8 @@ import ( "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -26,9 +28,9 @@ var ( inst *Subprovider ) -var _ subprovider.SDK = &Subprovider{} +var _ subprovider.Subprovider = &Subprovider{} -// NewSubprovider returns a core sub provider +// NewSubprovider returns new networklists subprovider func NewSubprovider(opts ...option) *Subprovider { once.Do(func() { inst = &Subprovider{} @@ -47,7 +49,7 @@ func withClient(c networklists.NTWRKLISTS) option { } } -// Client returns the PAPI interface +// Client returns the NTWRKLISTS interface func (p *Subprovider) Client(meta meta.Meta) networklists.NTWRKLISTS { if p.client != nil { return p.client @@ -55,8 +57,8 @@ func (p *Subprovider) Client(meta meta.Meta) networklists.NTWRKLISTS { return networklists.Client(meta.Session()) } -// Resources returns terraform resources for networklists -func (p *Subprovider) Resources() map[string]*schema.Resource { +// SDKResources returns the networklists resources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKResources() map[string]*schema.Resource { return map[string]*schema.Resource{ "akamai_networklist_activations": resourceActivations(), "akamai_networklist_description": resourceNetworkListDescription(), @@ -65,9 +67,19 @@ func (p *Subprovider) Resources() map[string]*schema.Resource { } } -// DataSources returns terraform data sources for networklists -func (p *Subprovider) DataSources() map[string]*schema.Resource { +// SDKDataSources returns the networklists data sources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKDataSources() map[string]*schema.Resource { return map[string]*schema.Resource{ "akamai_networklist_network_lists": dataSourceNetworkList(), } } + +// FrameworkResources returns the networklists resources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkResources() []func() resource.Resource { + return []func() resource.Resource{} +} + +// FrameworkDataSources returns the networklists data sources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkDataSources() []func() datasource.DataSource { + return []func() datasource.DataSource{} +} diff --git a/pkg/providers/property/property.go b/pkg/providers/property/property.go index 93fcba6f0..14378b527 100644 --- a/pkg/providers/property/property.go +++ b/pkg/providers/property/property.go @@ -6,6 +6,5 @@ import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" const SubproviderName = "property" func init() { - registry.RegisterSDKSubprovider(NewPluginSubprovider()) - registry.RegisterFrameworkSubprovider(NewFrameworkSubprovider()) + registry.RegisterSubprovider(NewSubprovider()) } diff --git a/pkg/providers/registry/registry.go b/pkg/providers/registry/registry.go index 7e744b600..e14b2a281 100644 --- a/pkg/providers/registry/registry.go +++ b/pkg/providers/registry/registry.go @@ -10,44 +10,24 @@ import ( var ( lock sync.Mutex - sdkSubproviders []subprovider.SDK - frameworkSubproviders []subprovider.Framework + subproviders []subprovider.Subprovider ) -// RegisterSDKSubprovider registers a terraform-plugin-sdk sub-provider -func RegisterSDKSubprovider(p subprovider.SDK) { +// RegisterSubprovider registers a terraform-plugin-framework sub-provider +func RegisterSubprovider(s subprovider.Subprovider) { lock.Lock() defer lock.Unlock() - sdkSubproviders = append(sdkSubproviders, p) + subproviders = append(subproviders, s) } -// SDKSubproviders returns all of the registered terraform-plugin-sdk sub-providers -func SDKSubproviders() []subprovider.SDK { +// Subproviders returns all of the registered terraform-plugin-framework sub-providers +func Subproviders() []subprovider.Subprovider { lock.Lock() defer lock.Unlock() - out := make([]subprovider.SDK, len(sdkSubproviders)) - copy(out, sdkSubproviders) - - return out -} - -// RegisterFrameworkSubprovider registers a terraform-plugin-framework sub-provider -func RegisterFrameworkSubprovider(p subprovider.Framework) { - lock.Lock() - defer lock.Unlock() - - frameworkSubproviders = append(frameworkSubproviders, p) -} - -// FrameworkSubproviders returns all of the registered terraform-plugin-framework sub-providers -func FrameworkSubproviders() []subprovider.Framework { - lock.Lock() - defer lock.Unlock() - - out := make([]subprovider.Framework, len(frameworkSubproviders)) - copy(out, frameworkSubproviders) + out := make([]subprovider.Subprovider, len(subproviders)) + copy(out, subproviders) return out } diff --git a/pkg/subprovider/subprovider.go b/pkg/subprovider/subprovider.go index f0a9fecd7..79775ddbb 100644 --- a/pkg/subprovider/subprovider.go +++ b/pkg/subprovider/subprovider.go @@ -7,20 +7,17 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -// SDK is the interface implemented by the sub-providers using terraform-plugin-sdk -type SDK interface { - // Resources returns the resources for the sub-provider - Resources() map[string]*schema.Resource +// Subprovider is the interface implemented by the akamai sub-providers +type Subprovider interface { + // SDKResources returns the resources implemented using terraform-plugin-sdk + SDKResources() map[string]*schema.Resource - // DataSources returns the datasources for the sub-provider - DataSources() map[string]*schema.Resource -} + // SDKDataSources returns the data sources implemented using terraform-plugin-sdk + SDKDataSources() map[string]*schema.Resource -// Framework is the interface implemented by the sub-providers using terraform-plugin-framework -type Framework interface { - // Resources returns the resources for the sub-provider - Resources() []func() resource.Resource + // FrameworkResources returns the resources implemented using terraform-plugin-framework + FrameworkResources() []func() resource.Resource - // DataSources returns the datasources for the sub-provider - DataSources() []func() datasource.DataSource + // FrameworkDataSources returns the data sources implemented using terraform-plugin-framework + FrameworkDataSources() []func() datasource.DataSource } From bc84a0e0999a198832aaf3dfea82977e6190d9a4 Mon Sep 17 00:00:00 2001 From: Dawid Dzhafarov Date: Mon, 2 Oct 2023 06:19:35 +0000 Subject: [PATCH 09/52] DXE-3127 Refactor provider factories --- pkg/akamai/framework_provider_test.go | 42 ++-------- pkg/common/testutils/testutils.go | 39 ++++++---- ...ed_settings_attack_payload_logging_test.go | 4 +- ...vanced_settings_evasive_path_match_test.go | 2 +- ...i_appsec_advanced_settings_logging_test.go | 2 +- ...sec_advanced_settings_pii_learning_test.go | 4 +- ...ai_appsec_advanced_settings_pragma_test.go | 2 +- ..._appsec_advanced_settings_prefetch_test.go | 2 +- ...sec_advanced_settings_request_body_test.go | 4 +- .../data_akamai_appsec_api_endpoints_test.go | 2 +- ...pi_hostname_coverage_match_targets_test.go | 2 +- ..._api_hostname_coverage_overlapping_test.go | 2 +- ...kamai_appsec_api_hostname_coverage_test.go | 2 +- ...mai_appsec_api_request_constraints_test.go | 2 +- .../data_akamai_appsec_attack_groups_test.go | 2 +- ...akamai_appsec_bypass_network_lists_test.go | 2 +- .../data_akamai_appsec_configuration_test.go | 4 +- ...kamai_appsec_configuration_version_test.go | 2 +- ...ata_akamai_appsec_contracts_groups_test.go | 2 +- .../data_akamai_appsec_custom_deny_test.go | 2 +- ..._akamai_appsec_custom_rule_actions_test.go | 2 +- .../data_akamai_appsec_custom_rules_test.go | 2 +- .../data_akamai_appsec_eval_groups_test.go | 4 +- ...ata_akamai_appsec_eval_penalty_box_test.go | 2 +- .../data_akamai_appsec_eval_rules_test.go | 2 +- .../appsec/data_akamai_appsec_eval_test.go | 2 +- ...akamai_appsec_export_configuration_test.go | 2 +- ...a_akamai_appsec_failover_hostnames_test.go | 2 +- .../appsec/data_akamai_appsec_ip_geo_test.go | 2 +- ...kamai_appsec_malware_content_types_test.go | 2 +- ...ata_akamai_appsec_malware_policies_test.go | 4 +- ...amai_appsec_malware_policy_actions_test.go | 2 +- .../data_akamai_appsec_match_targets_test.go | 2 +- .../data_akamai_appsec_penalty_box_test.go | 2 +- .../data_akamai_appsec_rate_policies_test.go | 2 +- ..._akamai_appsec_rate_policy_actions_test.go | 2 +- ..._akamai_appsec_reputation_analysis_test.go | 2 +- ..._appsec_reputation_profile_actions_test.go | 2 +- ..._akamai_appsec_reputation_profiles_test.go | 2 +- .../data_akamai_appsec_rule_upgrade_test.go | 2 +- .../appsec/data_akamai_appsec_rules_test.go | 2 +- ...appsec_security_policy_protections_test.go | 2 +- ...data_akamai_appsec_security_policy_test.go | 2 +- ...akamai_appsec_selectable_hostnames_test.go | 2 +- ...a_akamai_appsec_selected_hostnames_test.go | 2 +- ...ata_akamai_appsec_siem_definitions_test.go | 2 +- .../data_akamai_appsec_siem_settings_test.go | 2 +- ...psec_slow_post_protection_settings_test.go | 2 +- .../data_akamai_appsec_threat_intel_test.go | 4 +- ...amai_appsec_tuning_recommendations_test.go | 4 +- .../data_akamai_appsec_version_notes_test.go | 2 +- .../data_akamai_appsec_waf_mode_test.go | 2 +- ...amai_appsec_wap_selected_hostnames_test.go | 6 +- pkg/providers/appsec/provider_test.go | 44 +---------- ...resource_akamai_appsec_activations_test.go | 6 +- ...ed_settings_attack_payload_logging_test.go | 8 +- ...vanced_settings_evasive_path_match_test.go | 2 +- ...i_appsec_advanced_settings_logging_test.go | 2 +- ...sec_advanced_settings_pii_learning_test.go | 4 +- ...ai_appsec_advanced_settings_pragma_test.go | 2 +- ..._appsec_advanced_settings_prefetch_test.go | 2 +- ...sec_advanced_settings_request_body_test.go | 8 +- ..._appsec_api_constraints_protection_test.go | 2 +- ...mai_appsec_api_request_constraints_test.go | 2 +- ...esource_akamai_appsec_attack_group_test.go | 4 +- ...akamai_appsec_bypass_network_lists_test.go | 2 +- ...akamai_appsec_configuration_rename_test.go | 2 +- ...source_akamai_appsec_configuration_test.go | 4 +- ...resource_akamai_appsec_custom_deny_test.go | 2 +- ...e_akamai_appsec_custom_rule_action_test.go | 2 +- ...resource_akamai_appsec_custom_rule_test.go | 4 +- .../resource_akamai_appsec_eval_group_test.go | 4 +- ...rce_akamai_appsec_eval_penalty_box_test.go | 2 +- .../resource_akamai_appsec_eval_rule_test.go | 2 +- .../resource_akamai_appsec_eval_test.go | 2 +- ...ce_akamai_appsec_ip_geo_protection_test.go | 2 +- .../resource_akamai_appsec_ip_geo_test.go | 10 +-- ...kamai_appsec_malware_policy_action_test.go | 2 +- ...amai_appsec_malware_policy_actions_test.go | 2 +- ...ource_akamai_appsec_malware_policy_test.go | 2 +- ...e_akamai_appsec_malware_protection_test.go | 2 +- ...kamai_appsec_match_target_sequence_test.go | 2 +- ...esource_akamai_appsec_match_target_test.go | 2 +- ...resource_akamai_appsec_penalty_box_test.go | 2 +- ...e_akamai_appsec_rate_policy_action_test.go | 2 +- ...resource_akamai_appsec_rate_policy_test.go | 2 +- ...urce_akamai_appsec_rate_protection_test.go | 2 +- ..._akamai_appsec_reputation_analysis_test.go | 2 +- ...i_appsec_reputation_profile_action_test.go | 2 +- ...e_akamai_appsec_reputation_profile_test.go | 2 +- ...kamai_appsec_reputation_protection_test.go | 2 +- .../resource_akamai_appsec_rule_test.go | 2 +- ...esource_akamai_appsec_rule_upgrade_test.go | 2 +- ...ecurity_policy_default_protections_test.go | 4 +- ...amai_appsec_security_policy_rename_test.go | 2 +- ...urce_akamai_appsec_security_policy_test.go | 2 +- ...ce_akamai_appsec_selected_hostname_test.go | 2 +- ...source_akamai_appsec_siem_settings_test.go | 2 +- ...ppsec_slow_post_protection_setting_test.go | 2 +- ..._akamai_appsec_slowpost_protection_test.go | 2 +- ...esource_akamai_appsec_threat_intel_test.go | 2 +- ...source_akamai_appsec_version_notes_test.go | 2 +- .../resource_akamai_appsec_waf_mode_test.go | 2 +- ...ource_akamai_appsec_waf_protection_test.go | 2 +- ...amai_appsec_wap_selected_hostnames_test.go | 4 +- ..._botman_akamai_bot_category_action_test.go | 5 +- ..._akamai_botman_akamai_bot_category_test.go | 5 +- ...a_akamai_botman_akamai_defined_bot_test.go | 5 +- ...akamai_botman_bot_analytics_cookie_test.go | 3 +- ...botman_bot_analytics_cookie_values_test.go | 3 +- ...amai_botman_bot_category_exception_test.go | 3 +- ...akamai_botman_bot_detection_action_test.go | 5 +- .../data_akamai_botman_bot_detection_test.go | 5 +- ...otman_bot_endpoint_coverage_report_test.go | 9 ++- ...mai_botman_bot_management_settings_test.go | 3 +- ...ata_akamai_botman_challenge_action_test.go | 5 +- ...i_botman_challenge_injection_rules_test.go | 3 +- ...otman_challenge_interception_rules_test.go | 3 +- ...akamai_botman_client_side_security_test.go | 3 +- ...a_akamai_botman_conditional_action_test.go | 5 +- ..._botman_custom_bot_category_action_test.go | 5 +- ...otman_custom_bot_category_sequence_test.go | 3 +- ..._akamai_botman_custom_bot_category_test.go | 5 +- ...amai_botman_custom_client_sequence_test.go | 3 +- .../data_akamai_botman_custom_client_test.go | 5 +- ...a_akamai_botman_custom_defined_bot_test.go | 5 +- ...a_akamai_botman_custom_deny_action_test.go | 5 +- ...akamai_botman_javascript_injection_test.go | 3 +- ...n_recategorized_akamai_defined_bot_test.go | 5 +- ...data_akamai_botman_response_action_test.go | 5 +- ...amai_botman_serve_alternate_action_test.go | 5 +- ..._transactional_endpoint_protection_test.go | 3 +- ...amai_botman_transactional_endpoint_test.go | 5 +- pkg/providers/botman/provider_test.go | 43 +---------- ..._botman_akamai_bot_category_action_test.go | 3 +- ...akamai_botman_bot_analytics_cookie_test.go | 3 +- ...amai_botman_bot_category_exception_test.go | 3 +- ...akamai_botman_bot_detection_action_test.go | 3 +- ...mai_botman_bot_management_settings_test.go | 3 +- ...rce_akamai_botman_challenge_action_test.go | 3 +- ...i_botman_challenge_injection_rules_test.go | 3 +- ...otman_challenge_interception_rules_test.go | 3 +- ...akamai_botman_client_side_security_test.go | 3 +- ...e_akamai_botman_conditional_action_test.go | 3 +- ..._botman_custom_bot_category_action_test.go | 3 +- ...otman_custom_bot_category_sequence_test.go | 3 +- ..._akamai_botman_custom_bot_category_test.go | 3 +- ...amai_botman_custom_client_sequence_test.go | 3 +- ...source_akamai_botman_custom_client_test.go | 3 +- ...e_akamai_botman_custom_defined_bot_test.go | 3 +- ...e_akamai_botman_custom_deny_action_test.go | 3 +- ...akamai_botman_javascript_injection_test.go | 3 +- ...n_recategorized_akamai_defined_bot_test.go | 3 +- ...amai_botman_serve_alternate_action_test.go | 3 +- ..._transactional_endpoint_protection_test.go | 3 +- ...amai_botman_transactional_endpoint_test.go | 3 +- .../data_akamai_clientlist_lists_test.go | 3 +- pkg/providers/clientlists/provider_test.go | 44 +---------- ...akamai_clientlists_list_activation_test.go | 15 ++-- .../resource_akamai_clientlists_list_test.go | 21 ++--- ...lets_api_prioritization_match_rule_test.go | 4 +- ...plication_load_balancer_match_rule_test.go | 4 +- ...loudlets_application_load_balancer_test.go | 2 +- ...s_audience_segmentation_match_rule_test.go | 4 +- ...oudlets_edge_redirector_match_rule_test.go | 4 +- ...oudlets_forward_rewrite_match_rule_test.go | 4 +- ...loudlets_phased_release_match_rule_test.go | 4 +- .../data_akamai_cloudlets_policy_test.go | 2 +- ...oudlets_request_control_match_rule_test.go | 4 +- ..._visitor_prioritization_match_rule_test.go | 4 +- pkg/providers/cloudlets/provider_test.go | 57 +------------- ...plication_load_balancer_activation_test.go | 2 +- ...loudlets_application_load_balancer_test.go | 32 ++++---- ...akamai_cloudlets_policy_activation_test.go | 2 +- .../resource_akamai_cloudlets_policy_test.go | 38 +++++----- pkg/providers/cloudwrapper/provider_test.go | 11 +-- ..._akamai_cloudwrapper_configuration_test.go | 76 ------------------- pkg/providers/cps/data_akamai_cps_csr_test.go | 2 +- .../cps/data_akamai_cps_deployments_test.go | 2 +- .../cps/data_akamai_cps_enrollment_test.go | 2 +- .../cps/data_akamai_cps_enrollments_test.go | 2 +- .../cps/data_akamai_cps_warnings_test.go | 2 +- pkg/providers/cps/provider_test.go | 44 +---------- .../resource_akamai_cps_dv_enrollment_test.go | 24 +++--- .../resource_akamai_cps_dv_validation_test.go | 6 +- ..._akamai_cps_third_party_enrollment_test.go | 36 ++++----- ...urce_akamai_cps_upload_certificate_test.go | 14 ++-- ...amai_datastream_activation_history_test.go | 2 +- ...a_akamai_datastream_dataset_fields_test.go | 4 +- .../data_akamai_datastreams_test.go | 2 +- pkg/providers/datastream/provider_test.go | 44 +---------- .../resource_akamai_datastream_test.go | 20 ++--- .../dns/data_authorities_set_test.go | 6 +- pkg/providers/dns/data_dns_record_set_test.go | 4 +- pkg/providers/dns/provider_test.go | 44 +---------- .../dns/resource_akamai_dns_record_test.go | 4 +- .../dns/resource_akamai_dns_zone_test.go | 2 +- .../data_akamai_edgekv_group_items_test.go | 11 +-- .../data_akamai_edgekv_groups_test.go | 9 ++- .../data_akamai_edgeworker_activation_test.go | 2 +- .../data_akamai_edgeworker_test.go | 2 +- ..._akamai_edgeworkers_property_rules_test.go | 2 +- ...a_akamai_edgeworkers_resource_tier_test.go | 2 +- pkg/providers/edgeworkers/provider_test.go | 44 +---------- ...resource_akamai_edgekv_group_items_test.go | 10 +-- .../resource_akamai_edgekv_test.go | 2 +- .../resource_akamai_edgeworker_test.go | 20 ++--- ...urce_akamai_edgeworkers_activation_test.go | 2 +- .../gtm/data_akamai_gtm_datacenter_test.go | 2 +- .../gtm/data_akamai_gtm_datacenters_test.go | 2 +- ...data_akamai_gtm_default_datacenter_test.go | 2 +- pkg/providers/gtm/provider_test.go | 71 +---------------- .../gtm/resource_akamai_gtm_asmap_test.go | 10 +-- .../gtm/resource_akamai_gtm_cidrmap_test.go | 8 +- .../resource_akamai_gtm_datacenter_test.go | 6 +- .../gtm/resource_akamai_gtm_domain_test.go | 12 +-- .../gtm/resource_akamai_gtm_geomap_test.go | 8 +- .../gtm/resource_akamai_gtm_property_test.go | 16 ++-- .../gtm/resource_akamai_gtm_resource_test.go | 8 +- .../iam/data_akamai_iam_contact_types_test.go | 5 +- .../iam/data_akamai_iam_countries_test.go | 5 +- .../data_akamai_iam_grantable_roles_test.go | 5 +- .../iam/data_akamai_iam_groups_test.go | 5 +- .../iam/data_akamai_iam_roles_test.go | 5 +- .../iam/data_akamai_iam_states_test.go | 5 +- .../data_akamai_iam_supported_langs_test.go | 5 +- .../data_akamai_iam_timeout_policies_test.go | 5 +- .../iam/data_akamai_iam_timezones_test.go | 5 +- pkg/providers/iam/provider_test.go | 44 +---------- ...akamai_iam_blocked_user_properties_test.go | 2 +- .../iam/resource_akamai_iam_group_test.go | 2 +- .../iam/resource_akamai_iam_role_test.go | 12 +-- .../iam/resource_akamai_iam_user_test.go | 2 +- .../data_akamai_imaging_policy_image_test.go | 2 +- .../data_akamai_imaging_policy_video_test.go | 2 +- pkg/providers/imaging/provider_test.go | 44 +---------- ...source_akamai_imaging_policy_image_test.go | 32 ++++---- ...resource_akamai_imaging_policy_set_test.go | 2 +- ...source_akamai_imaging_policy_video_test.go | 28 +++---- ...a_akamai_networklist_network_lists_test.go | 4 +- pkg/providers/networklists/provider_test.go | 44 +---------- ...rce_akamai_networklist_activations_test.go | 4 +- ...tworklist_network_list_description_test.go | 2 +- ...worklist_network_list_subscription_test.go | 2 +- ...ce_akamai_networklist_network_list_test.go | 6 +- .../property/data_akamai_contracts_test.go | 5 +- .../property/data_akamai_cp_code_test.go | 17 ++--- .../data_akamai_properties_search_test.go | 9 +-- .../property/data_akamai_properties_test.go | 11 ++- .../data_akamai_property_activation_test.go | 2 +- .../data_akamai_property_hostnames_test.go | 8 +- ...akamai_property_include_activation_test.go | 2 +- ...ta_akamai_property_include_parents_test.go | 2 +- ...data_akamai_property_include_rules_test.go | 2 +- .../data_akamai_property_include_test.go | 5 +- .../data_akamai_property_includes_test.go | 2 +- .../data_akamai_property_products_test.go | 8 +- .../data_akamai_property_rule_formats_test.go | 7 +- ...data_akamai_property_rules_builder_test.go | 14 ++-- ...ata_akamai_property_rules_template_test.go | 34 ++++----- .../data_akamai_property_rules_test.go | 27 ++++--- .../property/data_akamai_property_test.go | 5 +- .../data_property_akamai_contract_test.go | 2 +- .../data_property_akamai_group_test.go | 2 +- .../data_property_akamai_groups_test.go | 9 +-- pkg/providers/property/provider_test.go | 54 +------------ .../property/resource_akamai_cp_code_test.go | 28 ++++--- .../resource_akamai_edge_hostname_test.go | 11 ++- ...esource_akamai_property_activation_test.go | 5 +- ...akamai_property_include_activation_test.go | 18 ++--- .../resource_akamai_property_include_test.go | 2 +- .../property/resource_akamai_property_test.go | 24 +++--- 272 files changed, 709 insertions(+), 1357 deletions(-) diff --git a/pkg/akamai/framework_provider_test.go b/pkg/akamai/framework_provider_test.go index 78b6f8581..fec502a1a 100644 --- a/pkg/akamai/framework_provider_test.go +++ b/pkg/akamai/framework_provider_test.go @@ -8,12 +8,9 @@ import ( "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/cache" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" - "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" "github.com/hashicorp/terraform-plugin-framework/provider" - "github.com/hashicorp/terraform-plugin-framework/providerserver" - "github.com/hashicorp/terraform-plugin-go/tfprotov6" - "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/assert" ) @@ -49,7 +46,7 @@ func TestFramework_ConfigureCache_EnabledInContext(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: newProtoV6ProviderFactory(dummy{}), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(dummy{}), Steps: []resource.TestStep{ { Config: fmt.Sprintf(` @@ -92,7 +89,7 @@ func TestFramework_ConfigureEdgercInContext(t *testing.T) { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: newProtoV6ProviderFactory(dummy{}), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(dummy{}), Steps: []resource.TestStep{ { ExpectError: testcase.expectedError, @@ -141,7 +138,7 @@ func TestFramework_EdgercValidate(t *testing.T) { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: newProtoV6ProviderFactory(dummy{}), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(dummy{}), Steps: []resource.TestStep{ { ExpectError: testcase.expectedError, @@ -211,7 +208,7 @@ func TestFramework_EdgercFromConfig(t *testing.T) { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: newProtoV6ProviderFactory(dummy{}), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(dummy{}), Steps: []resource.TestStep{ { ExpectError: testcase.expectedError, @@ -236,7 +233,7 @@ func TestFramework_EdgercFromConfig(t *testing.T) { func TestFramework_EdgercFromConfig_missing_required_attributes(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: newProtoV6ProviderFactory(dummy{}), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(dummy{}), Steps: []resource.TestStep{ { ExpectError: regexp.MustCompile("The argument \"host\" is required, but no definition was found"), @@ -289,30 +286,3 @@ func TestFramework_EdgercFromConfig_missing_required_attributes(t *testing.T) { }, }) } - -func newProtoV6ProviderFactory(subproviders ...subprovider.Subprovider) map[string]func() (tfprotov6.ProviderServer, error) { - return map[string]func() (tfprotov6.ProviderServer, error){ - "akamai": func() (tfprotov6.ProviderServer, error) { - ctx := context.Background() - - sdkProviderV6, err := akamai.NewProtoV6SDKProvider(registry.Subproviders()) - if err != nil { - return nil, err - } - - providers := []func() tfprotov6.ProviderServer{ - sdkProviderV6, - providerserver.NewProtocol6( - akamai.NewFrameworkProvider(subproviders...)(), - ), - } - - muxServer, err := tf6muxserver.NewMuxServer(ctx, providers...) - if err != nil { - return nil, err - } - - return muxServer.ProviderServer(), nil - }, - } -} diff --git a/pkg/common/testutils/testutils.go b/pkg/common/testutils/testutils.go index 96183fda9..53a8c2c32 100644 --- a/pkg/common/testutils/testutils.go +++ b/pkg/common/testutils/testutils.go @@ -5,13 +5,14 @@ import ( "context" "fmt" "io/ioutil" + "log" "os" "testing" "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/hashicorp/terraform-plugin-framework/providerserver" "github.com/hashicorp/terraform-plugin-go/tfprotov6" - "github.com/hashicorp/terraform-plugin-mux/tf5to6server" "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" "github.com/stretchr/testify/require" ) @@ -19,6 +20,18 @@ import ( // tfTestTempDir specifies the location of tmp directory which will be used by provider SDK's testing framework const tfTestTempDir = "./test_tmp" +// TestRunner executes common test setup and teardown in all subproviders +func TestRunner(m *testing.M) { + if err := TFTestSetup(); err != nil { + log.Fatal(err) + } + exitCode := m.Run() + if err := TFTestTeardown(); err != nil { + log.Fatal(err) + } + os.Exit(exitCode) +} + // TFTestSetup contains common setup for tests in all subproviders func TFTestSetup() error { if err := os.MkdirAll(tfTestTempDir, 0755); err != nil { @@ -54,26 +67,25 @@ func LoadFixtureString(t *testing.T, format string, args ...interface{}) string return string(LoadFixtureBytes(t, fmt.Sprintf(format, args...))) } -// NewSDKProviderFactories uses provided subprovider to create provider factories for test purposes -func NewSDKProviderFactories(subprovider subprovider.Subprovider) map[string]func() (tfprotov6.ProviderServer, error) { - testAccSDKProvider := akamai.NewSDKProvider(subprovider)() - testAccProviders := map[string]func() (tfprotov6.ProviderServer, error){ +// NewProtoV6ProviderFactory uses provided subprovider to create provider factory for test purposes +func NewProtoV6ProviderFactory(subproviders ...subprovider.Subprovider) map[string]func() (tfprotov6.ProviderServer, error) { + return map[string]func() (tfprotov6.ProviderServer, error){ "akamai": func() (tfprotov6.ProviderServer, error) { - sdkProviderV6, err := tf5to6server.UpgradeServer( - context.Background(), - testAccSDKProvider.GRPCProvider, - ) + ctx := context.Background() + + sdkProviderV6, err := akamai.NewProtoV6SDKProvider(subproviders) if err != nil { return nil, err } providers := []func() tfprotov6.ProviderServer{ - func() tfprotov6.ProviderServer { - return sdkProviderV6 - }, + sdkProviderV6, + providerserver.NewProtocol6( + akamai.NewFrameworkProvider(subproviders...)(), + ), } - muxServer, err := tf6muxserver.NewMuxServer(context.Background(), providers...) + muxServer, err := tf6muxserver.NewMuxServer(ctx, providers...) if err != nil { return nil, err } @@ -81,5 +93,4 @@ func NewSDKProviderFactories(subprovider subprovider.Subprovider) map[string]fun return muxServer.ProviderServer(), nil }, } - return testAccProviders } diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_attack_payload_logging_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_attack_payload_logging_test.go index df4bda6b8..d8028b7bc 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_attack_payload_logging_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_attack_payload_logging_test.go @@ -36,7 +36,7 @@ func TestAkamaiAdvancedSettingsAttackPayloadLoggingDataBasic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSAdvancedSettingsAttackPayloadLogging/match_by_id.tf"), @@ -78,7 +78,7 @@ func TestAkamaiAdvancedSettingsAttackPayloadLoggingDataBasicPolicyId(t *testing. useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSAdvancedSettingsAttackPayloadLogging/match_by_policy_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_evasive_path_match_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_evasive_path_match_test.go index 5ca4944c5..2a432cb99 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_evasive_path_match_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_evasive_path_match_test.go @@ -36,7 +36,7 @@ func TestAkamaiAdvancedSettingsEvasivePathMatch_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSAdvancedSettingsEvasivePathMatch/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_logging_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_logging_test.go index 496176709..049727e34 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_logging_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_logging_test.go @@ -36,7 +36,7 @@ func TestAkamaiAdvancedSettingsLogging_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSAdvancedSettingsLogging/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pii_learning_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pii_learning_test.go index db49eb28c..539b670be 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pii_learning_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pii_learning_test.go @@ -56,7 +56,7 @@ func TestAkamaiAdvancedSettingsPIILearning_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSAdvancedSettingsPIILearning/match_by_id.tf"), @@ -109,7 +109,7 @@ func TestAkamaiAdvancedSettingsPIILearning_data_missing_parameter(t *testing.T) useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSAdvancedSettingsPIILearning/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pragma_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pragma_test.go index cade98fa2..e481aeb55 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pragma_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pragma_test.go @@ -36,7 +36,7 @@ func TestAkamaiAdvancedSettingsPragma_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSAdvancedSettingsPragma/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_prefetch_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_prefetch_test.go index e5b96c0d1..b6bd81319 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_prefetch_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_prefetch_test.go @@ -36,7 +36,7 @@ func TestAkamaiAdvancedSettingsPrefetch_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSAdvancedSettingsPrefetch/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_request_body_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_request_body_test.go index d25ca2f56..90b86ce18 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_request_body_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_request_body_test.go @@ -36,7 +36,7 @@ func TestAkamaiAdvancedSettingsRequestBodyDataBasic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSAdvancedSettingsRequestBody/match_by_id.tf"), @@ -78,7 +78,7 @@ func TestAkamaiAdvancedSettingsRequestBodyDataBasicPolicyID(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSAdvancedSettingsRequestBody/match_by_policy_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_api_endpoints_test.go b/pkg/providers/appsec/data_akamai_appsec_api_endpoints_test.go index b7bd92116..4ee405698 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_endpoints_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_endpoints_test.go @@ -36,7 +36,7 @@ func TestAkamaiApiEndpoints_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSApiEndpoints/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_match_targets_test.go b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_match_targets_test.go index 1bf670949..a7f2002fc 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_match_targets_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_match_targets_test.go @@ -36,7 +36,7 @@ func TestAkamaiApiHostnameCoverageMatchTargets_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSApiHostnameCoverageMatchTargets/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_overlapping_test.go b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_overlapping_test.go index a6d701af4..3f2fbea53 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_overlapping_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_overlapping_test.go @@ -36,7 +36,7 @@ func TestAkamaiApiHostnameCoverageOverlapping_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSApiHostnameCoverageOverlapping/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_test.go b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_test.go index 058268679..28d0deca9 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_test.go @@ -27,7 +27,7 @@ func TestAkamaiApiHostnameCoverage_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSApiHostnameCoverage/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_api_request_constraints_test.go b/pkg/providers/appsec/data_akamai_appsec_api_request_constraints_test.go index 90966c696..aa418e343 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_request_constraints_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_request_constraints_test.go @@ -36,7 +36,7 @@ func TestAkamaiApiRequestConstraints_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSApiRequestConstraints/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_attack_groups_test.go b/pkg/providers/appsec/data_akamai_appsec_attack_groups_test.go index 28c0851bc..c728e71d5 100644 --- a/pkg/providers/appsec/data_akamai_appsec_attack_groups_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_attack_groups_test.go @@ -36,7 +36,7 @@ func TestAkamaiAttackGroups_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSAttackGroups/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_bypass_network_lists_test.go b/pkg/providers/appsec/data_akamai_appsec_bypass_network_lists_test.go index 7c8415ac0..4e45b1dd0 100644 --- a/pkg/providers/appsec/data_akamai_appsec_bypass_network_lists_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_bypass_network_lists_test.go @@ -36,7 +36,7 @@ func TestAkamaiBypassNetworkLists_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSBypassNetworkLists/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_configuration_test.go b/pkg/providers/appsec/data_akamai_appsec_configuration_test.go index 60c332a45..9e21c8a8a 100644 --- a/pkg/providers/appsec/data_akamai_appsec_configuration_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_configuration_test.go @@ -29,7 +29,7 @@ func TestAkamaiConfiguration_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSConfiguration/match_by_id.tf"), @@ -61,7 +61,7 @@ func TestAkamaiConfiguration_data_nonexistentConfig(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSConfiguration/nonexistent_config.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_configuration_version_test.go b/pkg/providers/appsec/data_akamai_appsec_configuration_version_test.go index cf66be9d5..af4977dea 100644 --- a/pkg/providers/appsec/data_akamai_appsec_configuration_version_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_configuration_version_test.go @@ -27,7 +27,7 @@ func TestAkamaiConfigurationVersion_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSConfigurationVersion/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_contracts_groups_test.go b/pkg/providers/appsec/data_akamai_appsec_contracts_groups_test.go index 53646e8e4..30c3dcf1f 100644 --- a/pkg/providers/appsec/data_akamai_appsec_contracts_groups_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_contracts_groups_test.go @@ -27,7 +27,7 @@ func TestAkamaiContractsGroups_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSContractsGroups/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_custom_deny_test.go b/pkg/providers/appsec/data_akamai_appsec_custom_deny_test.go index cc9b2909b..6dc17cdc7 100644 --- a/pkg/providers/appsec/data_akamai_appsec_custom_deny_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_custom_deny_test.go @@ -36,7 +36,7 @@ func TestAkamaiCustomDeny_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSCustomDeny/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_custom_rule_actions_test.go b/pkg/providers/appsec/data_akamai_appsec_custom_rule_actions_test.go index 2194cb6f7..303c520de 100644 --- a/pkg/providers/appsec/data_akamai_appsec_custom_rule_actions_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_custom_rule_actions_test.go @@ -36,7 +36,7 @@ func TestAkamaiCustomRuleActions_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSCustomRuleActions/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_custom_rules_test.go b/pkg/providers/appsec/data_akamai_appsec_custom_rules_test.go index c2fe911e3..e7c2a156c 100644 --- a/pkg/providers/appsec/data_akamai_appsec_custom_rules_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_custom_rules_test.go @@ -27,7 +27,7 @@ func TestAkamaiCustomRules_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSCustomRules/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_groups_test.go b/pkg/providers/appsec/data_akamai_appsec_eval_groups_test.go index f9e7fa229..03112636f 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval_groups_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval_groups_test.go @@ -34,7 +34,7 @@ func TestAkamaiEvalGroups_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSEvalGroups/match_by_id.tf"), @@ -72,7 +72,7 @@ func TestAkamaiEvalGroups_data_error_retrieving_eval_groups(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSEvalGroups/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_test.go b/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_test.go index 4d6411132..0b7769f17 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_test.go @@ -36,7 +36,7 @@ func TestAkamaiEvalPenaltyBox_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSEvalPenaltyBox/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_rules_test.go b/pkg/providers/appsec/data_akamai_appsec_eval_rules_test.go index 714b6fe53..8ef42655d 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval_rules_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval_rules_test.go @@ -36,7 +36,7 @@ func TestAkamaiEvalRules_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSEvalRules/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_test.go b/pkg/providers/appsec/data_akamai_appsec_eval_test.go index a49a2fe4b..c65646d37 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval_test.go @@ -36,7 +36,7 @@ func TestAkamaiEval_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSEval/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_export_configuration_test.go b/pkg/providers/appsec/data_akamai_appsec_export_configuration_test.go index 6eb505204..bd6e05101 100644 --- a/pkg/providers/appsec/data_akamai_appsec_export_configuration_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_export_configuration_test.go @@ -29,7 +29,7 @@ func TestAkamaiExportConfiguration_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSExportConfiguration/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_failover_hostnames_test.go b/pkg/providers/appsec/data_akamai_appsec_failover_hostnames_test.go index 705a5bc80..f79f33a88 100644 --- a/pkg/providers/appsec/data_akamai_appsec_failover_hostnames_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_failover_hostnames_test.go @@ -27,7 +27,7 @@ func TestAkamaiFailoverHostnames_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSFailoverHostnames/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_ip_geo_test.go b/pkg/providers/appsec/data_akamai_appsec_ip_geo_test.go index eb2c7122c..1a0c0f574 100644 --- a/pkg/providers/appsec/data_akamai_appsec_ip_geo_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_ip_geo_test.go @@ -36,7 +36,7 @@ func TestAkamaiIPGeo_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSIPGeo/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_malware_content_types_test.go b/pkg/providers/appsec/data_akamai_appsec_malware_content_types_test.go index 8253b3f9e..f0bdcfcec 100644 --- a/pkg/providers/appsec/data_akamai_appsec_malware_content_types_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_malware_content_types_test.go @@ -36,7 +36,7 @@ func TestAkamaiMalwareContentTypes_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSMalwareContentTypes/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_malware_policies_test.go b/pkg/providers/appsec/data_akamai_appsec_malware_policies_test.go index 611ea317c..9fde06b50 100644 --- a/pkg/providers/appsec/data_akamai_appsec_malware_policies_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_malware_policies_test.go @@ -36,7 +36,7 @@ func TestAkamaiMalwarePolicies_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSMalwarePolicies/match_by_id.tf"), @@ -78,7 +78,7 @@ func TestAkamaiMalwarePolicies_data_single_policy(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSMalwarePolicies/match_by_id_single_policy.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_malware_policy_actions_test.go b/pkg/providers/appsec/data_akamai_appsec_malware_policy_actions_test.go index fb1fe0304..ad6a30a81 100644 --- a/pkg/providers/appsec/data_akamai_appsec_malware_policy_actions_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_malware_policy_actions_test.go @@ -36,7 +36,7 @@ func TestAkamaiMalwarePolicyActions_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSMalwarePolicyActions/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_match_targets_test.go b/pkg/providers/appsec/data_akamai_appsec_match_targets_test.go index f66c8f8e6..f221098da 100644 --- a/pkg/providers/appsec/data_akamai_appsec_match_targets_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_match_targets_test.go @@ -36,7 +36,7 @@ func TestAkamaiMatchTargets_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: false, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSMatchTargets/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_penalty_box_test.go b/pkg/providers/appsec/data_akamai_appsec_penalty_box_test.go index 7fa13fe6e..d83570713 100644 --- a/pkg/providers/appsec/data_akamai_appsec_penalty_box_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_penalty_box_test.go @@ -36,7 +36,7 @@ func TestAkamaiPenaltyBox_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSPenaltyBox/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_rate_policies_test.go b/pkg/providers/appsec/data_akamai_appsec_rate_policies_test.go index 066b0c0d0..55ae7f5be 100644 --- a/pkg/providers/appsec/data_akamai_appsec_rate_policies_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_rate_policies_test.go @@ -36,7 +36,7 @@ func TestAkamaiRatePolicies_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRatePolicies/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_rate_policy_actions_test.go b/pkg/providers/appsec/data_akamai_appsec_rate_policy_actions_test.go index 3c7c1f047..040e86eae 100644 --- a/pkg/providers/appsec/data_akamai_appsec_rate_policy_actions_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_rate_policy_actions_test.go @@ -36,7 +36,7 @@ func TestAkamaiRatePolicyActions_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRatePolicyActions/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_reputation_analysis_test.go b/pkg/providers/appsec/data_akamai_appsec_reputation_analysis_test.go index fc6cc8300..766916b68 100644 --- a/pkg/providers/appsec/data_akamai_appsec_reputation_analysis_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_reputation_analysis_test.go @@ -36,7 +36,7 @@ func TestAkamaiReputationAnalysis_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSReputationAnalysis/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_reputation_profile_actions_test.go b/pkg/providers/appsec/data_akamai_appsec_reputation_profile_actions_test.go index f131297a6..144ee56dd 100644 --- a/pkg/providers/appsec/data_akamai_appsec_reputation_profile_actions_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_reputation_profile_actions_test.go @@ -36,7 +36,7 @@ func TestAkamaiReputationProfileActions_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSReputationProfileActions/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_reputation_profiles_test.go b/pkg/providers/appsec/data_akamai_appsec_reputation_profiles_test.go index b96d3d04e..8a38b934e 100644 --- a/pkg/providers/appsec/data_akamai_appsec_reputation_profiles_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_reputation_profiles_test.go @@ -36,7 +36,7 @@ func TestAkamaiReputationProfiles_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSReputationProfiles/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_rule_upgrade_test.go b/pkg/providers/appsec/data_akamai_appsec_rule_upgrade_test.go index e711438b9..7443fe11f 100644 --- a/pkg/providers/appsec/data_akamai_appsec_rule_upgrade_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_rule_upgrade_test.go @@ -36,7 +36,7 @@ func TestAkamaiRuleUpgrade_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRuleUpgrade/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_rules_test.go b/pkg/providers/appsec/data_akamai_appsec_rules_test.go index b9b5fabfe..731f0be07 100644 --- a/pkg/providers/appsec/data_akamai_appsec_rules_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_rules_test.go @@ -48,7 +48,7 @@ func TestAkamaiRules_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRules/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_security_policy_protections_test.go b/pkg/providers/appsec/data_akamai_appsec_security_policy_protections_test.go index 41526f7c7..65550f506 100644 --- a/pkg/providers/appsec/data_akamai_appsec_security_policy_protections_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_security_policy_protections_test.go @@ -36,7 +36,7 @@ func TestAkamaiPolicyProtections_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSPolicyProtections/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_security_policy_test.go b/pkg/providers/appsec/data_akamai_appsec_security_policy_test.go index 65a106d81..4272c2b0c 100644 --- a/pkg/providers/appsec/data_akamai_appsec_security_policy_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_security_policy_test.go @@ -44,7 +44,7 @@ func TestAkamaiSecurityPolicy_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSSecurityPolicy/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_selectable_hostnames_test.go b/pkg/providers/appsec/data_akamai_appsec_selectable_hostnames_test.go index d363e1495..a66942d3a 100644 --- a/pkg/providers/appsec/data_akamai_appsec_selectable_hostnames_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_selectable_hostnames_test.go @@ -36,7 +36,7 @@ func TestAkamaiSelectableHostnames_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSSelectableHostnames/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_selected_hostnames_test.go b/pkg/providers/appsec/data_akamai_appsec_selected_hostnames_test.go index d23e2663f..41df017c9 100644 --- a/pkg/providers/appsec/data_akamai_appsec_selected_hostnames_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_selected_hostnames_test.go @@ -36,7 +36,7 @@ func TestAkamaiSelectedHostnames_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSSelectedHostnames/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_siem_definitions_test.go b/pkg/providers/appsec/data_akamai_appsec_siem_definitions_test.go index 483b37266..172e02526 100644 --- a/pkg/providers/appsec/data_akamai_appsec_siem_definitions_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_siem_definitions_test.go @@ -27,7 +27,7 @@ func TestAkamaiSiemDefinitions_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSSiemDefinitions/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_siem_settings_test.go b/pkg/providers/appsec/data_akamai_appsec_siem_settings_test.go index d8ad70c36..62545625f 100644 --- a/pkg/providers/appsec/data_akamai_appsec_siem_settings_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_siem_settings_test.go @@ -36,7 +36,7 @@ func TestAkamaiSiemSettings_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSSiemSettings/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_slow_post_protection_settings_test.go b/pkg/providers/appsec/data_akamai_appsec_slow_post_protection_settings_test.go index 574b84ff7..e2449754f 100644 --- a/pkg/providers/appsec/data_akamai_appsec_slow_post_protection_settings_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_slow_post_protection_settings_test.go @@ -36,7 +36,7 @@ func TestAkamaiSlowPostProtectionSettings_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSSlowPostProtectionSettings/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_threat_intel_test.go b/pkg/providers/appsec/data_akamai_appsec_threat_intel_test.go index 036998967..e85d67535 100644 --- a/pkg/providers/appsec/data_akamai_appsec_threat_intel_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_threat_intel_test.go @@ -38,7 +38,7 @@ func TestAkamaiThreatIntel_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSThreatIntel/match_by_id.tf"), @@ -80,7 +80,7 @@ func TestAkamaiThreatIntel_data_error_retrieving_threat_intel(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSThreatIntel/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_tuning_recommendations_test.go b/pkg/providers/appsec/data_akamai_appsec_tuning_recommendations_test.go index a2acfdc96..336754b78 100644 --- a/pkg/providers/appsec/data_akamai_appsec_tuning_recommendations_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_tuning_recommendations_test.go @@ -56,7 +56,7 @@ func TestAkamaiTuningRecommendationsDataBasic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSTuningRecommendations/match_by_id.tf"), @@ -116,7 +116,7 @@ func TestAkamaiTuningRecommenadationsDataErrorRetrievingTuningRecommenadations(t useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSTuningRecommendations/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_version_notes_test.go b/pkg/providers/appsec/data_akamai_appsec_version_notes_test.go index a2e556b09..2ce39eccf 100644 --- a/pkg/providers/appsec/data_akamai_appsec_version_notes_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_version_notes_test.go @@ -36,7 +36,7 @@ func TestAkamaiVersionNotes_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSVersionNotes/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_waf_mode_test.go b/pkg/providers/appsec/data_akamai_appsec_waf_mode_test.go index dfee987bc..094db8d36 100644 --- a/pkg/providers/appsec/data_akamai_appsec_waf_mode_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_waf_mode_test.go @@ -36,7 +36,7 @@ func TestAkamaiWAFMode_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSWAFMode/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_wap_selected_hostnames_test.go b/pkg/providers/appsec/data_akamai_appsec_wap_selected_hostnames_test.go index cb6750c6e..cd21d3606 100644 --- a/pkg/providers/appsec/data_akamai_appsec_wap_selected_hostnames_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_wap_selected_hostnames_test.go @@ -38,7 +38,7 @@ func TestAkamaiWAPSelectedHostnames_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSWAPSelectedHostnames/match_by_id.tf"), @@ -80,7 +80,7 @@ func TestAkamaiWAPSelectedHostnames_data_error_retrieving_hostnames(t *testing.T useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSWAPSelectedHostnames/match_by_id.tf"), @@ -132,7 +132,7 @@ func TestAkamaiWAPSelectedHostnames_NonWAP_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSWAPSelectedHostnames/match_by_id.tf"), diff --git a/pkg/providers/appsec/provider_test.go b/pkg/providers/appsec/provider_test.go index 90c5973a2..38e3003bd 100644 --- a/pkg/providers/appsec/provider_test.go +++ b/pkg/providers/appsec/provider_test.go @@ -1,57 +1,15 @@ package appsec import ( - "context" - "log" - "os" "sync" "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/hashicorp/terraform-plugin-go/tfprotov6" - "github.com/hashicorp/terraform-plugin-mux/tf5to6server" - "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" ) -var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) - func TestMain(m *testing.M) { - testAccSDKProvider := akamai.NewSDKProvider(NewSubprovider())() - testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ - "akamai": func() (tfprotov6.ProviderServer, error) { - sdkProviderV6, err := tf5to6server.UpgradeServer( - context.Background(), - testAccSDKProvider.GRPCProvider, - ) - if err != nil { - return nil, err - } - - providers := []func() tfprotov6.ProviderServer{ - func() tfprotov6.ProviderServer { - return sdkProviderV6 - }, - } - - muxServer, err := tf6muxserver.NewMuxServer(context.Background(), providers...) - if err != nil { - return nil, err - } - - return muxServer.ProviderServer(), nil - }, - } - - if err := testutils.TFTestSetup(); err != nil { - log.Fatal(err) - } - exitCode := m.Run() - if err := testutils.TFTestTeardown(); err != nil { - log.Fatal(err) - } - os.Exit(exitCode) + testutils.TestRunner(m) } // Only allow one test at a time to patch the client via useClient() diff --git a/pkg/providers/appsec/resource_akamai_appsec_activations_test.go b/pkg/providers/appsec/resource_akamai_appsec_activations_test.go index 135f657b7..cb4d0f791 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_activations_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_activations_test.go @@ -76,7 +76,7 @@ func TestAkamaiActivations_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResActivations/match_by_id.tf"), @@ -159,7 +159,7 @@ func TestAkamaiActivations_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResActivations/match_by_id.tf"), @@ -288,7 +288,7 @@ func TestAkamaiActivations_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResActivations/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_attack_payload_logging_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_attack_payload_logging_test.go index d34dfb85c..a9bf2aefe 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_attack_payload_logging_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_attack_payload_logging_test.go @@ -84,7 +84,7 @@ func TestAkamaiAdvancedSettingsAttackPayloadLoggingConfig(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsAttackPayloadLogging/match_by_id.tf"), @@ -123,7 +123,7 @@ func TestAkamaiAdvancedSettingsAttackPayloadLoggingConfig(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsAttackPayloadLogging/match_by_id.tf"), @@ -163,7 +163,7 @@ func TestAkamaiAdvancedSettingsAttackPayloadLoggingConfig(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsAttackPayloadLogging/update_by_policy_id.tf"), @@ -204,7 +204,7 @@ func TestAkamaiAdvancedSettingsAttackPayloadLoggingConfig(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsAttackPayloadLogging/update_by_policy_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_evasive_path_match_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_evasive_path_match_test.go index 4a7cd4435..50c05068a 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_evasive_path_match_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_evasive_path_match_test.go @@ -54,7 +54,7 @@ func TestAkamaiAdvancedSettingsEvasivePathMatch_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsEvasivePathMatch/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_logging_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_logging_test.go index ee65f42fc..cd899dfeb 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_logging_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_logging_test.go @@ -55,7 +55,7 @@ func TestAkamaiAdvancedSettingsLogging_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsLogging/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pii_learning_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pii_learning_test.go index 7fc5fe70d..2a7962843 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pii_learning_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pii_learning_test.go @@ -75,7 +75,7 @@ func TestAkamaiAdvancedSettingsPIILearning_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsPIILearning/match_by_id.tf"), @@ -135,7 +135,7 @@ func TestAkamaiAdvancedSettingsPIILearning_res_api_call_failure(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsPIILearning/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pragma_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pragma_test.go index 0e3db1ccf..545e43dc4 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pragma_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pragma_test.go @@ -54,7 +54,7 @@ func TestAkamaiAdvancedSettingsPragma_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsPragma/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_prefetch_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_prefetch_test.go index 8825c07a6..c012651dd 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_prefetch_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_prefetch_test.go @@ -54,7 +54,7 @@ func TestAkamaiAdvancedSettingsPrefetch_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsPrefetch/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_request_body_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_request_body_test.go index e59be356a..311263553 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_request_body_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_request_body_test.go @@ -76,7 +76,7 @@ func TestAkamaiAdvancedSettingsRequestBodyResConfig(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsRequestBody/match_by_id.tf"), @@ -107,7 +107,7 @@ func TestAkamaiAdvancedSettingsRequestBodyResConfig(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsRequestBody/match_by_id.tf"), @@ -140,7 +140,7 @@ func TestAkamaiAdvancedSettingsRequestBodyResConfig(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsRequestBody/update_by_policy_id.tf"), @@ -174,7 +174,7 @@ func TestAkamaiAdvancedSettingsRequestBodyResConfig(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAdvancedSettingsRequestBody/update_by_policy_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_api_constraints_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_api_constraints_protection_test.go index 8e934ed4a..b881b8665 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_api_constraints_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_api_constraints_protection_test.go @@ -90,7 +90,7 @@ func TestAkamaiAPICoProtection_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAPIConstraintsProtection/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_api_request_constraints_test.go b/pkg/providers/appsec/resource_akamai_appsec_api_request_constraints_test.go index 755060973..7876e7853 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_api_request_constraints_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_api_request_constraints_test.go @@ -54,7 +54,7 @@ func TestAkamaiApiRequestConstraints_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResApiRequestConstraints/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_attack_group_test.go b/pkg/providers/appsec/resource_akamai_appsec_attack_group_test.go index beab7d82e..9a39b7816 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_attack_group_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_attack_group_test.go @@ -55,7 +55,7 @@ func TestAkamaiAttackGroup_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAttackGroup/match_by_id.tf"), @@ -104,7 +104,7 @@ func TestAkamaiAttackGroup_res_error_updating_attack_group(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResAttackGroup/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_bypass_network_lists_test.go b/pkg/providers/appsec/resource_akamai_appsec_bypass_network_lists_test.go index d4389095c..fee94eef2 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_bypass_network_lists_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_bypass_network_lists_test.go @@ -54,7 +54,7 @@ func TestAkamaiBypassNetworkLists_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResBypassNetworkLists/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_configuration_rename_test.go b/pkg/providers/appsec/resource_akamai_appsec_configuration_rename_test.go index 208f45ea2..95461771e 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_configuration_rename_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_configuration_rename_test.go @@ -36,7 +36,7 @@ func TestAkamaiConfigurationRename_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResConfigurationRename/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_configuration_test.go b/pkg/providers/appsec/resource_akamai_appsec_configuration_test.go index 09631cce2..ee3628152 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_configuration_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_configuration_test.go @@ -65,7 +65,7 @@ func TestAkamaiConfiguration_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResConfiguration/match_by_id.tf"), @@ -138,7 +138,7 @@ func TestAkamaiConfiguration_res_error_updating_configuration(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResConfiguration/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_custom_deny_test.go b/pkg/providers/appsec/resource_akamai_appsec_custom_deny_test.go index fdd83e198..766291277 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_custom_deny_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_custom_deny_test.go @@ -68,7 +68,7 @@ func TestAkamaiCustomDeny_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCustomDeny/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_custom_rule_action_test.go b/pkg/providers/appsec/resource_akamai_appsec_custom_rule_action_test.go index e6c75d1c2..9d34104ec 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_custom_rule_action_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_custom_rule_action_test.go @@ -42,7 +42,7 @@ func TestAkamaiCustomRuleAction_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCustomRuleAction/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_custom_rule_test.go b/pkg/providers/appsec/resource_akamai_appsec_custom_rule_test.go index ac1064ad6..120c12b78 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_custom_rule_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_custom_rule_test.go @@ -78,7 +78,7 @@ func TestAkamaiCustomRule_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCustomRule/match_by_id.tf"), @@ -166,7 +166,7 @@ func TestAkamaiCustomRule_res_error_removing_active_rule(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCustomRule/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_group_test.go b/pkg/providers/appsec/resource_akamai_appsec_eval_group_test.go index 847b42ba9..701acb2c6 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval_group_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_group_test.go @@ -55,7 +55,7 @@ func TestAkamaiEvalGroup_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResEvalGroup/match_by_id.tf"), @@ -104,7 +104,7 @@ func TestAkamaiEvalGroup_res_error_updating_eval_group(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResEvalGroup/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_test.go b/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_test.go index 32286e390..90c9b3a5f 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_test.go @@ -45,7 +45,7 @@ func TestAkamaiEvalPenaltyBox_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResEvalPenaltyBox/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_rule_test.go b/pkg/providers/appsec/resource_akamai_appsec_eval_rule_test.go index e41a771e9..133db9bf6 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval_rule_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_rule_test.go @@ -54,7 +54,7 @@ func TestAkamaiEvalRule_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResEvalRule/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_test.go b/pkg/providers/appsec/resource_akamai_appsec_eval_test.go index 2683b65c1..446474a58 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_test.go @@ -54,7 +54,7 @@ func TestAkamaiEval_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResEval/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_ip_geo_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_ip_geo_protection_test.go index fec2998db..4bc97d430 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_ip_geo_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_ip_geo_protection_test.go @@ -90,7 +90,7 @@ func TestAkamaiIPGeoProtection_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResIPGeoProtection/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_ip_geo_test.go b/pkg/providers/appsec/resource_akamai_appsec_ip_geo_test.go index c682bf474..3e79ac018 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_ip_geo_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_ip_geo_test.go @@ -110,7 +110,7 @@ func TestAkamaiIPGeo_res_block(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResIPGeo/match_by_id.tf"), @@ -174,7 +174,7 @@ func TestAkamaiIPGeo_res_block(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResIPGeo/ukraine_match_by_id.tf"), @@ -215,7 +215,7 @@ func TestAkamaiIPGeo_res_block(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResIPGeo/allow.tf"), @@ -248,7 +248,7 @@ func TestAkamaiIPGeo_res_block(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResIPGeo/block_with_empty_lists.tf"), @@ -282,7 +282,7 @@ func TestAkamaiIPGeo_res_block(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResIPGeo/allow_with_empty_lists.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_action_test.go b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_action_test.go index c535a43d3..15e1d1ba0 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_action_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_action_test.go @@ -95,7 +95,7 @@ func TestAkamaiMalwarePolicyAction_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResMalwarePolicyAction/create.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_actions_test.go b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_actions_test.go index a1ac96cb4..7f52002a7 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_actions_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_actions_test.go @@ -35,7 +35,7 @@ func TestAkamaiMalwarePolicyActions_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: false, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResMalwarePolicyActions/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_test.go b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_test.go index 29c9964f7..f98c82365 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_test.go @@ -71,7 +71,7 @@ func TestAkamaiMalwarePolicy_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResMalwarePolicy/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_malware_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_malware_protection_test.go index 80cef6291..f82097cc7 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_malware_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_malware_protection_test.go @@ -69,7 +69,7 @@ func TestAkamaiMalwareProtection_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResMalwareProtection/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_match_target_sequence_test.go b/pkg/providers/appsec/resource_akamai_appsec_match_target_sequence_test.go index 1cd2fd209..86604bc78 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_match_target_sequence_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_match_target_sequence_test.go @@ -45,7 +45,7 @@ func TestAkamaiMatchTargetSequence_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResMatchTargetSequence/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_match_target_test.go b/pkg/providers/appsec/resource_akamai_appsec_match_target_test.go index 428dc1e9f..9965a21ab 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_match_target_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_match_target_test.go @@ -75,7 +75,7 @@ func TestAkamaiMatchTarget_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResMatchTarget/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_penalty_box_test.go b/pkg/providers/appsec/resource_akamai_appsec_penalty_box_test.go index 2eb65968f..0d09cc2a7 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_penalty_box_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_penalty_box_test.go @@ -45,7 +45,7 @@ func TestAkamaiPenaltyBox_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResPenaltyBox/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_rate_policy_action_test.go b/pkg/providers/appsec/resource_akamai_appsec_rate_policy_action_test.go index 792d8f385..7c1c8b965 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rate_policy_action_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rate_policy_action_test.go @@ -95,7 +95,7 @@ func TestAkamaiRatePolicyAction_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResRatePolicyAction/create.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_rate_policy_test.go b/pkg/providers/appsec/resource_akamai_appsec_rate_policy_test.go index 769e6d885..743506aae 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rate_policy_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rate_policy_test.go @@ -76,7 +76,7 @@ func TestAkamaiRatePolicy_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResRatePolicy/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_rate_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_rate_protection_test.go index 1ba939f73..2c01b3527 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rate_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rate_protection_test.go @@ -90,7 +90,7 @@ func TestAkamaiRateProtection_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResRateProtection/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_reputation_analysis_test.go b/pkg/providers/appsec/resource_akamai_appsec_reputation_analysis_test.go index b1b0aa57f..5d5c95bed 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_reputation_analysis_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_reputation_analysis_test.go @@ -54,7 +54,7 @@ func TestAkamaiReputationAnalysis_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResReputationAnalysis/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_action_test.go b/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_action_test.go index 246899bba..f28f4204a 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_action_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_action_test.go @@ -45,7 +45,7 @@ func TestAkamaiReputationProfileAction_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResReputationProfileAction/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_test.go b/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_test.go index 63d3776ab..5e0f3771d 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_test.go @@ -54,7 +54,7 @@ func TestAkamaiReputationProfile_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: false, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResReputationProfile/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_reputation_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_reputation_protection_test.go index 2f5d80a08..52de3c1c7 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_reputation_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_reputation_protection_test.go @@ -90,7 +90,7 @@ func TestAkamaiReputationProtection_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResReputationProtection/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_rule_test.go b/pkg/providers/appsec/resource_akamai_appsec_rule_test.go index 6fe3adbd3..0937b1755 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rule_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rule_test.go @@ -55,7 +55,7 @@ func TestAkamaiRule_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResRule/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_rule_upgrade_test.go b/pkg/providers/appsec/resource_akamai_appsec_rule_upgrade_test.go index e658aa29a..c75f33732 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rule_upgrade_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rule_upgrade_test.go @@ -45,7 +45,7 @@ func TestAkamaiRuleUpgrade_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResRuleUpgrade/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_security_policy_default_protections_test.go b/pkg/providers/appsec/resource_akamai_appsec_security_policy_default_protections_test.go index bf59e9e6b..28a77bd21 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_security_policy_default_protections_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_security_policy_default_protections_test.go @@ -74,7 +74,7 @@ func TestAkamaiSecurityPolicyDefaultProtections_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResSecurityPolicyDefaultProtections/match_by_id.tf"), @@ -118,7 +118,7 @@ func TestAkamaiSecurityPolicyDefaultProtections_res_failure_creating_policy(t *t useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResSecurityPolicyDefaultProtections/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_security_policy_rename_test.go b/pkg/providers/appsec/resource_akamai_appsec_security_policy_rename_test.go index 355757666..3ccdce2d3 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_security_policy_rename_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_security_policy_rename_test.go @@ -45,7 +45,7 @@ func TestAkamaiSecurityPolicyRename_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResSecurityPolicyRename/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_security_policy_test.go b/pkg/providers/appsec/resource_akamai_appsec_security_policy_test.go index 7328ee5ef..7efa991e3 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_security_policy_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_security_policy_test.go @@ -54,7 +54,7 @@ func TestAkamaiSecurityPolicy_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResSecurityPolicy/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_selected_hostname_test.go b/pkg/providers/appsec/resource_akamai_appsec_selected_hostname_test.go index 224207fff..42edd45d2 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_selected_hostname_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_selected_hostname_test.go @@ -57,7 +57,7 @@ func TestAkamaiSelectedHostname_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResSelectedHostname/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_siem_settings_test.go b/pkg/providers/appsec/resource_akamai_appsec_siem_settings_test.go index a62655e78..9b187d9a7 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_siem_settings_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_siem_settings_test.go @@ -54,7 +54,7 @@ func TestAkamaiSiemSettings_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResSiemSettings/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_slow_post_protection_setting_test.go b/pkg/providers/appsec/resource_akamai_appsec_slow_post_protection_setting_test.go index 9ecc79f56..1fbf236f5 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_slow_post_protection_setting_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_slow_post_protection_setting_test.go @@ -55,7 +55,7 @@ func TestAkamaiSlowPostProtectionSetting_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResSlowPostProtectionSetting/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_slowpost_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_slowpost_protection_test.go index 328cebee3..5721ba6cd 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_slowpost_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_slowpost_protection_test.go @@ -69,7 +69,7 @@ func TestAkamaiSlowPostProtection_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResSlowPostProtection/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_threat_intel_test.go b/pkg/providers/appsec/resource_akamai_appsec_threat_intel_test.go index 282816485..4bbeebaf8 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_threat_intel_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_threat_intel_test.go @@ -45,7 +45,7 @@ func TestAkamaiThreatIntel_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThreatIntel/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_version_notes_test.go b/pkg/providers/appsec/resource_akamai_appsec_version_notes_test.go index 3b74a1e1c..bc9ac9882 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_version_notes_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_version_notes_test.go @@ -45,7 +45,7 @@ func TestAkamaiVersionNotes_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResVersionNotes/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_waf_mode_test.go b/pkg/providers/appsec/resource_akamai_appsec_waf_mode_test.go index c324849cb..d2e6a09ee 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_waf_mode_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_waf_mode_test.go @@ -45,7 +45,7 @@ func TestAkamaiWAFMode_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResWAFMode/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_waf_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_waf_protection_test.go index 1d4c4a9c6..b25e833cf 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_waf_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_waf_protection_test.go @@ -69,7 +69,7 @@ func TestAkamaiWAFProtection_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResWAFProtection/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_wap_selected_hostnames_test.go b/pkg/providers/appsec/resource_akamai_appsec_wap_selected_hostnames_test.go index e646db9ee..df1d449b8 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_wap_selected_hostnames_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_wap_selected_hostnames_test.go @@ -54,7 +54,7 @@ func TestAkamaiWAPSelectedHostnames_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResWAPSelectedHostnames/match_by_id.tf"), @@ -112,7 +112,7 @@ func TestAkamaiWAPSelectedHostnames_res_error_retrieving_hostnames(t *testing.T) useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResWAPSelectedHostnames/match_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action_test.go b/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action_test.go index 301b993d6..fe2c55eae 100644 --- a/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -41,7 +42,7 @@ func TestDataAkamaiBotCategoryAction(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataAkamaiBotCategoryAction/basic.tf"), @@ -77,7 +78,7 @@ func TestDataAkamaiBotCategoryAction(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataAkamaiBotCategoryAction/filter_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_akamai_bot_category_test.go b/pkg/providers/botman/data_akamai_botman_akamai_bot_category_test.go index 58187133c..20cceb9be 100644 --- a/pkg/providers/botman/data_akamai_botman_akamai_bot_category_test.go +++ b/pkg/providers/botman/data_akamai_botman_akamai_bot_category_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -39,7 +40,7 @@ func TestDataAkamaiBotCategory(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataAkamaiBotCategory/basic.tf"), @@ -73,7 +74,7 @@ func TestDataAkamaiBotCategory(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataAkamaiBotCategory/filter_by_name.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_akamai_defined_bot_test.go b/pkg/providers/botman/data_akamai_botman_akamai_defined_bot_test.go index c0493420d..454d13252 100644 --- a/pkg/providers/botman/data_akamai_botman_akamai_defined_bot_test.go +++ b/pkg/providers/botman/data_akamai_botman_akamai_defined_bot_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -39,7 +40,7 @@ func TestDataAkamaiDefinedBot(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataAkamaiDefinedBot/basic.tf"), @@ -73,7 +74,7 @@ func TestDataAkamaiDefinedBot(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataAkamaiDefinedBot/filter_by_name.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_test.go b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_test.go index e0da5e8ca..629cb83a7 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -24,7 +25,7 @@ func TestDataBotAnalyticsCookie(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataBotAnalyticsCookie/basic.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values_test.go b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values_test.go index 0453d3f14..680a13001 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -38,7 +39,7 @@ func TestDataBotAnalyticsCookieValue(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataBotAnalyticsCookieValues/basic.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_bot_category_exception_test.go b/pkg/providers/botman/data_akamai_botman_bot_category_exception_test.go index b0a1e5fcc..cae3463a3 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_category_exception_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_category_exception_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -24,7 +25,7 @@ func TestDataBotCategoryException(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataBotCategoryException/basic.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_bot_detection_action_test.go b/pkg/providers/botman/data_akamai_botman_bot_detection_action_test.go index 28733e000..620e6cec2 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_detection_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_detection_action_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -41,7 +42,7 @@ func TestDataBotDetectionAction(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataBotDetectionAction/basic.tf"), @@ -77,7 +78,7 @@ func TestDataBotDetectionAction(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataBotDetectionAction/filter_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_bot_detection_test.go b/pkg/providers/botman/data_akamai_botman_bot_detection_test.go index 779bd9d5f..56b4b0771 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_detection_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_detection_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -39,7 +40,7 @@ func TestDataBotDetection(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataBotDetection/basic.tf"), @@ -73,7 +74,7 @@ func TestDataBotDetection(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataBotDetection/filter_by_name.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report_test.go b/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report_test.go index 056947c70..f723c4f74 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -41,7 +42,7 @@ func TestDataBotEndpointCoverageReport(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataBotEndpointCoverageReport/basic.tf"), @@ -77,7 +78,7 @@ func TestDataBotEndpointCoverageReport(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataBotEndpointCoverageReport/filter_by_id.tf"), @@ -121,7 +122,7 @@ func TestDataBotEndpointCoverageReport(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataBotEndpointCoverageReport/with_config.tf"), @@ -157,7 +158,7 @@ func TestDataBotEndpointCoverageReport(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataBotEndpointCoverageReport/with_config_filter_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_bot_management_settings_test.go b/pkg/providers/botman/data_akamai_botman_bot_management_settings_test.go index 0683652de..400c87b7a 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_management_settings_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_management_settings_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -24,7 +25,7 @@ func TestDataBotManagementSettings(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataBotManagementSettings/basic.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_challenge_action_test.go b/pkg/providers/botman/data_akamai_botman_challenge_action_test.go index 2d3e20624..e90bcf96d 100644 --- a/pkg/providers/botman/data_akamai_botman_challenge_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_challenge_action_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -41,7 +42,7 @@ func TestDataChallengeAction(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataChallengeAction/basic.tf"), @@ -77,7 +78,7 @@ func TestDataChallengeAction(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataChallengeAction/filter_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_challenge_injection_rules_test.go b/pkg/providers/botman/data_akamai_botman_challenge_injection_rules_test.go index 9cda30ba3..a6143f47b 100644 --- a/pkg/providers/botman/data_akamai_botman_challenge_injection_rules_test.go +++ b/pkg/providers/botman/data_akamai_botman_challenge_injection_rules_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -24,7 +25,7 @@ func TestDataChallengeInjectionRules(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataChallengeInjectionRules/basic.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_challenge_interception_rules_test.go b/pkg/providers/botman/data_akamai_botman_challenge_interception_rules_test.go index f8e536f1c..82757d095 100644 --- a/pkg/providers/botman/data_akamai_botman_challenge_interception_rules_test.go +++ b/pkg/providers/botman/data_akamai_botman_challenge_interception_rules_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -24,7 +25,7 @@ func TestDataChallengeInterceptionRules(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataChallengeInterceptionRules/basic.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_client_side_security_test.go b/pkg/providers/botman/data_akamai_botman_client_side_security_test.go index 8aa8231f7..2e97f28ed 100644 --- a/pkg/providers/botman/data_akamai_botman_client_side_security_test.go +++ b/pkg/providers/botman/data_akamai_botman_client_side_security_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -24,7 +25,7 @@ func TestDataClientSideSecurity(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataClientSideSecurity/basic.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_conditional_action_test.go b/pkg/providers/botman/data_akamai_botman_conditional_action_test.go index 079f935aa..d4d97162e 100644 --- a/pkg/providers/botman/data_akamai_botman_conditional_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_conditional_action_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -41,7 +42,7 @@ func TestDataConditionalAction(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataConditionalAction/basic.tf"), @@ -77,7 +78,7 @@ func TestDataConditionalAction(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataConditionalAction/filter_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_custom_bot_category_action_test.go b/pkg/providers/botman/data_akamai_botman_custom_bot_category_action_test.go index c331fc9cd..bddd8b04e 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_bot_category_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_bot_category_action_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -41,7 +42,7 @@ func TestDataCustomBotCategoryAction(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataCustomBotCategoryAction/basic.tf"), @@ -77,7 +78,7 @@ func TestDataCustomBotCategoryAction(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataCustomBotCategoryAction/filter_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence_test.go b/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence_test.go index 2a4f9a15c..bdd211992 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -25,7 +26,7 @@ func TestDataCustomBotCategorySequence(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataCustomBotCategorySequence/basic.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_custom_bot_category_test.go b/pkg/providers/botman/data_akamai_botman_custom_bot_category_test.go index 2d90a9051..52ab0db62 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_bot_category_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_bot_category_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -41,7 +42,7 @@ func TestDataCustomBotCategory(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataCustomBotCategory/basic.tf"), @@ -77,7 +78,7 @@ func TestDataCustomBotCategory(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataCustomBotCategory/filter_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_custom_client_sequence_test.go b/pkg/providers/botman/data_akamai_botman_custom_client_sequence_test.go index e9acaad80..f6a7b9e46 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_client_sequence_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_client_sequence_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -25,7 +26,7 @@ func TestDataCustomClientSequence(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataCustomClientSequence/basic.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_custom_client_test.go b/pkg/providers/botman/data_akamai_botman_custom_client_test.go index f1949bb4b..a3e9a1569 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_client_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_client_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -41,7 +42,7 @@ func TestDataCustomClient(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataCustomClient/basic.tf"), @@ -77,7 +78,7 @@ func TestDataCustomClient(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataCustomClient/filter_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_custom_defined_bot_test.go b/pkg/providers/botman/data_akamai_botman_custom_defined_bot_test.go index 761cd54ad..5d2a2e82f 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_defined_bot_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_defined_bot_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -41,7 +42,7 @@ func TestDataCustomDefinedBot(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataCustomDefinedBot/basic.tf"), @@ -77,7 +78,7 @@ func TestDataCustomDefinedBot(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataCustomDefinedBot/filter_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_custom_deny_action_test.go b/pkg/providers/botman/data_akamai_botman_custom_deny_action_test.go index 810386a45..cd927f4c8 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_deny_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_deny_action_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -41,7 +42,7 @@ func TestDataCustomDenyAction(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataCustomDenyAction/basic.tf"), @@ -77,7 +78,7 @@ func TestDataCustomDenyAction(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataCustomDenyAction/filter_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_javascript_injection_test.go b/pkg/providers/botman/data_akamai_botman_javascript_injection_test.go index 942d343b9..2a08c5a4c 100644 --- a/pkg/providers/botman/data_akamai_botman_javascript_injection_test.go +++ b/pkg/providers/botman/data_akamai_botman_javascript_injection_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -24,7 +25,7 @@ func TestDataJavascriptInjection(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataJavascriptInjection/basic.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot_test.go b/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot_test.go index 17f6c9dfe..14ed44d06 100644 --- a/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot_test.go +++ b/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -41,7 +42,7 @@ func TestDataRecategorizedAkamaiDefinedBot(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataRecategorizedAkamaiDefinedBot/basic.tf"), @@ -77,7 +78,7 @@ func TestDataRecategorizedAkamaiDefinedBot(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataRecategorizedAkamaiDefinedBot/filter_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_response_action_test.go b/pkg/providers/botman/data_akamai_botman_response_action_test.go index 691ca41b6..0eb58d95a 100644 --- a/pkg/providers/botman/data_akamai_botman_response_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_response_action_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -41,7 +42,7 @@ func TestDataResponseAction(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataResponseAction/basic.tf"), @@ -77,7 +78,7 @@ func TestDataResponseAction(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataResponseAction/filter_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_serve_alternate_action_test.go b/pkg/providers/botman/data_akamai_botman_serve_alternate_action_test.go index faae3657d..d14201e37 100644 --- a/pkg/providers/botman/data_akamai_botman_serve_alternate_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_serve_alternate_action_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -41,7 +42,7 @@ func TestDataServeAlternateAction(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataServeAlternateAction/basic.tf"), @@ -77,7 +78,7 @@ func TestDataServeAlternateAction(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataServeAlternateAction/filter_by_id.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection_test.go b/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection_test.go index cdbdb7931..6c01e0d80 100644 --- a/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection_test.go +++ b/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -24,7 +25,7 @@ func TestDataTransactionalEndpointProtection(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataTransactionalEndpointProtection/basic.tf"), diff --git a/pkg/providers/botman/data_akamai_botman_transactional_endpoint_test.go b/pkg/providers/botman/data_akamai_botman_transactional_endpoint_test.go index 71f3bc81b..db61dda33 100644 --- a/pkg/providers/botman/data_akamai_botman_transactional_endpoint_test.go +++ b/pkg/providers/botman/data_akamai_botman_transactional_endpoint_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -41,7 +42,7 @@ func TestDataTransactionalEndpoint(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataTransactionalEndpoint/basic.tf"), @@ -77,7 +78,7 @@ func TestDataTransactionalEndpoint(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestDataTransactionalEndpoint/filter_by_id.tf"), diff --git a/pkg/providers/botman/provider_test.go b/pkg/providers/botman/provider_test.go index 1d9aca1df..14e228c51 100644 --- a/pkg/providers/botman/provider_test.go +++ b/pkg/providers/botman/provider_test.go @@ -4,56 +4,15 @@ import ( "bytes" "context" "encoding/json" - "log" - "os" "sync" "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/hashicorp/terraform-plugin-go/tfprotov6" - "github.com/hashicorp/terraform-plugin-mux/tf5to6server" - "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" ) -var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) - func TestMain(m *testing.M) { - testAccSDKProvider := akamai.NewSDKProvider(NewSubprovider())() - testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ - "akamai": func() (tfprotov6.ProviderServer, error) { - sdkProviderV6, err := tf5to6server.UpgradeServer( - context.Background(), - testAccSDKProvider.GRPCProvider, - ) - if err != nil { - return nil, err - } - - providers := []func() tfprotov6.ProviderServer{ - func() tfprotov6.ProviderServer { - return sdkProviderV6 - }, - } - - muxServer, err := tf6muxserver.NewMuxServer(context.Background(), providers...) - if err != nil { - return nil, err - } - - return muxServer.ProviderServer(), nil - }, - } - - if err := testutils.TFTestSetup(); err != nil { - log.Fatal(err) - } - exitCode := m.Run() - if err := testutils.TFTestTeardown(); err != nil { - log.Fatal(err) - } - os.Exit(exitCode) + testutils.TestRunner(m) } // Only allow one test at a time to patch the client via useClient() diff --git a/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action_test.go b/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action_test.go index 5ff7be374..6ca7f06b6 100644 --- a/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -66,7 +67,7 @@ func TestResourceAkamaiBotCategoryAction(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceAkamaiBotCategoryAction/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie_test.go b/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie_test.go index a6318497a..33dba56e7 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie_test.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -57,7 +58,7 @@ func TestResourceBotAnalyticsCookie(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceBotAnalyticsCookie/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_bot_category_exception_test.go b/pkg/providers/botman/resource_akamai_botman_bot_category_exception_test.go index 623346599..4413caa8d 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_category_exception_test.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_category_exception_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -61,7 +62,7 @@ func TestResourceBotCategoryException(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceBotCategoryException/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_bot_detection_action_test.go b/pkg/providers/botman/resource_akamai_botman_bot_detection_action_test.go index d42a73bbc..81939218c 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_detection_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_detection_action_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -66,7 +67,7 @@ func TestResourceBotDetectionAction(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceBotDetectionAction/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_bot_management_settings_test.go b/pkg/providers/botman/resource_akamai_botman_bot_management_settings_test.go index 81cc5fe91..781edc386 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_management_settings_test.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_management_settings_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -61,7 +62,7 @@ func TestResourceBotManagementSettings(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceBotManagementSettings/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_challenge_action_test.go b/pkg/providers/botman/resource_akamai_botman_challenge_action_test.go index ee9569db7..5d14b168b 100644 --- a/pkg/providers/botman/resource_akamai_botman_challenge_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_challenge_action_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -70,7 +71,7 @@ func TestResourceChallengeAction(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceChallengeAction/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules_test.go b/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules_test.go index 015b13bb0..a4465ac66 100644 --- a/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules_test.go +++ b/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -57,7 +58,7 @@ func TestResourceChallengeInjectionRules(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceChallengeInjectionRules/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules_test.go b/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules_test.go index e004c0e40..5cc735912 100644 --- a/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules_test.go +++ b/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -57,7 +58,7 @@ func TestResourceChallengeInterceptionRules(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceChallengeInterceptionRules/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_client_side_security_test.go b/pkg/providers/botman/resource_akamai_botman_client_side_security_test.go index ee01269f0..5aeb7d9e0 100644 --- a/pkg/providers/botman/resource_akamai_botman_client_side_security_test.go +++ b/pkg/providers/botman/resource_akamai_botman_client_side_security_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -57,7 +58,7 @@ func TestResourceClientSideSecurity(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceClientSideSecurity/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_conditional_action_test.go b/pkg/providers/botman/resource_akamai_botman_conditional_action_test.go index cda509e09..1480562df 100644 --- a/pkg/providers/botman/resource_akamai_botman_conditional_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_conditional_action_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -70,7 +71,7 @@ func TestResourceConditionalAction(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceConditionalAction/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action_test.go b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action_test.go index ac5cbb974..6084826a8 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -66,7 +67,7 @@ func TestResourceCustomBotCategoryAction(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceCustomBotCategoryAction/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence_test.go b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence_test.go index aa6507ef8..2d3fd7fda 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" @@ -56,7 +57,7 @@ func TestResourceCustomBotCategorySequence(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceCustomBotCategorySequence/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_test.go b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_test.go index 4e2c64c3b..c7e20e400 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -70,7 +71,7 @@ func TestResourceCustomBotCategory(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceCustomBotCategory/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_custom_client_sequence_test.go b/pkg/providers/botman/resource_akamai_botman_custom_client_sequence_test.go index 8651c4750..c99edd237 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_client_sequence_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_client_sequence_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" @@ -56,7 +57,7 @@ func TestResourceCustomClientSequence(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceCustomClientSequence/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_custom_client_test.go b/pkg/providers/botman/resource_akamai_botman_custom_client_test.go index 712ab6c6d..e2e9fb646 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_client_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_client_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -70,7 +71,7 @@ func TestResourceCustomClient(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceCustomClient/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_custom_defined_bot_test.go b/pkg/providers/botman/resource_akamai_botman_custom_defined_bot_test.go index 82b34f201..2d5975564 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_defined_bot_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_defined_bot_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -70,7 +71,7 @@ func TestResourceCustomDefinedBot(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceCustomDefinedBot/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_custom_deny_action_test.go b/pkg/providers/botman/resource_akamai_botman_custom_deny_action_test.go index 3f61ce80f..1ccb1f2cd 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_deny_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_deny_action_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -70,7 +71,7 @@ func TestResourceCustomDenyAction(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceCustomDenyAction/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_javascript_injection_test.go b/pkg/providers/botman/resource_akamai_botman_javascript_injection_test.go index 34dbd5af6..c5459e40c 100644 --- a/pkg/providers/botman/resource_akamai_botman_javascript_injection_test.go +++ b/pkg/providers/botman/resource_akamai_botman_javascript_injection_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -61,7 +62,7 @@ func TestResourceJavascriptInjection(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceJavascriptInjection/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot_test.go b/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot_test.go index 9795599ea..52743a8b4 100644 --- a/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot_test.go +++ b/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -66,7 +67,7 @@ func TestResourceRecategorizedAkamaiDefinedBot(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceRecategorizedAkamaiDefinedBot/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_serve_alternate_action_test.go b/pkg/providers/botman/resource_akamai_botman_serve_alternate_action_test.go index 89a31d200..e40097d43 100644 --- a/pkg/providers/botman/resource_akamai_botman_serve_alternate_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_serve_alternate_action_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -70,7 +71,7 @@ func TestResourceServeAlternateAction(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceServeAlternateAction/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection_test.go b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection_test.go index 7eee58533..ca68144a7 100644 --- a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection_test.go +++ b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -57,7 +58,7 @@ func TestResourceTransactionalEndpointProtection(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceTransactionalEndpointProtection/create.tf"), diff --git a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_test.go b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_test.go index 371425c77..c611841c1 100644 --- a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_test.go +++ b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -75,7 +76,7 @@ func TestResourceTransactionalEndpoint(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/TestResourceTransactionalEndpoint/create.tf"), diff --git a/pkg/providers/clientlists/data_akamai_clientlist_lists_test.go b/pkg/providers/clientlists/data_akamai_clientlist_lists_test.go index 70810ff20..90f193038 100644 --- a/pkg/providers/clientlists/data_akamai_clientlist_lists_test.go +++ b/pkg/providers/clientlists/data_akamai_clientlist_lists_test.go @@ -8,6 +8,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/clientlists" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" @@ -93,7 +94,7 @@ func TestClientList_data_all_lists(t *testing.T) { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.config, diff --git a/pkg/providers/clientlists/provider_test.go b/pkg/providers/clientlists/provider_test.go index 9551d9bf3..5721467a5 100644 --- a/pkg/providers/clientlists/provider_test.go +++ b/pkg/providers/clientlists/provider_test.go @@ -1,58 +1,16 @@ package clientlists import ( - "context" "io/ioutil" - "log" - "os" "sync" "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/clientlists" - "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/hashicorp/terraform-plugin-go/tfprotov6" - "github.com/hashicorp/terraform-plugin-mux/tf5to6server" - "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" ) -var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) - func TestMain(m *testing.M) { - testAccSDKProvider := akamai.NewSDKProvider(NewSubprovider())() - testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ - "akamai": func() (tfprotov6.ProviderServer, error) { - sdkProviderV6, err := tf5to6server.UpgradeServer( - context.Background(), - testAccSDKProvider.GRPCProvider, - ) - if err != nil { - return nil, err - } - - providers := []func() tfprotov6.ProviderServer{ - func() tfprotov6.ProviderServer { - return sdkProviderV6 - }, - } - - muxServer, err := tf6muxserver.NewMuxServer(context.Background(), providers...) - if err != nil { - return nil, err - } - - return muxServer.ProviderServer(), nil - }, - } - - if err := testutils.TFTestSetup(); err != nil { - log.Fatal(err) - } - exitCode := m.Run() - if err := testutils.TFTestTeardown(); err != nil { - log.Fatal(err) - } - os.Exit(exitCode) + testutils.TestRunner(m) } // Only allow one test at a time to patch the client via useClient() diff --git a/pkg/providers/clientlists/resource_akamai_clientlists_list_activation_test.go b/pkg/providers/clientlists/resource_akamai_clientlists_list_activation_test.go index e3d41ea7d..8d434ee85 100644 --- a/pkg/providers/clientlists/resource_akamai_clientlists_list_activation_test.go +++ b/pkg/providers/clientlists/resource_akamai_clientlists_list_activation_test.go @@ -8,6 +8,7 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/clientlists" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -155,7 +156,7 @@ func TestClientListActivationResource(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/activation_create.tf", testDir)), @@ -220,7 +221,7 @@ func TestClientListActivationResource(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/activation_create.tf", testDir)), @@ -296,7 +297,7 @@ func TestClientListActivationResource(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/activation_create.tf", testDir)), @@ -352,7 +353,7 @@ func TestClientListActivationResource(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/activation_create.tf", testDir)), @@ -402,7 +403,7 @@ func TestClientListActivationResource(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/activation_create.tf", testDir)), @@ -437,7 +438,7 @@ func TestClientListActivationResource(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/activation_missing_param.tf", testDir)), @@ -465,7 +466,7 @@ func TestClientListActivationResource(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/activation_create.tf", testDir)), diff --git a/pkg/providers/clientlists/resource_akamai_clientlists_list_test.go b/pkg/providers/clientlists/resource_akamai_clientlists_list_test.go index e6c977d9e..6c736979d 100644 --- a/pkg/providers/clientlists/resource_akamai_clientlists_list_test.go +++ b/pkg/providers/clientlists/resource_akamai_clientlists_list_test.go @@ -7,6 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/clientlists" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -180,7 +181,7 @@ func TestResourceClientList(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/list_create.tf", testDir)), @@ -228,7 +229,7 @@ func TestResourceClientList(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/list_create.tf", testDir)), @@ -280,7 +281,7 @@ func TestResourceClientList(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/list_create_empty_tags.tf", testDir)), @@ -340,7 +341,7 @@ func TestResourceClientList(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/list_create.tf", testDir)), @@ -399,7 +400,7 @@ func TestResourceClientList(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/list_and_items_create.tf", testDir)), @@ -504,7 +505,7 @@ func TestResourceClientList(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/list_and_items_create.tf", testDir)), @@ -616,7 +617,7 @@ func TestResourceClientList(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/list_and_items_create.tf", testDir)), @@ -691,7 +692,7 @@ func TestResourceClientList(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/list_and_items_create_one_item.tf", testDir)), @@ -755,7 +756,7 @@ func TestResourceClientList(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/list_and_items_create_one_item.tf", testDir)), @@ -780,7 +781,7 @@ func TestResourceClientList(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/list_and_duplicate_items_create.tf", testDir)), diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule_test.go index 34b1ef87a..12fa543f7 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule_test.go @@ -47,7 +47,7 @@ func TestDataCloudletsAPIPrioritizationMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -105,7 +105,7 @@ func TestIncorrectDataCloudletsAPIPrioritizationMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule_test.go index 0db6ef8f7..e1374658a 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule_test.go @@ -50,7 +50,7 @@ func TestDataCloudletsLoadBalancerMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -100,7 +100,7 @@ func TestIncorrectDataCloudletsLoadBalancerMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_test.go index 3c1dddd76..3fa8544ef 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_test.go @@ -164,7 +164,7 @@ func TestDataApplicationLoadBalancer(t *testing.T) { test.init(client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule_test.go index 6afab37f4..8951d586b 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule_test.go @@ -54,7 +54,7 @@ func TestDataCloudletsAudienceSegmentationMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -112,7 +112,7 @@ func TestIncorrectDataCloudletsAudienceSegmentationMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule_test.go index 22601f24a..28e639790 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule_test.go @@ -59,7 +59,7 @@ func TestDataCloudletsEdgeRedirectorMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -113,7 +113,7 @@ func TestIncorrectDataCloudletsEdgeRedirectorMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule_test.go index b9af6e2ce..f42c58e3e 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule_test.go @@ -45,7 +45,7 @@ func TestDataCloudletsForwardRewriteMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -91,7 +91,7 @@ func TestIncorrectDataCloudletsForwardRewriteMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule_test.go index 79952f0e3..b029e5b77 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule_test.go @@ -45,7 +45,7 @@ func TestDataCloudletsPhasedReleaseMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -95,7 +95,7 @@ func TestIncorrectDataPhasedReleaseDeploymentMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_policy_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_policy_test.go index b0176a44a..fdcb9737a 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_policy_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_policy_test.go @@ -281,7 +281,7 @@ func TestDataCloudletsPolicy(t *testing.T) { client.On("GetPolicy", mock.Anything, mock.Anything).Return(&test.getPolicyReturn, nil) client.On("GetPolicyVersion", mock.Anything, mock.Anything).Return(&test.getPolicyVersionReturn, nil) resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule_test.go index fa4366e78..f20f23ce0 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule_test.go @@ -49,7 +49,7 @@ func TestDataCloudletsRequestControlMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -107,7 +107,7 @@ func TestIncorrectDataCloudletsRequestControlMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule_test.go index 8917082b5..54545cb5c 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule_test.go @@ -47,7 +47,7 @@ func TestDataCloudletsVisitorPrioritizationMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -102,7 +102,7 @@ func TestIncorrectDataCloudletsVisitorPrioritizationMatchRule(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/cloudlets/provider_test.go b/pkg/providers/cloudlets/provider_test.go index e4056ef02..747ab036a 100644 --- a/pkg/providers/cloudlets/provider_test.go +++ b/pkg/providers/cloudlets/provider_test.go @@ -1,72 +1,17 @@ package cloudlets import ( - "context" - "log" - "os" "sync" "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" - "github.com/hashicorp/terraform-plugin-framework/provider" - "github.com/hashicorp/terraform-plugin-framework/providerserver" - - "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/hashicorp/terraform-plugin-go/tfprotov6" - "github.com/hashicorp/terraform-plugin-mux/tf5to6server" - "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets/v3" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -) - -var ( - testAccProviders map[string]func() (tfprotov6.ProviderServer, error) - testAccPluginProvider *schema.Provider - testAccFrameworkProvider provider.Provider ) func TestMain(m *testing.M) { - testAccPluginProvider = akamai.NewPluginProvider(NewPluginSubprovider())() - testAccFrameworkProvider = akamai.NewFrameworkProvider(NewFrameworkSubprovider())() - - testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ - "akamai": func() (tfprotov6.ProviderServer, error) { - ctx := context.Background() - upgradedPluginProvider, err := tf5to6server.UpgradeServer( - context.Background(), - testAccPluginProvider.GRPCProvider, - ) - if err != nil { - return nil, err - } - providers := []func() tfprotov6.ProviderServer{ - func() tfprotov6.ProviderServer { - return upgradedPluginProvider - }, - providerserver.NewProtocol6( - testAccFrameworkProvider, - ), - } - - muxServer, err := tf6muxserver.NewMuxServer(ctx, providers...) - if err != nil { - return nil, err - } - - return muxServer.ProviderServer(), nil - }, - } - - if err := testutils.TFTestSetup(); err != nil { - log.Fatal(err) - } - exitCode := m.Run() - if err := testutils.TFTestTeardown(); err != nil { - log.Fatal(err) - } - os.Exit(exitCode) + testutils.TestRunner(m) } // Only allow one test at a time to patch the client via useClient() diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_activation_test.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_activation_test.go index 6fd454fa0..09c35bd04 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_activation_test.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_activation_test.go @@ -474,7 +474,7 @@ func TestResourceCloudletsApplicationLoadBalancerActivation(t *testing.T) { test.init(client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: test.steps, }) diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_test.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_test.go index d877daa90..73e9fe03a 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_test.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_test.go @@ -235,7 +235,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -275,7 +275,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -315,7 +315,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -355,7 +355,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -402,7 +402,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -447,7 +447,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -513,7 +513,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -539,7 +539,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -626,7 +626,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -650,7 +650,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -679,7 +679,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -706,7 +706,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -737,7 +737,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -771,7 +771,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -805,7 +805,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), @@ -827,7 +827,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_test.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_test.go index 02f543ac9..796e9ff9b 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_test.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_test.go @@ -1027,7 +1027,7 @@ func TestResourceCloudletsPolicyActivation(t *testing.T) { test.init(client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: test.steps, }) diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go index 84b9ffd13..af3dec93a 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go @@ -277,7 +277,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -415,7 +415,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -473,7 +473,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -540,7 +540,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -607,7 +607,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -683,7 +683,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -745,7 +745,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -808,7 +808,7 @@ func TestResourcePolicyV2(t *testing.T) { expectRemovePolicy(t, client, 2, 1, 0) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -877,7 +877,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -978,7 +978,7 @@ func TestResourcePolicyV2(t *testing.T) { testCases[i].Expectations(client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -1002,7 +1002,7 @@ func TestResourcePolicyV2(t *testing.T) { expectRemovePolicy(t, client, 2, 1, 0) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -1029,7 +1029,7 @@ func TestResourcePolicyV2(t *testing.T) { expectRemovePolicy(t, client, 2, 1, 0) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -1086,7 +1086,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -1185,7 +1185,7 @@ func TestResourcePolicyV2(t *testing.T) { testCases[i].Expectations(client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -1207,7 +1207,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -1259,7 +1259,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -1333,7 +1333,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -1402,7 +1402,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -1435,7 +1435,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), diff --git a/pkg/providers/cloudwrapper/provider_test.go b/pkg/providers/cloudwrapper/provider_test.go index 1a9e03f9d..a4621710b 100644 --- a/pkg/providers/cloudwrapper/provider_test.go +++ b/pkg/providers/cloudwrapper/provider_test.go @@ -2,8 +2,6 @@ package cloudwrapper import ( "context" - "log" - "os" "testing" "time" @@ -107,14 +105,7 @@ func (ts *TestSubprovider) FrameworkDataSources() []func() datasource.DataSource } func TestMain(m *testing.M) { - if err := testutils.TFTestSetup(); err != nil { - log.Fatal(err) - } - exitCode := m.Run() - if err := testutils.TFTestTeardown(); err != nil { - log.Fatal(err) - } - os.Exit(exitCode) + testutils.TestRunner(m) } func newProviderFactory(opts ...testSubproviderOption) map[string]func() (tfprotov6.ProviderServer, error) { diff --git a/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration_test.go b/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration_test.go index 827cf2693..3b2751f5f 100644 --- a/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration_test.go +++ b/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration_test.go @@ -605,82 +605,6 @@ func TestConfigurationResource(t *testing.T) { }, }) }) - t.Run("update comments - expect an error", func(t *testing.T) { - t.Parallel() - client := &cloudwrapper.Mock{} - - configuration := cloudwrapper.CreateConfigurationRequest{ - Body: cloudwrapper.CreateConfigurationBody{ - Comments: "test", - ContractID: "ctr_123", - Locations: []cloudwrapper.ConfigLocationReq{ - { - Comments: "test", - TrafficTypeID: 1, - Capacity: cloudwrapper.Capacity{ - Value: 1, - Unit: cloudwrapper.UnitGB, - }, - }, - }, - NotificationEmails: []string{"test@akamai.com"}, - ConfigName: "testname", - PropertyIDs: []string{"200200200"}, - RetainIdleObjects: false, - }, - } - - expecter := newExpecter(t, client) - - expecter.ExpectCreate(configuration) - - expecter.ExpectRefresh() - - configUpdate := cloudwrapper.UpdateConfigurationRequest{ - ConfigID: expecter.config.ConfigID, - Body: cloudwrapper.UpdateConfigurationBody{ - Comments: "test-updated", - Locations: []cloudwrapper.ConfigLocationReq{ - { - Comments: "test", - TrafficTypeID: 1, - Capacity: cloudwrapper.Capacity{ - Value: 1, - Unit: cloudwrapper.UnitGB, - }, - }, - }, - NotificationEmails: []string{"test@akamai.com"}, - PropertyIDs: []string{"200200200"}, - RetainIdleObjects: false, - }, - } - - expecter.ExpectRefresh() - expecter.ExpectUpdate(configUpdate) - - expecter.ExpectRefresh() - expecter.ExpectDelete() - - resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProtoV6ProviderFactories: newProviderFactory(withMockClient(client)), - Steps: []resource.TestStep{ - { - Config: testutils.LoadFixtureString(t, "testdata/TestResConfiguration/create.tf"), - Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttr("akamai_cloudwrapper_configuration.test", "id", "123"), - resource.TestCheckResourceAttr("akamai_cloudwrapper_configuration.test", "config_name", "testname"), - resource.TestCheckResourceAttr("akamai_cloudwrapper_configuration.test", "contract_id", "ctr_123"), - ), - }, - { - Config: testutils.LoadFixtureString(t, "testdata/TestResConfiguration/update_comments_error.tf"), - ExpectError: regexp.MustCompile("updating field `comments` is not possible"), - }, - }, - }) - }) t.Run("drift - config got removed", func(t *testing.T) { t.Parallel() client := &cloudwrapper.Mock{} diff --git a/pkg/providers/cps/data_akamai_cps_csr_test.go b/pkg/providers/cps/data_akamai_cps_csr_test.go index c0bf8bb8b..c3ac3ae62 100644 --- a/pkg/providers/cps/data_akamai_cps_csr_test.go +++ b/pkg/providers/cps/data_akamai_cps_csr_test.go @@ -439,7 +439,7 @@ func TestDataCPSCSR(t *testing.T) { test.init(t, client, test.mockData) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/cps/data_akamai_cps_deployments_test.go b/pkg/providers/cps/data_akamai_cps_deployments_test.go index 1bb783aff..32e95bfa3 100644 --- a/pkg/providers/cps/data_akamai_cps_deployments_test.go +++ b/pkg/providers/cps/data_akamai_cps_deployments_test.go @@ -240,7 +240,7 @@ func TestDataCPSDeployments(t *testing.T) { test.init(client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/cps/data_akamai_cps_enrollment_test.go b/pkg/providers/cps/data_akamai_cps_enrollment_test.go index 931464b39..cc1617a5e 100644 --- a/pkg/providers/cps/data_akamai_cps_enrollment_test.go +++ b/pkg/providers/cps/data_akamai_cps_enrollment_test.go @@ -485,7 +485,7 @@ func TestDataEnrollment(t *testing.T) { test.init(t, client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: test.steps, }) diff --git a/pkg/providers/cps/data_akamai_cps_enrollments_test.go b/pkg/providers/cps/data_akamai_cps_enrollments_test.go index a91de907a..dd4d84ae9 100644 --- a/pkg/providers/cps/data_akamai_cps_enrollments_test.go +++ b/pkg/providers/cps/data_akamai_cps_enrollments_test.go @@ -101,7 +101,7 @@ func TestDataEnrollments(t *testing.T) { test.init(t, client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: test.steps, }) diff --git a/pkg/providers/cps/data_akamai_cps_warnings_test.go b/pkg/providers/cps/data_akamai_cps_warnings_test.go index 81caedaad..a83c7927a 100644 --- a/pkg/providers/cps/data_akamai_cps_warnings_test.go +++ b/pkg/providers/cps/data_akamai_cps_warnings_test.go @@ -10,7 +10,7 @@ import ( func TestDataWarnings(t *testing.T) { t.Run("run warning datasource", func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/cps/provider_test.go b/pkg/providers/cps/provider_test.go index 1be8fedba..ddd510e77 100644 --- a/pkg/providers/cps/provider_test.go +++ b/pkg/providers/cps/provider_test.go @@ -1,57 +1,15 @@ package cps import ( - "context" - "log" - "os" "sync" "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" - "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/hashicorp/terraform-plugin-go/tfprotov6" - "github.com/hashicorp/terraform-plugin-mux/tf5to6server" - "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" ) -var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) - func TestMain(m *testing.M) { - testAccSDKProvider := akamai.NewSDKProvider(NewSubprovider())() - testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ - "akamai": func() (tfprotov6.ProviderServer, error) { - sdkProviderV6, err := tf5to6server.UpgradeServer( - context.Background(), - testAccSDKProvider.GRPCProvider, - ) - if err != nil { - return nil, err - } - - providers := []func() tfprotov6.ProviderServer{ - func() tfprotov6.ProviderServer { - return sdkProviderV6 - }, - } - - muxServer, err := tf6muxserver.NewMuxServer(context.Background(), providers...) - if err != nil { - return nil, err - } - - return muxServer.ProviderServer(), nil - }, - } - - if err := testutils.TFTestSetup(); err != nil { - log.Fatal(err) - } - exitCode := m.Run() - if err := testutils.TFTestTeardown(); err != nil { - log.Fatal(err) - } - os.Exit(exitCode) + testutils.TestRunner(m) } // Only allow one test at a time to patch the client via useClient() diff --git a/pkg/providers/cps/resource_akamai_cps_dv_enrollment_test.go b/pkg/providers/cps/resource_akamai_cps_dv_enrollment_test.go index aae2d0b2f..14f41f27e 100644 --- a/pkg/providers/cps/resource_akamai_cps_dv_enrollment_test.go +++ b/pkg/providers/cps/resource_akamai_cps_dv_enrollment_test.go @@ -276,7 +276,7 @@ func TestResourceDVEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVEnrollment/lifecycle/create_enrollment.tf"), @@ -478,7 +478,7 @@ func TestResourceDVEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVEnrollment/empty_sans/create_enrollment.tf"), @@ -688,7 +688,7 @@ func TestResourceDVEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVEnrollment/client_mutual_auth/create_enrollment.tf"), @@ -879,7 +879,7 @@ func TestResourceDVEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVEnrollment/lifecycle_cn_in_sans/create_enrollment.tf"), @@ -1037,7 +1037,7 @@ func TestResourceDVEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVEnrollment/lifecycle/create_enrollment.tf"), @@ -1250,7 +1250,7 @@ func TestResourceDVEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVEnrollment/no_acknowledge_warnings/create_enrollment.tf"), @@ -1439,7 +1439,7 @@ func TestResourceDVEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVEnrollment/acknowledge_warnings/create_enrollment.tf"), @@ -1625,7 +1625,7 @@ func TestResourceDVEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVEnrollment/allow_duplicate_cn/create_enrollment.tf"), @@ -1761,7 +1761,7 @@ func TestResourceDVEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVEnrollment/no_acknowledge_warnings/create_enrollment.tf"), @@ -1844,7 +1844,7 @@ func TestResourceDVEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVEnrollment/no_acknowledge_warnings/create_enrollment.tf"), @@ -1997,7 +1997,7 @@ func TestResourceDVEnrollmentImport(t *testing.T) { }, nil).Once() useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVEnrollment/import/import_enrollment.tf"), @@ -2034,7 +2034,7 @@ func TestResourceDVEnrollmentImport(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVEnrollment/import/import_enrollment.tf"), diff --git a/pkg/providers/cps/resource_akamai_cps_dv_validation_test.go b/pkg/providers/cps/resource_akamai_cps_dv_validation_test.go index 175ec24d6..0ed507011 100644 --- a/pkg/providers/cps/resource_akamai_cps_dv_validation_test.go +++ b/pkg/providers/cps/resource_akamai_cps_dv_validation_test.go @@ -96,7 +96,7 @@ func TestDVValidation(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVValidation/create_validation.tf"), @@ -167,7 +167,7 @@ func TestDVValidation(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVValidation/create_validation.tf"), @@ -207,7 +207,7 @@ func TestDVValidation(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDVValidation/create_validation_with_timeout.tf"), diff --git a/pkg/providers/cps/resource_akamai_cps_third_party_enrollment_test.go b/pkg/providers/cps/resource_akamai_cps_third_party_enrollment_test.go index de9b0b6aa..9b1253013 100644 --- a/pkg/providers/cps/resource_akamai_cps_third_party_enrollment_test.go +++ b/pkg/providers/cps/resource_akamai_cps_third_party_enrollment_test.go @@ -137,7 +137,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/lifecycle/create_enrollment.tf"), @@ -270,7 +270,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/lifecycle_no_sans/create_enrollment.tf"), @@ -365,7 +365,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/empty_sans/create_enrollment.tf"), @@ -479,7 +479,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/client_mutual_auth/create_enrollment.tf"), @@ -569,7 +569,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/lifecycle_cn_in_sans/create_enrollment.tf"), @@ -668,7 +668,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/lifecycle_no_cn_in_sans/create_enrollment.tf"), @@ -734,7 +734,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/lifecycle/create_enrollment.tf"), @@ -825,7 +825,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/no_acknowledge_warnings/create_enrollment.tf"), @@ -935,7 +935,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/acknowledge_warnings/create_enrollment.tf"), @@ -1022,7 +1022,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/allow_duplicate_cn/create_enrollment.tf"), @@ -1097,7 +1097,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/no_acknowledge_warnings/create_enrollment.tf"), @@ -1137,7 +1137,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/no_acknowledge_warnings/create_enrollment.tf"), @@ -1239,7 +1239,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/auto_approve_warnings/create_enrollment.tf"), @@ -1313,7 +1313,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/auto_approve_warnings/create_enrollment.tf"), @@ -1391,7 +1391,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/auto_approve_warnings/create_enrollment.tf"), @@ -1474,7 +1474,7 @@ func TestResourceThirdPartyEnrollmentImport(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/import/import_enrollment.tf"), @@ -1511,7 +1511,7 @@ func TestResourceThirdPartyEnrollmentImport(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/import/import_enrollment.tf"), @@ -1615,7 +1615,7 @@ func TestSuppressingSignatureAlgorithm(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResThirdPartyEnrollment/lifecycle/create_enrollment.tf"), diff --git a/pkg/providers/cps/resource_akamai_cps_upload_certificate_test.go b/pkg/providers/cps/resource_akamai_cps_upload_certificate_test.go index 203344fcf..67701d3a3 100644 --- a/pkg/providers/cps/resource_akamai_cps_upload_certificate_test.go +++ b/pkg/providers/cps/resource_akamai_cps_upload_certificate_test.go @@ -72,7 +72,7 @@ func TestResourceCPSUploadCertificate(t *testing.T) { test.init(t, client, test.enrollment, test.enrollmentID, test.changeID) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { @@ -173,7 +173,7 @@ func TestResourceCPSUploadCertificateWithThirdPartyEnrollmentDependency(t *testi test.init(t, client, &test.enrollment, test.enrollmentID, test.changeID) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { @@ -280,7 +280,7 @@ func TestResourceCPSUploadCertificateLifecycle(t *testing.T) { test.init(t, client, test.enrollment, test.enrollmentUpdated, test.enrollmentID, test.changeID, test.changeIDUpdated) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { @@ -673,7 +673,7 @@ func TestCreateCPSUploadCertificate(t *testing.T) { test.init(t, client, test.enrollment, test.enrollmentID, test.changeID) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { @@ -788,7 +788,7 @@ func TestReadCPSUploadCertificate(t *testing.T) { test.init(t, client, test.enrollment, test.enrollmentID, test.changeID) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { @@ -1101,7 +1101,7 @@ func TestUpdateCPSUploadCertificate(t *testing.T) { test.init(t, client, test.enrollment, test.enrollmentUpdated, test.enrollmentID, test.changeID, test.changeIDUpdated) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { @@ -1180,7 +1180,7 @@ func TestResourceUploadCertificateImport(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCPSUploadCertificate/import/import_upload.tf"), diff --git a/pkg/providers/datastream/data_akamai_datastream_activation_history_test.go b/pkg/providers/datastream/data_akamai_datastream_activation_history_test.go index f4ca666ce..d6eb4d1fa 100644 --- a/pkg/providers/datastream/data_akamai_datastream_activation_history_test.go +++ b/pkg/providers/datastream/data_akamai_datastream_activation_history_test.go @@ -76,7 +76,7 @@ func TestDataAkamaiDatastreamActivationHistoryRead(t *testing.T) { client.On("GetActivationHistory", mock.Anything, mock.Anything).Return(test.getActivationHistoryReturn, nil) } resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/datastream/data_akamai_datastream_dataset_fields_test.go b/pkg/providers/datastream/data_akamai_datastream_dataset_fields_test.go index 8997636f4..548de8345 100644 --- a/pkg/providers/datastream/data_akamai_datastream_dataset_fields_test.go +++ b/pkg/providers/datastream/data_akamai_datastream_dataset_fields_test.go @@ -93,7 +93,7 @@ func TestDataSourceDatasetFieldsRead(t *testing.T) { useClient(client, func() { if test.withError == nil { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -105,7 +105,7 @@ func TestDataSourceDatasetFieldsRead(t *testing.T) { }) } else { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/datastream/data_akamai_datastreams_test.go b/pkg/providers/datastream/data_akamai_datastreams_test.go index df1d14c46..b6cc927fe 100644 --- a/pkg/providers/datastream/data_akamai_datastreams_test.go +++ b/pkg/providers/datastream/data_akamai_datastreams_test.go @@ -144,7 +144,7 @@ func TestDataDatastreams(t *testing.T) { test.init(t, client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: test.steps, }) diff --git a/pkg/providers/datastream/provider_test.go b/pkg/providers/datastream/provider_test.go index 46cc40053..a4bb58e91 100644 --- a/pkg/providers/datastream/provider_test.go +++ b/pkg/providers/datastream/provider_test.go @@ -1,57 +1,15 @@ package datastream import ( - "context" - "log" - "os" "sync" "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/datastream" - "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/hashicorp/terraform-plugin-go/tfprotov6" - "github.com/hashicorp/terraform-plugin-mux/tf5to6server" - "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" ) -var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) - func TestMain(m *testing.M) { - testAccSDKProvider := akamai.NewSDKProvider(NewSubprovider())() - testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ - "akamai": func() (tfprotov6.ProviderServer, error) { - sdkProviderV6, err := tf5to6server.UpgradeServer( - context.Background(), - testAccSDKProvider.GRPCProvider, - ) - if err != nil { - return nil, err - } - - providers := []func() tfprotov6.ProviderServer{ - func() tfprotov6.ProviderServer { - return sdkProviderV6 - }, - } - - muxServer, err := tf6muxserver.NewMuxServer(context.Background(), providers...) - if err != nil { - return nil, err - } - - return muxServer.ProviderServer(), nil - }, - } - - if err := testutils.TFTestSetup(); err != nil { - log.Fatal(err) - } - exitCode := m.Run() - if err := testutils.TFTestTeardown(); err != nil { - log.Fatal(err) - } - os.Exit(exitCode) + testutils.TestRunner(m) } // Only allow one test at a time to patch the client via useClient() diff --git a/pkg/providers/datastream/resource_akamai_datastream_test.go b/pkg/providers/datastream/resource_akamai_datastream_test.go index 63a90448e..5d5b4d500 100644 --- a/pkg/providers/datastream/resource_akamai_datastream_test.go +++ b/pkg/providers/datastream/resource_akamai_datastream_test.go @@ -368,7 +368,7 @@ func TestResourceStream(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResourceStream/lifecycle/create_stream.tf"), @@ -704,7 +704,7 @@ func TestResourceUpdate(t *testing.T) { useClient(m, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("testdata/TestResourceStream/update_resource/create_stream_%s.tf", createStreamFilenameSuffix)), @@ -781,7 +781,7 @@ func TestResourceStreamErrors(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.tfFile), @@ -841,7 +841,7 @@ func TestResourceStreamCustomDiff(t *testing.T) { t.Run(name, func(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.tfFile), @@ -999,7 +999,7 @@ func TestEmailIDs(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("testdata/TestResourceStream/email_ids/%s", test.Filename)), @@ -1198,7 +1198,7 @@ func TestDatasetIDsDiff(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.preConfig), @@ -1502,7 +1502,7 @@ func TestCustomHeaders(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("testdata/TestResourceStream/custom_headers/%s", test.Filename)), @@ -1731,7 +1731,7 @@ func TestMTLS(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("testdata/TestResourceStream/mtls/%s", test.Filename)), @@ -2046,7 +2046,7 @@ func TestUrlSuppressor(t *testing.T) { useClient(m, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: test.Steps, }) @@ -2204,7 +2204,7 @@ func TestConnectors(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("testdata/TestResourceStream/connectors/%s", test.Filename)), diff --git a/pkg/providers/dns/data_authorities_set_test.go b/pkg/providers/dns/data_authorities_set_test.go index ddc8f5609..beaca028f 100644 --- a/pkg/providers/dns/data_authorities_set_test.go +++ b/pkg/providers/dns/data_authorities_set_test.go @@ -28,7 +28,7 @@ func TestDataSourceAuthoritiesSet_basic(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDataSetAuthorities/basic.tf"), @@ -53,7 +53,7 @@ func TestDataSourceAuthoritiesSet_basic(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDataSetAuthorities/missing_contract.tf"), @@ -76,7 +76,7 @@ func TestDataSourceAuthoritiesSet_basic(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDataSetAuthorities/basic.tf"), diff --git a/pkg/providers/dns/data_dns_record_set_test.go b/pkg/providers/dns/data_dns_record_set_test.go index f0a6588a2..ddae2cf0e 100644 --- a/pkg/providers/dns/data_dns_record_set_test.go +++ b/pkg/providers/dns/data_dns_record_set_test.go @@ -31,7 +31,7 @@ func TestDataSourceDNSRecordSet_basic(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDataDnsRecordSet/basic.tf"), @@ -63,7 +63,7 @@ func TestDataSourceDNSRecordSet_basic(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDataDnsRecordSet/basic.tf"), diff --git a/pkg/providers/dns/provider_test.go b/pkg/providers/dns/provider_test.go index bc5ec4208..4eb4d021c 100644 --- a/pkg/providers/dns/provider_test.go +++ b/pkg/providers/dns/provider_test.go @@ -1,57 +1,15 @@ package dns import ( - "context" - "log" - "os" "sync" "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/dns" - "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/hashicorp/terraform-plugin-go/tfprotov6" - "github.com/hashicorp/terraform-plugin-mux/tf5to6server" - "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" ) -var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) - func TestMain(m *testing.M) { - testAccSDKProvider := akamai.NewSDKProvider(NewSubprovider())() - testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ - "akamai": func() (tfprotov6.ProviderServer, error) { - sdkProviderV6, err := tf5to6server.UpgradeServer( - context.Background(), - testAccSDKProvider.GRPCProvider, - ) - if err != nil { - return nil, err - } - - providers := []func() tfprotov6.ProviderServer{ - func() tfprotov6.ProviderServer { - return sdkProviderV6 - }, - } - - muxServer, err := tf6muxserver.NewMuxServer(context.Background(), providers...) - if err != nil { - return nil, err - } - - return muxServer.ProviderServer(), nil - }, - } - - if err := testutils.TFTestSetup(); err != nil { - log.Fatal(err) - } - exitCode := m.Run() - if err := testutils.TFTestTeardown(); err != nil { - log.Fatal(err) - } - os.Exit(exitCode) + testutils.TestRunner(m) } // Only allow one test at a time to patch the client via useClient() diff --git a/pkg/providers/dns/resource_akamai_dns_record_test.go b/pkg/providers/dns/resource_akamai_dns_record_test.go index 3fa52cda9..b53626b60 100644 --- a/pkg/providers/dns/resource_akamai_dns_record_test.go +++ b/pkg/providers/dns/resource_akamai_dns_record_test.go @@ -89,7 +89,7 @@ func TestResDnsRecord(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDnsRecord/create_basic.tf"), @@ -187,7 +187,7 @@ func TestResDnsRecord(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDnsRecord/create_basic_txt.tf"), diff --git a/pkg/providers/dns/resource_akamai_dns_zone_test.go b/pkg/providers/dns/resource_akamai_dns_zone_test.go index dd42ffb67..caa7a7d51 100644 --- a/pkg/providers/dns/resource_akamai_dns_zone_test.go +++ b/pkg/providers/dns/resource_akamai_dns_zone_test.go @@ -245,7 +245,7 @@ func TestResDnsZone(t *testing.T) { }() useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDnsZone/create_primary.tf"), diff --git a/pkg/providers/edgeworkers/data_akamai_edgekv_group_items_test.go b/pkg/providers/edgeworkers/data_akamai_edgekv_group_items_test.go index 850d74446..c0ec232f4 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgekv_group_items_test.go +++ b/pkg/providers/edgeworkers/data_akamai_edgekv_group_items_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -35,7 +36,7 @@ func TestEdgeKVGroupItems(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { @@ -59,7 +60,7 @@ func TestEdgeKVGroupItems(t *testing.T) { t.Run("missed required `namespace_name` field", func(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { @@ -76,7 +77,7 @@ func TestEdgeKVGroupItems(t *testing.T) { t.Run("missed required `network` field", func(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { @@ -93,7 +94,7 @@ func TestEdgeKVGroupItems(t *testing.T) { t.Run("missed required `group_name` field", func(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { @@ -110,7 +111,7 @@ func TestEdgeKVGroupItems(t *testing.T) { t.Run("incorrect `network` field", func(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/edgeworkers/data_akamai_edgekv_groups_test.go b/pkg/providers/edgeworkers/data_akamai_edgekv_groups_test.go index 42d02ba22..144ca688a 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgekv_groups_test.go +++ b/pkg/providers/edgeworkers/data_akamai_edgekv_groups_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -21,7 +22,7 @@ func TestEdgeKVGroups(t *testing.T) { Return([]string{"TestImportGroup", "TestGroup1", "TestGroup2", "TestGroup3", "TestGroup4"}, nil).Times(5) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { @@ -47,7 +48,7 @@ func TestEdgeKVGroups(t *testing.T) { t.Run("missed required `namespace_name` field", func(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { @@ -64,7 +65,7 @@ func TestEdgeKVGroups(t *testing.T) { t.Run("missed required `network` field", func(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { @@ -81,7 +82,7 @@ func TestEdgeKVGroups(t *testing.T) { t.Run("incorrect `network` field", func(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/edgeworkers/data_akamai_edgeworker_activation_test.go b/pkg/providers/edgeworkers/data_akamai_edgeworker_activation_test.go index ae281d59f..d3c4ec23d 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgeworker_activation_test.go +++ b/pkg/providers/edgeworkers/data_akamai_edgeworker_activation_test.go @@ -194,7 +194,7 @@ func TestDataEdgeWorkersActivation(t *testing.T) { test.init(t, client, test.mockData) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/edgeworkers/data_akamai_edgeworker_test.go b/pkg/providers/edgeworkers/data_akamai_edgeworker_test.go index fb24a95d0..b4ec2c366 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgeworker_test.go +++ b/pkg/providers/edgeworkers/data_akamai_edgeworker_test.go @@ -327,7 +327,7 @@ func TestDataEdgeWorkersEdgeWorker(t *testing.T) { test.init(t, client, test.mockData) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/edgeworkers/data_akamai_edgeworkers_property_rules_test.go b/pkg/providers/edgeworkers/data_akamai_edgeworkers_property_rules_test.go index 49124d1f3..64c1967ce 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgeworkers_property_rules_test.go +++ b/pkg/providers/edgeworkers/data_akamai_edgeworkers_property_rules_test.go @@ -21,7 +21,7 @@ func TestDataEdgeworkersPropertyRules(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/edgeworkers/data_akamai_edgeworkers_resource_tier_test.go b/pkg/providers/edgeworkers/data_akamai_edgeworkers_resource_tier_test.go index f25c0ebd7..e90304ee0 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgeworkers_resource_tier_test.go +++ b/pkg/providers/edgeworkers/data_akamai_edgeworkers_resource_tier_test.go @@ -164,7 +164,7 @@ func TestDataEdgeworkersResourceTier(t *testing.T) { test.init(client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: test.steps, }) diff --git a/pkg/providers/edgeworkers/provider_test.go b/pkg/providers/edgeworkers/provider_test.go index bd80d6998..b6f79de16 100644 --- a/pkg/providers/edgeworkers/provider_test.go +++ b/pkg/providers/edgeworkers/provider_test.go @@ -1,57 +1,15 @@ package edgeworkers import ( - "context" - "log" - "os" "sync" "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" - "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/hashicorp/terraform-plugin-go/tfprotov6" - "github.com/hashicorp/terraform-plugin-mux/tf5to6server" - "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" ) -var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) - func TestMain(m *testing.M) { - testAccSDKProvider := akamai.NewSDKProvider(NewSubprovider())() - testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ - "akamai": func() (tfprotov6.ProviderServer, error) { - sdkProviderV6, err := tf5to6server.UpgradeServer( - context.Background(), - testAccSDKProvider.GRPCProvider, - ) - if err != nil { - return nil, err - } - - providers := []func() tfprotov6.ProviderServer{ - func() tfprotov6.ProviderServer { - return sdkProviderV6 - }, - } - - muxServer, err := tf6muxserver.NewMuxServer(context.Background(), providers...) - if err != nil { - return nil, err - } - - return muxServer.ProviderServer(), nil - }, - } - - if err := testutils.TFTestSetup(); err != nil { - log.Fatal(err) - } - exitCode := m.Run() - if err := testutils.TFTestTeardown(); err != nil { - log.Fatal(err) - } - os.Exit(exitCode) + testutils.TestRunner(m) } // Only allow one test at a time to patch the client via useClient() diff --git a/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items_test.go b/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items_test.go index 60519dd4c..a3ee71392 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items_test.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items_test.go @@ -191,7 +191,7 @@ func TestCreateEdgeKVGroupItems(t *testing.T) { test.init(client, test.attrs) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -356,7 +356,7 @@ func TestReadEdgeKVGroupItems(t *testing.T) { test.init(client, test.attrsForCreate, test.attrsForUpdate) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPathForCreate), @@ -842,7 +842,7 @@ func TestUpdateEdgeKVGroupItems(t *testing.T) { test.init(client, test.attrsForCreate, test.attrsForUpdate) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { @@ -917,7 +917,7 @@ func TestDeleteEdgeKVGroupItems(t *testing.T) { test.init(client, test.attrs) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -989,7 +989,7 @@ func TestImportEdgeKVGroupItems(t *testing.T) { test.init(client, test.attrs) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ diff --git a/pkg/providers/edgeworkers/resource_akamai_edgekv_test.go b/pkg/providers/edgeworkers/resource_akamai_edgekv_test.go index f6d9fc33c..769668008 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgekv_test.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgekv_test.go @@ -494,7 +494,7 @@ func TestResourceEdgeKV(t *testing.T) { test.init(client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: test.steps, }) diff --git a/pkg/providers/edgeworkers/resource_akamai_edgeworker_test.go b/pkg/providers/edgeworkers/resource_akamai_edgeworker_test.go index 47156b1ba..910181838 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgeworker_test.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgeworker_test.go @@ -386,7 +386,7 @@ func TestResourceEdgeWorkersEdgeWorker(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/edgeworker_create.tf", testDir)), @@ -465,7 +465,7 @@ func TestResourceEdgeWorkersEdgeWorker(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/edgeworker_no_bundle.tf", testDir)), @@ -501,7 +501,7 @@ func TestResourceEdgeWorkersEdgeWorker(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/edgeworker_create.tf", testDir)), @@ -571,7 +571,7 @@ func TestResourceEdgeWorkersEdgeWorker(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { PreConfig: prepareTempBundleLink(t, bundlePathForCreate, tempBundlePath), @@ -620,7 +620,7 @@ func TestResourceEdgeWorkersEdgeWorker(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/edgeworker_create.tf", testDir)), @@ -663,7 +663,7 @@ func TestResourceEdgeWorkersEdgeWorker(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/edgeworker_create.tf", testDir)), @@ -710,7 +710,7 @@ func TestResourceEdgeWorkersEdgeWorker(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/edgeworker_create.tf", testDir)), @@ -794,7 +794,7 @@ func TestResourceEdgeWorkersEdgeWorker(t *testing.T) { client.On("DeleteEdgeWorkerID", mock.Anything, edgeWorkerDeleteReq).Return(nil).Once() useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/edgeworker_create.tf", testDir)), @@ -858,7 +858,7 @@ func TestResourceEdgeWorkersEdgeWorker(t *testing.T) { client.On("DeleteEdgeWorkerID", mock.Anything, edgeWorkerDeleteReq).Return(nil).Once() useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/edgeworker_create.tf", testDir)), @@ -891,7 +891,7 @@ func TestResourceEdgeWorkersEdgeWorker(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/edgeworker_create.tf", testDir)), diff --git a/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation_test.go b/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation_test.go index 3189c5b12..ff102204f 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation_test.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation_test.go @@ -1356,7 +1356,7 @@ func TestResourceEdgeworkersActivation(t *testing.T) { test.init(client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: test.steps, }) diff --git a/pkg/providers/gtm/data_akamai_gtm_datacenter_test.go b/pkg/providers/gtm/data_akamai_gtm_datacenter_test.go index 2534d4d03..33be71339 100644 --- a/pkg/providers/gtm/data_akamai_gtm_datacenter_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_datacenter_test.go @@ -67,7 +67,7 @@ func TestDataGTMDatacenter(t *testing.T) { test.init(t, client, test.mockData) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/gtm/data_akamai_gtm_datacenters_test.go b/pkg/providers/gtm/data_akamai_gtm_datacenters_test.go index fce882fde..736a63a6b 100644 --- a/pkg/providers/gtm/data_akamai_gtm_datacenters_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_datacenters_test.go @@ -62,7 +62,7 @@ func TestDataGTMDatacenters(t *testing.T) { test.init(t, client, test.mockData) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go b/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go index 8dd11c2cf..0093bcfa3 100644 --- a/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go @@ -30,7 +30,7 @@ func TestAccDataSourceGTMDefaultDatacenter_basic(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDataDefaultDatacenter/basic.tf"), diff --git a/pkg/providers/gtm/provider_test.go b/pkg/providers/gtm/provider_test.go index d9d904eff..408e8aca8 100644 --- a/pkg/providers/gtm/provider_test.go +++ b/pkg/providers/gtm/provider_test.go @@ -1,84 +1,15 @@ package gtm import ( - "context" - "log" - "os" "sync" "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" - "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - - "github.com/hashicorp/terraform-plugin-go/tfprotov6" - "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" - "github.com/hashicorp/terraform-plugin-mux/tf5to6server" - - "github.com/hashicorp/terraform-plugin-framework/provider" - "github.com/hashicorp/terraform-plugin-framework/providerserver" ) -var testAccProvidersProtoV5 map[string]func() (tfprotov6.ProviderServer, error) -var testAccProviders map[string]func() (*schema.Provider, error) -var testAccFrameworkProvider provider.Provider -var testAccProvider *schema.Provider - func TestMain(m *testing.M) { - testAccProvider = akamai.NewPluginProvider(NewSubprovider())() - testAccFrameworkProvider = akamai.NewFrameworkProvider(NewFrameworkSubprovider())() - - testAccProviders = map[string]func() (*schema.Provider, error){ - "akamai": func() (*schema.Provider, error) { - upgradedPluginProvider, err := tf5to6server.UpgradeServer( - context.Background(), - testAccProvider.GRPCProvider, - ) - if err != nil { - return nil, err - } - - providers := []func() tfprotov6.ProviderServer{ - func() tfprotov6.ProviderServer { - return upgradedPluginProvider - }, - } - - muxServer, err := tf6muxserver.NewMuxServer(context.Background(), providers...) - if err != nil { - return nil, err - } - - return muxServer.ProviderServer(), nil - }, - } - testAccProvidersProtoV5 = map[string]func() (tfprotov6.ProviderServer, error){ - "akamai": func() (tfprotov6.ProviderServer, error) { - ctx := context.Background() - providers := []func() tfprotov6.ProviderServer{ - providerserver.NewProtocol6( - testAccFrameworkProvider, - ), - } - - muxServer, err := tf6muxserver.NewMuxServer(ctx, providers...) - if err != nil { - return nil, err - } - - return muxServer.ProviderServer(), nil - }, - } - - if err := testutils.TFTestSetup(); err != nil { - log.Fatal(err) - } - exitCode := m.Run() - if err := testutils.TFTestTeardown(); err != nil { - log.Fatal(err) - } - os.Exit(exitCode) + testutils.TestRunner(m) } // Only allow one test at a time to patch the client via useClient() diff --git a/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go b/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go index ba9a40824..ee3662e43 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go @@ -76,7 +76,7 @@ func TestResGtmAsmap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmAsmap/create_basic.tf"), @@ -121,7 +121,7 @@ func TestResGtmAsmap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmAsmap/create_basic.tf"), @@ -159,7 +159,7 @@ func TestResGtmAsmap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmAsmap/create_basic.tf"), @@ -220,7 +220,7 @@ func TestResGtmAsmap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmAsmap/import_basic.tf"), @@ -320,7 +320,7 @@ func TestGTMAsMapOrder(t *testing.T) { t.Run(name, func(t *testing.T) { useClient(test.client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go b/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go index bb1e9a8a0..f3884229b 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go @@ -68,7 +68,7 @@ func TestResGtmCidrmap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmCidrmap/create_basic.tf"), @@ -113,7 +113,7 @@ func TestResGtmCidrmap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmCidrmap/create_basic.tf"), @@ -151,7 +151,7 @@ func TestResGtmCidrmap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmCidrmap/create_basic.tf"), @@ -242,7 +242,7 @@ func TestGTMCidrMapOrder(t *testing.T) { t.Run(name, func(t *testing.T) { useClient(test.client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go b/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go index ee0d9f016..a682575c5 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go @@ -86,7 +86,7 @@ func TestResGtmDatacenter(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmDatacenter/create_basic.tf"), @@ -126,7 +126,7 @@ func TestResGtmDatacenter(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmDatacenter/create_basic.tf"), @@ -157,7 +157,7 @@ func TestResGtmDatacenter(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmDatacenter/create_basic.tf"), diff --git a/pkg/providers/gtm/resource_akamai_gtm_domain_test.go b/pkg/providers/gtm/resource_akamai_gtm_domain_test.go index 33d3b8ee4..2af8ee3bc 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_domain_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_domain_test.go @@ -60,7 +60,7 @@ func TestResGtmDomain(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmDomain/create_basic.tf"), @@ -124,7 +124,7 @@ func TestResGtmDomain(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmDomain/create_basic.tf"), @@ -164,7 +164,7 @@ func TestResGtmDomain(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmDomain/create_basic.tf"), @@ -197,7 +197,7 @@ func TestResGtmDomain(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmDomain/create_basic.tf"), @@ -249,7 +249,7 @@ func TestResGtmDomain(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmDomain/create_basic.tf"), @@ -303,7 +303,7 @@ func TestGTMDomainOrder(t *testing.T) { t.Run(name, func(t *testing.T) { useClient(test.client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go b/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go index bec37c3ea..f04c14521 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go @@ -73,7 +73,7 @@ func TestResGtmGeomap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmGeomap/create_basic.tf"), @@ -118,7 +118,7 @@ func TestResGtmGeomap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmGeomap/create_basic.tf"), @@ -156,7 +156,7 @@ func TestResGtmGeomap(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmGeomap/create_basic.tf"), @@ -240,7 +240,7 @@ func TestGTMGeoMapOrder(t *testing.T) { t.Run(name, func(t *testing.T) { useClient(test.client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/gtm/resource_akamai_gtm_property_test.go b/pkg/providers/gtm/resource_akamai_gtm_property_test.go index feaac5e90..abbaa0fd2 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_property_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_property_test.go @@ -227,7 +227,7 @@ func TestResGtmProperty(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/create_basic.tf"), @@ -298,7 +298,7 @@ func TestResGtmProperty(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/create_basic.tf"), @@ -360,7 +360,7 @@ func TestResGtmProperty(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/create_basic.tf"), @@ -558,7 +558,7 @@ func TestResGtmProperty(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/test_object/test_object_not_required.tf"), @@ -586,7 +586,7 @@ func TestResGtmProperty(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/test_object/test_object_protocol_ftp.tf"), @@ -604,7 +604,7 @@ func TestResGtmProperty(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/test_object/test_object_protocol_http.tf"), @@ -622,7 +622,7 @@ func TestResGtmProperty(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/test_object/test_object_protocol_https.tf"), @@ -735,7 +735,7 @@ func TestResourceGTMTrafficTargetOrder(t *testing.T) { t.Run(name, func(t *testing.T) { useClient(test.client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/gtm/resource_akamai_gtm_resource_test.go b/pkg/providers/gtm/resource_akamai_gtm_resource_test.go index 0e90d91fc..c8f1a5488 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_resource_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_resource_test.go @@ -85,7 +85,7 @@ func TestResGtmResource(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmResource/create_basic.tf"), @@ -148,7 +148,7 @@ func TestResGtmResource(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmResource/create_basic.tf"), @@ -202,7 +202,7 @@ func TestResGtmResource(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmResource/create_basic.tf"), @@ -272,7 +272,7 @@ func TestGTMResourceOrder(t *testing.T) { t.Run(name, func(t *testing.T) { useClient(test.client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewSDKProviderFactories(NewSubprovider()), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/iam/data_akamai_iam_contact_types_test.go b/pkg/providers/iam/data_akamai_iam_contact_types_test.go index 6b7a639c5..a2fad15c2 100644 --- a/pkg/providers/iam/data_akamai_iam_contact_types_test.go +++ b/pkg/providers/iam/data_akamai_iam_contact_types_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -19,7 +20,7 @@ func TestDataContactTypes(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { @@ -46,7 +47,7 @@ func TestDataContactTypes(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/iam/data_akamai_iam_countries_test.go b/pkg/providers/iam/data_akamai_iam_countries_test.go index cb042e01c..026bd24aa 100644 --- a/pkg/providers/iam/data_akamai_iam_countries_test.go +++ b/pkg/providers/iam/data_akamai_iam_countries_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -19,7 +20,7 @@ func TestDataCountries(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { @@ -46,7 +47,7 @@ func TestDataCountries(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/iam/data_akamai_iam_grantable_roles_test.go b/pkg/providers/iam/data_akamai_iam_grantable_roles_test.go index 817ae685e..abe76bfbf 100644 --- a/pkg/providers/iam/data_akamai_iam_grantable_roles_test.go +++ b/pkg/providers/iam/data_akamai_iam_grantable_roles_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -22,7 +23,7 @@ func TestGrantableRoles(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { @@ -52,7 +53,7 @@ func TestGrantableRoles(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/iam/data_akamai_iam_groups_test.go b/pkg/providers/iam/data_akamai_iam_groups_test.go index 885f5705b..632301351 100644 --- a/pkg/providers/iam/data_akamai_iam_groups_test.go +++ b/pkg/providers/iam/data_akamai_iam_groups_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-testing/helper/resource" @@ -38,7 +39,7 @@ func TestDataGroups(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/%s/step0.tf", t.Name()), @@ -89,7 +90,7 @@ func TestDataGroups(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: test.Fixture("testdata/%s/step0.tf", t.Name()), diff --git a/pkg/providers/iam/data_akamai_iam_roles_test.go b/pkg/providers/iam/data_akamai_iam_roles_test.go index 4e8f6bc7a..ac25bd07a 100644 --- a/pkg/providers/iam/data_akamai_iam_roles_test.go +++ b/pkg/providers/iam/data_akamai_iam_roles_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -33,7 +34,7 @@ func TestDataRoles(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { @@ -66,7 +67,7 @@ func TestDataRoles(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/iam/data_akamai_iam_states_test.go b/pkg/providers/iam/data_akamai_iam_states_test.go index e6e3313df..d935a77ba 100644 --- a/pkg/providers/iam/data_akamai_iam_states_test.go +++ b/pkg/providers/iam/data_akamai_iam_states_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -21,7 +22,7 @@ func TestDataStates(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { @@ -49,7 +50,7 @@ func TestDataStates(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/iam/data_akamai_iam_supported_langs_test.go b/pkg/providers/iam/data_akamai_iam_supported_langs_test.go index 29f6793d9..99a9a97aa 100644 --- a/pkg/providers/iam/data_akamai_iam_supported_langs_test.go +++ b/pkg/providers/iam/data_akamai_iam_supported_langs_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -19,7 +20,7 @@ func TestDataSupportedLangs(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { @@ -45,7 +46,7 @@ func TestDataSupportedLangs(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/iam/data_akamai_iam_timeout_policies_test.go b/pkg/providers/iam/data_akamai_iam_timeout_policies_test.go index f7a9ea794..ab4f21e2b 100644 --- a/pkg/providers/iam/data_akamai_iam_timeout_policies_test.go +++ b/pkg/providers/iam/data_akamai_iam_timeout_policies_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -25,7 +26,7 @@ func TestDataTimeoutPolicies(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { @@ -52,7 +53,7 @@ func TestDataTimeoutPolicies(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/iam/data_akamai_iam_timezones_test.go b/pkg/providers/iam/data_akamai_iam_timezones_test.go index 6cdfa3d37..253cf1715 100644 --- a/pkg/providers/iam/data_akamai_iam_timezones_test.go +++ b/pkg/providers/iam/data_akamai_iam_timezones_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -41,7 +42,7 @@ func TestDataTimezones(t *testing.T) { useClient(client, func() { resourceName := "data.akamai_iam_timezones.test" resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { @@ -77,7 +78,7 @@ func TestDataTimezones(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/iam/provider_test.go b/pkg/providers/iam/provider_test.go index 8cc31dc2e..404688d72 100644 --- a/pkg/providers/iam/provider_test.go +++ b/pkg/providers/iam/provider_test.go @@ -1,57 +1,15 @@ package iam import ( - "context" - "log" - "os" "sync" "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" - "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/hashicorp/terraform-plugin-go/tfprotov6" - "github.com/hashicorp/terraform-plugin-mux/tf5to6server" - "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" ) -var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) - func TestMain(m *testing.M) { - testAccSDKProvider := akamai.NewSDKProvider(NewSubprovider())() - testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ - "akamai": func() (tfprotov6.ProviderServer, error) { - sdkProviderV6, err := tf5to6server.UpgradeServer( - context.Background(), - testAccSDKProvider.GRPCProvider, - ) - if err != nil { - return nil, err - } - - providers := []func() tfprotov6.ProviderServer{ - func() tfprotov6.ProviderServer { - return sdkProviderV6 - }, - } - - muxServer, err := tf6muxserver.NewMuxServer(context.Background(), providers...) - if err != nil { - return nil, err - } - - return muxServer.ProviderServer(), nil - }, - } - - if err := testutils.TFTestSetup(); err != nil { - log.Fatal(err) - } - exitCode := m.Run() - if err := testutils.TFTestTeardown(); err != nil { - log.Fatal(err) - } - os.Exit(exitCode) + testutils.TestRunner(m) } // Only allow one test at a time to patch the client via useClient() diff --git a/pkg/providers/iam/resource_akamai_iam_blocked_user_properties_test.go b/pkg/providers/iam/resource_akamai_iam_blocked_user_properties_test.go index 57d02a93a..18d0b8fbe 100644 --- a/pkg/providers/iam/resource_akamai_iam_blocked_user_properties_test.go +++ b/pkg/providers/iam/resource_akamai_iam_blocked_user_properties_test.go @@ -171,7 +171,7 @@ func TestResourceIAMBlockedUserProperties(t *testing.T) { test.init(client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: test.steps, }) diff --git a/pkg/providers/iam/resource_akamai_iam_group_test.go b/pkg/providers/iam/resource_akamai_iam_group_test.go index 7be407e67..0139637f2 100644 --- a/pkg/providers/iam/resource_akamai_iam_group_test.go +++ b/pkg/providers/iam/resource_akamai_iam_group_test.go @@ -143,7 +143,7 @@ func TestResourceGroup(t *testing.T) { test.init(client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: test.steps, }) diff --git a/pkg/providers/iam/resource_akamai_iam_role_test.go b/pkg/providers/iam/resource_akamai_iam_role_test.go index 775ba0758..437757d8c 100644 --- a/pkg/providers/iam/resource_akamai_iam_role_test.go +++ b/pkg/providers/iam/resource_akamai_iam_role_test.go @@ -135,7 +135,7 @@ func TestResourceIAMRole(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/role_create.tf", testDir)), @@ -164,7 +164,7 @@ func TestResourceIAMRole(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/role_create.tf", testDir)), @@ -198,7 +198,7 @@ func TestResourceIAMRole(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/role_create.tf", testDir)), @@ -235,7 +235,7 @@ func TestResourceIAMRole(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/role_create.tf", testDir)), @@ -268,7 +268,7 @@ func TestResourceIAMRole(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/role_create.tf", testDir)), @@ -298,7 +298,7 @@ func TestResourceIAMRole(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/role_create.tf", testDir)), diff --git a/pkg/providers/iam/resource_akamai_iam_user_test.go b/pkg/providers/iam/resource_akamai_iam_user_test.go index 45ce6353d..7f4e8d38d 100644 --- a/pkg/providers/iam/resource_akamai_iam_user_test.go +++ b/pkg/providers/iam/resource_akamai_iam_user_test.go @@ -633,7 +633,7 @@ func TestResourceUser(t *testing.T) { test.init(client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: test.steps, }) diff --git a/pkg/providers/imaging/data_akamai_imaging_policy_image_test.go b/pkg/providers/imaging/data_akamai_imaging_policy_image_test.go index baeb8bfeb..346a10bb3 100644 --- a/pkg/providers/imaging/data_akamai_imaging_policy_image_test.go +++ b/pkg/providers/imaging/data_akamai_imaging_policy_image_test.go @@ -37,7 +37,7 @@ func TestDataPolicyImage(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/imaging/data_akamai_imaging_policy_video_test.go b/pkg/providers/imaging/data_akamai_imaging_policy_video_test.go index fcd18eee4..c3d4b7a3a 100644 --- a/pkg/providers/imaging/data_akamai_imaging_policy_video_test.go +++ b/pkg/providers/imaging/data_akamai_imaging_policy_video_test.go @@ -25,7 +25,7 @@ func TestDataPolicyVideo(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/imaging/provider_test.go b/pkg/providers/imaging/provider_test.go index d793b13a7..a657feeda 100644 --- a/pkg/providers/imaging/provider_test.go +++ b/pkg/providers/imaging/provider_test.go @@ -1,58 +1,16 @@ package imaging import ( - "context" - "log" - "os" "sync" "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/imaging" - "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/hashicorp/terraform-plugin-go/tfprotov6" - "github.com/hashicorp/terraform-plugin-mux/tf5to6server" - "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" ) -var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) - func TestMain(m *testing.M) { PolicyDepth = 4 - testAccSDKProvider := akamai.NewSDKProvider(NewSubprovider())() - testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ - "akamai": func() (tfprotov6.ProviderServer, error) { - sdkProviderV6, err := tf5to6server.UpgradeServer( - context.Background(), - testAccSDKProvider.GRPCProvider, - ) - if err != nil { - return nil, err - } - - providers := []func() tfprotov6.ProviderServer{ - func() tfprotov6.ProviderServer { - return sdkProviderV6 - }, - } - - muxServer, err := tf6muxserver.NewMuxServer(context.Background(), providers...) - if err != nil { - return nil, err - } - - return muxServer.ProviderServer(), nil - }, - } - - if err := testutils.TFTestSetup(); err != nil { - log.Fatal(err) - } - exitCode := m.Run() - if err := testutils.TFTestTeardown(); err != nil { - log.Fatal(err) - } - os.Exit(exitCode) + testutils.TestRunner(m) } // Only allow one test at a time to patch the client via useClient() diff --git a/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go b/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go index 9a4412511..66a23304b 100644 --- a/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go @@ -227,7 +227,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -260,7 +260,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -311,7 +311,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -409,7 +409,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -459,7 +459,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -511,7 +511,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -553,7 +553,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/default.tf", testDir)), @@ -609,7 +609,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -741,7 +741,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -775,7 +775,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -810,7 +810,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -850,7 +850,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -879,7 +879,7 @@ func TestResourcePolicyImage(t *testing.T) { client := new(imaging.Mock) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -896,7 +896,7 @@ func TestResourcePolicyImage(t *testing.T) { client := new(imaging.Mock) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -923,7 +923,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -946,7 +946,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), diff --git a/pkg/providers/imaging/resource_akamai_imaging_policy_set_test.go b/pkg/providers/imaging/resource_akamai_imaging_policy_set_test.go index 799faea40..02cf1180a 100644 --- a/pkg/providers/imaging/resource_akamai_imaging_policy_set_test.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_set_test.go @@ -344,7 +344,7 @@ func TestResourceImagingPolicySet(t *testing.T) { test.init(client) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: test.steps, }) }) diff --git a/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go b/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go index 51ce960e3..cc5db1913 100644 --- a/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go @@ -184,7 +184,7 @@ func TestResourcePolicyVideo(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -217,7 +217,7 @@ func TestResourcePolicyVideo(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -268,7 +268,7 @@ func TestResourcePolicyVideo(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -367,7 +367,7 @@ func TestResourcePolicyVideo(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -416,7 +416,7 @@ func TestResourcePolicyVideo(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -468,7 +468,7 @@ func TestResourcePolicyVideo(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -511,7 +511,7 @@ func TestResourcePolicyVideo(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -545,7 +545,7 @@ func TestResourcePolicyVideo(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/default.tf", testDir)), @@ -580,7 +580,7 @@ func TestResourcePolicyVideo(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -615,7 +615,7 @@ func TestResourcePolicyVideo(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -637,7 +637,7 @@ func TestResourcePolicyVideo(t *testing.T) { client := new(imaging.Mock) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -660,7 +660,7 @@ func TestResourcePolicyVideo(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -693,7 +693,7 @@ func TestResourcePolicyVideo(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -716,7 +716,7 @@ func TestResourcePolicyVideo(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), diff --git a/pkg/providers/networklists/data_akamai_networklist_network_lists_test.go b/pkg/providers/networklists/data_akamai_networklist_network_lists_test.go index f92d2a65b..4cc6e90b0 100644 --- a/pkg/providers/networklists/data_akamai_networklist_network_lists_test.go +++ b/pkg/providers/networklists/data_akamai_networklist_network_lists_test.go @@ -27,7 +27,7 @@ func TestAccAkamaiNetworkList_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSNetworkList/match_by_id.tf"), @@ -59,7 +59,7 @@ func TestAccAkamaiNetworkList_data_by_uniqueID(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSNetworkList/match_by_uniqueid.tf"), diff --git a/pkg/providers/networklists/provider_test.go b/pkg/providers/networklists/provider_test.go index ef7fd8c10..fc2021f9d 100644 --- a/pkg/providers/networklists/provider_test.go +++ b/pkg/providers/networklists/provider_test.go @@ -1,57 +1,15 @@ package networklists import ( - "context" - "log" - "os" "sync" "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/networklists" - "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/hashicorp/terraform-plugin-go/tfprotov6" - "github.com/hashicorp/terraform-plugin-mux/tf5to6server" - "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" ) -var testAccProviders map[string]func() (tfprotov6.ProviderServer, error) - func TestMain(m *testing.M) { - testAccSDKProvider := akamai.NewSDKProvider(NewSubprovider())() - testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ - "akamai": func() (tfprotov6.ProviderServer, error) { - sdkProviderV6, err := tf5to6server.UpgradeServer( - context.Background(), - testAccSDKProvider.GRPCProvider, - ) - if err != nil { - return nil, err - } - - providers := []func() tfprotov6.ProviderServer{ - func() tfprotov6.ProviderServer { - return sdkProviderV6 - }, - } - - muxServer, err := tf6muxserver.NewMuxServer(context.Background(), providers...) - if err != nil { - return nil, err - } - - return muxServer.ProviderServer(), nil - }, - } - - if err := testutils.TFTestSetup(); err != nil { - log.Fatal(err) - } - exitCode := m.Run() - if err := testutils.TFTestTeardown(); err != nil { - log.Fatal(err) - } - os.Exit(exitCode) + testutils.TestRunner(m) } // Only allow one test at a time to patch the client via useClient() diff --git a/pkg/providers/networklists/resource_akamai_networklist_activations_test.go b/pkg/providers/networklists/resource_akamai_networklist_activations_test.go index 064e9ce77..548ed4750 100644 --- a/pkg/providers/networklists/resource_akamai_networklist_activations_test.go +++ b/pkg/providers/networklists/resource_akamai_networklist_activations_test.go @@ -54,7 +54,7 @@ func TestAccAkamaiActivations_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResActivations/match_by_id.tf"), @@ -120,7 +120,7 @@ func TestAccAkamaiActivations_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResActivations/match_by_id.tf"), diff --git a/pkg/providers/networklists/resource_akamai_networklist_network_list_description_test.go b/pkg/providers/networklists/resource_akamai_networklist_network_list_description_test.go index 1add7652f..cf90f7392 100644 --- a/pkg/providers/networklists/resource_akamai_networklist_network_list_description_test.go +++ b/pkg/providers/networklists/resource_akamai_networklist_network_list_description_test.go @@ -36,7 +36,7 @@ func TestAccAkamaiNetworkListDescription_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: false, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResNetworkListDescription/match_by_id.tf"), diff --git a/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription_test.go b/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription_test.go index 0967bb9fa..68aba3a0b 100644 --- a/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription_test.go +++ b/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription_test.go @@ -45,7 +45,7 @@ func TestAccAkamaiNetworkListSubscription_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResNetworkListSubscription/match_by_id.tf"), diff --git a/pkg/providers/networklists/resource_akamai_networklist_network_list_test.go b/pkg/providers/networklists/resource_akamai_networklist_network_list_test.go index ab11a46df..fc07e1e93 100644 --- a/pkg/providers/networklists/resource_akamai_networklist_network_list_test.go +++ b/pkg/providers/networklists/resource_akamai_networklist_network_list_test.go @@ -74,7 +74,7 @@ func TestAccAkamaiNetworkList_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResNetworkList/match_by_id.tf"), @@ -150,8 +150,8 @@ func TestAccAkamaiNetworkListConfigChanged(t *testing.T) { t.Run("changed contractID and groupID", func(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResNetworkList/match_by_id.tf"), diff --git a/pkg/providers/property/data_akamai_contracts_test.go b/pkg/providers/property/data_akamai_contracts_test.go index 4035fca42..b00d7346b 100644 --- a/pkg/providers/property/data_akamai_contracts_test.go +++ b/pkg/providers/property/data_akamai_contracts_test.go @@ -5,9 +5,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/stretchr/testify/mock" - "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/stretchr/testify/mock" ) func TestDataContracts(t *testing.T) { @@ -30,7 +29,7 @@ func TestDataContracts(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDataContracts/contracts.tf"), Check: resource.ComposeAggregateTestCheckFunc( diff --git a/pkg/providers/property/data_akamai_cp_code_test.go b/pkg/providers/property/data_akamai_cp_code_test.go index 64de3a09a..6b040ecbf 100644 --- a/pkg/providers/property/data_akamai_cp_code_test.go +++ b/pkg/providers/property/data_akamai_cp_code_test.go @@ -4,11 +4,10 @@ import ( "regexp" "testing" - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/stretchr/testify/mock" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/stretchr/testify/mock" ) func TestDSCPCode(t *testing.T) { @@ -28,7 +27,7 @@ func TestDSCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSCPCode/match_by_name.tf"), Check: resource.ComposeAggregateTestCheckFunc( @@ -60,7 +59,7 @@ func TestDSCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSCPCode/match_by_name_output_products.tf"), Check: resource.ComposeAggregateTestCheckFunc( @@ -94,7 +93,7 @@ func TestDSCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSCPCode/match_by_full_id.tf"), Check: resource.ComposeAggregateTestCheckFunc( @@ -126,7 +125,7 @@ func TestDSCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSCPCode/match_by_unprefixed_id.tf"), Check: resource.ComposeAggregateTestCheckFunc( @@ -155,7 +154,7 @@ func TestDSCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSCPCode/match_by_unprefixed_id.tf"), ExpectError: regexp.MustCompile(`cp code not found`), @@ -179,7 +178,7 @@ func TestDSCPCode(t *testing.T) { }}, nil).Times(3) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSGroupNotFound/cp_code.tf"), diff --git a/pkg/providers/property/data_akamai_properties_search_test.go b/pkg/providers/property/data_akamai_properties_search_test.go index db72b2d05..49cf2966f 100644 --- a/pkg/providers/property/data_akamai_properties_search_test.go +++ b/pkg/providers/property/data_akamai_properties_search_test.go @@ -4,11 +4,10 @@ import ( "regexp" "testing" - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/stretchr/testify/mock" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/stretchr/testify/mock" ) func TestDSPropertiesSearch(t *testing.T) { @@ -55,7 +54,7 @@ func TestDSPropertiesSearch(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertiesSearch/match_by_hostname.tf"), Check: resource.ComposeAggregateTestCheckFunc( @@ -96,7 +95,7 @@ func TestDSPropertiesSearch(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertiesSearch/match_by_hostname.tf"), ExpectError: regexp.MustCompile("searching for properties"), diff --git a/pkg/providers/property/data_akamai_properties_test.go b/pkg/providers/property/data_akamai_properties_test.go index 5824e7336..425a7adfe 100644 --- a/pkg/providers/property/data_akamai_properties_test.go +++ b/pkg/providers/property/data_akamai_properties_test.go @@ -4,11 +4,10 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/stretchr/testify/mock" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/stretchr/testify/mock" ) func TestDataProperties(t *testing.T) { @@ -24,7 +23,7 @@ func TestDataProperties(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDataProperties/properties.tf"), Check: buildAggregatedTest(properties, "grp_testctr_test", "grp_test", "ctr_test"), @@ -47,7 +46,7 @@ func TestDataProperties(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDataProperties/properties_no_group_prefix.tf"), Check: buildAggregatedTest(properties, "grp_testctr_test", "test", "ctr_test"), @@ -70,7 +69,7 @@ func TestDataProperties(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDataProperties/properties_no_contract_prefix.tf"), Check: buildAggregatedTest(properties, "grp_testctr_test", "grp_test", "test"), diff --git a/pkg/providers/property/data_akamai_property_activation_test.go b/pkg/providers/property/data_akamai_property_activation_test.go index 4315533c4..f46abf2b1 100644 --- a/pkg/providers/property/data_akamai_property_activation_test.go +++ b/pkg/providers/property/data_akamai_property_activation_test.go @@ -140,7 +140,7 @@ func TestDataSourcePAPIPropertyActivation(t *testing.T) { } useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: test.steps, }) diff --git a/pkg/providers/property/data_akamai_property_hostnames_test.go b/pkg/providers/property/data_akamai_property_hostnames_test.go index be1ea3b28..15b614f00 100644 --- a/pkg/providers/property/data_akamai_property_hostnames_test.go +++ b/pkg/providers/property/data_akamai_property_hostnames_test.go @@ -49,7 +49,7 @@ func TestDataPropertyHostnames(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDataPropertyHostnames/property_hostnames.tf"), Check: buildAggregatedHostnamesTest(hostnameItems, "prp_test1", "grp_test", "ctr_test", "prp_test", 1), @@ -96,7 +96,7 @@ func TestDataPropertyHostnames(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDataPropertyHostnames/property_hostnames_no_group_prefix.tf"), Check: buildAggregatedHostnamesTest(hostnameItems, "prp_test1", "test", "ctr_test", "prp_test", 1), @@ -143,7 +143,7 @@ func TestDataPropertyHostnames(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDataPropertyHostnames/property_hostnames_no_contract_prefix.tf"), Check: buildAggregatedHostnamesTest(hostnameItems, "prp_test1", "grp_test", "test", "prp_test", 1), @@ -190,7 +190,7 @@ func TestDataPropertyHostnames(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDataPropertyHostnames/property_hostnames_no_property_prefix.tf"), Check: buildAggregatedHostnamesTest(hostnameItems, "prp_test1", "grp_test", "ctr_test", "prp_test", 1), diff --git a/pkg/providers/property/data_akamai_property_include_activation_test.go b/pkg/providers/property/data_akamai_property_include_activation_test.go index b29b46c3e..80903ae12 100644 --- a/pkg/providers/property/data_akamai_property_include_activation_test.go +++ b/pkg/providers/property/data_akamai_property_include_activation_test.go @@ -163,7 +163,7 @@ func TestDataPropertyIncludeActivation(t *testing.T) { test.init(t, client, test.attrs) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/property/data_akamai_property_include_parents_test.go b/pkg/providers/property/data_akamai_property_include_parents_test.go index c5d463284..ad2206e56 100644 --- a/pkg/providers/property/data_akamai_property_include_parents_test.go +++ b/pkg/providers/property/data_akamai_property_include_parents_test.go @@ -161,7 +161,7 @@ func TestDataPropertyIncludeParents(t *testing.T) { useClient(client, nil, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, fmt.Sprintf("testdata/TestDataPropertyIncludeParents/%s", test.givenTF)), Check: resource.ComposeAggregateTestCheckFunc(checkFuncs...), diff --git a/pkg/providers/property/data_akamai_property_include_rules_test.go b/pkg/providers/property/data_akamai_property_include_rules_test.go index edaf2ac6e..a8bd107e4 100644 --- a/pkg/providers/property/data_akamai_property_include_rules_test.go +++ b/pkg/providers/property/data_akamai_property_include_rules_test.go @@ -162,7 +162,7 @@ func TestDataPropertyIncludeRules(t *testing.T) { test.init(t, client, test.mockData) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/property/data_akamai_property_include_test.go b/pkg/providers/property/data_akamai_property_include_test.go index bde277cae..bb7d74146 100644 --- a/pkg/providers/property/data_akamai_property_include_test.go +++ b/pkg/providers/property/data_akamai_property_include_test.go @@ -8,9 +8,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" - "github.com/stretchr/testify/mock" - "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/stretchr/testify/mock" ) func TestDataPropertyInclude(t *testing.T) { @@ -137,7 +136,7 @@ func TestDataPropertyInclude(t *testing.T) { useClient(client, nil, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, fmt.Sprintf("testdata/TestDataPropertyInclude/%s", test.givenTF)), Check: resource.ComposeAggregateTestCheckFunc(checkFuncs...), diff --git a/pkg/providers/property/data_akamai_property_includes_test.go b/pkg/providers/property/data_akamai_property_includes_test.go index 4cb1c17ae..db4fac6ff 100644 --- a/pkg/providers/property/data_akamai_property_includes_test.go +++ b/pkg/providers/property/data_akamai_property_includes_test.go @@ -297,7 +297,7 @@ func TestDataPropertyIncludes(t *testing.T) { test.init(t, client, test.attrs) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, test.configPath), diff --git a/pkg/providers/property/data_akamai_property_products_test.go b/pkg/providers/property/data_akamai_property_products_test.go index 1ba7417e9..f27aabac1 100644 --- a/pkg/providers/property/data_akamai_property_products_test.go +++ b/pkg/providers/property/data_akamai_property_products_test.go @@ -5,16 +5,16 @@ import ( "regexp" "testing" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" - - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" ) func TestVerifyProductsDataSourceSchema(t *testing.T) { t.Run("akamai_property_products - test data source required contract", func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{{ Config: testConfig(""), @@ -38,7 +38,7 @@ func TestOutputProductsDataSource(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{{ Config: testConfig("contract_id = \"ctr_test\""), diff --git a/pkg/providers/property/data_akamai_property_rule_formats_test.go b/pkg/providers/property/data_akamai_property_rule_formats_test.go index d4c6018ad..087d18ad6 100644 --- a/pkg/providers/property/data_akamai_property_rule_formats_test.go +++ b/pkg/providers/property/data_akamai_property_rule_formats_test.go @@ -3,11 +3,10 @@ package property import ( "testing" - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/stretchr/testify/mock" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/stretchr/testify/mock" ) func Test_readPropertyRuleFormats(t *testing.T) { @@ -23,7 +22,7 @@ func Test_readPropertyRuleFormats(t *testing.T) { ).Return(&papi.GetRuleFormatsResponse{RuleFormats: ruleFormats}, nil) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRuleFormats/rule_formats.tf"), Check: resource.ComposeAggregateTestCheckFunc( diff --git a/pkg/providers/property/data_akamai_property_rules_builder_test.go b/pkg/providers/property/data_akamai_property_rules_builder_test.go index 82e309d2f..1956f1c7b 100644 --- a/pkg/providers/property/data_akamai_property_rules_builder_test.go +++ b/pkg/providers/property/data_akamai_property_rules_builder_test.go @@ -15,7 +15,7 @@ func TestDataPropertyRulesBuilder(t *testing.T) { t.Run("valid rule with 3 children - v2023-01-05", func(t *testing.T) { useClient(nil, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRulesBuilder/rules_v2023_01_05.tf"), Check: resource.ComposeAggregateTestCheckFunc( @@ -54,7 +54,7 @@ func TestDataPropertyRulesBuilder(t *testing.T) { t.Run("valid rule with 3 children - v2023-05-30", func(t *testing.T) { useClient(nil, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRulesBuilder/rules_v2023_05_30.tf"), Check: resource.ComposeAggregateTestCheckFunc( @@ -210,7 +210,7 @@ func TestDataPropertyRulesBuilder(t *testing.T) { t.Run("invalid rule with 3 children with different versions", func(t *testing.T) { useClient(nil, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRulesBuilder/rules_mixed_versions.tf"), ExpectError: regexp.MustCompile(`child rule is using different rule format \(rules_v2023_05_30\) than expected \(rules_v2023_01_05\)`), @@ -221,7 +221,7 @@ func TestDataPropertyRulesBuilder(t *testing.T) { t.Run("fails on rule with more than one behavior in one block", func(t *testing.T) { useClient(nil, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRulesBuilder/rules_error_too_many_elements.tf"), ExpectError: regexp.MustCompile(`expected 1 element\(s\), got 2`), @@ -232,7 +232,7 @@ func TestDataPropertyRulesBuilder(t *testing.T) { t.Run("fails on rule with is_secure outside default rule", func(t *testing.T) { useClient(nil, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRulesBuilder/rules_with_is_secure_outside_default.tf"), ExpectError: regexp.MustCompile(`cannot be used outside 'default' rule: is_secure`), @@ -243,7 +243,7 @@ func TestDataPropertyRulesBuilder(t *testing.T) { t.Run("fails on rule with variable outside default rule", func(t *testing.T) { useClient(nil, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRulesBuilder/rules_with_variable_outside_default.tf"), ExpectError: regexp.MustCompile(`cannot be used outside 'default' rule: variable`), @@ -254,7 +254,7 @@ func TestDataPropertyRulesBuilder(t *testing.T) { t.Run("valid rule with one child and some values are variables", func(t *testing.T) { useClient(nil, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRulesBuilder/rules_variables.tf"), Check: resource.ComposeAggregateTestCheckFunc( diff --git a/pkg/providers/property/data_akamai_property_rules_template_test.go b/pkg/providers/property/data_akamai_property_rules_template_test.go index f35454337..51c5c2dd4 100644 --- a/pkg/providers/property/data_akamai_property_rules_template_test.go +++ b/pkg/providers/property/data_akamai_property_rules_template_test.go @@ -19,7 +19,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_vars_map.tf"), @@ -41,7 +41,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_vars_map_ns.tf"), @@ -63,7 +63,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_null_values.tf"), @@ -101,7 +101,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_vars_file.tf"), @@ -123,7 +123,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_file_data_conflict.tf"), @@ -141,7 +141,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_missing_data.tf"), @@ -159,7 +159,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_vars_conflict.tf"), @@ -173,7 +173,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_vars_invalid_type.tf"), @@ -187,7 +187,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_var_not_found.tf"), @@ -201,7 +201,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_vars_invalid_value.tf"), @@ -215,7 +215,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_vars_file_not_found.tf"), @@ -229,7 +229,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_invalid_json.tf"), @@ -243,7 +243,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_file_not_found.tf"), @@ -258,7 +258,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_file_is_empty.tf"), @@ -674,7 +674,7 @@ func TestVariablesNesting(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -708,7 +708,7 @@ func TestVariablesAndIncludesNestingCyclicDependency(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configPath), @@ -726,7 +726,7 @@ func TestMultipleTemplates(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_multiple_templates.tf"), diff --git a/pkg/providers/property/data_akamai_property_rules_test.go b/pkg/providers/property/data_akamai_property_rules_test.go index 42bc3ff77..110799ffb 100644 --- a/pkg/providers/property/data_akamai_property_rules_test.go +++ b/pkg/providers/property/data_akamai_property_rules_test.go @@ -5,11 +5,10 @@ import ( "regexp" "testing" - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/stretchr/testify/mock" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/stretchr/testify/mock" ) func TestDSPropertyRulesRead(t *testing.T) { @@ -51,7 +50,7 @@ func TestDSPropertyRulesRead(t *testing.T) { mockImpl(client) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRules/ds_property_rules.tf"), @@ -127,7 +126,7 @@ func TestDSPropertyRulesRead(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, test.configFile), @@ -157,7 +156,7 @@ func TestDSPropertyRulesRead(t *testing.T) { mockImpl(client) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRules/with_versioned_rule_format.tf"), @@ -176,7 +175,7 @@ func TestDSPropertyRulesRead(t *testing.T) { mockImpl(client) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRules/with_versioned_rule_format.tf"), @@ -191,7 +190,7 @@ func TestDSPropertyRulesRead(t *testing.T) { client := &papi.Mock{} useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRules/missing_group_id.tf"), @@ -206,7 +205,7 @@ func TestDSPropertyRulesRead(t *testing.T) { client := &papi.Mock{} useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRules/missing_contract_id.tf"), @@ -221,7 +220,7 @@ func TestDSPropertyRulesRead(t *testing.T) { client := &papi.Mock{} useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRules/empty_contract_id.tf"), @@ -236,7 +235,7 @@ func TestDSPropertyRulesRead(t *testing.T) { client := &papi.Mock{} useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRules/empty_group_id.tf"), @@ -259,7 +258,7 @@ func TestDSPropertyRulesRead(t *testing.T) { mockImpl(client) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRules/ds_property_rules.tf"), @@ -296,7 +295,7 @@ func TestDSPropertyRulesRead(t *testing.T) { mockImpl(client) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRules/ds_property_rules.tf"), @@ -311,7 +310,7 @@ func TestDSPropertyRulesRead(t *testing.T) { func TestDSPropertyRulesRead_Fail(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRules/always_fails.tf"), ExpectError: regexp.MustCompile(`Error: provided value cannot be blank`), diff --git a/pkg/providers/property/data_akamai_property_test.go b/pkg/providers/property/data_akamai_property_test.go index f30656b0b..e1906f355 100644 --- a/pkg/providers/property/data_akamai_property_test.go +++ b/pkg/providers/property/data_akamai_property_test.go @@ -6,13 +6,12 @@ import ( "regexp" "testing" - "github.com/stretchr/testify/mock" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/stretchr/testify/mock" ) func TestDataProperty(t *testing.T) { @@ -436,7 +435,7 @@ func TestDataProperty(t *testing.T) { useClient(client, nil, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, fmt.Sprintf("testdata/TestDataProperty/%s", test.givenTF)), Check: resource.ComposeAggregateTestCheckFunc(checkFuncs...), diff --git a/pkg/providers/property/data_property_akamai_contract_test.go b/pkg/providers/property/data_property_akamai_contract_test.go index 21d29c4bb..08ffb2314 100644 --- a/pkg/providers/property/data_property_akamai_contract_test.go +++ b/pkg/providers/property/data_property_akamai_contract_test.go @@ -191,7 +191,7 @@ func Test_DSReadContract(t *testing.T) { test.init(t, client, test.mockData) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/property/data_property_akamai_group_test.go b/pkg/providers/property/data_property_akamai_group_test.go index 8e2ef1086..e5b90e2d1 100644 --- a/pkg/providers/property/data_property_akamai_group_test.go +++ b/pkg/providers/property/data_property_akamai_group_test.go @@ -151,7 +151,7 @@ func Test_DSReadGroup(t *testing.T) { test.init(t, client, test.mockData) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { diff --git a/pkg/providers/property/data_property_akamai_groups_test.go b/pkg/providers/property/data_property_akamai_groups_test.go index e5c4207a8..cc419ec46 100644 --- a/pkg/providers/property/data_property_akamai_groups_test.go +++ b/pkg/providers/property/data_property_akamai_groups_test.go @@ -4,11 +4,10 @@ import ( "log" "testing" - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/hashicorp/terraform-plugin-testing/terraform" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestDataSourceMultipleGroups_basic(t *testing.T) { @@ -31,7 +30,7 @@ func TestDataSourceMultipleGroups_basic(t *testing.T) { }}}}, nil) useClient(client, nil, func() { resource.ParallelTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), CheckDestroy: testAccCheckAkamaiMultipleGroupsDestroy, IsUnitTest: true, Steps: []resource.TestStep{ @@ -70,7 +69,7 @@ func TestGroup_ContractNotFoundInState(t *testing.T) { }}}}, nil) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSContractRequired/groups.tf"), diff --git a/pkg/providers/property/provider_test.go b/pkg/providers/property/provider_test.go index 915edd320..d8f3cb31a 100644 --- a/pkg/providers/property/provider_test.go +++ b/pkg/providers/property/provider_test.go @@ -2,7 +2,6 @@ package property import ( "context" - "log" "os" "sync" "testing" @@ -13,65 +12,14 @@ import ( "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/go-hclog" "github.com/hashicorp/terraform-plugin-framework/datasource" - "github.com/hashicorp/terraform-plugin-framework/provider" "github.com/hashicorp/terraform-plugin-framework/providerserver" - "github.com/hashicorp/terraform-plugin-go/tfprotov6" - "github.com/hashicorp/terraform-plugin-mux/tf5to6server" - "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-go/tfprotov5" "github.com/hashicorp/terraform-plugin-mux/tf5muxserver" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -) - -var ( - testAccProviders map[string]func() (tfprotov6.ProviderServer, error) - testAccPluginProvider *schema.Provider - testAccFrameworkProvider provider.Provider ) func TestMain(m *testing.M) { - testAccPluginProvider = akamai.NewPluginProvider(NewPluginSubprovider())() - testAccFrameworkProvider = akamai.NewFrameworkProvider(NewFrameworkSubprovider())() - - testAccProviders = map[string]func() (tfprotov6.ProviderServer, error){ - "akamai": func() (tfprotov6.ProviderServer, error) { - ctx := context.Background() - - upgradedSdkProvider, err := tf5to6server.UpgradeServer( - context.Background(), - testAccPluginProvider.GRPCProvider, - ) - if err != nil { - return nil, err - } - - providers := []func() tfprotov6.ProviderServer{ - func() tfprotov6.ProviderServer { - return upgradedSdkProvider - }, - providerserver.NewProtocol6( - testAccFrameworkProvider, - ), - } - - muxServer, err := tf6muxserver.NewMuxServer(ctx, providers...) - if err != nil { - return nil, err - } - - return muxServer.ProviderServer(), nil - }, - } - - if err := testutils.TFTestSetup(); err != nil { - log.Fatal(err) - } - exitCode := m.Run() - if err := testutils.TFTestTeardown(); err != nil { - log.Fatal(err) - } - os.Exit(exitCode) + testutils.TestRunner(m) } // Only allow one test at a time to patch the client via useClient() diff --git a/pkg/providers/property/resource_akamai_cp_code_test.go b/pkg/providers/property/resource_akamai_cp_code_test.go index a7856f66e..f07ca223f 100644 --- a/pkg/providers/property/resource_akamai_cp_code_test.go +++ b/pkg/providers/property/resource_akamai_cp_code_test.go @@ -10,10 +10,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" - "github.com/stretchr/testify/mock" "github.com/tj/assert" ) @@ -155,7 +153,7 @@ func TestResCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestResCPCode/create_new_cp_code.tf"), Check: resource.ComposeAggregateTestCheckFunc( @@ -192,7 +190,7 @@ func TestResCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestResCPCode/use_existing_cp_code.tf"), Check: resource.ComposeAggregateTestCheckFunc( @@ -229,7 +227,7 @@ func TestResCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestResCPCode/use_existing_cp_code.tf"), Check: resource.ComposeAggregateTestCheckFunc( @@ -265,7 +263,7 @@ func TestResCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestResCPCode/use_existing_cp_code.tf"), ExpectError: regexp.MustCompile("Couldn't find product id on the CP Code"), @@ -296,7 +294,7 @@ func TestResCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCPCode/change_name_step0.tf"), @@ -326,7 +324,7 @@ func TestResCPCode(t *testing.T) { expectGetCPCode(client, "ctr_1", "grp_2", 0, &CPCodes, nil).Times(4) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCPCode/import_cp_code.tf"), @@ -359,7 +357,7 @@ func TestResCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCPCode/import_cp_code.tf"), @@ -380,7 +378,7 @@ func TestResCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCPCode/import_cp_code.tf"), @@ -411,7 +409,7 @@ func TestResCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCPCode/change_name_step0.tf"), @@ -479,7 +477,7 @@ func TestResCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCPCode/change_name_step0.tf"), @@ -516,7 +514,7 @@ func TestResCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCPCode/change_name_step0.tf"), @@ -566,7 +564,7 @@ func TestResCPCode(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCPCode/change_name_step0.tf"), @@ -588,7 +586,7 @@ func TestResCPCode(t *testing.T) { expectedErr := regexp.MustCompile("`product_id` must be specified for creation") resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResCPCode/missing_product.tf"), diff --git a/pkg/providers/property/resource_akamai_edge_hostname_test.go b/pkg/providers/property/resource_akamai_edge_hostname_test.go index 41d376ad5..624e80d0b 100644 --- a/pkg/providers/property/resource_akamai_edge_hostname_test.go +++ b/pkg/providers/property/resource_akamai_edge_hostname_test.go @@ -8,15 +8,14 @@ import ( "regexp" "testing" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/hapi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/hapi" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" ) func TestResourceEdgeHostname(t *testing.T) { @@ -1053,7 +1052,7 @@ func TestResourceEdgeHostname(t *testing.T) { test.init(client, clientHapi) useClient(client, clientHapi, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: test.steps, }) }) @@ -1135,7 +1134,7 @@ func TestResourceEdgeHostnames_WithImport(t *testing.T) { expectGetEdgeHostnames(client, "ctr_1", "grp_2") useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { // please note that import does not support product id, that why we only define it in config for creation diff --git a/pkg/providers/property/resource_akamai_property_activation_test.go b/pkg/providers/property/resource_akamai_property_activation_test.go index a7b617007..3bb6d59b8 100644 --- a/pkg/providers/property/resource_akamai_property_activation_test.go +++ b/pkg/providers/property/resource_akamai_property_activation_test.go @@ -5,11 +5,10 @@ import ( "regexp" "testing" - "github.com/stretchr/testify/mock" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/stretchr/testify/mock" ) func TestResourcePAPIPropertyActivation(t *testing.T) { @@ -659,7 +658,7 @@ func TestResourcePAPIPropertyActivation(t *testing.T) { } useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: test.steps, }) diff --git a/pkg/providers/property/resource_akamai_property_include_activation_test.go b/pkg/providers/property/resource_akamai_property_include_activation_test.go index 0eecd09b5..f345b9715 100644 --- a/pkg/providers/property/resource_akamai_property_include_activation_test.go +++ b/pkg/providers/property/resource_akamai_property_include_activation_test.go @@ -304,7 +304,7 @@ func TestResourcePropertyIncludeActivation(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/property_include_activation.tf", testDir)), @@ -424,7 +424,7 @@ func TestResourcePropertyIncludeActivation(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/property_include_activation.tf", testDir)), @@ -482,7 +482,7 @@ func TestResourcePropertyIncludeActivation(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/property_include_activation.tf", testDir)), @@ -530,7 +530,7 @@ func TestResourcePropertyIncludeActivation(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/property_include_activation.tf", testDir)), @@ -580,7 +580,7 @@ func TestResourcePropertyIncludeActivation(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/no_compliance_record_on_production.tf", testDir)), @@ -635,7 +635,7 @@ func TestResourcePropertyIncludeActivation(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/property_include_activation.tf", testDir)), @@ -691,7 +691,7 @@ func TestResourcePropertyIncludeActivation(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/property_include_activation.tf", testDir)), @@ -731,7 +731,7 @@ func TestResourcePropertyIncludeActivation(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/property_include_activation.tf", testDir)), @@ -799,7 +799,7 @@ func TestResourcePropertyIncludeActivation(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/property_include_activation.tf", testDir)), diff --git a/pkg/providers/property/resource_akamai_property_include_test.go b/pkg/providers/property/resource_akamai_property_include_test.go index 5c8d5d217..f583885d1 100644 --- a/pkg/providers/property/resource_akamai_property_include_test.go +++ b/pkg/providers/property/resource_akamai_property_include_test.go @@ -972,7 +972,7 @@ func TestResourcePropertyInclude(t *testing.T) { useClient(client, &hapi.Mock{}, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: testCase.steps, }) diff --git a/pkg/providers/property/resource_akamai_property_test.go b/pkg/providers/property/resource_akamai_property_test.go index 6f7a537b2..4e9975e0f 100644 --- a/pkg/providers/property/resource_akamai_property_test.go +++ b/pkg/providers/property/resource_akamai_property_test.go @@ -767,7 +767,7 @@ func TestResProperty(t *testing.T) { return func(t *testing.T) { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestResProperty/ConfigError/%s.tf", fixtureName), ExpectError: regexp.MustCompile(rx), @@ -791,7 +791,7 @@ func TestResProperty(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: tc.Steps(State, fixturePrefix), }) @@ -886,7 +886,7 @@ func TestResProperty(t *testing.T) { tc.ClientSetup(State) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: tc.Steps(State, ""), }) }) @@ -998,7 +998,7 @@ func TestResProperty(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/%s-step0.tf", t.Name()), @@ -1047,7 +1047,7 @@ func TestResProperty(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/%s/step0.tf", t.Name()), @@ -1098,7 +1098,7 @@ func TestResProperty(t *testing.T) { ExpectRemoveProperty(client, "prp_1", "", "") useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResProperty/property_update_with_validation_error_for_rules.tf"), @@ -1265,7 +1265,7 @@ func TestResProperty(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResProperty/CreationUpdateNoHostnames/creation/property_create.tf"), @@ -1321,7 +1321,7 @@ func TestResProperty(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResProperty/CreationUpdateNoHostnames/creation/property_create.tf"), @@ -1369,7 +1369,7 @@ func TestResProperty(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResProperty/CreationUpdateNoHostnames/creation/property_create.tf"), @@ -1412,7 +1412,7 @@ func TestResProperty(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestResProperty/Creation/property.tf"), ExpectError: regexp.MustCompile("group not found: grp_0"), @@ -1439,7 +1439,7 @@ func TestResProperty(t *testing.T) { client.On("CreateProperty", AnyCTX, req).Return(nil, fmt.Errorf("given property name is not unique")) useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/%s.tf", t.Name()), @@ -1658,7 +1658,7 @@ func TestResProperty(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResProperty/CreationUpdateIncorrectEdgeHostname/create/property.tf"), From d51c110fc7ab364bf410e19cf44dfaf6ea834f28 Mon Sep 17 00:00:00 2001 From: Darek Stopka Date: Mon, 27 Nov 2023 09:39:49 +0100 Subject: [PATCH 10/52] DXE-3374 Fix tests not using ProtoV6ProviderFactories --- .../resource_akamai_clientlists_list_activation_test.go | 2 +- .../clientlists/resource_akamai_clientlists_list_test.go | 2 +- .../cloudlets/resource_akamai_cloudlets_policy_test.go | 2 +- pkg/providers/edgeworkers/resource_akamai_edgeworker_test.go | 2 +- .../property/data_akamai_property_rules_builder_test.go | 2 +- .../resource_akamai_property_include_activation_test.go | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/providers/clientlists/resource_akamai_clientlists_list_activation_test.go b/pkg/providers/clientlists/resource_akamai_clientlists_list_activation_test.go index 8d434ee85..0a95cf685 100644 --- a/pkg/providers/clientlists/resource_akamai_clientlists_list_activation_test.go +++ b/pkg/providers/clientlists/resource_akamai_clientlists_list_activation_test.go @@ -500,7 +500,7 @@ func TestClientListActivationResource(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/activation_create.tf", testDir)), diff --git a/pkg/providers/clientlists/resource_akamai_clientlists_list_test.go b/pkg/providers/clientlists/resource_akamai_clientlists_list_test.go index 6c736979d..a23fcd069 100644 --- a/pkg/providers/clientlists/resource_akamai_clientlists_list_test.go +++ b/pkg/providers/clientlists/resource_akamai_clientlists_list_test.go @@ -810,7 +810,7 @@ func TestResourceClientList(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: loadFixtureString(fmt.Sprintf("%s/list_create.tf", testDir)), diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go index af3dec93a..9a8c3e012 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go @@ -847,7 +847,7 @@ func TestResourcePolicyV2(t *testing.T) { expectRemovePolicy(t, client, 2, 1, 0) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), diff --git a/pkg/providers/edgeworkers/resource_akamai_edgeworker_test.go b/pkg/providers/edgeworkers/resource_akamai_edgeworker_test.go index 910181838..54727d424 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgeworker_test.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgeworker_test.go @@ -418,7 +418,7 @@ func TestResourceEdgeWorkersEdgeWorker(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/edgeworker_create_with_timeout.tf", testDir)), diff --git a/pkg/providers/property/data_akamai_property_rules_builder_test.go b/pkg/providers/property/data_akamai_property_rules_builder_test.go index 1956f1c7b..de880ae42 100644 --- a/pkg/providers/property/data_akamai_property_rules_builder_test.go +++ b/pkg/providers/property/data_akamai_property_rules_builder_test.go @@ -93,7 +93,7 @@ func TestDataPropertyRulesBuilder(t *testing.T) { t.Run("valid rule with 3 children - v2023-09-20", func(t *testing.T) { useClient(nil, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRulesBuilder/rules_v2023_09_20.tf"), Check: resource.ComposeAggregateTestCheckFunc( diff --git a/pkg/providers/property/resource_akamai_property_include_activation_test.go b/pkg/providers/property/resource_akamai_property_include_activation_test.go index f345b9715..45b1c486f 100644 --- a/pkg/providers/property/resource_akamai_property_include_activation_test.go +++ b/pkg/providers/property/resource_akamai_property_include_activation_test.go @@ -349,7 +349,7 @@ func TestResourcePropertyIncludeActivation(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/property_include_activation_with_timeout.tf", testDir)), @@ -596,7 +596,7 @@ func TestResourcePropertyIncludeActivation(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/property_include_activation_incorrect_timeout.tf", testDir)), From 5dabd6eb5c6ad1e8e43dfbcfc754260b81a80fe3 Mon Sep 17 00:00:00 2001 From: Darek Stopka Date: Fri, 23 Jun 2023 15:00:32 +0200 Subject: [PATCH 11/52] DXE-3373 Move pkg/tests to testutils package --- pkg/{test => common/testutils}/edgerc | 0 pkg/common/testutils/fixture.go | 22 ++++++ pkg/common/testutils/mocks.go | 31 ++++++++ pkg/common/testutils/provider_factory.go | 39 ++++++++++ pkg/common/testutils/testutils.go | 71 ++++++++----------- .../match_by_id.tf | 2 +- .../match_by_policy_id.tf | 2 +- .../match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../match_by_policy_id.tf | 2 +- .../TestDSApiEndpoints/match_by_id.tf | 2 +- .../TestDSApiHostnameCoverage/match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../TestDSAttackGroupActions/match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../TestDSAttackGroups/match_by_id.tf | 2 +- .../TestDSBypassNetworkLists/match_by_id.tf | 2 +- .../TestDSConfiguration/match_by_id.tf | 2 +- .../TestDSConfiguration/nonexistent_config.tf | 2 +- .../TestDSConfigurationVersion/match_by_id.tf | 2 +- .../TestDSContractsGroups/match_by_id.tf | 2 +- .../testdata/TestDSCustomDeny/match_by_id.tf | 2 +- .../TestDSCustomRuleActions/match_by_id.tf | 2 +- .../testdata/TestDSCustomRules/match_by_id.tf | 2 +- .../appsec/testdata/TestDSEval/match_by_id.tf | 2 +- .../testdata/TestDSEvalGroups/match_by_id.tf | 2 +- .../TestDSEvalPenaltyBox/match_by_id.tf | 2 +- .../TestDSEvalRuleActions/match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../testdata/TestDSEvalRules/match_by_id.tf | 2 +- .../TestDSExportConfiguration/match_by_id.tf | 2 +- .../TestDSFailoverHostnames/match_by_id.tf | 2 +- .../testdata/TestDSIPGeo/match_by_id.tf | 2 +- .../TestDSMalwareContentTypes/match_by_id.tf | 2 +- .../TestDSMalwarePolicies/match_by_id.tf | 2 +- .../match_by_id_single_policy.tf | 2 +- .../TestDSMalwarePolicyActions/match_by_id.tf | 2 +- .../TestDSMatchTargets/match_by_id.tf | 2 +- .../testdata/TestDSPenaltyBox/match_by_id.tf | 2 +- .../TestDSPenaltyBoxes/match_by_id.tf | 2 +- .../TestDSPolicyProtections/match_by_id.tf | 2 +- .../TestDSRatePolicies/match_by_id.tf | 2 +- .../TestDSRatePolicyActions/match_by_id.tf | 2 +- .../TestDSRateProtections/match_by_id.tf | 2 +- .../TestDSReputationAnalysis/match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../TestDSReputationProfiles/match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../testdata/TestDSRuleActions/match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../testdata/TestDSRuleUpgrade/match_by_id.tf | 2 +- .../testdata/TestDSRules/match_by_id.tf | 2 +- .../TestDSSecurityPolicy/match_by_id.tf | 2 +- .../TestDSSelectableHostnames/match_by_id.tf | 2 +- .../TestDSSelectedHostnames/match_by_id.tf | 2 +- .../TestDSSiemDefinitions/match_by_id.tf | 2 +- .../TestDSSiemSettings/match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../TestDSSlowPostProtections/match_by_id.tf | 2 +- .../testdata/TestDSThreatIntel/match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../TestDSVersionNotes/match_by_id.tf | 2 +- .../testdata/TestDSWAFMode/match_by_id.tf | 2 +- .../TestDSWAFProtections/match_by_id.tf | 2 +- .../TestDSWAPSelectedHostnames/match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../update_by_id.tf | 2 +- .../TestResActivations/match_by_id.tf | 2 +- .../TestResActivations/update_by_id.tf | 2 +- .../TestResActivations/update_notes.tf | 2 +- .../match_by_id.tf | 2 +- .../update_by_policy_id.tf | 2 +- .../match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../update_by_policy_id.tf | 2 +- .../match_by_id.tf | 2 +- .../TestResAttackGroup/match_by_id.tf | 2 +- .../TestResAttackGroupAction/match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../TestResBypassNetworkLists/match_by_id.tf | 2 +- .../TestResConfiguration/match_by_id.tf | 2 +- .../TestResConfiguration/modify_contract.tf | 2 +- .../TestResConfiguration/update_by_id.tf | 2 +- .../TestResConfigurationClone/match_by_id.tf | 2 +- .../TestResConfigurationRename/match_by_id.tf | 2 +- .../update_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../testdata/TestResCustomDeny/match_by_id.tf | 2 +- .../TestResCustomDeny/update_by_id.tf | 2 +- .../testdata/TestResCustomRule/match_by_id.tf | 2 +- .../TestResCustomRule/update_by_id.tf | 2 +- .../TestResCustomRuleAction/match_by_id.tf | 2 +- .../testdata/TestResEval/match_by_id.tf | 2 +- .../testdata/TestResEval/update_by_id.tf | 2 +- .../testdata/TestResEvalGroup/match_by_id.tf | 2 +- .../TestResEvalPenaltyBox/match_by_id.tf | 2 +- .../testdata/TestResEvalRule/match_by_id.tf | 2 +- .../TestResEvalRuleAction/match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../appsec/testdata/TestResIPGeo/allow.tf | 2 +- .../TestResIPGeo/allow_with_empty_lists.tf | 2 +- .../TestResIPGeo/block_with_empty_lists.tf | 2 +- .../testdata/TestResIPGeo/match_by_id.tf | 2 +- .../TestResIPGeo/ukraine_match_by_id.tf | 2 +- .../TestResIPGeoProtection/match_by_id.tf | 2 +- .../TestResIPGeoProtection/update_by_id.tf | 2 +- .../TestResMalwarePolicy/match_by_id.tf | 2 +- .../TestResMalwarePolicy/update_by_id.tf | 2 +- .../TestResMalwarePolicyAction/create.tf | 2 +- .../TestResMalwarePolicyAction/update.tf | 2 +- .../match_by_id.tf | 2 +- .../update_by_id.tf | 2 +- .../TestResMalwareProtection/match_by_id.tf | 2 +- .../TestResMatchTarget/match_by_id.tf | 2 +- .../TestResMatchTarget/update_by_id.tf | 2 +- .../TestResMatchTargetSequence/match_by_id.tf | 2 +- .../update_by_id.tf | 2 +- .../testdata/TestResPenaltyBox/match_by_id.tf | 2 +- .../testdata/TestResRatePolicy/match_by_id.tf | 2 +- .../TestResRatePolicy/update_by_id.tf | 2 +- .../TestResRatePolicyAction/create.tf | 2 +- .../TestResRatePolicyAction/update.tf | 2 +- .../TestResRateProtection/match_by_id.tf | 2 +- .../TestResRateProtection/update_by_id.tf | 2 +- .../TestResReputationAnalysis/match_by_id.tf | 2 +- .../TestResReputationAnalysis/update_by_id.tf | 2 +- .../TestResReputationProfile/match_by_id.tf | 2 +- .../TestResReputationProfile/update_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../update_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../update_by_id.tf | 2 +- .../testdata/TestResRule/match_by_id.tf | 2 +- .../testdata/TestResRuleAction/match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../TestResRuleUpgrade/match_by_id.tf | 2 +- .../TestResSecurityPolicy/match_by_id.tf | 2 +- .../TestResSecurityPolicy/update_by_id.tf | 2 +- .../TestResSecurityPolicyClone/match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../update_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../update_by_id.tf | 2 +- .../TestResSelectedHostname/match_by_id.tf | 2 +- .../TestResSiemSettings/match_by_id.tf | 2 +- .../TestResSlowPostProtection/match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../TestResThreatIntel/match_by_id.tf | 2 +- .../TestResVersionNotes/match_by_id.tf | 2 +- .../TestResWAFEvalMode/match_by_id.tf | 2 +- .../testdata/TestResWAFMode/match_by_id.tf | 2 +- .../TestResWAFProtection/match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- ..._botman_akamai_bot_category_action_test.go | 5 +- ..._akamai_botman_akamai_bot_category_test.go | 5 +- ...a_akamai_botman_akamai_defined_bot_test.go | 5 +- ...akamai_botman_bot_analytics_cookie_test.go | 3 +- ...botman_bot_analytics_cookie_values_test.go | 3 +- ...amai_botman_bot_category_exception_test.go | 3 +- ...akamai_botman_bot_detection_action_test.go | 5 +- .../data_akamai_botman_bot_detection_test.go | 5 +- ...otman_bot_endpoint_coverage_report_test.go | 9 ++- ...mai_botman_bot_management_settings_test.go | 3 +- ...ata_akamai_botman_challenge_action_test.go | 5 +- ...i_botman_challenge_injection_rules_test.go | 3 +- ...otman_challenge_interception_rules_test.go | 3 +- ...akamai_botman_client_side_security_test.go | 3 +- ...a_akamai_botman_conditional_action_test.go | 5 +- ..._botman_custom_bot_category_action_test.go | 5 +- ...otman_custom_bot_category_sequence_test.go | 3 +- ..._akamai_botman_custom_bot_category_test.go | 5 +- ...amai_botman_custom_client_sequence_test.go | 3 +- .../data_akamai_botman_custom_client_test.go | 5 +- ...a_akamai_botman_custom_defined_bot_test.go | 5 +- ...a_akamai_botman_custom_deny_action_test.go | 5 +- ...akamai_botman_javascript_injection_test.go | 3 +- ...n_recategorized_akamai_defined_bot_test.go | 5 +- ...data_akamai_botman_response_action_test.go | 5 +- ...amai_botman_serve_alternate_action_test.go | 5 +- ..._transactional_endpoint_protection_test.go | 3 +- ...amai_botman_transactional_endpoint_test.go | 5 +- ..._botman_akamai_bot_category_action_test.go | 5 +- ...akamai_botman_bot_analytics_cookie_test.go | 9 ++- ...amai_botman_bot_category_exception_test.go | 9 ++- ...akamai_botman_bot_detection_action_test.go | 5 +- ...mai_botman_bot_management_settings_test.go | 9 ++- ...rce_akamai_botman_challenge_action_test.go | 7 +- ...i_botman_challenge_injection_rules_test.go | 9 ++- ...otman_challenge_interception_rules_test.go | 9 ++- ...akamai_botman_client_side_security_test.go | 9 ++- ...e_akamai_botman_conditional_action_test.go | 7 +- ..._botman_custom_bot_category_action_test.go | 5 +- ...otman_custom_bot_category_sequence_test.go | 5 +- ..._akamai_botman_custom_bot_category_test.go | 7 +- ...amai_botman_custom_client_sequence_test.go | 5 +- ...source_akamai_botman_custom_client_test.go | 7 +- ...e_akamai_botman_custom_defined_bot_test.go | 7 +- ...e_akamai_botman_custom_deny_action_test.go | 7 +- ...akamai_botman_javascript_injection_test.go | 9 ++- ...n_recategorized_akamai_defined_bot_test.go | 5 +- ...amai_botman_serve_alternate_action_test.go | 7 +- ..._transactional_endpoint_protection_test.go | 9 ++- ...amai_botman_transactional_endpoint_test.go | 5 +- .../TestDataAkamaiBotCategory/basic.tf | 2 +- .../filter_by_name.tf | 2 +- .../TestDataAkamaiBotCategoryAction/basic.tf | 2 +- .../filter_by_id.tf | 2 +- .../TestDataAkamaiDefinedBot/basic.tf | 2 +- .../filter_by_name.tf | 2 +- .../TestDataBotAnalyticsCookie/basic.tf | 2 +- .../TestDataBotAnalyticsCookieValues/basic.tf | 2 +- .../TestDataBotCategoryException/basic.tf | 2 +- .../testdata/TestDataBotDetection/basic.tf | 2 +- .../TestDataBotDetection/filter_by_name.tf | 2 +- .../TestDataBotDetectionAction/basic.tf | 2 +- .../filter_by_id.tf | 2 +- .../basic.tf | 2 +- .../filter_by_id.tf | 2 +- .../with_config.tf | 2 +- .../with_config_filter_by_id.tf | 2 +- .../TestDataBotManagementSettings/basic.tf | 2 +- .../testdata/TestDataChallengeAction/basic.tf | 2 +- .../TestDataChallengeAction/filter_by_id.tf | 2 +- .../TestDataChallengeInjectionRules/basic.tf | 2 +- .../basic.tf | 2 +- .../TestDataClientSideSecurity/basic.tf | 2 +- .../TestDataConditionalAction/basic.tf | 2 +- .../TestDataConditionalAction/filter_by_id.tf | 2 +- .../TestDataCustomBotCategory/basic.tf | 2 +- .../TestDataCustomBotCategory/filter_by_id.tf | 2 +- .../TestDataCustomBotCategoryAction/basic.tf | 2 +- .../filter_by_id.tf | 2 +- .../basic.tf | 2 +- .../testdata/TestDataCustomClient/basic.tf | 2 +- .../TestDataCustomClient/filter_by_id.tf | 2 +- .../TestDataCustomClientSequence/basic.tf | 2 +- .../TestDataCustomDefinedBot/basic.tf | 2 +- .../TestDataCustomDefinedBot/filter_by_id.tf | 2 +- .../TestDataCustomDenyAction/basic.tf | 2 +- .../TestDataCustomDenyAction/filter_by_id.tf | 2 +- .../TestDataJavascriptInjection/basic.tf | 2 +- .../basic.tf | 2 +- .../filter_by_id.tf | 2 +- .../testdata/TestDataResponseAction/basic.tf | 2 +- .../TestDataResponseAction/filter_by_id.tf | 2 +- .../TestDataServeAlternateAction/basic.tf | 2 +- .../filter_by_id.tf | 2 +- .../TestDataTransactionalEndpoint/basic.tf | 2 +- .../filter_by_id.tf | 2 +- .../basic.tf | 2 +- .../create.tf | 2 +- .../update.tf | 2 +- .../TestResourceBotAnalyticsCookie/create.tf | 2 +- .../TestResourceBotAnalyticsCookie/update.tf | 2 +- .../create.tf | 2 +- .../update.tf | 2 +- .../TestResourceBotDetectionAction/create.tf | 2 +- .../TestResourceBotDetectionAction/update.tf | 2 +- .../create.tf | 2 +- .../update.tf | 2 +- .../TestResourceChallengeAction/create.tf | 2 +- .../TestResourceChallengeAction/update.tf | 2 +- .../create.tf | 2 +- .../update.tf | 2 +- .../create.tf | 2 +- .../update.tf | 2 +- .../TestResourceClientSideSecurity/create.tf | 2 +- .../TestResourceClientSideSecurity/update.tf | 2 +- .../TestResourceConditionalAction/create.tf | 2 +- .../TestResourceConditionalAction/update.tf | 2 +- .../TestResourceCustomBotCategory/create.tf | 2 +- .../TestResourceCustomBotCategory/update.tf | 2 +- .../create.tf | 2 +- .../update.tf | 2 +- .../create.tf | 2 +- .../update.tf | 2 +- .../TestResourceCustomClient/create.tf | 2 +- .../TestResourceCustomClient/update.tf | 2 +- .../create.tf | 2 +- .../update.tf | 2 +- .../TestResourceCustomDefinedBot/create.tf | 2 +- .../TestResourceCustomDefinedBot/update.tf | 2 +- .../TestResourceCustomDenyAction/create.tf | 2 +- .../TestResourceCustomDenyAction/update.tf | 2 +- .../TestResourceJavascriptInjection/create.tf | 2 +- .../TestResourceJavascriptInjection/update.tf | 2 +- .../create.tf | 2 +- .../update.tf | 2 +- .../create.tf | 2 +- .../update.tf | 2 +- .../create.tf | 2 +- .../update.tf | 2 +- .../create.tf | 2 +- .../update.tf | 2 +- .../testData/TestDSClientList/match_all.tf | 2 +- .../TestDSClientList/match_by_filters.tf | 2 +- .../TestResActivation/activation_create.tf | 2 +- .../activation_missing_param.tf | 2 +- .../TestResActivation/activation_update.tf | 2 +- .../activation_update_comments_suppressed.tf | 2 +- .../activation_update_siebelTicketId.tf | 2 +- .../activation_update_version_only.tf | 2 +- .../list_and_duplicate_items_create.tf | 2 +- .../list_and_items_create.tf | 2 +- .../list_and_items_create_one_item.tf | 2 +- .../list_and_items_update.tf | 2 +- .../testData/TestResClientList/list_create.tf | 2 +- .../list_create_empty_tags.tf | 2 +- .../list_items_only_update.tf | 2 +- .../list_items_update_compute_version.tf | 2 +- .../list_items_update_not_compute_version.tf | 2 +- .../testData/TestResClientList/list_update.tf | 2 +- .../list_update_remove_tags.tf | 2 +- .../invalid_pass_through_percent.tf | 2 +- .../match_value_and_omv_together.tf | 2 +- .../matches_invalid_checkips.tf | 2 +- .../matches_invalid_operator.tf | 2 +- .../minimal_vars_map.tf | 2 +- .../missing_argument.tf | 2 +- .../no_match_value_and_omv.tf | 2 +- .../omv_invalid_type.tf | 2 +- .../omv_object.tf | 2 +- .../omv_simple.tf | 2 +- .../vars_map.tf | 2 +- .../application_load_balancer.tf | 2 +- .../application_load_balancer_version.tf | 2 +- .../basic.tf | 2 +- .../duplicate_values.tf | 2 +- .../invalid_enum_check_ips.tf | 2 +- .../invalid_enum_match_operator.tf | 2 +- .../invalid_enum_match_type.tf | 2 +- .../invalid_enum_type.tf | 2 +- .../invalid_type_range.tf | 2 +- .../missing_forward_settings.tf | 2 +- .../missing_type.tf | 2 +- .../missing_value.tf | 2 +- .../omv_complex.tf | 2 +- .../omv_empty.tf | 2 +- .../omv_object.tf | 2 +- .../omv_range.tf | 2 +- .../omv_simple.tf | 2 +- .../empty_relative_url_vars_map.tf | 2 +- .../invalid_status_code.tf | 2 +- .../match_value_and_omv_together.tf | 2 +- .../matches_always.tf | 2 +- .../matches_invalid_checkips.tf | 2 +- .../matches_invalid_operator.tf | 2 +- .../matches_with_matches_always.tf | 2 +- .../minimal_vars_map.tf | 2 +- .../no_match_value_and_omv.tf | 2 +- .../omv_empty.tf | 2 +- .../omv_invalid_type.tf | 2 +- .../omv_missed_type.tf | 2 +- .../omv_object.tf | 2 +- .../omv_simple.tf | 2 +- .../vars_map.tf | 2 +- .../basic.tf | 2 +- .../match_value_and_omv_together.tf | 2 +- .../matches_invalid_checkips.tf | 2 +- .../matches_invalid_operator.tf | 2 +- .../no_match_value_and_omv.tf | 2 +- .../omv_empty.tf | 2 +- .../omv_invalid_type.tf | 2 +- .../omv_missed_type.tf | 2 +- .../omv_object.tf | 2 +- .../omv_simple.tf | 2 +- .../basic.tf | 2 +- .../match_value_and_omv_together.tf | 2 +- .../matches_invalid_checkips.tf | 2 +- .../matches_invalid_operator.tf | 2 +- .../no_match_value_and_omv.tf | 2 +- .../omv_empty.tf | 2 +- .../omv_incorrect_range.tf | 2 +- .../omv_invalid_type.tf | 2 +- .../omv_missed_type.tf | 2 +- .../omv_object.tf | 2 +- .../omv_range.tf | 2 +- .../omv_simple.tf | 2 +- .../basic.tf | 2 +- .../invalid_percent.tf | 2 +- .../match_value_and_omv_together.tf | 2 +- .../matches_invalid_checkips.tf | 2 +- .../matches_invalid_operator.tf | 2 +- .../no_match_value_and_omv.tf | 2 +- .../omv_empty.tf | 2 +- .../omv_invalid_type.tf | 2 +- .../omv_missed_type.tf | 2 +- .../omv_object.tf | 2 +- .../omv_simple.tf | 2 +- .../TestDataCloudletsPolicy/policy.tf | 2 +- .../policy_with_version.tf | 2 +- .../basic.tf | 2 +- .../duplicate_values.tf | 2 +- .../invalid_enum_allow_deny.tf | 2 +- .../invalid_enum_check_ips.tf | 2 +- .../invalid_enum_match_operator.tf | 2 +- .../invalid_enum_match_type.tf | 2 +- .../invalid_enum_type.tf | 2 +- .../missing_allow_deny.tf | 2 +- .../missing_type.tf | 2 +- .../missing_value.tf | 2 +- .../omv_complex.tf | 2 +- .../omv_empty.tf | 2 +- .../omv_object.tf | 2 +- .../omv_simple.tf | 2 +- .../invalid_pass_through_percent.tf | 2 +- .../match_value_and_omv_together.tf | 2 +- .../matches_invalid_operator.tf | 2 +- .../minimal_vars_map.tf | 2 +- .../missing_argument.tf | 2 +- .../no_match_value_and_omv.tf | 2 +- .../omv_invalid_type.tf | 2 +- .../omv_object.tf | 2 +- .../omv_simple.tf | 2 +- .../vars_map.tf | 2 +- .../policy_activation_no_properties.tf | 2 +- .../policy_activation_update_version2.tf | 2 +- .../policy_activation_version1.tf | 2 +- .../policy_activation_version1_prod.tf | 2 +- .../policy_activation_version1_production.tf | 2 +- .../lifecycle/alb_create.tf | 2 +- .../lifecycle/alb_update.tf | 2 +- .../lifecycle_dc_update/alb_create.tf | 2 +- .../lifecycle_dc_update/alb_update.tf | 2 +- .../alb_create.tf | 2 +- .../alb_update.tf | 2 +- .../lifecycle_origin_update/alb_create.tf | 2 +- .../lifecycle_origin_update/alb_update.tf | 2 +- .../lifecycle_version_update/alb_create.tf | 2 +- .../lifecycle_version_update/alb_update.tf | 2 +- .../percentage_validation/alb_create.tf | 2 +- .../create_no_match_rules/policy_create.tf | 2 +- .../TestResPolicy/import/policy_create.tf | 2 +- .../import_no_match_rules/policy_create.tf | 2 +- .../invalid_group_id/policy_create.tf | 2 +- .../TestResPolicy/lifecycle/policy_create.tf | 2 +- .../TestResPolicy/lifecycle/policy_update.tf | 2 +- .../lifecycle_policy_update/policy_create.tf | 2 +- .../lifecycle_policy_update/policy_update.tf | 2 +- .../policy_create.tf | 2 +- .../policy_update.tf | 2 +- .../lifecycle_version_update/policy_create.tf | 2 +- .../lifecycle_version_update/policy_update.tf | 2 +- .../TestResPolicy/timeouts/policy_create.tf | 2 +- .../alb_activation_timeouts.tf | 2 +- .../alb_activation_update.tf | 2 +- .../alb_activation_update_prod.tf | 2 +- .../alb_activation_version1.tf | 2 +- ...ata_akamai_cloudwrapper_capacities_test.go | 2 +- .../testdata/TestDataConfiguration/default.tf | 2 +- .../TestDataConfiguration/no_config_id.tf | 2 +- .../TestDataConfigurations/default.tf | 2 +- .../testdata/TestDataLocation/invalid_type.tf | 2 +- .../testdata/TestDataLocation/location.tf | 2 +- .../testdata/TestDataLocation/no_location.tf | 2 +- .../testdata/TestDataLocations/location.tf | 2 +- .../default_unused_false.tf | 2 +- .../TestDataProperties/default_unused_true.tf | 2 +- .../missing_contract_ids.tf | 2 +- .../TestDataProperties/no_attributes.tf | 2 +- .../testdata/TestResActivation/create.tf | 2 +- .../create_missing_required.tf | 2 +- .../TestResActivation/create_timeout.tf | 2 +- .../testdata/TestResActivation/update.tf | 2 +- .../TestResActivation/update_forcenew.tf | 2 +- .../TestResActivation/update_timeout.tf | 2 +- .../TestResConfiguration/computed_email.tf | 2 +- .../computed_retain_idle_obj.tf | 2 +- .../contract_id_no_prefix.tf | 2 +- .../testdata/TestResConfiguration/create.tf | 2 +- .../TestResConfiguration/missing_capacity.tf | 2 +- .../TestResConfiguration/missing_location.tf | 2 +- .../missing_location_comments.tf | 2 +- .../TestResConfiguration/missing_required.tf | 2 +- .../property_ids_with_prefix.tf | 2 +- .../update_alerts_threshold.tf | 2 +- .../update_config_name.tf | 2 +- .../update_contract_id.tf | 2 +- .../cps/testdata/TestDataCPSCSR/default.tf | 2 +- .../testdata/TestDataCPSCSR/no_algorithms.tf | 2 +- .../TestDataCPSCSR/no_enrollment_id.tf | 2 +- .../TestDataDeployments/deployments.tf | 2 +- .../enrollment_with_challenges.tf | 2 +- .../enrollment_with_ev_challenges.tf | 2 +- .../enrollment_with_third_party_challenges.tf | 2 +- .../enrollment_without_challenges.tf | 2 +- .../TestDataEnrollments/enrollments.tf | 2 +- .../cps/testdata/TestDataWarnings/warnings.tf | 2 +- .../ack_false.tf | 2 +- .../ack_true.tf | 2 +- .../auto_approve_warnings.tf | 2 +- .../auto_approve_warnings_empty.tf | 2 +- .../auto_approve_warnings_not_provided.tf | 2 +- .../auto_approve_warnings_updated.tf | 2 +- .../auto_approve_warnings_with_chM_true.tf | 2 +- .../certificates/changed_both_certificates.tf | 2 +- .../certificates/changed_certificate.tf | 2 +- ...certificates_with_auto_approve_warnings.tf | 2 +- ...cates_with_auto_approve_warnings_accept.tf | 2 +- .../certificates/create_both_certificates.tf | 2 +- .../certificates/create_certificate_ecdsa.tf | 2 +- .../certificates/create_certificate_rsa.tf | 2 +- .../create_certificate_timeouts.tf | 2 +- .../certificates/no_certificates.tf | 2 +- .../certificates/trust_chain_without_cert.tf | 2 +- .../change_management_false.tf | 2 +- .../change_management_not_specified.tf | 2 +- .../change_management_true.tf | 2 +- .../import/import_upload.tf | 2 +- ...third_party_enrollment_with_upload_cert.tf | 2 +- .../status_changes_slowly.tf | 2 +- .../wait_for_deployment_false.tf | 2 +- .../wait_for_deployment_true.tf | 2 +- .../acknowledge_warnings/create_enrollment.tf | 2 +- .../allow_duplicate_cn/create_enrollment.tf | 2 +- .../client_mutual_auth/create_enrollment.tf | 2 +- .../empty_sans/create_enrollment.tf | 2 +- .../import/import_enrollment.tf | 2 +- .../lifecycle/create_enrollment.tf | 2 +- .../lifecycle/update_enrollment.tf | 2 +- .../lifecycle_cn_in_sans/create_enrollment.tf | 2 +- .../create_enrollment.tf | 2 +- .../TestResDVValidation/create_validation.tf | 2 +- .../create_validation_with_timeout.tf | 2 +- .../TestResDVValidation/update_validation.tf | 2 +- .../acknowledge_warnings/create_enrollment.tf | 2 +- .../allow_duplicate_cn/create_enrollment.tf | 2 +- .../create_enrollment.tf | 2 +- .../client_mutual_auth/create_enrollment.tf | 2 +- .../empty_sans/create_enrollment.tf | 2 +- .../import/import_enrollment.tf | 2 +- .../lifecycle/create_enrollment.tf | 2 +- .../lifecycle/update_enrollment.tf | 2 +- .../lifecycle_cn_in_sans/create_enrollment.tf | 2 +- .../create_enrollment.tf | 2 +- .../lifecycle_no_sans/create_enrollment.tf | 2 +- .../lifecycle_no_sans/update_enrollment.tf | 2 +- .../create_enrollment.tf | 2 +- .../create_validation.tf | 2 +- .../update_validation.tf | 2 +- .../activation_history.tf | 2 +- .../empty_activation_history.tf | 2 +- .../list_streams_with_groupid.tf | 2 +- ...treams_with_groupid_with_invalid_prefix.tf | 2 +- .../list_streams_with_groupid_with_prefix.tf | 2 +- .../list_streams_without_groupid.tf | 2 +- .../list_dataset_fields_default_product.tf | 2 +- .../list_dataset_fields_with_product.tf | 2 +- .../TestResourceStream/connectors/azure.tf | 2 +- .../TestResourceStream/connectors/gcs.tf | 2 +- .../custom_diff/custom_diff1.tf | 2 +- .../custom_diff/custom_diff2.tf | 2 +- .../custom_diff/custom_diff3.tf | 2 +- .../custom_diff/custom_diff4.tf | 2 +- .../custom_diff/custom_diff5.tf | 2 +- .../custom_diff/custom_diff6.tf | 2 +- .../custom_diff/custom_diff7.tf | 2 +- .../custom_diff/custom_diff8.tf | 2 +- .../custom_headers_elasticsearch.tf | 2 +- .../custom_headers/custom_headers_https.tf | 2 +- .../custom_headers/custom_headers_loggly.tf | 2 +- .../custom_headers_new_relic.tf | 2 +- .../custom_headers/custom_headers_splunk.tf | 2 +- .../custom_headers_sumologic.tf | 2 +- .../dataset_ids_diff/json_config.tf | 2 +- .../json_config_duplicates.tf | 2 +- .../dataset_ids_diff/structured_config.tf | 2 +- .../email_ids/empty_email_ids.tf | 2 +- .../email_ids/no_email_ids.tf | 2 +- .../TestResourceStream/email_ids/one_email.tf | 2 +- .../email_ids/two_emails.tf | 2 +- .../internal_server_error.tf | 2 +- .../errors/invalid_email/invalid_email.tf | 2 +- .../missing_required_argument.tf | 2 +- .../stream_name_not_unique.tf | 2 +- .../lifecycle/create_stream.tf | 2 +- .../lifecycle/update_stream.tf | 2 +- .../mtls/mtls_elasticsearch.tf | 2 +- .../TestResourceStream/mtls/mtls_https.tf | 2 +- .../TestResourceStream/mtls/mtls_splunk.tf | 2 +- .../update_resource/create_stream_active.tf | 2 +- .../update_resource/create_stream_inactive.tf | 2 +- .../update_resource/update_stream_active.tf | 2 +- .../update_resource/update_stream_inactive.tf | 2 +- .../adding_fields/create_stream.tf | 2 +- .../adding_fields/update_stream.tf | 2 +- .../change_connector/create_stream.tf | 2 +- .../change_connector/update_stream.tf | 2 +- .../idempotency/create_stream.tf | 2 +- .../idempotency/update_stream.tf | 2 +- .../update_endpoint_field/create_stream.tf | 2 +- .../update_endpoint_field/update_stream.tf | 2 +- .../testdata/TestDataDnsRecordSet/basic.tf | 2 +- .../testdata/TestDataSetAuthorities/basic.tf | 2 +- .../missing_contract.tf | 2 +- .../testdata/TestResDnsRecord/create_basic.tf | 2 +- .../TestResDnsRecord/create_basic_txt.tf | 2 +- .../testdata/TestResDnsRecord/update_basic.tf | 2 +- .../testdata/TestResDnsZone/create_primary.tf | 2 +- .../testdata/TestResDnsZone/update_primary.tf | 2 +- .../data_akamai_edgekv_group_items_test.go | 13 ++-- .../data_akamai_edgekv_groups_test.go | 11 ++- .../TestDataEdgeKVGroupItems/basic.tf | 2 +- .../incorrect_network.tf | 2 +- .../TestDataEdgeKVGroupItems/missed_group.tf | 2 +- .../missed_namespace_name.tf | 2 +- .../missed_network.tf | 2 +- .../TestDataEdgeKVNamespaceGroups/basic.tf | 2 +- .../incorrect_network.tf | 2 +- .../missed_namespace_name.tf | 2 +- .../missed_network.tf | 2 +- .../no_activations.tf | 2 +- .../no_edgeworker_id.tf | 2 +- .../no_network.tf | 2 +- .../one_activation.tf | 2 +- .../three_activations.tf | 2 +- .../wrong_status.tf | 2 +- .../edgeworker_no_edgeworker_id.tf | 2 +- .../edgeworker_no_local_bundle.tf | 2 +- .../edgeworker_no_versions.tf | 2 +- .../edgeworker_one_version.tf | 2 +- .../edgeworker_one_warning.tf | 2 +- .../edgeworker_three_warnings.tf | 2 +- .../edgeworker_two_versions.tf | 2 +- .../TestDataEdgeWorkersPropertyRules/basic.tf | 2 +- .../TestDataEdgeWorkersResourceTier/basic.tf | 2 +- .../ctr_prefix.tf | 2 +- .../incorrect_resource_tier_name.tf | 2 +- .../missing_contract_id.tf | 2 +- .../missing_resource_tier_name.tf | 2 +- .../edgeworker_lifecycle/edgeworker_create.tf | 2 +- .../edgeworker_create_with_timeout.tf | 2 +- .../edgeworker_no_bundle.tf | 2 +- .../edgeworker_temp_bundle.tf | 2 +- .../edgeworker_update_group_id.tf | 2 +- .../edgeworker_update_group_id_prefix.tf | 2 +- .../edgeworker_update_local_bundle.tf | 2 +- .../edgeworker_update_name.tf | 2 +- .../create/basic_2_items.tf | 2 +- .../create/basic_3_items.tf | 2 +- .../create/empty_items.tf | 2 +- .../create/no_group.tf | 2 +- .../create/no_items.tf | 2 +- .../create/no_namespace.tf | 2 +- .../create/no_network.tf | 2 +- .../create/with_timeout.tf | 2 +- .../update/add_1_item.tf | 2 +- .../update/add_remove_upsert_items.tf | 2 +- .../update/basic_upsert_key.tf | 2 +- .../update/change_all_keys.tf | 2 +- .../update/changed_order.tf | 2 +- .../update/check_counting_logic.tf | 2 +- .../update/remove_1_item.tf | 2 +- .../update/remove_1_item_of_3.tf | 2 +- .../update/remove_2_items.tf | 2 +- .../update/remove_fail.tf | 2 +- .../update/upsert_1_item.tf | 2 +- ...kers_activation_different_edgeworker_id.tf | 2 +- .../edgeworkers_activation_import.tf | 2 +- ...orkers_activation_missing_required_args.tf | 2 +- ...geworkers_activation_version_test1_stag.tf | 2 +- ...dgeworkers_activation_version_test_prod.tf | 2 +- ...dgeworkers_activation_version_test_stag.tf | 2 +- ...rs_activation_version_test_with_timeout.tf | 2 +- .../TestResourceEdgeWorkersEdgeKV/basic.tf | 2 +- .../basic_retention_0.tf | 2 +- .../ekv_with_data.tf | 2 +- .../TestResourceEdgeWorkersEdgeKV/import.tf | 2 +- .../update_data.tf | 2 +- .../update_diff_group_id.tf | 2 +- .../update_retention.tf | 2 +- .../TestDataDefaultDatacenter/basic.tf | 2 +- .../testdata/TestDataGTMDatacenter/default.tf | 2 +- .../TestDataGTMDatacenter/no_datacenter_id.tf | 2 +- .../TestDataGTMDatacenter/no_domain.tf | 2 +- .../TestDataGTMDatacenters/default.tf | 2 +- .../TestDataGTMDatacenters/no_domain.tf | 2 +- .../testdata/TestResGtmAsmap/create_basic.tf | 2 +- .../testdata/TestResGtmAsmap/import_basic.tf | 2 +- .../order/as_numbers/reorder.tf | 2 +- .../order/as_numbers/reorder_and_update.tf | 2 +- .../order/assignments/reorder.tf | 2 +- .../reorder_and_update_as_numbers.tf | 2 +- .../reorder_and_update_nickname.tf | 2 +- .../testdata/TestResGtmAsmap/order/create.tf | 2 +- .../order/reorder_assignments_as_numbers.tf | 2 +- .../TestResGtmAsmap/order/update_domain.tf | 2 +- .../TestResGtmAsmap/order/update_name.tf | 2 +- .../order/update_wait_on_complete.tf | 2 +- .../testdata/TestResGtmAsmap/update_basic.tf | 2 +- .../TestResGtmCidrmap/create_basic.tf | 2 +- .../order/assignments/reorder.tf | 2 +- .../assignments/reorder_and_update_block.tf | 2 +- .../reorder_and_update_nickname.tf | 2 +- .../TestResGtmCidrmap/order/blocks/reorder.tf | 2 +- .../order/blocks/reorder_and_update.tf | 2 +- .../TestResGtmCidrmap/order/create.tf | 2 +- .../order/reorder_assignments_and_blocks.tf | 2 +- .../TestResGtmCidrmap/order/update_domain.tf | 2 +- .../TestResGtmCidrmap/order/update_name.tf | 2 +- .../order/update_wait_on_complete.tf | 2 +- .../TestResGtmCidrmap/update_basic.tf | 2 +- .../TestResGtmDatacenter/create_basic.tf | 2 +- .../TestResGtmDatacenter/update_basic.tf | 2 +- .../testdata/TestResGtmDomain/create_basic.tf | 2 +- .../order/email_notification_list/create.tf | 2 +- .../order/email_notification_list/reorder.tf | 2 +- .../reorder_and_update_comment.tf | 2 +- .../testdata/TestResGtmDomain/update_basic.tf | 2 +- .../TestResGtmDomain/update_domain_name.tf | 2 +- .../testdata/TestResGtmGeomap/create_basic.tf | 2 +- .../order/assignments/reorder.tf | 2 +- .../reorder_and_update_countries.tf | 2 +- .../reorder_and_update_nickname.tf | 2 +- .../order/countries/reorder.tf | 2 +- .../order/countries/reorder_and_update.tf | 2 +- .../testdata/TestResGtmGeomap/order/create.tf | 2 +- .../reorder_assignments_and_countries.tf | 2 +- .../TestResGtmGeomap/order/update_domain.tf | 2 +- .../TestResGtmGeomap/order/update_name.tf | 2 +- .../order/update_wait_on_complete.tf | 2 +- .../testdata/TestResGtmGeomap/update_basic.tf | 2 +- .../TestResGtmProperty/create_basic.tf | 2 +- .../create_basic_without_datacenter_id.tf | 2 +- .../create_multiple_traffic_targets.tf | 2 +- .../TestResGtmProperty/multiple_servers.tf | 2 +- .../servers/change_server.tf | 2 +- ...ge_server_and_diff_traffic_target_order.tf | 2 +- .../servers/changed_and_diff_order.tf | 2 +- .../TestResGtmProperty/servers/diff_order.tf | 2 +- .../test_object/test_object_not_required.tf | 2 +- .../test_object/test_object_protocol_ftp.tf | 2 +- .../test_object/test_object_protocol_http.tf | 2 +- .../test_object/test_object_protocol_https.tf | 2 +- .../traffic_target/add_traffic_target.tf | 2 +- .../traffic_target/change_enabled_field.tf | 2 +- .../change_enabled_field_diff_order.tf | 2 +- .../traffic_target/diff_order.tf | 2 +- .../traffic_target/no_datacenter_id.tf | 2 +- .../no_datacenter_id_diff_order.tf | 2 +- .../traffic_target/remove_traffic_target.tf | 2 +- .../TestResGtmProperty/update_basic.tf | 2 +- .../TestResGtmProperty/update_name.tf | 2 +- .../TestResGtmResource/create_basic.tf | 2 +- .../TestResGtmResource/order/create.tf | 2 +- .../order/load_servers/reorder.tf | 2 +- .../order/load_servers/reorder_and_update.tf | 2 +- .../reorder_resource_instance_load_servers.tf | 2 +- .../order/resource_instance/reorder.tf | 2 +- .../reorder_and_update_load_servers.tf | 2 +- .../TestResGtmResource/order/update_name.tf | 2 +- .../TestResGtmResource/update_basic.tf | 2 +- .../iam/data_akamai_iam_contact_types_test.go | 9 ++- .../iam/data_akamai_iam_countries_test.go | 9 ++- .../data_akamai_iam_grantable_roles_test.go | 9 ++- .../iam/data_akamai_iam_groups_test.go | 9 ++- .../iam/data_akamai_iam_roles_test.go | 9 ++- .../iam/data_akamai_iam_states_test.go | 9 ++- .../data_akamai_iam_supported_langs_test.go | 9 ++- .../data_akamai_iam_timeout_policies_test.go | 9 ++- .../iam/data_akamai_iam_timezones_test.go | 9 ++- .../TestDataContactTypes/fail_path/step0.tf | 2 +- .../TestDataContactTypes/happy_path/step0.tf | 2 +- .../TestDataCountries/fail_path/step0.tf | 2 +- .../TestDataCountries/happy_path/step0.tf | 2 +- .../TestDataGroups/fail_path/step0.tf | 2 +- .../TestDataGroups/happy_path/step0.tf | 2 +- .../happy_path/step0.tf | 2 +- .../testdata/TestDataRoles/fail_path/step0.tf | 2 +- .../TestDataRoles/happy_path/no_args.tf | 2 +- .../TestDataStates/fail_path/step0.tf | 2 +- .../TestDataStates/happy_path/step0.tf | 2 +- .../TestDataSupportedLangs/fail_path/step0.tf | 2 +- .../happy_path/step0.tf | 2 +- .../fail_path/step0.tf | 2 +- .../happy_path/step0.tf | 2 +- .../testdata/TestDataTimezones/timezones.tf | 2 +- .../TestGrantableRoles/fail_path/step0.tf | 2 +- .../TestGrantableRoles/happy_path/step0.tf | 2 +- .../iam/testdata/TestResGroup/basic/basic.tf | 2 +- .../testdata/TestResGroup/update/update.tf | 2 +- .../step00-all basic info A with grants.tf | 2 +- ...0-all basic info A with notifications A.tf | 2 +- ...0-all basic info A with notifications B.tf | 2 +- ... info A with notifications C and grants.tf | 2 +- ...0-all basic info A with notifications C.tf | 2 +- .../step00-all basic info A.tf | 2 +- .../step00-minimum basic info A.tf | 2 +- .../testdata/TestResUserLifecycle/step01.tf | 2 +- .../testdata/TestResUserLifecycle/step02.tf | 2 +- .../testdata/TestResUserLifecycle/step03.tf | 2 +- .../testdata/TestResUserLifecycle/step04.tf | 2 +- .../testdata/TestResUserLifecycle/step05.tf | 2 +- .../testdata/TestResUserLifecycle/step06.tf | 2 +- .../testdata/TestResUserLifecycle/step07.tf | 2 +- .../create-empty-properties.tf | 2 +- .../create.tf | 2 +- .../update-group-id.tf | 2 +- .../update.tf | 2 +- .../TestResourceRoleLifecycle/role_create.tf | 2 +- .../TestResourceRoleLifecycle/role_update.tf | 2 +- .../role_with_reordered_granted_roles.tf | 2 +- .../auth_grants_interpolated.tf | 2 +- .../create_auth_grants.tf | 2 +- .../TestResourceUserLifecycle/create_basic.tf | 2 +- .../create_basic_ext_phone.tf | 2 +- .../create_basic_grants.tf | 2 +- .../create_basic_grants_swap.tf | 2 +- .../create_basic_invalid_phone.tf | 2 +- .../create_basic_lock.tf | 2 +- .../invalid_auth_grants.tf | 2 +- .../update_auth_grants.tf | 2 +- .../TestResourceUserLifecycle/update_email.tf | 2 +- .../update_user_info.tf | 2 +- .../composite_post_policy/policy.tf | 2 +- .../empty_breakpoints/policy.tf | 2 +- .../empty_policy/policy.tf | 2 +- .../imquery_transformation/policy.tf | 2 +- .../policy.tf | 2 +- .../regular_policy/policy.tf | 2 +- .../empty_policy/policy.tf | 2 +- .../regular_policy/policy.tf | 2 +- .../auto_policy/policy_create.tf | 2 +- .../auto_policy/policy_update.tf | 2 +- .../change_policyset_id/policy_create.tf | 2 +- .../change_policyset_id/policy_update.tf | 2 +- .../diff_suppress/fields/default.tf | 2 +- .../diff_suppress/fields/diff_order.tf | 2 +- .../inconsistent_policy/policy_create.tf | 2 +- .../invalid_policy/policy_create.tf | 2 +- .../regular_policy/policy_create.tf | 2 +- .../regular_policy/policy_update.tf | 2 +- .../policy_create.tf | 2 +- .../policy_update.tf | 2 +- .../regular_policy_import/policy_create.tf | 2 +- .../regular_policy_no_update/policy_create.tf | 2 +- .../regular_policy_no_update/policy_update.tf | 2 +- .../policy_create.tf | 2 +- .../policy_update.tf | 2 +- .../policy_create.tf | 2 +- .../policy_update.tf | 2 +- .../policy_update_staging.tf | 2 +- .../TestResPolicySet/lifecycle/create.tf | 2 +- .../lifecycle/update_region_us.tf | 2 +- .../auto_policy/policy_create.tf | 2 +- .../auto_policy/policy_update.tf | 2 +- .../change_policyset_id/policy_create.tf | 2 +- .../change_policyset_id/policy_update.tf | 2 +- .../diff_suppress/fields/default.tf | 2 +- .../diff_suppress/fields/diff_order.tf | 2 +- .../policy_create.tf | 2 +- .../invalid_policy/policy_create.tf | 2 +- .../regular_policy/policy_create.tf | 2 +- .../regular_policy/policy_update.tf | 2 +- .../policy_create.tf | 2 +- .../policy_update.tf | 2 +- .../regular_policy_no_update/policy_create.tf | 2 +- .../regular_policy_no_update/policy_update.tf | 2 +- .../policy_create.tf | 2 +- .../policy_update.tf | 2 +- .../policy_update_staging.tf | 2 +- .../testdata/TestDSNetworkList/match_by_id.tf | 2 +- .../TestDSNetworkList/match_by_uniqueid.tf | 2 +- .../TestResActivations/match_by_id.tf | 2 +- .../TestResActivations/update_by_id.tf | 2 +- .../TestResActivations/update_notes.tf | 2 +- .../TestResNetworkList/changed_contract_id.tf | 2 +- .../TestResNetworkList/changed_group_id.tf | 2 +- .../TestResNetworkList/match_by_id.tf | 2 +- .../TestResNetworkList/update_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../match_by_id.tf | 2 +- .../data_akamai_property_products_test.go | 2 +- .../data_property_akamai_groups_test.go | 2 +- .../resource_akamai_property_include_test.go | 19 +++-- .../testdata/TestDSCPCode/match_by_full_id.tf | 2 +- .../testdata/TestDSCPCode/match_by_name.tf | 2 +- .../match_by_name_output_products.tf | 2 +- .../TestDSCPCode/match_by_unprefixed_id.tf | 2 +- .../ds_contract_with_group_id.tf | 2 +- ...s_contract_with_group_id_without_prefix.tf | 2 +- .../ds_contract_with_group_name.tf | 2 +- .../ds_contract_with_group_name_and_group.tf | 2 +- .../testdata/TestDSContractRequired/groups.tf | 2 +- .../ds-group-w-group-name-and-contract_id.tf | 2 +- .../testdata/TestDSGroupNotFound/cp_code.tf | 2 +- .../match_by_hostname.tf | 2 +- .../datasource_property_activation.tf | 2 +- .../datasource_property_activation.tf | 2 +- .../ok/datasource_property_activation.tf | 2 +- ...tasource_property_activation_no_version.tf | 2 +- .../ok/datasource_property_activation_prod.tf | 2 +- .../datasource_property_activation_update.tf | 2 +- .../property_include_rules.tf | 2 +- .../property_include_rules_api_error.tf | 2 +- .../property_include_rules_no_contract_id.tf | 2 +- .../property_include_rules_no_group_id.tf | 2 +- .../property_include_rules_no_include_id.tf | 2 +- .../property_include_rules_no_version.tf | 2 +- .../TestDSPropertyRuleFormats/rule_formats.tf | 2 +- .../TestDSPropertyRules/always_fails.tf | 2 +- .../TestDSPropertyRules/ds_property_rules.tf | 2 +- .../TestDSPropertyRules/empty_contract_id.tf | 2 +- .../TestDSPropertyRules/empty_group_id.tf | 2 +- .../missing_contract_id.tf | 2 +- .../TestDSPropertyRules/missing_group_id.tf | 2 +- .../with_latest_rule_format.tf | 2 +- .../with_versioned_rule_format.tf | 2 +- .../rules_error_too_many_elements.tf | 2 +- .../rules_mixed_versions.tf | 2 +- .../rules_v2023_01_05.tf | 2 +- .../rules_v2023_05_30.tf | 2 +- .../rules_v2023_09_20.tf | 2 +- .../rules_variables.tf | 2 +- .../rules_with_is_secure_outside_default.tf | 2 +- .../rules_with_variable_outside_default.tf | 2 +- .../template_child_with_childs.tf | 2 +- .../template_file_data_conflict.tf | 2 +- .../template_file_data_missing.tf | 2 +- .../template_file_is_empty.tf | 2 +- .../template_file_not_found.tf | 2 +- .../template_include_with_variables.tf | 2 +- .../template_invalid_json.tf | 2 +- ...template_invalid_snippets_file_not_json.tf | 2 +- .../template_missing_data.tf | 2 +- .../template_missing_dir.tf | 2 +- .../template_multiple_templates.tf | 2 +- .../template_nested_includes.tf | 2 +- .../template_not_valid_json_includes.tf | 2 +- .../template_null_values.tf | 2 +- .../template_null_values_with_data.tf | 2 +- .../template_simple_cyclic_dependency.tf | 2 +- .../template_tricky_cyclic_dependency.tf | 2 +- .../template_var_not_found.tf | 2 +- .../template_variable_building_in_include.tf | 2 +- .../template_variables_build.tf | 2 +- .../template_vars_conflict.tf | 2 +- .../TestDSRulesTemplate/template_vars_file.tf | 2 +- .../template_vars_file_not_found.tf | 2 +- .../template_vars_file_with_data.tf | 2 +- .../template_vars_invalid_type.tf | 2 +- .../template_vars_invalid_value.tf | 2 +- .../TestDSRulesTemplate/template_vars_map.tf | 2 +- .../template_vars_map_ns.tf | 2 +- .../template_vars_map_with_data.tf | 2 +- .../template_vars_map_with_data_ns.tf | 2 +- .../TestDSRulesTemplate/template_with_list.tf | 2 +- .../testdata/TestDataContracts/contracts.tf | 2 +- .../testdata/TestDataProperties/properties.tf | 2 +- .../properties_no_contract_prefix.tf | 2 +- .../properties_no_group_prefix.tf | 2 +- .../testdata/TestDataProperty/no_name.tf | 2 +- .../testdata/TestDataProperty/no_version.tf | 2 +- .../testdata/TestDataProperty/with_version.tf | 2 +- .../property_hostnames.tf | 2 +- .../property_hostnames_no_contract_prefix.tf | 2 +- .../property_hostnames_no_group_prefix.tf | 2 +- .../property_hostnames_no_property_prefix.tf | 2 +- .../missing_contract_id.tf | 2 +- .../missing_group_id.tf | 2 +- .../missing_include_id.tf | 2 +- .../testdata/TestDataPropertyInclude/valid.tf | 2 +- .../no_activation_for_given_network.tf | 2 +- .../no_contract_id.tf | 2 +- .../no_group_id.tf | 2 +- .../no_include_id.tf | 2 +- .../no_network.tf | 2 +- .../valid_production.tf | 2 +- .../valid_staging.tf | 2 +- .../missing_contract_id.tf | 2 +- .../missing_group_id.tf | 2 +- .../missing_include_id.tf | 2 +- .../TestDataPropertyIncludeParents/valid.tf | 2 +- .../invalid_include_type.tf | 2 +- .../no_contract_id.tf | 2 +- .../TestDataPropertyIncludes/no_group_id.tf | 2 +- .../no_property_id.tf | 2 +- .../no_property_version.tf | 2 +- .../list_available_includes_no_filters.tf | 2 +- ...available_includes_type_common_settings.tf | 2 +- ...t_available_includes_type_microservices.tf | 2 +- .../list_includes_no_filters.tf | 2 +- .../list_includes_type_common_settings.tf | 2 +- .../list_includes_type_microservices.tf | 2 +- .../resource_property_activation.tf | 2 +- .../resource_property_activation_update.tf | 2 +- ...ource_property_activation_with_empty_cr.tf | 2 +- ...operty_activation_with_more_than_one_cr.tf | 2 +- .../resource_property_activation.tf | 2 +- .../resource_property_activation.tf | 2 +- .../resource_property_activation_update.tf | 2 +- ...property_activation_creation_for_import.tf | 2 +- .../resource_property_activation.tf | 2 +- .../resource_property_activation.tf | 2 +- .../ok/resource_property_activation.tf | 2 +- ...source_property_activation_minimum_args.tf | 2 +- .../ok/resource_property_activation_update.tf | 2 +- ...perty_activation_with_compliance_record.tf | 2 +- ...e_property_activation_incorrect_timeout.tf | 2 +- ...source_property_activation_with_timeout.tf | 2 +- ...property_activation_with_timeout_update.tf | 2 +- .../resource_property_activation.tf | 2 +- .../resource_property_activation_update.tf | 2 +- .../resource_property_activation.tf | 2 +- .../resource_property_activation_update.tf | 2 +- .../TestResCPCode/change_immutable.tf | 2 +- .../TestResCPCode/change_name_step0.tf | 2 +- .../TestResCPCode/change_name_step1.tf | 2 +- .../TestResCPCode/change_product_step0.tf | 2 +- .../TestResCPCode/change_product_step1.tf | 2 +- .../TestResCPCode/create_new_cp_code.tf | 2 +- .../testdata/TestResCPCode/import_cp_code.tf | 2 +- .../testdata/TestResCPCode/missing_product.tf | 2 +- .../TestResCPCode/use_existing_cp_code.tf | 2 +- .../ConfigError/contract_id_not_given.tf | 2 +- .../ConfigError/group_id_not_given.tf | 2 +- .../ConfigError/invalid_json_rules.tf | 2 +- .../ConfigError/invalid_name_given.tf | 2 +- .../ConfigError/name_given_too_long.tf | 2 +- .../ConfigError/name_not_given.tf | 2 +- .../ConfigError/product_id_not_given.tf | 2 +- .../TestResProperty/Creation/property.tf | 2 +- .../create/property.tf | 2 +- .../update/property.tf | 2 +- .../creation/property_create.tf | 2 +- .../update/property_update.tf | 2 +- .../TestResProperty/ForbiddenAttr/contact.tf | 2 +- .../TestResProperty/ForbiddenAttr/cp_code.tf | 2 +- .../ForbiddenAttr/hostnames.tf | 2 +- .../ForbiddenAttr/is_secure.tf | 2 +- .../TestResProperty/ForbiddenAttr/origin.tf | 2 +- .../ForbiddenAttr/rule_format.tf | 2 +- .../TestResProperty/ForbiddenAttr/rules.tf | 2 +- .../ForbiddenAttr/variables.tf | 2 +- .../Immutable/contract/step0.tf | 2 +- .../Immutable/contract/step1.tf | 2 +- .../Immutable/contract_id/step0.tf | 2 +- .../Immutable/contract_id/step1.tf | 2 +- .../TestResProperty/Immutable/group/step0.tf | 2 +- .../TestResProperty/Immutable/group/step1.tf | 2 +- .../Immutable/group_id/step0.tf | 2 +- .../Immutable/group_id/step1.tf | 2 +- .../Immutable/product/step0.tf | 2 +- .../Immutable/product/step1.tf | 2 +- .../Immutable/product_id/step0.tf | 2 +- .../Immutable/product_id/step1.tf | 2 +- .../TestResProperty/Importable/importable.tf | 2 +- .../importable_with_property_rules_builder.tf | 2 +- .../contract without prefix/step0.tf | 2 +- .../contract without prefix/step1.tf | 2 +- .../contract_id without prefix/step0.tf | 2 +- .../contract_id without prefix/step1.tf | 2 +- .../Lifecycle/group without prefix/step0.tf | 2 +- .../Lifecycle/group without prefix/step1.tf | 2 +- .../group_id without prefix/step0.tf | 2 +- .../group_id without prefix/step1.tf | 2 +- .../Lifecycle/hostnames/step0.tf | 2 +- .../Lifecycle/hostnames/step1.tf | 2 +- .../new version changed on server/step0.tf | 2 +- .../Lifecycle/no diff/step0.tf | 2 +- .../Lifecycle/no diff/step1.tf | 2 +- .../TestResProperty/Lifecycle/normal/step0.tf | 2 +- .../TestResProperty/Lifecycle/normal/step1.tf | 2 +- .../Lifecycle/product without prefix/step0.tf | 2 +- .../Lifecycle/product without prefix/step1.tf | 2 +- .../product_id without prefix/step0.tf | 2 +- .../product_id without prefix/step1.tf | 2 +- .../Lifecycle/rules custom diff/step0.tf | 2 +- .../Lifecycle/rules custom diff/step1.tf | 2 +- .../Lifecycle/rules diff cpcode/step0.tf | 2 +- .../Lifecycle/rules with variables/step0.tf | 2 +- .../Lifecycle/rules with variables/step1.tf | 2 +- ..._creating_property_with_non-unique_name.tf | 2 +- .../step0.tf | 2 +- .../step1.tf | 2 +- ...nd_recreated_when_name_is_changed-step0.tf | 2 +- ...nd_recreated_when_name_is_changed-step1.tf | 2 +- ..._update_with_validation_error_for_rules.tf | 2 +- .../custom_validation_errors.tf | 2 +- .../product_id_error.tf | 2 +- .../property_include.tf | 2 +- .../property_include_force_new.tf | 2 +- .../property_include_import.tf | 2 +- .../property_include_no_rules.tf | 2 +- .../property_include_null_cpcode.tf | 2 +- .../property_include_with_comment.tf | 2 +- .../property_include_with_ds_create.tf | 2 +- .../property_include_with_ds_update.tf | 2 +- .../rule_format_blank.tf | 2 +- .../rule_format_latest.tf | 2 +- .../validation_required_errors.tf | 2 +- .../no_compliance_record_on_production.tf | 2 +- .../property_include_activation.tf | 2 +- ...ty_include_activation_incorrect_timeout.tf | 2 +- .../property_include_activation_update.tf | 2 +- ...roperty_include_activation_with_timeout.tf | 2 +- ..._include_activation_with_timeout_update.tf | 2 +- ...erty_include_update_note_not_suppressed.tf | 2 +- .../creation_before_import_edgehostname.tf | 2 +- .../import_edgehostname.tf | 2 +- .../missing_certificate.tf | 2 +- .../testdata/TestResourceEdgeHostname/new.tf | 2 +- ...akamaized_error_update_ipv6_performance.tf | 2 +- .../new_akamaized_ipv4.tf | 2 +- .../new_akamaized_ipv4_with_email.tf | 2 +- .../new_akamaized_net.tf | 2 +- .../new_akamaized_net_without_product_id.tf | 2 +- .../new_akamaized_update_ip_behavior.tf | 2 +- ...kamaized_update_ip_behavior_empty_email.tf | 2 +- ...w_akamaized_update_ip_behavior_no_email.tf | 2 +- .../new_edgekey_net.tf | 2 +- .../new_edgesuite_net.tf | 2 +- .../update_no_status_update_email.tf | 2 +- pkg/test/fixtures.go | 23 ------ pkg/test/helpers.go | 63 ---------------- pkg/test/tattle_t.go | 21 ------ 1126 files changed, 1349 insertions(+), 1435 deletions(-) rename pkg/{test => common/testutils}/edgerc (100%) create mode 100644 pkg/common/testutils/fixture.go create mode 100644 pkg/common/testutils/mocks.go create mode 100644 pkg/common/testutils/provider_factory.go delete mode 100644 pkg/test/fixtures.go delete mode 100644 pkg/test/helpers.go delete mode 100644 pkg/test/tattle_t.go diff --git a/pkg/test/edgerc b/pkg/common/testutils/edgerc similarity index 100% rename from pkg/test/edgerc rename to pkg/common/testutils/edgerc diff --git a/pkg/common/testutils/fixture.go b/pkg/common/testutils/fixture.go new file mode 100644 index 000000000..0f6873b3e --- /dev/null +++ b/pkg/common/testutils/fixture.go @@ -0,0 +1,22 @@ +package testutils + +import ( + "fmt" + "io/ioutil" + "testing" + + "github.com/stretchr/testify/require" +) + +// LoadFixtureBytes returns the entire contents of the given file as a byte slice +func LoadFixtureBytes(t *testing.T, path string) []byte { + t.Helper() + contents, err := ioutil.ReadFile(path) + require.NoError(t, err) + return contents +} + +// LoadFixtureString returns the entire contents of the given file as a string +func LoadFixtureString(t *testing.T, format string, args ...interface{}) string { + return string(LoadFixtureBytes(t, fmt.Sprintf(format, args...))) +} diff --git a/pkg/common/testutils/mocks.go b/pkg/common/testutils/mocks.go new file mode 100644 index 000000000..cbf3addfa --- /dev/null +++ b/pkg/common/testutils/mocks.go @@ -0,0 +1,31 @@ +package testutils + +import "github.com/stretchr/testify/mock" + +// MockCalls is a wrapper around []*mock.Call +type MockCalls []*mock.Call + +// Times sets how many times we expect each call to execute +func (mc MockCalls) Times(t int) MockCalls { + for _, c := range mc { + c.Times(t) + } + return mc +} + +// Once expects calls to be called only one time +func (mc MockCalls) Once() MockCalls { + return mc.Times(1) +} + +// ReturnErr sets the given error as a last return parameter of the call with the given method +func (mc MockCalls) ReturnErr(method string, err error) MockCalls { + for _, c := range mc { + if c.Method == method { + last := len(c.ReturnArguments) - 1 + c.ReturnArguments[last] = err + } + } + + return mc +} diff --git a/pkg/common/testutils/provider_factory.go b/pkg/common/testutils/provider_factory.go new file mode 100644 index 000000000..631f6d836 --- /dev/null +++ b/pkg/common/testutils/provider_factory.go @@ -0,0 +1,39 @@ +package testutils + +import ( + "context" + + "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" + "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/hashicorp/terraform-plugin-framework/providerserver" + "github.com/hashicorp/terraform-plugin-go/tfprotov6" + "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" +) + +// NewProtoV6ProviderFactory uses provided subprovider to create provider factory for test purposes +func NewProtoV6ProviderFactory(subproviders ...subprovider.Subprovider) map[string]func() (tfprotov6.ProviderServer, error) { + return map[string]func() (tfprotov6.ProviderServer, error){ + "akamai": func() (tfprotov6.ProviderServer, error) { + ctx := context.Background() + + sdkProviderV6, err := akamai.NewProtoV6SDKProvider(subproviders) + if err != nil { + return nil, err + } + + providers := []func() tfprotov6.ProviderServer{ + sdkProviderV6, + providerserver.NewProtocol6( + akamai.NewFrameworkProvider(subproviders...)(), + ), + } + + muxServer, err := tf6muxserver.NewMuxServer(ctx, providers...) + if err != nil { + return nil, err + } + + return muxServer.ProviderServer(), nil + }, + } +} diff --git a/pkg/common/testutils/testutils.go b/pkg/common/testutils/testutils.go index 53a8c2c32..af6d74ca3 100644 --- a/pkg/common/testutils/testutils.go +++ b/pkg/common/testutils/testutils.go @@ -2,19 +2,12 @@ package testutils import ( - "context" "fmt" - "io/ioutil" "log" "os" "testing" - "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" - "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" - "github.com/hashicorp/terraform-plugin-framework/providerserver" - "github.com/hashicorp/terraform-plugin-go/tfprotov6" - "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" - "github.com/stretchr/testify/require" + "github.com/hashicorp/go-hclog" ) // tfTestTempDir specifies the location of tmp directory which will be used by provider SDK's testing framework @@ -54,43 +47,41 @@ func TFTestTeardown() error { return nil } -// LoadFixtureBytes returns the entire contents of the given file as a byte slice -func LoadFixtureBytes(t *testing.T, path string) []byte { +// TODO marks a test as being in a "pending" state and logs a message telling the user why. Such tests are expected to +// fail for the time being and may exist for the sake of unfinished/future features or to document known failure cases +// that won't be fixed right away. The failure of a pending test is not considered an error and the test will therefore +// be skipped unless the TEST_TODO environment variable is set to a non-empty value. +func TODO(t *testing.T, message string) { t.Helper() - contents, err := ioutil.ReadFile(path) - require.NoError(t, err) - return contents -} + t.Log(fmt.Sprintf("TODO: %s (%s)", message, t.Name())) -// LoadFixtureString returns the entire contents of the given file as a string -func LoadFixtureString(t *testing.T, format string, args ...interface{}) string { - return string(LoadFixtureBytes(t, fmt.Sprintf(format, args...))) + if os.Getenv("TEST_TODO") == "" { + t.Skip("TODO: Set TEST_TODO=1 in env to run this test") + } } -// NewProtoV6ProviderFactory uses provided subprovider to create provider factory for test purposes -func NewProtoV6ProviderFactory(subproviders ...subprovider.Subprovider) map[string]func() (tfprotov6.ProviderServer, error) { - return map[string]func() (tfprotov6.ProviderServer, error){ - "akamai": func() (tfprotov6.ProviderServer, error) { - ctx := context.Background() - - sdkProviderV6, err := akamai.NewProtoV6SDKProvider(subproviders) - if err != nil { - return nil, err - } +// MuteLogging globally prevents logging output unless TEST_LOGGING env var is not empty +func MuteLogging(t *testing.T) { + t.Helper() - providers := []func() tfprotov6.ProviderServer{ - sdkProviderV6, - providerserver.NewProtocol6( - akamai.NewFrameworkProvider(subproviders...)(), - ), - } + if os.Getenv("TEST_LOGGING") == "" { + hclog.SetDefault(hclog.NewNullLogger()) + t.Log("Logging is suppressed. Set TEST_LOGGING=1 in env to see logged messages during test") + } +} - muxServer, err := tf6muxserver.NewMuxServer(ctx, providers...) - if err != nil { - return nil, err - } +// TattleT wraps a *testing.T to intercept a Testify mock's call of t.FailNow(). When testing.t.FailNow() is called from +// any goroutine other than the one on which a test was created, it causes the test to hang. Testify's mocks fail to +// inform the user which test failed. Use this struct to wrap a *testing.TattleT when you call `mock.Test(TattleT{t})` +// and the mock's failure message will include the failling test's name. Such failures are usually caused by unexpected +// method calls on a mock. +// +// NB: You would only need to use this where Testify mocks are used in tests that spawn goroutines, such as those run by +// the Terraform test driver. +type TattleT struct{ *testing.T } - return muxServer.ProviderServer(), nil - }, - } +// FailNow overrides testing.T.FailNow() so when a test mock fails an assertion, we see which test failed +func (t TattleT) FailNow() { + t.T.Helper() + t.T.Fatalf("FAIL: %s", t.T.Name()) } diff --git a/pkg/providers/appsec/testdata/TestDSAdvancedSettingsAttackPayloadLogging/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSAdvancedSettingsAttackPayloadLogging/match_by_id.tf index 5f59fdbbc..4466d5b44 100644 --- a/pkg/providers/appsec/testdata/TestDSAdvancedSettingsAttackPayloadLogging/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSAdvancedSettingsAttackPayloadLogging/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSAdvancedSettingsAttackPayloadLogging/match_by_policy_id.tf b/pkg/providers/appsec/testdata/TestDSAdvancedSettingsAttackPayloadLogging/match_by_policy_id.tf index 6ef704e4c..db794aad6 100644 --- a/pkg/providers/appsec/testdata/TestDSAdvancedSettingsAttackPayloadLogging/match_by_policy_id.tf +++ b/pkg/providers/appsec/testdata/TestDSAdvancedSettingsAttackPayloadLogging/match_by_policy_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSAdvancedSettingsEvasivePathMatch/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSAdvancedSettingsEvasivePathMatch/match_by_id.tf index 90e52b47a..858bf9c78 100644 --- a/pkg/providers/appsec/testdata/TestDSAdvancedSettingsEvasivePathMatch/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSAdvancedSettingsEvasivePathMatch/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSAdvancedSettingsLogging/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSAdvancedSettingsLogging/match_by_id.tf index 3b5a07b50..843ecd629 100644 --- a/pkg/providers/appsec/testdata/TestDSAdvancedSettingsLogging/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSAdvancedSettingsLogging/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSAdvancedSettingsPIILearning/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSAdvancedSettingsPIILearning/match_by_id.tf index 299a05d80..8076ff1ee 100644 --- a/pkg/providers/appsec/testdata/TestDSAdvancedSettingsPIILearning/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSAdvancedSettingsPIILearning/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSAdvancedSettingsPragma/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSAdvancedSettingsPragma/match_by_id.tf index a75c0d7df..8dbd3a062 100644 --- a/pkg/providers/appsec/testdata/TestDSAdvancedSettingsPragma/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSAdvancedSettingsPragma/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSAdvancedSettingsPrefetch/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSAdvancedSettingsPrefetch/match_by_id.tf index 8812e0a9f..aac53afd2 100644 --- a/pkg/providers/appsec/testdata/TestDSAdvancedSettingsPrefetch/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSAdvancedSettingsPrefetch/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSAdvancedSettingsRequestBody/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSAdvancedSettingsRequestBody/match_by_id.tf index 87bd274f7..5b8211dfb 100644 --- a/pkg/providers/appsec/testdata/TestDSAdvancedSettingsRequestBody/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSAdvancedSettingsRequestBody/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSAdvancedSettingsRequestBody/match_by_policy_id.tf b/pkg/providers/appsec/testdata/TestDSAdvancedSettingsRequestBody/match_by_policy_id.tf index e5e0d48f2..b8479c6b6 100644 --- a/pkg/providers/appsec/testdata/TestDSAdvancedSettingsRequestBody/match_by_policy_id.tf +++ b/pkg/providers/appsec/testdata/TestDSAdvancedSettingsRequestBody/match_by_policy_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSApiEndpoints/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSApiEndpoints/match_by_id.tf index d677dc6b3..9fbb6514c 100644 --- a/pkg/providers/appsec/testdata/TestDSApiEndpoints/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSApiEndpoints/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSApiHostnameCoverage/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSApiHostnameCoverage/match_by_id.tf index 97203b47a..4da6bc1c0 100644 --- a/pkg/providers/appsec/testdata/TestDSApiHostnameCoverage/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSApiHostnameCoverage/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSApiHostnameCoverageMatchTargets/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSApiHostnameCoverageMatchTargets/match_by_id.tf index e9d3e2ff1..0889a4195 100644 --- a/pkg/providers/appsec/testdata/TestDSApiHostnameCoverageMatchTargets/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSApiHostnameCoverageMatchTargets/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSApiHostnameCoverageOverlapping/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSApiHostnameCoverageOverlapping/match_by_id.tf index dcb745281..bd798ce22 100644 --- a/pkg/providers/appsec/testdata/TestDSApiHostnameCoverageOverlapping/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSApiHostnameCoverageOverlapping/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSApiRequestConstraints/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSApiRequestConstraints/match_by_id.tf index cfbf5c857..a4de28b2e 100644 --- a/pkg/providers/appsec/testdata/TestDSApiRequestConstraints/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSApiRequestConstraints/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSAttackGroupActions/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSAttackGroupActions/match_by_id.tf index 35c055c1e..6b02a2866 100644 --- a/pkg/providers/appsec/testdata/TestDSAttackGroupActions/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSAttackGroupActions/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSAttackGroupConditionException/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSAttackGroupConditionException/match_by_id.tf index 0d8bbb0f0..7b34720fc 100644 --- a/pkg/providers/appsec/testdata/TestDSAttackGroupConditionException/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSAttackGroupConditionException/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSAttackGroups/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSAttackGroups/match_by_id.tf index bbb5bbb32..087467084 100644 --- a/pkg/providers/appsec/testdata/TestDSAttackGroups/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSAttackGroups/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSBypassNetworkLists/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSBypassNetworkLists/match_by_id.tf index 88f4b1337..ba7a691a2 100644 --- a/pkg/providers/appsec/testdata/TestDSBypassNetworkLists/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSBypassNetworkLists/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSConfiguration/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSConfiguration/match_by_id.tf index 49ea198e0..c560a311e 100644 --- a/pkg/providers/appsec/testdata/TestDSConfiguration/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSConfiguration/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSConfiguration/nonexistent_config.tf b/pkg/providers/appsec/testdata/TestDSConfiguration/nonexistent_config.tf index a29229c88..601d2dc54 100644 --- a/pkg/providers/appsec/testdata/TestDSConfiguration/nonexistent_config.tf +++ b/pkg/providers/appsec/testdata/TestDSConfiguration/nonexistent_config.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSConfigurationVersion/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSConfigurationVersion/match_by_id.tf index 3be40cc4c..d56f60ac6 100644 --- a/pkg/providers/appsec/testdata/TestDSConfigurationVersion/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSConfigurationVersion/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSContractsGroups/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSContractsGroups/match_by_id.tf index 332ccd6b9..592c0b49f 100644 --- a/pkg/providers/appsec/testdata/TestDSContractsGroups/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSContractsGroups/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSCustomDeny/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSCustomDeny/match_by_id.tf index f81d6e17a..ff5370181 100644 --- a/pkg/providers/appsec/testdata/TestDSCustomDeny/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSCustomDeny/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSCustomRuleActions/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSCustomRuleActions/match_by_id.tf index 7ac309231..133063565 100644 --- a/pkg/providers/appsec/testdata/TestDSCustomRuleActions/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSCustomRuleActions/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSCustomRules/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSCustomRules/match_by_id.tf index f335b07ee..df5cfce70 100644 --- a/pkg/providers/appsec/testdata/TestDSCustomRules/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSCustomRules/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSEval/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSEval/match_by_id.tf index 565c0017c..b1af43afc 100644 --- a/pkg/providers/appsec/testdata/TestDSEval/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSEval/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSEvalGroups/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSEvalGroups/match_by_id.tf index 0cc4f6661..363157709 100644 --- a/pkg/providers/appsec/testdata/TestDSEvalGroups/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSEvalGroups/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSEvalPenaltyBox/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSEvalPenaltyBox/match_by_id.tf index 85ddb3f2d..959b55979 100644 --- a/pkg/providers/appsec/testdata/TestDSEvalPenaltyBox/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSEvalPenaltyBox/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSEvalRuleActions/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSEvalRuleActions/match_by_id.tf index 8676b243f..957d6c62f 100644 --- a/pkg/providers/appsec/testdata/TestDSEvalRuleActions/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSEvalRuleActions/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSEvalRuleConditionException/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSEvalRuleConditionException/match_by_id.tf index 6c79509a9..d0269d105 100644 --- a/pkg/providers/appsec/testdata/TestDSEvalRuleConditionException/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSEvalRuleConditionException/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSEvalRules/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSEvalRules/match_by_id.tf index 3a255ec35..3f473d468 100644 --- a/pkg/providers/appsec/testdata/TestDSEvalRules/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSEvalRules/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSExportConfiguration/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSExportConfiguration/match_by_id.tf index 86c5dd1a0..a597fd5aa 100644 --- a/pkg/providers/appsec/testdata/TestDSExportConfiguration/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSExportConfiguration/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSFailoverHostnames/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSFailoverHostnames/match_by_id.tf index 04dfd5f3f..ce46125d9 100644 --- a/pkg/providers/appsec/testdata/TestDSFailoverHostnames/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSFailoverHostnames/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSIPGeo/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSIPGeo/match_by_id.tf index 6a361f190..6423c0082 100644 --- a/pkg/providers/appsec/testdata/TestDSIPGeo/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSIPGeo/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSMalwareContentTypes/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSMalwareContentTypes/match_by_id.tf index 1b7485e0a..34f04babe 100644 --- a/pkg/providers/appsec/testdata/TestDSMalwareContentTypes/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSMalwareContentTypes/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSMalwarePolicies/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSMalwarePolicies/match_by_id.tf index 2f4079f80..ee408c892 100644 --- a/pkg/providers/appsec/testdata/TestDSMalwarePolicies/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSMalwarePolicies/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSMalwarePolicies/match_by_id_single_policy.tf b/pkg/providers/appsec/testdata/TestDSMalwarePolicies/match_by_id_single_policy.tf index 9d31ac80d..f30f3831e 100644 --- a/pkg/providers/appsec/testdata/TestDSMalwarePolicies/match_by_id_single_policy.tf +++ b/pkg/providers/appsec/testdata/TestDSMalwarePolicies/match_by_id_single_policy.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSMalwarePolicyActions/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSMalwarePolicyActions/match_by_id.tf index 7a25c1990..2e9cf3466 100644 --- a/pkg/providers/appsec/testdata/TestDSMalwarePolicyActions/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSMalwarePolicyActions/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSMatchTargets/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSMatchTargets/match_by_id.tf index d3a9e88e8..9947de15b 100644 --- a/pkg/providers/appsec/testdata/TestDSMatchTargets/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSMatchTargets/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSPenaltyBox/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSPenaltyBox/match_by_id.tf index 57acad955..1fec3bafc 100644 --- a/pkg/providers/appsec/testdata/TestDSPenaltyBox/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSPenaltyBox/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSPenaltyBoxes/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSPenaltyBoxes/match_by_id.tf index 863494ce5..1efefc700 100644 --- a/pkg/providers/appsec/testdata/TestDSPenaltyBoxes/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSPenaltyBoxes/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSPolicyProtections/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSPolicyProtections/match_by_id.tf index cc222f816..20aeb9758 100644 --- a/pkg/providers/appsec/testdata/TestDSPolicyProtections/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSPolicyProtections/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSRatePolicies/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSRatePolicies/match_by_id.tf index e3dccdf7f..dd28d6f98 100644 --- a/pkg/providers/appsec/testdata/TestDSRatePolicies/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSRatePolicies/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSRatePolicyActions/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSRatePolicyActions/match_by_id.tf index 33b205f25..e1e2cf536 100644 --- a/pkg/providers/appsec/testdata/TestDSRatePolicyActions/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSRatePolicyActions/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSRateProtections/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSRateProtections/match_by_id.tf index 19a10623b..137972767 100644 --- a/pkg/providers/appsec/testdata/TestDSRateProtections/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSRateProtections/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSReputationAnalysis/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSReputationAnalysis/match_by_id.tf index 46d0f71e6..7012ebdea 100644 --- a/pkg/providers/appsec/testdata/TestDSReputationAnalysis/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSReputationAnalysis/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSReputationProfileActions/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSReputationProfileActions/match_by_id.tf index 7dc6d47b6..9f7944d5a 100644 --- a/pkg/providers/appsec/testdata/TestDSReputationProfileActions/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSReputationProfileActions/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSReputationProfiles/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSReputationProfiles/match_by_id.tf index 74688fc85..9496d3dc3 100644 --- a/pkg/providers/appsec/testdata/TestDSReputationProfiles/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSReputationProfiles/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSReputationProtections/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSReputationProtections/match_by_id.tf index f820f53e1..9878e9403 100644 --- a/pkg/providers/appsec/testdata/TestDSReputationProtections/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSReputationProtections/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSRuleActions/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSRuleActions/match_by_id.tf index 844172e0c..4d7140237 100644 --- a/pkg/providers/appsec/testdata/TestDSRuleActions/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSRuleActions/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSRuleConditionException/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSRuleConditionException/match_by_id.tf index 664849b40..b51cc862c 100644 --- a/pkg/providers/appsec/testdata/TestDSRuleConditionException/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSRuleConditionException/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSRuleUpgrade/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSRuleUpgrade/match_by_id.tf index e3543f972..6dfa5a961 100644 --- a/pkg/providers/appsec/testdata/TestDSRuleUpgrade/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSRuleUpgrade/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSRules/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSRules/match_by_id.tf index e4bef20d2..c55d3c58a 100644 --- a/pkg/providers/appsec/testdata/TestDSRules/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSRules/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSSecurityPolicy/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSSecurityPolicy/match_by_id.tf index 1b0ca12d3..b4dba5f08 100644 --- a/pkg/providers/appsec/testdata/TestDSSecurityPolicy/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSSecurityPolicy/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSSelectableHostnames/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSSelectableHostnames/match_by_id.tf index 051b5fdcb..60c72c47a 100644 --- a/pkg/providers/appsec/testdata/TestDSSelectableHostnames/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSSelectableHostnames/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSSelectedHostnames/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSSelectedHostnames/match_by_id.tf index f18b80664..bc439d05e 100644 --- a/pkg/providers/appsec/testdata/TestDSSelectedHostnames/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSSelectedHostnames/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSSiemDefinitions/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSSiemDefinitions/match_by_id.tf index 206b77c1f..57e8d7648 100644 --- a/pkg/providers/appsec/testdata/TestDSSiemDefinitions/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSSiemDefinitions/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSSiemSettings/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSSiemSettings/match_by_id.tf index 6f671a38c..9a13f87bd 100644 --- a/pkg/providers/appsec/testdata/TestDSSiemSettings/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSSiemSettings/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSSlowPostProtectionSettings/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSSlowPostProtectionSettings/match_by_id.tf index e9a007c0d..94e745908 100644 --- a/pkg/providers/appsec/testdata/TestDSSlowPostProtectionSettings/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSSlowPostProtectionSettings/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSSlowPostProtections/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSSlowPostProtections/match_by_id.tf index 681bc2f4b..19c9bc24e 100644 --- a/pkg/providers/appsec/testdata/TestDSSlowPostProtections/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSSlowPostProtections/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSThreatIntel/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSThreatIntel/match_by_id.tf index 20b7fbf5a..b3d38e597 100644 --- a/pkg/providers/appsec/testdata/TestDSThreatIntel/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSThreatIntel/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSTuningRecommendations/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSTuningRecommendations/match_by_id.tf index a6dd78e47..fbf5b2d6a 100644 --- a/pkg/providers/appsec/testdata/TestDSTuningRecommendations/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSTuningRecommendations/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSVersionNotes/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSVersionNotes/match_by_id.tf index c647f565c..557301a86 100644 --- a/pkg/providers/appsec/testdata/TestDSVersionNotes/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSVersionNotes/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSWAFMode/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSWAFMode/match_by_id.tf index caa8b192f..6ecc9e43c 100644 --- a/pkg/providers/appsec/testdata/TestDSWAFMode/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSWAFMode/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSWAFProtections/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSWAFProtections/match_by_id.tf index 6eff0964b..3db98b8dc 100644 --- a/pkg/providers/appsec/testdata/TestDSWAFProtections/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSWAFProtections/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSWAPSelectedHostnames/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSWAPSelectedHostnames/match_by_id.tf index 0287aca75..6e6451f56 100644 --- a/pkg/providers/appsec/testdata/TestDSWAPSelectedHostnames/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSWAPSelectedHostnames/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResAPIConstraintsProtection/match_by_id.tf b/pkg/providers/appsec/testdata/TestResAPIConstraintsProtection/match_by_id.tf index 14cfcea20..a7932cb07 100644 --- a/pkg/providers/appsec/testdata/TestResAPIConstraintsProtection/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResAPIConstraintsProtection/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResAPIConstraintsProtection/update_by_id.tf b/pkg/providers/appsec/testdata/TestResAPIConstraintsProtection/update_by_id.tf index 0aa44cc58..cbf8dcb43 100644 --- a/pkg/providers/appsec/testdata/TestResAPIConstraintsProtection/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResAPIConstraintsProtection/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResActivations/match_by_id.tf b/pkg/providers/appsec/testdata/TestResActivations/match_by_id.tf index 84d2fb5fb..d000d2a7b 100644 --- a/pkg/providers/appsec/testdata/TestResActivations/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResActivations/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResActivations/update_by_id.tf b/pkg/providers/appsec/testdata/TestResActivations/update_by_id.tf index 4099068f4..3095c180f 100644 --- a/pkg/providers/appsec/testdata/TestResActivations/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResActivations/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResActivations/update_notes.tf b/pkg/providers/appsec/testdata/TestResActivations/update_notes.tf index e92b46d9a..a9d16e39d 100644 --- a/pkg/providers/appsec/testdata/TestResActivations/update_notes.tf +++ b/pkg/providers/appsec/testdata/TestResActivations/update_notes.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResAdvancedSettingsAttackPayloadLogging/match_by_id.tf b/pkg/providers/appsec/testdata/TestResAdvancedSettingsAttackPayloadLogging/match_by_id.tf index c7004bccb..af1977acd 100644 --- a/pkg/providers/appsec/testdata/TestResAdvancedSettingsAttackPayloadLogging/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResAdvancedSettingsAttackPayloadLogging/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResAdvancedSettingsAttackPayloadLogging/update_by_policy_id.tf b/pkg/providers/appsec/testdata/TestResAdvancedSettingsAttackPayloadLogging/update_by_policy_id.tf index fcc8a63a2..a96368dc6 100644 --- a/pkg/providers/appsec/testdata/TestResAdvancedSettingsAttackPayloadLogging/update_by_policy_id.tf +++ b/pkg/providers/appsec/testdata/TestResAdvancedSettingsAttackPayloadLogging/update_by_policy_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResAdvancedSettingsEvasivePathMatch/match_by_id.tf b/pkg/providers/appsec/testdata/TestResAdvancedSettingsEvasivePathMatch/match_by_id.tf index 69fe8758a..535e97dd6 100644 --- a/pkg/providers/appsec/testdata/TestResAdvancedSettingsEvasivePathMatch/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResAdvancedSettingsEvasivePathMatch/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResAdvancedSettingsLogging/match_by_id.tf b/pkg/providers/appsec/testdata/TestResAdvancedSettingsLogging/match_by_id.tf index 0bac7554b..350594603 100644 --- a/pkg/providers/appsec/testdata/TestResAdvancedSettingsLogging/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResAdvancedSettingsLogging/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResAdvancedSettingsPIILearning/match_by_id.tf b/pkg/providers/appsec/testdata/TestResAdvancedSettingsPIILearning/match_by_id.tf index 53f35aff9..2c261d230 100644 --- a/pkg/providers/appsec/testdata/TestResAdvancedSettingsPIILearning/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResAdvancedSettingsPIILearning/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResAdvancedSettingsPragma/match_by_id.tf b/pkg/providers/appsec/testdata/TestResAdvancedSettingsPragma/match_by_id.tf index a34441218..b656a797d 100644 --- a/pkg/providers/appsec/testdata/TestResAdvancedSettingsPragma/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResAdvancedSettingsPragma/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResAdvancedSettingsPrefetch/match_by_id.tf b/pkg/providers/appsec/testdata/TestResAdvancedSettingsPrefetch/match_by_id.tf index 21f3ba6c2..e8fdd05c2 100644 --- a/pkg/providers/appsec/testdata/TestResAdvancedSettingsPrefetch/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResAdvancedSettingsPrefetch/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResAdvancedSettingsRequestBody/match_by_id.tf b/pkg/providers/appsec/testdata/TestResAdvancedSettingsRequestBody/match_by_id.tf index 05138ab8f..3ceeefd2f 100644 --- a/pkg/providers/appsec/testdata/TestResAdvancedSettingsRequestBody/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResAdvancedSettingsRequestBody/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResAdvancedSettingsRequestBody/update_by_policy_id.tf b/pkg/providers/appsec/testdata/TestResAdvancedSettingsRequestBody/update_by_policy_id.tf index 3d8b3c2ee..e8a20ee76 100644 --- a/pkg/providers/appsec/testdata/TestResAdvancedSettingsRequestBody/update_by_policy_id.tf +++ b/pkg/providers/appsec/testdata/TestResAdvancedSettingsRequestBody/update_by_policy_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResApiRequestConstraints/match_by_id.tf b/pkg/providers/appsec/testdata/TestResApiRequestConstraints/match_by_id.tf index 5a08c5f5d..9b0dcb6cf 100644 --- a/pkg/providers/appsec/testdata/TestResApiRequestConstraints/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResApiRequestConstraints/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResAttackGroup/match_by_id.tf b/pkg/providers/appsec/testdata/TestResAttackGroup/match_by_id.tf index 324d9a41d..9a13ff45c 100644 --- a/pkg/providers/appsec/testdata/TestResAttackGroup/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResAttackGroup/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResAttackGroupAction/match_by_id.tf b/pkg/providers/appsec/testdata/TestResAttackGroupAction/match_by_id.tf index 743dafe0a..420951334 100644 --- a/pkg/providers/appsec/testdata/TestResAttackGroupAction/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResAttackGroupAction/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResAttackGroupConditionException/match_by_id.tf b/pkg/providers/appsec/testdata/TestResAttackGroupConditionException/match_by_id.tf index 9b797f87b..1d0e5ea19 100644 --- a/pkg/providers/appsec/testdata/TestResAttackGroupConditionException/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResAttackGroupConditionException/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResBypassNetworkLists/match_by_id.tf b/pkg/providers/appsec/testdata/TestResBypassNetworkLists/match_by_id.tf index 750d30f7e..ef5b5150a 100644 --- a/pkg/providers/appsec/testdata/TestResBypassNetworkLists/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResBypassNetworkLists/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResConfiguration/match_by_id.tf b/pkg/providers/appsec/testdata/TestResConfiguration/match_by_id.tf index 09d262983..9170423a4 100644 --- a/pkg/providers/appsec/testdata/TestResConfiguration/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResConfiguration/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResConfiguration/modify_contract.tf b/pkg/providers/appsec/testdata/TestResConfiguration/modify_contract.tf index dfe6a7914..ccf2976ab 100644 --- a/pkg/providers/appsec/testdata/TestResConfiguration/modify_contract.tf +++ b/pkg/providers/appsec/testdata/TestResConfiguration/modify_contract.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResConfiguration/update_by_id.tf b/pkg/providers/appsec/testdata/TestResConfiguration/update_by_id.tf index 57463348f..33596c4c3 100644 --- a/pkg/providers/appsec/testdata/TestResConfiguration/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResConfiguration/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResConfigurationClone/match_by_id.tf b/pkg/providers/appsec/testdata/TestResConfigurationClone/match_by_id.tf index 2284db0e0..3bf69ae47 100644 --- a/pkg/providers/appsec/testdata/TestResConfigurationClone/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResConfigurationClone/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResConfigurationRename/match_by_id.tf b/pkg/providers/appsec/testdata/TestResConfigurationRename/match_by_id.tf index 916c8b0e1..f543ca1b2 100644 --- a/pkg/providers/appsec/testdata/TestResConfigurationRename/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResConfigurationRename/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResConfigurationRename/update_by_id.tf b/pkg/providers/appsec/testdata/TestResConfigurationRename/update_by_id.tf index 916c8b0e1..f543ca1b2 100644 --- a/pkg/providers/appsec/testdata/TestResConfigurationRename/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResConfigurationRename/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResConfigurationVersionClone/match_by_id.tf b/pkg/providers/appsec/testdata/TestResConfigurationVersionClone/match_by_id.tf index 2ee05e8a5..c41c642f3 100644 --- a/pkg/providers/appsec/testdata/TestResConfigurationVersionClone/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResConfigurationVersionClone/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResCustomDeny/match_by_id.tf b/pkg/providers/appsec/testdata/TestResCustomDeny/match_by_id.tf index a3ad4dbb2..6574e76cf 100644 --- a/pkg/providers/appsec/testdata/TestResCustomDeny/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResCustomDeny/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResCustomDeny/update_by_id.tf b/pkg/providers/appsec/testdata/TestResCustomDeny/update_by_id.tf index 81518d63b..2f74894b2 100644 --- a/pkg/providers/appsec/testdata/TestResCustomDeny/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResCustomDeny/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResCustomRule/match_by_id.tf b/pkg/providers/appsec/testdata/TestResCustomRule/match_by_id.tf index 47fd141df..1905c67f1 100644 --- a/pkg/providers/appsec/testdata/TestResCustomRule/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResCustomRule/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResCustomRule/update_by_id.tf b/pkg/providers/appsec/testdata/TestResCustomRule/update_by_id.tf index 95a59d326..a112d053e 100644 --- a/pkg/providers/appsec/testdata/TestResCustomRule/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResCustomRule/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResCustomRuleAction/match_by_id.tf b/pkg/providers/appsec/testdata/TestResCustomRuleAction/match_by_id.tf index e341f4352..4a178f78e 100644 --- a/pkg/providers/appsec/testdata/TestResCustomRuleAction/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResCustomRuleAction/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResEval/match_by_id.tf b/pkg/providers/appsec/testdata/TestResEval/match_by_id.tf index 02f83c36c..e7e9c35dc 100644 --- a/pkg/providers/appsec/testdata/TestResEval/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResEval/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResEval/update_by_id.tf b/pkg/providers/appsec/testdata/TestResEval/update_by_id.tf index 02f83c36c..e7e9c35dc 100644 --- a/pkg/providers/appsec/testdata/TestResEval/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResEval/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResEvalGroup/match_by_id.tf b/pkg/providers/appsec/testdata/TestResEvalGroup/match_by_id.tf index 80f0ac9aa..c0fad1303 100644 --- a/pkg/providers/appsec/testdata/TestResEvalGroup/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResEvalGroup/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResEvalPenaltyBox/match_by_id.tf b/pkg/providers/appsec/testdata/TestResEvalPenaltyBox/match_by_id.tf index ff122c6cd..1078c43ca 100644 --- a/pkg/providers/appsec/testdata/TestResEvalPenaltyBox/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResEvalPenaltyBox/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResEvalRule/match_by_id.tf b/pkg/providers/appsec/testdata/TestResEvalRule/match_by_id.tf index 9d7ed6c7f..b8eedd7d3 100644 --- a/pkg/providers/appsec/testdata/TestResEvalRule/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResEvalRule/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResEvalRuleAction/match_by_id.tf b/pkg/providers/appsec/testdata/TestResEvalRuleAction/match_by_id.tf index 7e89b6928..4a19ef437 100644 --- a/pkg/providers/appsec/testdata/TestResEvalRuleAction/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResEvalRuleAction/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResEvalRuleConditionException/match_by_id.tf b/pkg/providers/appsec/testdata/TestResEvalRuleConditionException/match_by_id.tf index 91e294d49..f457aed4e 100644 --- a/pkg/providers/appsec/testdata/TestResEvalRuleConditionException/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResEvalRuleConditionException/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResIPGeo/allow.tf b/pkg/providers/appsec/testdata/TestResIPGeo/allow.tf index ea0d95b29..b77770b4f 100644 --- a/pkg/providers/appsec/testdata/TestResIPGeo/allow.tf +++ b/pkg/providers/appsec/testdata/TestResIPGeo/allow.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResIPGeo/allow_with_empty_lists.tf b/pkg/providers/appsec/testdata/TestResIPGeo/allow_with_empty_lists.tf index 8df8421d2..a2d1d5db2 100644 --- a/pkg/providers/appsec/testdata/TestResIPGeo/allow_with_empty_lists.tf +++ b/pkg/providers/appsec/testdata/TestResIPGeo/allow_with_empty_lists.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResIPGeo/block_with_empty_lists.tf b/pkg/providers/appsec/testdata/TestResIPGeo/block_with_empty_lists.tf index 0526f4bb8..7ab7ba880 100644 --- a/pkg/providers/appsec/testdata/TestResIPGeo/block_with_empty_lists.tf +++ b/pkg/providers/appsec/testdata/TestResIPGeo/block_with_empty_lists.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResIPGeo/match_by_id.tf b/pkg/providers/appsec/testdata/TestResIPGeo/match_by_id.tf index 411534e2f..7b35ba545 100644 --- a/pkg/providers/appsec/testdata/TestResIPGeo/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResIPGeo/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResIPGeo/ukraine_match_by_id.tf b/pkg/providers/appsec/testdata/TestResIPGeo/ukraine_match_by_id.tf index bc0646e44..db4b62d6e 100644 --- a/pkg/providers/appsec/testdata/TestResIPGeo/ukraine_match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResIPGeo/ukraine_match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResIPGeoProtection/match_by_id.tf b/pkg/providers/appsec/testdata/TestResIPGeoProtection/match_by_id.tf index 4d3b0bc55..bcbf8039b 100644 --- a/pkg/providers/appsec/testdata/TestResIPGeoProtection/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResIPGeoProtection/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResIPGeoProtection/update_by_id.tf b/pkg/providers/appsec/testdata/TestResIPGeoProtection/update_by_id.tf index 6c1627b8c..e07306313 100644 --- a/pkg/providers/appsec/testdata/TestResIPGeoProtection/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResIPGeoProtection/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResMalwarePolicy/match_by_id.tf b/pkg/providers/appsec/testdata/TestResMalwarePolicy/match_by_id.tf index c7fedc95c..400ad2497 100644 --- a/pkg/providers/appsec/testdata/TestResMalwarePolicy/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResMalwarePolicy/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResMalwarePolicy/update_by_id.tf b/pkg/providers/appsec/testdata/TestResMalwarePolicy/update_by_id.tf index d6a6c145d..f3b0f502a 100644 --- a/pkg/providers/appsec/testdata/TestResMalwarePolicy/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResMalwarePolicy/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResMalwarePolicyAction/create.tf b/pkg/providers/appsec/testdata/TestResMalwarePolicyAction/create.tf index ddbb66e0f..fd879915b 100644 --- a/pkg/providers/appsec/testdata/TestResMalwarePolicyAction/create.tf +++ b/pkg/providers/appsec/testdata/TestResMalwarePolicyAction/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResMalwarePolicyAction/update.tf b/pkg/providers/appsec/testdata/TestResMalwarePolicyAction/update.tf index 2beb4f8ff..44576bc44 100644 --- a/pkg/providers/appsec/testdata/TestResMalwarePolicyAction/update.tf +++ b/pkg/providers/appsec/testdata/TestResMalwarePolicyAction/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResMalwarePolicyActions/match_by_id.tf b/pkg/providers/appsec/testdata/TestResMalwarePolicyActions/match_by_id.tf index a5a43bed3..522af7970 100644 --- a/pkg/providers/appsec/testdata/TestResMalwarePolicyActions/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResMalwarePolicyActions/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResMalwarePolicyActions/update_by_id.tf b/pkg/providers/appsec/testdata/TestResMalwarePolicyActions/update_by_id.tf index a5a43bed3..522af7970 100644 --- a/pkg/providers/appsec/testdata/TestResMalwarePolicyActions/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResMalwarePolicyActions/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResMalwareProtection/match_by_id.tf b/pkg/providers/appsec/testdata/TestResMalwareProtection/match_by_id.tf index 87efcb36d..d83965f0f 100644 --- a/pkg/providers/appsec/testdata/TestResMalwareProtection/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResMalwareProtection/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResMatchTarget/match_by_id.tf b/pkg/providers/appsec/testdata/TestResMatchTarget/match_by_id.tf index fc555284c..7be6918ff 100644 --- a/pkg/providers/appsec/testdata/TestResMatchTarget/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResMatchTarget/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResMatchTarget/update_by_id.tf b/pkg/providers/appsec/testdata/TestResMatchTarget/update_by_id.tf index c246124d7..26f27ed1f 100644 --- a/pkg/providers/appsec/testdata/TestResMatchTarget/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResMatchTarget/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResMatchTargetSequence/match_by_id.tf b/pkg/providers/appsec/testdata/TestResMatchTargetSequence/match_by_id.tf index 089b7b8ec..332e616fa 100644 --- a/pkg/providers/appsec/testdata/TestResMatchTargetSequence/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResMatchTargetSequence/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResMatchTargetSequence/update_by_id.tf b/pkg/providers/appsec/testdata/TestResMatchTargetSequence/update_by_id.tf index 089b7b8ec..332e616fa 100644 --- a/pkg/providers/appsec/testdata/TestResMatchTargetSequence/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResMatchTargetSequence/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResPenaltyBox/match_by_id.tf b/pkg/providers/appsec/testdata/TestResPenaltyBox/match_by_id.tf index 2e26ab982..27e9b5612 100644 --- a/pkg/providers/appsec/testdata/TestResPenaltyBox/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResPenaltyBox/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResRatePolicy/match_by_id.tf b/pkg/providers/appsec/testdata/TestResRatePolicy/match_by_id.tf index 0b98edaf5..231a05234 100644 --- a/pkg/providers/appsec/testdata/TestResRatePolicy/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResRatePolicy/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResRatePolicy/update_by_id.tf b/pkg/providers/appsec/testdata/TestResRatePolicy/update_by_id.tf index 6b8ba2658..2b78c3920 100644 --- a/pkg/providers/appsec/testdata/TestResRatePolicy/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResRatePolicy/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResRatePolicyAction/create.tf b/pkg/providers/appsec/testdata/TestResRatePolicyAction/create.tf index be4561825..4b0bfe869 100644 --- a/pkg/providers/appsec/testdata/TestResRatePolicyAction/create.tf +++ b/pkg/providers/appsec/testdata/TestResRatePolicyAction/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResRatePolicyAction/update.tf b/pkg/providers/appsec/testdata/TestResRatePolicyAction/update.tf index c79317fed..c2cd4025b 100644 --- a/pkg/providers/appsec/testdata/TestResRatePolicyAction/update.tf +++ b/pkg/providers/appsec/testdata/TestResRatePolicyAction/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResRateProtection/match_by_id.tf b/pkg/providers/appsec/testdata/TestResRateProtection/match_by_id.tf index 8ddf6493c..151cf2e28 100644 --- a/pkg/providers/appsec/testdata/TestResRateProtection/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResRateProtection/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResRateProtection/update_by_id.tf b/pkg/providers/appsec/testdata/TestResRateProtection/update_by_id.tf index 5ed5fc9a4..6e96d0517 100644 --- a/pkg/providers/appsec/testdata/TestResRateProtection/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResRateProtection/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResReputationAnalysis/match_by_id.tf b/pkg/providers/appsec/testdata/TestResReputationAnalysis/match_by_id.tf index acaeaefbf..35191fd30 100644 --- a/pkg/providers/appsec/testdata/TestResReputationAnalysis/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResReputationAnalysis/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResReputationAnalysis/update_by_id.tf b/pkg/providers/appsec/testdata/TestResReputationAnalysis/update_by_id.tf index acaeaefbf..35191fd30 100644 --- a/pkg/providers/appsec/testdata/TestResReputationAnalysis/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResReputationAnalysis/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResReputationProfile/match_by_id.tf b/pkg/providers/appsec/testdata/TestResReputationProfile/match_by_id.tf index 4fd1a073d..092f5193f 100644 --- a/pkg/providers/appsec/testdata/TestResReputationProfile/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResReputationProfile/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResReputationProfile/update_by_id.tf b/pkg/providers/appsec/testdata/TestResReputationProfile/update_by_id.tf index 4fd1a073d..092f5193f 100644 --- a/pkg/providers/appsec/testdata/TestResReputationProfile/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResReputationProfile/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResReputationProfileAction/match_by_id.tf b/pkg/providers/appsec/testdata/TestResReputationProfileAction/match_by_id.tf index 3880d7a06..dbe1c2011 100644 --- a/pkg/providers/appsec/testdata/TestResReputationProfileAction/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResReputationProfileAction/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResReputationProfileAction/update_by_id.tf b/pkg/providers/appsec/testdata/TestResReputationProfileAction/update_by_id.tf index 3d79576ee..8d6b51aa0 100644 --- a/pkg/providers/appsec/testdata/TestResReputationProfileAction/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResReputationProfileAction/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResReputationProtection/match_by_id.tf b/pkg/providers/appsec/testdata/TestResReputationProtection/match_by_id.tf index bff42ab4e..d9bc426cf 100644 --- a/pkg/providers/appsec/testdata/TestResReputationProtection/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResReputationProtection/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResReputationProtection/update_by_id.tf b/pkg/providers/appsec/testdata/TestResReputationProtection/update_by_id.tf index a2134522c..8c25e2ebc 100644 --- a/pkg/providers/appsec/testdata/TestResReputationProtection/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResReputationProtection/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResRule/match_by_id.tf b/pkg/providers/appsec/testdata/TestResRule/match_by_id.tf index 5a272a45e..18761901e 100644 --- a/pkg/providers/appsec/testdata/TestResRule/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResRule/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResRuleAction/match_by_id.tf b/pkg/providers/appsec/testdata/TestResRuleAction/match_by_id.tf index 85fffed6d..56c066b86 100644 --- a/pkg/providers/appsec/testdata/TestResRuleAction/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResRuleAction/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResRuleConditionException/match_by_id.tf b/pkg/providers/appsec/testdata/TestResRuleConditionException/match_by_id.tf index 2f1d95f64..9216d640d 100644 --- a/pkg/providers/appsec/testdata/TestResRuleConditionException/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResRuleConditionException/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResRuleUpgrade/match_by_id.tf b/pkg/providers/appsec/testdata/TestResRuleUpgrade/match_by_id.tf index d6eeee18a..2f033f32a 100644 --- a/pkg/providers/appsec/testdata/TestResRuleUpgrade/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResRuleUpgrade/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResSecurityPolicy/match_by_id.tf b/pkg/providers/appsec/testdata/TestResSecurityPolicy/match_by_id.tf index 71946748d..d4bee2a0a 100644 --- a/pkg/providers/appsec/testdata/TestResSecurityPolicy/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResSecurityPolicy/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResSecurityPolicy/update_by_id.tf b/pkg/providers/appsec/testdata/TestResSecurityPolicy/update_by_id.tf index c6cf6d7d3..6556d3040 100644 --- a/pkg/providers/appsec/testdata/TestResSecurityPolicy/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResSecurityPolicy/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResSecurityPolicyClone/match_by_id.tf b/pkg/providers/appsec/testdata/TestResSecurityPolicyClone/match_by_id.tf index 74e8fef86..fcfc9c58f 100644 --- a/pkg/providers/appsec/testdata/TestResSecurityPolicyClone/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResSecurityPolicyClone/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResSecurityPolicyDefaultProtections/match_by_id.tf b/pkg/providers/appsec/testdata/TestResSecurityPolicyDefaultProtections/match_by_id.tf index 8e8771c84..e50f7a4f7 100644 --- a/pkg/providers/appsec/testdata/TestResSecurityPolicyDefaultProtections/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResSecurityPolicyDefaultProtections/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResSecurityPolicyDefaultProtections/update_by_id.tf b/pkg/providers/appsec/testdata/TestResSecurityPolicyDefaultProtections/update_by_id.tf index 43058fbaa..6840d6640 100644 --- a/pkg/providers/appsec/testdata/TestResSecurityPolicyDefaultProtections/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResSecurityPolicyDefaultProtections/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResSecurityPolicyRename/match_by_id.tf b/pkg/providers/appsec/testdata/TestResSecurityPolicyRename/match_by_id.tf index 6c8596360..89f5715b6 100644 --- a/pkg/providers/appsec/testdata/TestResSecurityPolicyRename/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResSecurityPolicyRename/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResSecurityPolicyRename/update_by_id.tf b/pkg/providers/appsec/testdata/TestResSecurityPolicyRename/update_by_id.tf index 6c8596360..89f5715b6 100644 --- a/pkg/providers/appsec/testdata/TestResSecurityPolicyRename/update_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResSecurityPolicyRename/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResSelectedHostname/match_by_id.tf b/pkg/providers/appsec/testdata/TestResSelectedHostname/match_by_id.tf index ed31feb8b..deb5f0604 100644 --- a/pkg/providers/appsec/testdata/TestResSelectedHostname/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResSelectedHostname/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResSiemSettings/match_by_id.tf b/pkg/providers/appsec/testdata/TestResSiemSettings/match_by_id.tf index c3300dd75..059a2d6ce 100644 --- a/pkg/providers/appsec/testdata/TestResSiemSettings/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResSiemSettings/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResSlowPostProtection/match_by_id.tf b/pkg/providers/appsec/testdata/TestResSlowPostProtection/match_by_id.tf index 245bdaa9b..bff71cacd 100644 --- a/pkg/providers/appsec/testdata/TestResSlowPostProtection/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResSlowPostProtection/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResSlowPostProtectionSetting/match_by_id.tf b/pkg/providers/appsec/testdata/TestResSlowPostProtectionSetting/match_by_id.tf index 7c1fbca94..1615cde86 100644 --- a/pkg/providers/appsec/testdata/TestResSlowPostProtectionSetting/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResSlowPostProtectionSetting/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResThreatIntel/match_by_id.tf b/pkg/providers/appsec/testdata/TestResThreatIntel/match_by_id.tf index 7f34d384f..b54c641fa 100644 --- a/pkg/providers/appsec/testdata/TestResThreatIntel/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResThreatIntel/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResVersionNotes/match_by_id.tf b/pkg/providers/appsec/testdata/TestResVersionNotes/match_by_id.tf index d1a8307fb..8ebf8e4f2 100644 --- a/pkg/providers/appsec/testdata/TestResVersionNotes/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResVersionNotes/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResWAFEvalMode/match_by_id.tf b/pkg/providers/appsec/testdata/TestResWAFEvalMode/match_by_id.tf index 203770d01..0b89f1976 100644 --- a/pkg/providers/appsec/testdata/TestResWAFEvalMode/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResWAFEvalMode/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResWAFMode/match_by_id.tf b/pkg/providers/appsec/testdata/TestResWAFMode/match_by_id.tf index a1ebff043..2fbc0c9ce 100644 --- a/pkg/providers/appsec/testdata/TestResWAFMode/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResWAFMode/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResWAFProtection/match_by_id.tf b/pkg/providers/appsec/testdata/TestResWAFProtection/match_by_id.tf index 490a443b9..3450bf961 100644 --- a/pkg/providers/appsec/testdata/TestResWAFProtection/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResWAFProtection/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResWAPSelectedHostnames/match_by_id.tf b/pkg/providers/appsec/testdata/TestResWAPSelectedHostnames/match_by_id.tf index 03aa1e8a9..804dc4c8b 100644 --- a/pkg/providers/appsec/testdata/TestResWAPSelectedHostnames/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResWAPSelectedHostnames/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action_test.go b/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action_test.go index fe2c55eae..9b8c98bf1 100644 --- a/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -45,7 +44,7 @@ func TestDataAkamaiBotCategoryAction(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataAkamaiBotCategoryAction/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataAkamaiBotCategoryAction/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_akamai_bot_category_action.test", "json", compactJSON(expectedJSON))), }, @@ -81,7 +80,7 @@ func TestDataAkamaiBotCategoryAction(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataAkamaiBotCategoryAction/filter_by_id.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataAkamaiBotCategoryAction/filter_by_id.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_akamai_bot_category_action.test", "json", compactJSON(expectedJSON))), }, diff --git a/pkg/providers/botman/data_akamai_botman_akamai_bot_category_test.go b/pkg/providers/botman/data_akamai_botman_akamai_bot_category_test.go index 20cceb9be..b9981c5e2 100644 --- a/pkg/providers/botman/data_akamai_botman_akamai_bot_category_test.go +++ b/pkg/providers/botman/data_akamai_botman_akamai_bot_category_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -43,7 +42,7 @@ func TestDataAkamaiBotCategory(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataAkamaiBotCategory/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataAkamaiBotCategory/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_akamai_bot_category.test", "json", compactJSON(expectedJSON))), }, @@ -77,7 +76,7 @@ func TestDataAkamaiBotCategory(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataAkamaiBotCategory/filter_by_name.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataAkamaiBotCategory/filter_by_name.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_akamai_bot_category.test", "json", compactJSON(expectedJSON))), }, diff --git a/pkg/providers/botman/data_akamai_botman_akamai_defined_bot_test.go b/pkg/providers/botman/data_akamai_botman_akamai_defined_bot_test.go index 454d13252..e8d929039 100644 --- a/pkg/providers/botman/data_akamai_botman_akamai_defined_bot_test.go +++ b/pkg/providers/botman/data_akamai_botman_akamai_defined_bot_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -43,7 +42,7 @@ func TestDataAkamaiDefinedBot(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataAkamaiDefinedBot/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataAkamaiDefinedBot/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_akamai_defined_bot.test", "json", compactJSON(expectedJSON))), }, @@ -77,7 +76,7 @@ func TestDataAkamaiDefinedBot(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataAkamaiDefinedBot/filter_by_name.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataAkamaiDefinedBot/filter_by_name.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_akamai_defined_bot.test", "json", compactJSON(expectedJSON))), }, diff --git a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_test.go b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_test.go index 629cb83a7..510b7b563 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -28,7 +27,7 @@ func TestDataBotAnalyticsCookie(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataBotAnalyticsCookie/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataBotAnalyticsCookie/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_bot_analytics_cookie.test", "json", compactJSON(expectedJSON))), }, diff --git a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values_test.go b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values_test.go index 680a13001..fa0686a59 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -42,7 +41,7 @@ func TestDataBotAnalyticsCookieValue(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataBotAnalyticsCookieValues/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataBotAnalyticsCookieValues/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_bot_analytics_cookie_values.test", "json", compactJSON(expectedJSON))), }, diff --git a/pkg/providers/botman/data_akamai_botman_bot_category_exception_test.go b/pkg/providers/botman/data_akamai_botman_bot_category_exception_test.go index cae3463a3..5ba4dab6b 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_category_exception_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_category_exception_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -28,7 +27,7 @@ func TestDataBotCategoryException(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataBotCategoryException/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataBotCategoryException/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_bot_category_exception.test", "json", compactJSON(expectedJSON))), }, diff --git a/pkg/providers/botman/data_akamai_botman_bot_detection_action_test.go b/pkg/providers/botman/data_akamai_botman_bot_detection_action_test.go index 620e6cec2..03016936c 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_detection_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_detection_action_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -45,7 +44,7 @@ func TestDataBotDetectionAction(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataBotDetectionAction/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataBotDetectionAction/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_bot_detection_action.test", "json", compactJSON(expectedJSON))), }, @@ -81,7 +80,7 @@ func TestDataBotDetectionAction(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataBotDetectionAction/filter_by_id.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataBotDetectionAction/filter_by_id.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_bot_detection_action.test", "json", compactJSON(expectedJSON))), }, diff --git a/pkg/providers/botman/data_akamai_botman_bot_detection_test.go b/pkg/providers/botman/data_akamai_botman_bot_detection_test.go index 56b4b0771..dd8ab8312 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_detection_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_detection_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -43,7 +42,7 @@ func TestDataBotDetection(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataBotDetection/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataBotDetection/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_bot_detection.test", "json", compactJSON(expectedJSON))), }, @@ -77,7 +76,7 @@ func TestDataBotDetection(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataBotDetection/filter_by_name.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataBotDetection/filter_by_name.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_bot_detection.test", "json", compactJSON(expectedJSON))), }, diff --git a/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report_test.go b/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report_test.go index f723c4f74..6be43367c 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -45,7 +44,7 @@ func TestDataBotEndpointCoverageReport(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataBotEndpointCoverageReport/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataBotEndpointCoverageReport/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_bot_endpoint_coverage_report.test", "json", compactJSON(expectedJSON))), }, @@ -81,7 +80,7 @@ func TestDataBotEndpointCoverageReport(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataBotEndpointCoverageReport/filter_by_id.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataBotEndpointCoverageReport/filter_by_id.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_bot_endpoint_coverage_report.test", "json", compactJSON(expectedJSON))), }, @@ -125,7 +124,7 @@ func TestDataBotEndpointCoverageReport(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataBotEndpointCoverageReport/with_config.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataBotEndpointCoverageReport/with_config.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_bot_endpoint_coverage_report.test", "json", compactJSON(expectedJSON))), }, @@ -161,7 +160,7 @@ func TestDataBotEndpointCoverageReport(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataBotEndpointCoverageReport/with_config_filter_by_id.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataBotEndpointCoverageReport/with_config_filter_by_id.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_bot_endpoint_coverage_report.test", "json", compactJSON(expectedJSON))), }, diff --git a/pkg/providers/botman/data_akamai_botman_bot_management_settings_test.go b/pkg/providers/botman/data_akamai_botman_bot_management_settings_test.go index 400c87b7a..f7dd6ef93 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_management_settings_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_management_settings_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -28,7 +27,7 @@ func TestDataBotManagementSettings(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataBotManagementSettings/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataBotManagementSettings/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_bot_management_settings.test", "json", compactJSON(expectedJSON))), }, diff --git a/pkg/providers/botman/data_akamai_botman_challenge_action_test.go b/pkg/providers/botman/data_akamai_botman_challenge_action_test.go index e90bcf96d..8e3e1dea2 100644 --- a/pkg/providers/botman/data_akamai_botman_challenge_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_challenge_action_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -45,7 +44,7 @@ func TestDataChallengeAction(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataChallengeAction/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataChallengeAction/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_challenge_action.test", "json", compactJSON(expectedJSON))), }, @@ -81,7 +80,7 @@ func TestDataChallengeAction(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataChallengeAction/filter_by_id.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataChallengeAction/filter_by_id.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_challenge_action.test", "json", compactJSON(expectedJSON))), }, diff --git a/pkg/providers/botman/data_akamai_botman_challenge_injection_rules_test.go b/pkg/providers/botman/data_akamai_botman_challenge_injection_rules_test.go index a6143f47b..dee145c47 100644 --- a/pkg/providers/botman/data_akamai_botman_challenge_injection_rules_test.go +++ b/pkg/providers/botman/data_akamai_botman_challenge_injection_rules_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -28,7 +27,7 @@ func TestDataChallengeInjectionRules(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataChallengeInjectionRules/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataChallengeInjectionRules/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_challenge_injection_rules.test", "json", compactJSON(expectedJSON))), }, diff --git a/pkg/providers/botman/data_akamai_botman_challenge_interception_rules_test.go b/pkg/providers/botman/data_akamai_botman_challenge_interception_rules_test.go index 82757d095..02176460e 100644 --- a/pkg/providers/botman/data_akamai_botman_challenge_interception_rules_test.go +++ b/pkg/providers/botman/data_akamai_botman_challenge_interception_rules_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -28,7 +27,7 @@ func TestDataChallengeInterceptionRules(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataChallengeInterceptionRules/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataChallengeInterceptionRules/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_challenge_interception_rules.test", "json", compactJSON(expectedJSON))), }, diff --git a/pkg/providers/botman/data_akamai_botman_client_side_security_test.go b/pkg/providers/botman/data_akamai_botman_client_side_security_test.go index 2e97f28ed..5ed8107d6 100644 --- a/pkg/providers/botman/data_akamai_botman_client_side_security_test.go +++ b/pkg/providers/botman/data_akamai_botman_client_side_security_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -28,7 +27,7 @@ func TestDataClientSideSecurity(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataClientSideSecurity/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataClientSideSecurity/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_client_side_security.test", "json", compactJSON(expectedJSON))), }, diff --git a/pkg/providers/botman/data_akamai_botman_conditional_action_test.go b/pkg/providers/botman/data_akamai_botman_conditional_action_test.go index d4d97162e..9f73db102 100644 --- a/pkg/providers/botman/data_akamai_botman_conditional_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_conditional_action_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -45,7 +44,7 @@ func TestDataConditionalAction(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataConditionalAction/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataConditionalAction/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_conditional_action.test", "json", compactJSON(expectedJSON))), }, @@ -81,7 +80,7 @@ func TestDataConditionalAction(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataConditionalAction/filter_by_id.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataConditionalAction/filter_by_id.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_conditional_action.test", "json", compactJSON(expectedJSON))), }, diff --git a/pkg/providers/botman/data_akamai_botman_custom_bot_category_action_test.go b/pkg/providers/botman/data_akamai_botman_custom_bot_category_action_test.go index bddd8b04e..9f2e61c6a 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_bot_category_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_bot_category_action_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -45,7 +44,7 @@ func TestDataCustomBotCategoryAction(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataCustomBotCategoryAction/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataCustomBotCategoryAction/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_custom_bot_category_action.test", "json", compactJSON(expectedJSON))), }, @@ -81,7 +80,7 @@ func TestDataCustomBotCategoryAction(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataCustomBotCategoryAction/filter_by_id.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataCustomBotCategoryAction/filter_by_id.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_custom_bot_category_action.test", "json", compactJSON(expectedJSON))), }, diff --git a/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence_test.go b/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence_test.go index bdd211992..c082109c5 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -29,7 +28,7 @@ func TestDataCustomBotCategorySequence(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataCustomBotCategorySequence/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataCustomBotCategorySequence/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_custom_bot_category_sequence.test", "category_ids.#", "3"), resource.TestCheckResourceAttr("data.akamai_botman_custom_bot_category_sequence.test", "category_ids.0", "cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), diff --git a/pkg/providers/botman/data_akamai_botman_custom_bot_category_test.go b/pkg/providers/botman/data_akamai_botman_custom_bot_category_test.go index 52ab0db62..601d4beea 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_bot_category_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_bot_category_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -45,7 +44,7 @@ func TestDataCustomBotCategory(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataCustomBotCategory/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataCustomBotCategory/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_custom_bot_category.test", "json", compactJSON(expectedJSON))), }, @@ -81,7 +80,7 @@ func TestDataCustomBotCategory(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataCustomBotCategory/filter_by_id.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataCustomBotCategory/filter_by_id.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_custom_bot_category.test", "json", compactJSON(expectedJSON))), }, diff --git a/pkg/providers/botman/data_akamai_botman_custom_client_sequence_test.go b/pkg/providers/botman/data_akamai_botman_custom_client_sequence_test.go index f6a7b9e46..8aa410f54 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_client_sequence_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_client_sequence_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -29,7 +28,7 @@ func TestDataCustomClientSequence(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataCustomClientSequence/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataCustomClientSequence/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_custom_client_sequence.test", "custom_client_ids.#", "3"), resource.TestCheckResourceAttr("data.akamai_botman_custom_client_sequence.test", "custom_client_ids.0", "cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), diff --git a/pkg/providers/botman/data_akamai_botman_custom_client_test.go b/pkg/providers/botman/data_akamai_botman_custom_client_test.go index a3e9a1569..4fce9283d 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_client_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_client_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -45,7 +44,7 @@ func TestDataCustomClient(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataCustomClient/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataCustomClient/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_custom_client.test", "json", compactJSON(expectedJSON))), }, @@ -81,7 +80,7 @@ func TestDataCustomClient(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataCustomClient/filter_by_id.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataCustomClient/filter_by_id.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_custom_client.test", "json", compactJSON(expectedJSON))), }, diff --git a/pkg/providers/botman/data_akamai_botman_custom_defined_bot_test.go b/pkg/providers/botman/data_akamai_botman_custom_defined_bot_test.go index 5d2a2e82f..7ad336a7f 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_defined_bot_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_defined_bot_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -45,7 +44,7 @@ func TestDataCustomDefinedBot(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataCustomDefinedBot/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataCustomDefinedBot/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_custom_defined_bot.test", "json", compactJSON(expectedJSON))), }, @@ -81,7 +80,7 @@ func TestDataCustomDefinedBot(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataCustomDefinedBot/filter_by_id.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataCustomDefinedBot/filter_by_id.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_custom_defined_bot.test", "json", compactJSON(expectedJSON))), }, diff --git a/pkg/providers/botman/data_akamai_botman_custom_deny_action_test.go b/pkg/providers/botman/data_akamai_botman_custom_deny_action_test.go index cd927f4c8..c234d3008 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_deny_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_deny_action_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -45,7 +44,7 @@ func TestDataCustomDenyAction(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataCustomDenyAction/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataCustomDenyAction/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_custom_deny_action.test", "json", compactJSON(expectedJSON))), }, @@ -81,7 +80,7 @@ func TestDataCustomDenyAction(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataCustomDenyAction/filter_by_id.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataCustomDenyAction/filter_by_id.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_custom_deny_action.test", "json", compactJSON(expectedJSON))), }, diff --git a/pkg/providers/botman/data_akamai_botman_javascript_injection_test.go b/pkg/providers/botman/data_akamai_botman_javascript_injection_test.go index 2a08c5a4c..446af8867 100644 --- a/pkg/providers/botman/data_akamai_botman_javascript_injection_test.go +++ b/pkg/providers/botman/data_akamai_botman_javascript_injection_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -28,7 +27,7 @@ func TestDataJavascriptInjection(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataJavascriptInjection/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataJavascriptInjection/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_javascript_injection.test", "json", compactJSON(expectedJSON))), }, diff --git a/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot_test.go b/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot_test.go index 14ed44d06..5dfb3ef09 100644 --- a/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot_test.go +++ b/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -45,7 +44,7 @@ func TestDataRecategorizedAkamaiDefinedBot(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataRecategorizedAkamaiDefinedBot/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataRecategorizedAkamaiDefinedBot/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_recategorized_akamai_defined_bot.test", "json", compactJSON(expectedJSON))), }, @@ -81,7 +80,7 @@ func TestDataRecategorizedAkamaiDefinedBot(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataRecategorizedAkamaiDefinedBot/filter_by_id.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataRecategorizedAkamaiDefinedBot/filter_by_id.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_recategorized_akamai_defined_bot.test", "json", compactJSON(expectedJSON))), }, diff --git a/pkg/providers/botman/data_akamai_botman_response_action_test.go b/pkg/providers/botman/data_akamai_botman_response_action_test.go index 0eb58d95a..e3bcbff05 100644 --- a/pkg/providers/botman/data_akamai_botman_response_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_response_action_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -45,7 +44,7 @@ func TestDataResponseAction(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataResponseAction/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataResponseAction/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_response_action.test", "json", compactJSON(expectedJSON))), }, @@ -81,7 +80,7 @@ func TestDataResponseAction(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataResponseAction/filter_by_id.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataResponseAction/filter_by_id.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_response_action.test", "json", compactJSON(expectedJSON))), }, diff --git a/pkg/providers/botman/data_akamai_botman_serve_alternate_action_test.go b/pkg/providers/botman/data_akamai_botman_serve_alternate_action_test.go index d14201e37..89fd69faa 100644 --- a/pkg/providers/botman/data_akamai_botman_serve_alternate_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_serve_alternate_action_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -45,7 +44,7 @@ func TestDataServeAlternateAction(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataServeAlternateAction/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataServeAlternateAction/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_serve_alternate_action.test", "json", compactJSON(expectedJSON))), }, @@ -81,7 +80,7 @@ func TestDataServeAlternateAction(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataServeAlternateAction/filter_by_id.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataServeAlternateAction/filter_by_id.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_serve_alternate_action.test", "json", compactJSON(expectedJSON))), }, diff --git a/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection_test.go b/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection_test.go index 6c01e0d80..d141f66c6 100644 --- a/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection_test.go +++ b/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -28,7 +27,7 @@ func TestDataTransactionalEndpointProtection(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataTransactionalEndpointProtection/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataTransactionalEndpointProtection/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_transactional_endpoint_protection.test", "json", compactJSON(expectedJSON))), }, diff --git a/pkg/providers/botman/data_akamai_botman_transactional_endpoint_test.go b/pkg/providers/botman/data_akamai_botman_transactional_endpoint_test.go index db61dda33..83a0a2433 100644 --- a/pkg/providers/botman/data_akamai_botman_transactional_endpoint_test.go +++ b/pkg/providers/botman/data_akamai_botman_transactional_endpoint_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -45,7 +44,7 @@ func TestDataTransactionalEndpoint(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataTransactionalEndpoint/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataTransactionalEndpoint/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_transactional_endpoint.test", "json", compactJSON(expectedJSON))), }, @@ -81,7 +80,7 @@ func TestDataTransactionalEndpoint(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataTransactionalEndpoint/filter_by_id.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataTransactionalEndpoint/filter_by_id.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_transactional_endpoint.test", "json", compactJSON(expectedJSON))), }, diff --git a/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action_test.go b/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action_test.go index 6ca7f06b6..e89bcc745 100644 --- a/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action_test.go @@ -6,7 +6,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -70,13 +69,13 @@ func TestResourceAkamaiBotCategoryAction(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestResourceAkamaiBotCategoryAction/create.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceAkamaiBotCategoryAction/create.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_akamai_bot_category_action.test", "id", "43253:AAAA_81230:cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), resource.TestCheckResourceAttr("akamai_botman_akamai_bot_category_action.test", "akamai_bot_category_action", expectedCreateJSON)), }, { - Config: test.Fixture("testdata/TestResourceAkamaiBotCategoryAction/update.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceAkamaiBotCategoryAction/update.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_akamai_bot_category_action.test", "id", "43253:AAAA_81230:cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), resource.TestCheckResourceAttr("akamai_botman_akamai_bot_category_action.test", "akamai_bot_category_action", expectedUpdateJSON)), diff --git a/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie_test.go b/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie_test.go index 33dba56e7..71f703338 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie_test.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -15,7 +14,7 @@ func TestResourceBotAnalyticsCookie(t *testing.T) { mockedBotmanClient := &botman.Mock{} createResponse := map[string]interface{}{"testKey": "testValue3"} - createRequest := test.FixtureBytes("testdata/JsonPayload/create.json") + createRequest := testutils.LoadFixtureBytes(t, "testdata/JsonPayload/create.json") mockedBotmanClient.On("UpdateBotAnalyticsCookie", mock.Anything, botman.UpdateBotAnalyticsCookieRequest{ @@ -35,7 +34,7 @@ func TestResourceBotAnalyticsCookie(t *testing.T) { expectedCreateJSON := `{"testKey":"testValue3"}` updateResponse := map[string]interface{}{"testKey": "updated_testValue3"} - updateRequest := test.FixtureBytes("testdata/JsonPayload/update.json") + updateRequest := testutils.LoadFixtureBytes(t, "testdata/JsonPayload/update.json") mockedBotmanClient.On("UpdateBotAnalyticsCookie", mock.Anything, botman.UpdateBotAnalyticsCookieRequest{ @@ -61,13 +60,13 @@ func TestResourceBotAnalyticsCookie(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestResourceBotAnalyticsCookie/create.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceBotAnalyticsCookie/create.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_bot_analytics_cookie.test", "id", "43253"), resource.TestCheckResourceAttr("akamai_botman_bot_analytics_cookie.test", "bot_analytics_cookie", expectedCreateJSON)), }, { - Config: test.Fixture("testdata/TestResourceBotAnalyticsCookie/update.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceBotAnalyticsCookie/update.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_bot_analytics_cookie.test", "id", "43253"), resource.TestCheckResourceAttr("akamai_botman_bot_analytics_cookie.test", "bot_analytics_cookie", expectedUpdateJSON)), diff --git a/pkg/providers/botman/resource_akamai_botman_bot_category_exception_test.go b/pkg/providers/botman/resource_akamai_botman_bot_category_exception_test.go index 4413caa8d..e706d821c 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_category_exception_test.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_category_exception_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -15,7 +14,7 @@ func TestResourceBotCategoryException(t *testing.T) { mockedBotmanClient := &botman.Mock{} createResponse := map[string]interface{}{"testKey": "testValue3"} - createRequest := test.FixtureBytes("testdata/JsonPayload/create.json") + createRequest := testutils.LoadFixtureBytes(t, "testdata/JsonPayload/create.json") mockedBotmanClient.On("UpdateBotCategoryException", mock.Anything, botman.UpdateBotCategoryExceptionRequest{ @@ -37,7 +36,7 @@ func TestResourceBotCategoryException(t *testing.T) { expectedCreateJSON := `{"testKey":"testValue3"}` updateResponse := map[string]interface{}{"testKey": "updated_testValue3"} - updateRequest := test.FixtureBytes("testdata/JsonPayload/update.json") + updateRequest := testutils.LoadFixtureBytes(t, "testdata/JsonPayload/update.json") mockedBotmanClient.On("UpdateBotCategoryException", mock.Anything, botman.UpdateBotCategoryExceptionRequest{ @@ -65,13 +64,13 @@ func TestResourceBotCategoryException(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestResourceBotCategoryException/create.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceBotCategoryException/create.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_bot_category_exception.test", "id", "43253:AAAA_81230"), resource.TestCheckResourceAttr("akamai_botman_bot_category_exception.test", "bot_category_exception", expectedCreateJSON)), }, { - Config: test.Fixture("testdata/TestResourceBotCategoryException/update.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceBotCategoryException/update.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_bot_category_exception.test", "id", "43253:AAAA_81230"), resource.TestCheckResourceAttr("akamai_botman_bot_category_exception.test", "bot_category_exception", expectedUpdateJSON)), diff --git a/pkg/providers/botman/resource_akamai_botman_bot_detection_action_test.go b/pkg/providers/botman/resource_akamai_botman_bot_detection_action_test.go index 81939218c..beb2890c6 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_detection_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_detection_action_test.go @@ -6,7 +6,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -70,13 +69,13 @@ func TestResourceBotDetectionAction(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestResourceBotDetectionAction/create.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceBotDetectionAction/create.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_bot_detection_action.test", "id", "43253:AAAA_81230:cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), resource.TestCheckResourceAttr("akamai_botman_bot_detection_action.test", "bot_detection_action", expectedCreateJSON)), }, { - Config: test.Fixture("testdata/TestResourceBotDetectionAction/update.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceBotDetectionAction/update.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_bot_detection_action.test", "id", "43253:AAAA_81230:cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), resource.TestCheckResourceAttr("akamai_botman_bot_detection_action.test", "bot_detection_action", expectedUpdateJSON)), diff --git a/pkg/providers/botman/resource_akamai_botman_bot_management_settings_test.go b/pkg/providers/botman/resource_akamai_botman_bot_management_settings_test.go index 781edc386..e39c41839 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_management_settings_test.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_management_settings_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -15,7 +14,7 @@ func TestResourceBotManagementSettings(t *testing.T) { mockedBotmanClient := &botman.Mock{} createResponse := map[string]interface{}{"testKey": "testValue3"} - createRequest := test.FixtureBytes("testdata/JsonPayload/create.json") + createRequest := testutils.LoadFixtureBytes(t, "testdata/JsonPayload/create.json") mockedBotmanClient.On("UpdateBotManagementSetting", mock.Anything, botman.UpdateBotManagementSettingRequest{ @@ -37,7 +36,7 @@ func TestResourceBotManagementSettings(t *testing.T) { expectedCreateJSON := `{"testKey":"testValue3"}` updateResponse := map[string]interface{}{"testKey": "updated_testValue3"} - updateRequest := test.FixtureBytes("testdata/JsonPayload/update.json") + updateRequest := testutils.LoadFixtureBytes(t, "testdata/JsonPayload/update.json") mockedBotmanClient.On("UpdateBotManagementSetting", mock.Anything, botman.UpdateBotManagementSettingRequest{ @@ -65,13 +64,13 @@ func TestResourceBotManagementSettings(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestResourceBotManagementSettings/create.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceBotManagementSettings/create.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_bot_management_settings.test", "id", "43253:AAAA_81230"), resource.TestCheckResourceAttr("akamai_botman_bot_management_settings.test", "bot_management_settings", expectedCreateJSON)), }, { - Config: test.Fixture("testdata/TestResourceBotManagementSettings/update.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceBotManagementSettings/update.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_bot_management_settings.test", "id", "43253:AAAA_81230"), resource.TestCheckResourceAttr("akamai_botman_bot_management_settings.test", "bot_management_settings", expectedUpdateJSON)), diff --git a/pkg/providers/botman/resource_akamai_botman_challenge_action_test.go b/pkg/providers/botman/resource_akamai_botman_challenge_action_test.go index 5d14b168b..c66214ffd 100644 --- a/pkg/providers/botman/resource_akamai_botman_challenge_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_challenge_action_test.go @@ -6,7 +6,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -16,7 +15,7 @@ func TestResourceChallengeAction(t *testing.T) { mockedBotmanClient := &botman.Mock{} createResponse := map[string]interface{}{"actionId": "cc9c3f89-e179-4892-89cf-d5e623ba9dc7", "testKey": "testValue3"} - createRequest := test.FixtureBytes("testdata/JsonPayload/create.json") + createRequest := testutils.LoadFixtureBytes(t, "testdata/JsonPayload/create.json") mockedBotmanClient.On("CreateChallengeAction", mock.Anything, botman.CreateChallengeActionRequest{ @@ -74,13 +73,13 @@ func TestResourceChallengeAction(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestResourceChallengeAction/create.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceChallengeAction/create.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_challenge_action.test", "id", "43253:cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), resource.TestCheckResourceAttr("akamai_botman_challenge_action.test", "challenge_action", expectedCreateJSON)), }, { - Config: test.Fixture("testdata/TestResourceChallengeAction/update.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceChallengeAction/update.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_challenge_action.test", "id", "43253:cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), resource.TestCheckResourceAttr("akamai_botman_challenge_action.test", "challenge_action", expectedUpdateJSON)), diff --git a/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules_test.go b/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules_test.go index a4465ac66..5a3312826 100644 --- a/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules_test.go +++ b/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -15,7 +14,7 @@ func TestResourceChallengeInjectionRules(t *testing.T) { mockedBotmanClient := &botman.Mock{} createResponse := map[string]interface{}{"testKey": "testValue3"} - createRequest := test.FixtureBytes("testdata/JsonPayload/create.json") + createRequest := testutils.LoadFixtureBytes(t, "testdata/JsonPayload/create.json") mockedBotmanClient.On("UpdateChallengeInjectionRules", mock.Anything, botman.UpdateChallengeInjectionRulesRequest{ @@ -35,7 +34,7 @@ func TestResourceChallengeInjectionRules(t *testing.T) { expectedCreateJSON := `{"testKey":"testValue3"}` updateResponse := map[string]interface{}{"testKey": "updated_testValue3"} - updateRequest := test.FixtureBytes("testdata/JsonPayload/update.json") + updateRequest := testutils.LoadFixtureBytes(t, "testdata/JsonPayload/update.json") mockedBotmanClient.On("UpdateChallengeInjectionRules", mock.Anything, botman.UpdateChallengeInjectionRulesRequest{ @@ -61,13 +60,13 @@ func TestResourceChallengeInjectionRules(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestResourceChallengeInjectionRules/create.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceChallengeInjectionRules/create.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_challenge_injection_rules.test", "id", "43253"), resource.TestCheckResourceAttr("akamai_botman_challenge_injection_rules.test", "challenge_injection_rules", expectedCreateJSON)), }, { - Config: test.Fixture("testdata/TestResourceChallengeInjectionRules/update.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceChallengeInjectionRules/update.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_challenge_injection_rules.test", "id", "43253"), resource.TestCheckResourceAttr("akamai_botman_challenge_injection_rules.test", "challenge_injection_rules", expectedUpdateJSON)), diff --git a/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules_test.go b/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules_test.go index 5cc735912..73f0237c1 100644 --- a/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules_test.go +++ b/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -15,7 +14,7 @@ func TestResourceChallengeInterceptionRules(t *testing.T) { mockedBotmanClient := &botman.Mock{} createResponse := map[string]interface{}{"testKey": "testValue3"} - createRequest := test.FixtureBytes("testdata/JsonPayload/create.json") + createRequest := testutils.LoadFixtureBytes(t, "testdata/JsonPayload/create.json") mockedBotmanClient.On("UpdateChallengeInterceptionRules", mock.Anything, botman.UpdateChallengeInterceptionRulesRequest{ @@ -35,7 +34,7 @@ func TestResourceChallengeInterceptionRules(t *testing.T) { expectedCreateJSON := `{"testKey":"testValue3"}` updateResponse := map[string]interface{}{"testKey": "updated_testValue3"} - updateRequest := test.FixtureBytes("testdata/JsonPayload/update.json") + updateRequest := testutils.LoadFixtureBytes(t, "testdata/JsonPayload/update.json") mockedBotmanClient.On("UpdateChallengeInterceptionRules", mock.Anything, botman.UpdateChallengeInterceptionRulesRequest{ @@ -61,13 +60,13 @@ func TestResourceChallengeInterceptionRules(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestResourceChallengeInterceptionRules/create.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceChallengeInterceptionRules/create.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_challenge_interception_rules.test", "id", "43253"), resource.TestCheckResourceAttr("akamai_botman_challenge_interception_rules.test", "challenge_interception_rules", expectedCreateJSON)), }, { - Config: test.Fixture("testdata/TestResourceChallengeInterceptionRules/update.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceChallengeInterceptionRules/update.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_challenge_interception_rules.test", "id", "43253"), resource.TestCheckResourceAttr("akamai_botman_challenge_interception_rules.test", "challenge_interception_rules", expectedUpdateJSON)), diff --git a/pkg/providers/botman/resource_akamai_botman_client_side_security_test.go b/pkg/providers/botman/resource_akamai_botman_client_side_security_test.go index 5aeb7d9e0..85d82c33c 100644 --- a/pkg/providers/botman/resource_akamai_botman_client_side_security_test.go +++ b/pkg/providers/botman/resource_akamai_botman_client_side_security_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -15,7 +14,7 @@ func TestResourceClientSideSecurity(t *testing.T) { mockedBotmanClient := &botman.Mock{} createResponse := map[string]interface{}{"testKey": "testValue3"} - createRequest := test.FixtureBytes("testdata/JsonPayload/create.json") + createRequest := testutils.LoadFixtureBytes(t, "testdata/JsonPayload/create.json") mockedBotmanClient.On("UpdateClientSideSecurity", mock.Anything, botman.UpdateClientSideSecurityRequest{ @@ -35,7 +34,7 @@ func TestResourceClientSideSecurity(t *testing.T) { expectedCreateJSON := `{"testKey":"testValue3"}` updateResponse := map[string]interface{}{"testKey": "updated_testValue3"} - updateRequest := test.FixtureBytes("testdata/JsonPayload/update.json") + updateRequest := testutils.LoadFixtureBytes(t, "testdata/JsonPayload/update.json") mockedBotmanClient.On("UpdateClientSideSecurity", mock.Anything, botman.UpdateClientSideSecurityRequest{ @@ -61,13 +60,13 @@ func TestResourceClientSideSecurity(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestResourceClientSideSecurity/create.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceClientSideSecurity/create.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_client_side_security.test", "id", "43253"), resource.TestCheckResourceAttr("akamai_botman_client_side_security.test", "client_side_security", expectedCreateJSON)), }, { - Config: test.Fixture("testdata/TestResourceClientSideSecurity/update.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceClientSideSecurity/update.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_client_side_security.test", "id", "43253"), resource.TestCheckResourceAttr("akamai_botman_client_side_security.test", "client_side_security", expectedUpdateJSON)), diff --git a/pkg/providers/botman/resource_akamai_botman_conditional_action_test.go b/pkg/providers/botman/resource_akamai_botman_conditional_action_test.go index 1480562df..f3b2f1d1e 100644 --- a/pkg/providers/botman/resource_akamai_botman_conditional_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_conditional_action_test.go @@ -6,7 +6,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -16,7 +15,7 @@ func TestResourceConditionalAction(t *testing.T) { mockedBotmanClient := &botman.Mock{} createResponse := map[string]interface{}{"actionId": "cc9c3f89-e179-4892-89cf-d5e623ba9dc7", "testKey": "testValue3"} - createRequest := test.FixtureBytes("testdata/JsonPayload/create.json") + createRequest := testutils.LoadFixtureBytes(t, "testdata/JsonPayload/create.json") mockedBotmanClient.On("CreateConditionalAction", mock.Anything, botman.CreateConditionalActionRequest{ @@ -74,13 +73,13 @@ func TestResourceConditionalAction(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestResourceConditionalAction/create.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceConditionalAction/create.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_conditional_action.test", "id", "43253:cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), resource.TestCheckResourceAttr("akamai_botman_conditional_action.test", "conditional_action", expectedCreateJSON)), }, { - Config: test.Fixture("testdata/TestResourceConditionalAction/update.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceConditionalAction/update.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_conditional_action.test", "id", "43253:cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), resource.TestCheckResourceAttr("akamai_botman_conditional_action.test", "conditional_action", expectedUpdateJSON)), diff --git a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action_test.go b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action_test.go index 6084826a8..c057cc5a1 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action_test.go @@ -6,7 +6,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -70,13 +69,13 @@ func TestResourceCustomBotCategoryAction(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestResourceCustomBotCategoryAction/create.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceCustomBotCategoryAction/create.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_custom_bot_category_action.test", "id", "43253:AAAA_81230:cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), resource.TestCheckResourceAttr("akamai_botman_custom_bot_category_action.test", "custom_bot_category_action", expectedCreateJSON)), }, { - Config: test.Fixture("testdata/TestResourceCustomBotCategoryAction/update.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceCustomBotCategoryAction/update.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_custom_bot_category_action.test", "id", "43253:AAAA_81230:cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), resource.TestCheckResourceAttr("akamai_botman_custom_bot_category_action.test", "custom_bot_category_action", expectedUpdateJSON)), diff --git a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence_test.go b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence_test.go index 2d3fd7fda..db4e7c488 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -60,7 +59,7 @@ func TestResourceCustomBotCategorySequence(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestResourceCustomBotCategorySequence/create.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceCustomBotCategorySequence/create.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_custom_bot_category_sequence.test", "id", "43253"), resource.TestCheckResourceAttr("akamai_botman_custom_bot_category_sequence.test", "category_ids.#", tools.ConvertToString(len(createCategoryIds))), @@ -69,7 +68,7 @@ func TestResourceCustomBotCategorySequence(t *testing.T) { resource.TestCheckResourceAttr("akamai_botman_custom_bot_category_sequence.test", "category_ids.2", createCategoryIds[2])), }, { - Config: test.Fixture("testdata/TestResourceCustomBotCategorySequence/update.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceCustomBotCategorySequence/update.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_custom_bot_category_sequence.test", "id", "43253"), resource.TestCheckResourceAttr("akamai_botman_custom_bot_category_sequence.test", "category_ids.#", tools.ConvertToString(len(updateCategoryIds))), diff --git a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_test.go b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_test.go index c7e20e400..070f9cad1 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_test.go @@ -6,7 +6,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -16,7 +15,7 @@ func TestResourceCustomBotCategory(t *testing.T) { mockedBotmanClient := &botman.Mock{} createResponse := map[string]interface{}{"categoryId": "cc9c3f89-e179-4892-89cf-d5e623ba9dc7", "testKey": "testValue3"} - createRequest := test.FixtureBytes("testdata/JsonPayload/create.json") + createRequest := testutils.LoadFixtureBytes(t, "testdata/JsonPayload/create.json") mockedBotmanClient.On("CreateCustomBotCategory", mock.Anything, botman.CreateCustomBotCategoryRequest{ @@ -74,13 +73,13 @@ func TestResourceCustomBotCategory(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestResourceCustomBotCategory/create.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceCustomBotCategory/create.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_custom_bot_category.test", "id", "43253:cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), resource.TestCheckResourceAttr("akamai_botman_custom_bot_category.test", "custom_bot_category", expectedCreateJSON)), }, { - Config: test.Fixture("testdata/TestResourceCustomBotCategory/update.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceCustomBotCategory/update.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_custom_bot_category.test", "id", "43253:cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), resource.TestCheckResourceAttr("akamai_botman_custom_bot_category.test", "custom_bot_category", expectedUpdateJSON)), diff --git a/pkg/providers/botman/resource_akamai_botman_custom_client_sequence_test.go b/pkg/providers/botman/resource_akamai_botman_custom_client_sequence_test.go index c99edd237..40a297ec1 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_client_sequence_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_client_sequence_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -60,7 +59,7 @@ func TestResourceCustomClientSequence(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestResourceCustomClientSequence/create.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceCustomClientSequence/create.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_custom_client_sequence.test", "id", "43253"), resource.TestCheckResourceAttr("akamai_botman_custom_client_sequence.test", "custom_client_ids.#", tools.ConvertToString(len(createCustomClientIds))), @@ -69,7 +68,7 @@ func TestResourceCustomClientSequence(t *testing.T) { resource.TestCheckResourceAttr("akamai_botman_custom_client_sequence.test", "custom_client_ids.2", createCustomClientIds[2])), }, { - Config: test.Fixture("testdata/TestResourceCustomClientSequence/update.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceCustomClientSequence/update.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_custom_client_sequence.test", "id", "43253"), resource.TestCheckResourceAttr("akamai_botman_custom_client_sequence.test", "custom_client_ids.#", tools.ConvertToString(len(updateCustomClientIds))), diff --git a/pkg/providers/botman/resource_akamai_botman_custom_client_test.go b/pkg/providers/botman/resource_akamai_botman_custom_client_test.go index e2e9fb646..9f79d6070 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_client_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_client_test.go @@ -6,7 +6,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -16,7 +15,7 @@ func TestResourceCustomClient(t *testing.T) { mockedBotmanClient := &botman.Mock{} createResponse := map[string]interface{}{"customClientId": "cc9c3f89-e179-4892-89cf-d5e623ba9dc7", "testKey": "testValue3"} - createRequest := test.FixtureBytes("testdata/JsonPayload/create.json") + createRequest := testutils.LoadFixtureBytes(t, "testdata/JsonPayload/create.json") mockedBotmanClient.On("CreateCustomClient", mock.Anything, botman.CreateCustomClientRequest{ @@ -74,13 +73,13 @@ func TestResourceCustomClient(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestResourceCustomClient/create.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceCustomClient/create.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_custom_client.test", "id", "43253:cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), resource.TestCheckResourceAttr("akamai_botman_custom_client.test", "custom_client", expectedCreateJSON)), }, { - Config: test.Fixture("testdata/TestResourceCustomClient/update.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceCustomClient/update.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_custom_client.test", "id", "43253:cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), resource.TestCheckResourceAttr("akamai_botman_custom_client.test", "custom_client", expectedUpdateJSON)), diff --git a/pkg/providers/botman/resource_akamai_botman_custom_defined_bot_test.go b/pkg/providers/botman/resource_akamai_botman_custom_defined_bot_test.go index 2d5975564..4b46116e7 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_defined_bot_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_defined_bot_test.go @@ -6,7 +6,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -16,7 +15,7 @@ func TestResourceCustomDefinedBot(t *testing.T) { mockedBotmanClient := &botman.Mock{} createResponse := map[string]interface{}{"botId": "cc9c3f89-e179-4892-89cf-d5e623ba9dc7", "testKey": "testValue3"} - createRequest := test.FixtureBytes("testdata/JsonPayload/create.json") + createRequest := testutils.LoadFixtureBytes(t, "testdata/JsonPayload/create.json") mockedBotmanClient.On("CreateCustomDefinedBot", mock.Anything, botman.CreateCustomDefinedBotRequest{ @@ -74,13 +73,13 @@ func TestResourceCustomDefinedBot(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestResourceCustomDefinedBot/create.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceCustomDefinedBot/create.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_custom_defined_bot.test", "id", "43253:cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), resource.TestCheckResourceAttr("akamai_botman_custom_defined_bot.test", "custom_defined_bot", expectedCreateJSON)), }, { - Config: test.Fixture("testdata/TestResourceCustomDefinedBot/update.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceCustomDefinedBot/update.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_custom_defined_bot.test", "id", "43253:cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), resource.TestCheckResourceAttr("akamai_botman_custom_defined_bot.test", "custom_defined_bot", expectedUpdateJSON)), diff --git a/pkg/providers/botman/resource_akamai_botman_custom_deny_action_test.go b/pkg/providers/botman/resource_akamai_botman_custom_deny_action_test.go index 1ccb1f2cd..ad0ebd9fa 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_deny_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_deny_action_test.go @@ -6,7 +6,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -16,7 +15,7 @@ func TestResourceCustomDenyAction(t *testing.T) { mockedBotmanClient := &botman.Mock{} createResponse := map[string]interface{}{"actionId": "cc9c3f89-e179-4892-89cf-d5e623ba9dc7", "testKey": "testValue3"} - createRequest := test.FixtureBytes("testdata/JsonPayload/create.json") + createRequest := testutils.LoadFixtureBytes(t, "testdata/JsonPayload/create.json") mockedBotmanClient.On("CreateCustomDenyAction", mock.Anything, botman.CreateCustomDenyActionRequest{ @@ -74,13 +73,13 @@ func TestResourceCustomDenyAction(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestResourceCustomDenyAction/create.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceCustomDenyAction/create.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_custom_deny_action.test", "id", "43253:cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), resource.TestCheckResourceAttr("akamai_botman_custom_deny_action.test", "custom_deny_action", expectedCreateJSON)), }, { - Config: test.Fixture("testdata/TestResourceCustomDenyAction/update.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceCustomDenyAction/update.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_custom_deny_action.test", "id", "43253:cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), resource.TestCheckResourceAttr("akamai_botman_custom_deny_action.test", "custom_deny_action", expectedUpdateJSON)), diff --git a/pkg/providers/botman/resource_akamai_botman_javascript_injection_test.go b/pkg/providers/botman/resource_akamai_botman_javascript_injection_test.go index c5459e40c..7e68c6a6c 100644 --- a/pkg/providers/botman/resource_akamai_botman_javascript_injection_test.go +++ b/pkg/providers/botman/resource_akamai_botman_javascript_injection_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -15,7 +14,7 @@ func TestResourceJavascriptInjection(t *testing.T) { mockedBotmanClient := &botman.Mock{} createResponse := map[string]interface{}{"testKey": "testValue3"} - createRequest := test.FixtureBytes("testdata/JsonPayload/create.json") + createRequest := testutils.LoadFixtureBytes(t, "testdata/JsonPayload/create.json") mockedBotmanClient.On("UpdateJavascriptInjection", mock.Anything, botman.UpdateJavascriptInjectionRequest{ @@ -37,7 +36,7 @@ func TestResourceJavascriptInjection(t *testing.T) { expectedCreateJSON := `{"testKey":"testValue3"}` updateResponse := map[string]interface{}{"testKey": "updated_testValue3"} - updateRequest := test.FixtureBytes("testdata/JsonPayload/update.json") + updateRequest := testutils.LoadFixtureBytes(t, "testdata/JsonPayload/update.json") mockedBotmanClient.On("UpdateJavascriptInjection", mock.Anything, botman.UpdateJavascriptInjectionRequest{ @@ -65,13 +64,13 @@ func TestResourceJavascriptInjection(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestResourceJavascriptInjection/create.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceJavascriptInjection/create.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_javascript_injection.test", "id", "43253:AAAA_81230"), resource.TestCheckResourceAttr("akamai_botman_javascript_injection.test", "javascript_injection", expectedCreateJSON)), }, { - Config: test.Fixture("testdata/TestResourceJavascriptInjection/update.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceJavascriptInjection/update.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_javascript_injection.test", "id", "43253:AAAA_81230"), resource.TestCheckResourceAttr("akamai_botman_javascript_injection.test", "javascript_injection", expectedUpdateJSON)), diff --git a/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot_test.go b/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot_test.go index 52743a8b4..236e679a9 100644 --- a/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot_test.go +++ b/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -70,14 +69,14 @@ func TestResourceRecategorizedAkamaiDefinedBot(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestResourceRecategorizedAkamaiDefinedBot/create.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceRecategorizedAkamaiDefinedBot/create.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_recategorized_akamai_defined_bot.test", "id", "43253:cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), resource.TestCheckResourceAttr("akamai_botman_recategorized_akamai_defined_bot.test", "bot_id", "cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), resource.TestCheckResourceAttr("akamai_botman_recategorized_akamai_defined_bot.test", "category_id", "87fb601b-4d30-4e0d-a74f-dc77e2b1bb74")), }, { - Config: test.Fixture("testdata/TestResourceRecategorizedAkamaiDefinedBot/update.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceRecategorizedAkamaiDefinedBot/update.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_recategorized_akamai_defined_bot.test", "id", "43253:cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), resource.TestCheckResourceAttr("akamai_botman_recategorized_akamai_defined_bot.test", "bot_id", "cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), diff --git a/pkg/providers/botman/resource_akamai_botman_serve_alternate_action_test.go b/pkg/providers/botman/resource_akamai_botman_serve_alternate_action_test.go index e40097d43..fb2601267 100644 --- a/pkg/providers/botman/resource_akamai_botman_serve_alternate_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_serve_alternate_action_test.go @@ -6,7 +6,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -16,7 +15,7 @@ func TestResourceServeAlternateAction(t *testing.T) { mockedBotmanClient := &botman.Mock{} createResponse := map[string]interface{}{"actionId": "cc9c3f89-e179-4892-89cf-d5e623ba9dc7", "testKey": "testValue3"} - createRequest := test.FixtureBytes("testdata/JsonPayload/create.json") + createRequest := testutils.LoadFixtureBytes(t, "testdata/JsonPayload/create.json") mockedBotmanClient.On("CreateServeAlternateAction", mock.Anything, botman.CreateServeAlternateActionRequest{ @@ -74,13 +73,13 @@ func TestResourceServeAlternateAction(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestResourceServeAlternateAction/create.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceServeAlternateAction/create.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_serve_alternate_action.test", "id", "43253:cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), resource.TestCheckResourceAttr("akamai_botman_serve_alternate_action.test", "serve_alternate_action", expectedCreateJSON)), }, { - Config: test.Fixture("testdata/TestResourceServeAlternateAction/update.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceServeAlternateAction/update.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_serve_alternate_action.test", "id", "43253:cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), resource.TestCheckResourceAttr("akamai_botman_serve_alternate_action.test", "serve_alternate_action", expectedUpdateJSON)), diff --git a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection_test.go b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection_test.go index ca68144a7..51a45ea2d 100644 --- a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection_test.go +++ b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection_test.go @@ -5,7 +5,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -15,7 +14,7 @@ func TestResourceTransactionalEndpointProtection(t *testing.T) { mockedBotmanClient := &botman.Mock{} createResponse := map[string]interface{}{"testKey": "testValue3"} - createRequest := test.FixtureBytes("testdata/JsonPayload/create.json") + createRequest := testutils.LoadFixtureBytes(t, "testdata/JsonPayload/create.json") mockedBotmanClient.On("UpdateTransactionalEndpointProtection", mock.Anything, botman.UpdateTransactionalEndpointProtectionRequest{ @@ -35,7 +34,7 @@ func TestResourceTransactionalEndpointProtection(t *testing.T) { expectedCreateJSON := `{"testKey":"testValue3"}` updateResponse := map[string]interface{}{"testKey": "updated_testValue3"} - updateRequest := test.FixtureBytes("testdata/JsonPayload/update.json") + updateRequest := testutils.LoadFixtureBytes(t, "testdata/JsonPayload/update.json") mockedBotmanClient.On("UpdateTransactionalEndpointProtection", mock.Anything, botman.UpdateTransactionalEndpointProtectionRequest{ @@ -61,13 +60,13 @@ func TestResourceTransactionalEndpointProtection(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestResourceTransactionalEndpointProtection/create.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceTransactionalEndpointProtection/create.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_transactional_endpoint_protection.test", "id", "43253"), resource.TestCheckResourceAttr("akamai_botman_transactional_endpoint_protection.test", "transactional_endpoint_protection", expectedCreateJSON)), }, { - Config: test.Fixture("testdata/TestResourceTransactionalEndpointProtection/update.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceTransactionalEndpointProtection/update.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_transactional_endpoint_protection.test", "id", "43253"), resource.TestCheckResourceAttr("akamai_botman_transactional_endpoint_protection.test", "transactional_endpoint_protection", expectedUpdateJSON)), diff --git a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_test.go b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_test.go index c611841c1..42777e5ff 100644 --- a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_test.go +++ b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_test.go @@ -6,7 +6,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -79,13 +78,13 @@ func TestResourceTransactionalEndpoint(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestResourceTransactionalEndpoint/create.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceTransactionalEndpoint/create.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_transactional_endpoint.test", "id", "43253:AAAA_81230:cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), resource.TestCheckResourceAttr("akamai_botman_transactional_endpoint.test", "transactional_endpoint", expectedCreateJSON)), }, { - Config: test.Fixture("testdata/TestResourceTransactionalEndpoint/update.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceTransactionalEndpoint/update.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_transactional_endpoint.test", "id", "43253:AAAA_81230:cc9c3f89-e179-4892-89cf-d5e623ba9dc7"), resource.TestCheckResourceAttr("akamai_botman_transactional_endpoint.test", "transactional_endpoint", expectedUpdateJSON)), diff --git a/pkg/providers/botman/testdata/TestDataAkamaiBotCategory/basic.tf b/pkg/providers/botman/testdata/TestDataAkamaiBotCategory/basic.tf index de588d478..f9193bfcf 100644 --- a/pkg/providers/botman/testdata/TestDataAkamaiBotCategory/basic.tf +++ b/pkg/providers/botman/testdata/TestDataAkamaiBotCategory/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataAkamaiBotCategory/filter_by_name.tf b/pkg/providers/botman/testdata/TestDataAkamaiBotCategory/filter_by_name.tf index ca6f0a969..520f62d91 100644 --- a/pkg/providers/botman/testdata/TestDataAkamaiBotCategory/filter_by_name.tf +++ b/pkg/providers/botman/testdata/TestDataAkamaiBotCategory/filter_by_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataAkamaiBotCategoryAction/basic.tf b/pkg/providers/botman/testdata/TestDataAkamaiBotCategoryAction/basic.tf index 12c98487b..9e8f045b7 100644 --- a/pkg/providers/botman/testdata/TestDataAkamaiBotCategoryAction/basic.tf +++ b/pkg/providers/botman/testdata/TestDataAkamaiBotCategoryAction/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataAkamaiBotCategoryAction/filter_by_id.tf b/pkg/providers/botman/testdata/TestDataAkamaiBotCategoryAction/filter_by_id.tf index cbb087f7f..c26d9dbf5 100644 --- a/pkg/providers/botman/testdata/TestDataAkamaiBotCategoryAction/filter_by_id.tf +++ b/pkg/providers/botman/testdata/TestDataAkamaiBotCategoryAction/filter_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataAkamaiDefinedBot/basic.tf b/pkg/providers/botman/testdata/TestDataAkamaiDefinedBot/basic.tf index 7d79d6d42..96136e67d 100644 --- a/pkg/providers/botman/testdata/TestDataAkamaiDefinedBot/basic.tf +++ b/pkg/providers/botman/testdata/TestDataAkamaiDefinedBot/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataAkamaiDefinedBot/filter_by_name.tf b/pkg/providers/botman/testdata/TestDataAkamaiDefinedBot/filter_by_name.tf index 1dee7b000..98dcccb03 100644 --- a/pkg/providers/botman/testdata/TestDataAkamaiDefinedBot/filter_by_name.tf +++ b/pkg/providers/botman/testdata/TestDataAkamaiDefinedBot/filter_by_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataBotAnalyticsCookie/basic.tf b/pkg/providers/botman/testdata/TestDataBotAnalyticsCookie/basic.tf index 4bf2201fb..c8e91a245 100644 --- a/pkg/providers/botman/testdata/TestDataBotAnalyticsCookie/basic.tf +++ b/pkg/providers/botman/testdata/TestDataBotAnalyticsCookie/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataBotAnalyticsCookieValues/basic.tf b/pkg/providers/botman/testdata/TestDataBotAnalyticsCookieValues/basic.tf index 4dfc53a46..53ff8c806 100644 --- a/pkg/providers/botman/testdata/TestDataBotAnalyticsCookieValues/basic.tf +++ b/pkg/providers/botman/testdata/TestDataBotAnalyticsCookieValues/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataBotCategoryException/basic.tf b/pkg/providers/botman/testdata/TestDataBotCategoryException/basic.tf index 22d86187b..6978d799a 100644 --- a/pkg/providers/botman/testdata/TestDataBotCategoryException/basic.tf +++ b/pkg/providers/botman/testdata/TestDataBotCategoryException/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataBotDetection/basic.tf b/pkg/providers/botman/testdata/TestDataBotDetection/basic.tf index eae36124b..10feb5b35 100644 --- a/pkg/providers/botman/testdata/TestDataBotDetection/basic.tf +++ b/pkg/providers/botman/testdata/TestDataBotDetection/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataBotDetection/filter_by_name.tf b/pkg/providers/botman/testdata/TestDataBotDetection/filter_by_name.tf index 0888e50a4..4c5ec2545 100644 --- a/pkg/providers/botman/testdata/TestDataBotDetection/filter_by_name.tf +++ b/pkg/providers/botman/testdata/TestDataBotDetection/filter_by_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataBotDetectionAction/basic.tf b/pkg/providers/botman/testdata/TestDataBotDetectionAction/basic.tf index d554011e3..4d574d1f8 100644 --- a/pkg/providers/botman/testdata/TestDataBotDetectionAction/basic.tf +++ b/pkg/providers/botman/testdata/TestDataBotDetectionAction/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataBotDetectionAction/filter_by_id.tf b/pkg/providers/botman/testdata/TestDataBotDetectionAction/filter_by_id.tf index 57858a550..f74dd8196 100644 --- a/pkg/providers/botman/testdata/TestDataBotDetectionAction/filter_by_id.tf +++ b/pkg/providers/botman/testdata/TestDataBotDetectionAction/filter_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataBotEndpointCoverageReport/basic.tf b/pkg/providers/botman/testdata/TestDataBotEndpointCoverageReport/basic.tf index 161b1a1c6..35415f68e 100644 --- a/pkg/providers/botman/testdata/TestDataBotEndpointCoverageReport/basic.tf +++ b/pkg/providers/botman/testdata/TestDataBotEndpointCoverageReport/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataBotEndpointCoverageReport/filter_by_id.tf b/pkg/providers/botman/testdata/TestDataBotEndpointCoverageReport/filter_by_id.tf index 6a2b32e65..d1a8cd482 100644 --- a/pkg/providers/botman/testdata/TestDataBotEndpointCoverageReport/filter_by_id.tf +++ b/pkg/providers/botman/testdata/TestDataBotEndpointCoverageReport/filter_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataBotEndpointCoverageReport/with_config.tf b/pkg/providers/botman/testdata/TestDataBotEndpointCoverageReport/with_config.tf index 7cfb3c2d0..5e31fd7c0 100644 --- a/pkg/providers/botman/testdata/TestDataBotEndpointCoverageReport/with_config.tf +++ b/pkg/providers/botman/testdata/TestDataBotEndpointCoverageReport/with_config.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataBotEndpointCoverageReport/with_config_filter_by_id.tf b/pkg/providers/botman/testdata/TestDataBotEndpointCoverageReport/with_config_filter_by_id.tf index 46346e76c..708288e34 100644 --- a/pkg/providers/botman/testdata/TestDataBotEndpointCoverageReport/with_config_filter_by_id.tf +++ b/pkg/providers/botman/testdata/TestDataBotEndpointCoverageReport/with_config_filter_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataBotManagementSettings/basic.tf b/pkg/providers/botman/testdata/TestDataBotManagementSettings/basic.tf index 18cda0d1d..aed53d703 100644 --- a/pkg/providers/botman/testdata/TestDataBotManagementSettings/basic.tf +++ b/pkg/providers/botman/testdata/TestDataBotManagementSettings/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataChallengeAction/basic.tf b/pkg/providers/botman/testdata/TestDataChallengeAction/basic.tf index c8a1a19d7..8df827133 100644 --- a/pkg/providers/botman/testdata/TestDataChallengeAction/basic.tf +++ b/pkg/providers/botman/testdata/TestDataChallengeAction/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataChallengeAction/filter_by_id.tf b/pkg/providers/botman/testdata/TestDataChallengeAction/filter_by_id.tf index b2c35415d..6cd1c56ce 100644 --- a/pkg/providers/botman/testdata/TestDataChallengeAction/filter_by_id.tf +++ b/pkg/providers/botman/testdata/TestDataChallengeAction/filter_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataChallengeInjectionRules/basic.tf b/pkg/providers/botman/testdata/TestDataChallengeInjectionRules/basic.tf index 703bd7606..49a384a21 100644 --- a/pkg/providers/botman/testdata/TestDataChallengeInjectionRules/basic.tf +++ b/pkg/providers/botman/testdata/TestDataChallengeInjectionRules/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataChallengeInterceptionRules/basic.tf b/pkg/providers/botman/testdata/TestDataChallengeInterceptionRules/basic.tf index b6c16855b..4e2d9e768 100644 --- a/pkg/providers/botman/testdata/TestDataChallengeInterceptionRules/basic.tf +++ b/pkg/providers/botman/testdata/TestDataChallengeInterceptionRules/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataClientSideSecurity/basic.tf b/pkg/providers/botman/testdata/TestDataClientSideSecurity/basic.tf index 4fea0c373..f8cd8123c 100644 --- a/pkg/providers/botman/testdata/TestDataClientSideSecurity/basic.tf +++ b/pkg/providers/botman/testdata/TestDataClientSideSecurity/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataConditionalAction/basic.tf b/pkg/providers/botman/testdata/TestDataConditionalAction/basic.tf index 3aef7e56e..9d8231bbf 100644 --- a/pkg/providers/botman/testdata/TestDataConditionalAction/basic.tf +++ b/pkg/providers/botman/testdata/TestDataConditionalAction/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataConditionalAction/filter_by_id.tf b/pkg/providers/botman/testdata/TestDataConditionalAction/filter_by_id.tf index d636aa43b..e1ce02145 100644 --- a/pkg/providers/botman/testdata/TestDataConditionalAction/filter_by_id.tf +++ b/pkg/providers/botman/testdata/TestDataConditionalAction/filter_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataCustomBotCategory/basic.tf b/pkg/providers/botman/testdata/TestDataCustomBotCategory/basic.tf index 1719ea105..eb14515bb 100644 --- a/pkg/providers/botman/testdata/TestDataCustomBotCategory/basic.tf +++ b/pkg/providers/botman/testdata/TestDataCustomBotCategory/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataCustomBotCategory/filter_by_id.tf b/pkg/providers/botman/testdata/TestDataCustomBotCategory/filter_by_id.tf index c8853bf4e..51ccc194e 100644 --- a/pkg/providers/botman/testdata/TestDataCustomBotCategory/filter_by_id.tf +++ b/pkg/providers/botman/testdata/TestDataCustomBotCategory/filter_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataCustomBotCategoryAction/basic.tf b/pkg/providers/botman/testdata/TestDataCustomBotCategoryAction/basic.tf index 64bde18f5..84741bbc8 100644 --- a/pkg/providers/botman/testdata/TestDataCustomBotCategoryAction/basic.tf +++ b/pkg/providers/botman/testdata/TestDataCustomBotCategoryAction/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataCustomBotCategoryAction/filter_by_id.tf b/pkg/providers/botman/testdata/TestDataCustomBotCategoryAction/filter_by_id.tf index d051147f6..53f1f1da1 100644 --- a/pkg/providers/botman/testdata/TestDataCustomBotCategoryAction/filter_by_id.tf +++ b/pkg/providers/botman/testdata/TestDataCustomBotCategoryAction/filter_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataCustomBotCategorySequence/basic.tf b/pkg/providers/botman/testdata/TestDataCustomBotCategorySequence/basic.tf index 0c713982f..775ed7d3c 100644 --- a/pkg/providers/botman/testdata/TestDataCustomBotCategorySequence/basic.tf +++ b/pkg/providers/botman/testdata/TestDataCustomBotCategorySequence/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataCustomClient/basic.tf b/pkg/providers/botman/testdata/TestDataCustomClient/basic.tf index 03f348d21..9de366c56 100644 --- a/pkg/providers/botman/testdata/TestDataCustomClient/basic.tf +++ b/pkg/providers/botman/testdata/TestDataCustomClient/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataCustomClient/filter_by_id.tf b/pkg/providers/botman/testdata/TestDataCustomClient/filter_by_id.tf index 0f30b9e12..7acb93347 100644 --- a/pkg/providers/botman/testdata/TestDataCustomClient/filter_by_id.tf +++ b/pkg/providers/botman/testdata/TestDataCustomClient/filter_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataCustomClientSequence/basic.tf b/pkg/providers/botman/testdata/TestDataCustomClientSequence/basic.tf index 6fc823593..a7e0e362f 100644 --- a/pkg/providers/botman/testdata/TestDataCustomClientSequence/basic.tf +++ b/pkg/providers/botman/testdata/TestDataCustomClientSequence/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataCustomDefinedBot/basic.tf b/pkg/providers/botman/testdata/TestDataCustomDefinedBot/basic.tf index 2d7d80b95..811e7ba41 100644 --- a/pkg/providers/botman/testdata/TestDataCustomDefinedBot/basic.tf +++ b/pkg/providers/botman/testdata/TestDataCustomDefinedBot/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataCustomDefinedBot/filter_by_id.tf b/pkg/providers/botman/testdata/TestDataCustomDefinedBot/filter_by_id.tf index 28b9fa7d7..3c192ee6a 100644 --- a/pkg/providers/botman/testdata/TestDataCustomDefinedBot/filter_by_id.tf +++ b/pkg/providers/botman/testdata/TestDataCustomDefinedBot/filter_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataCustomDenyAction/basic.tf b/pkg/providers/botman/testdata/TestDataCustomDenyAction/basic.tf index f0e855a9d..dda44f1eb 100644 --- a/pkg/providers/botman/testdata/TestDataCustomDenyAction/basic.tf +++ b/pkg/providers/botman/testdata/TestDataCustomDenyAction/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataCustomDenyAction/filter_by_id.tf b/pkg/providers/botman/testdata/TestDataCustomDenyAction/filter_by_id.tf index b0f5e42e9..9196daf8c 100644 --- a/pkg/providers/botman/testdata/TestDataCustomDenyAction/filter_by_id.tf +++ b/pkg/providers/botman/testdata/TestDataCustomDenyAction/filter_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataJavascriptInjection/basic.tf b/pkg/providers/botman/testdata/TestDataJavascriptInjection/basic.tf index d1adcc70f..973d27c37 100644 --- a/pkg/providers/botman/testdata/TestDataJavascriptInjection/basic.tf +++ b/pkg/providers/botman/testdata/TestDataJavascriptInjection/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataRecategorizedAkamaiDefinedBot/basic.tf b/pkg/providers/botman/testdata/TestDataRecategorizedAkamaiDefinedBot/basic.tf index c71046c97..16d887a5f 100644 --- a/pkg/providers/botman/testdata/TestDataRecategorizedAkamaiDefinedBot/basic.tf +++ b/pkg/providers/botman/testdata/TestDataRecategorizedAkamaiDefinedBot/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataRecategorizedAkamaiDefinedBot/filter_by_id.tf b/pkg/providers/botman/testdata/TestDataRecategorizedAkamaiDefinedBot/filter_by_id.tf index 13eaff7c6..40f58bbf3 100644 --- a/pkg/providers/botman/testdata/TestDataRecategorizedAkamaiDefinedBot/filter_by_id.tf +++ b/pkg/providers/botman/testdata/TestDataRecategorizedAkamaiDefinedBot/filter_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataResponseAction/basic.tf b/pkg/providers/botman/testdata/TestDataResponseAction/basic.tf index f5ba705b7..967d2db2d 100644 --- a/pkg/providers/botman/testdata/TestDataResponseAction/basic.tf +++ b/pkg/providers/botman/testdata/TestDataResponseAction/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataResponseAction/filter_by_id.tf b/pkg/providers/botman/testdata/TestDataResponseAction/filter_by_id.tf index 5463dd539..9f803e13f 100644 --- a/pkg/providers/botman/testdata/TestDataResponseAction/filter_by_id.tf +++ b/pkg/providers/botman/testdata/TestDataResponseAction/filter_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataServeAlternateAction/basic.tf b/pkg/providers/botman/testdata/TestDataServeAlternateAction/basic.tf index 9bd9b7c8a..082d2b099 100644 --- a/pkg/providers/botman/testdata/TestDataServeAlternateAction/basic.tf +++ b/pkg/providers/botman/testdata/TestDataServeAlternateAction/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataServeAlternateAction/filter_by_id.tf b/pkg/providers/botman/testdata/TestDataServeAlternateAction/filter_by_id.tf index c49a7ad09..0f804d39f 100644 --- a/pkg/providers/botman/testdata/TestDataServeAlternateAction/filter_by_id.tf +++ b/pkg/providers/botman/testdata/TestDataServeAlternateAction/filter_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataTransactionalEndpoint/basic.tf b/pkg/providers/botman/testdata/TestDataTransactionalEndpoint/basic.tf index 8ec929910..98fabfb85 100644 --- a/pkg/providers/botman/testdata/TestDataTransactionalEndpoint/basic.tf +++ b/pkg/providers/botman/testdata/TestDataTransactionalEndpoint/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataTransactionalEndpoint/filter_by_id.tf b/pkg/providers/botman/testdata/TestDataTransactionalEndpoint/filter_by_id.tf index 8cebfbce9..9c97b762a 100644 --- a/pkg/providers/botman/testdata/TestDataTransactionalEndpoint/filter_by_id.tf +++ b/pkg/providers/botman/testdata/TestDataTransactionalEndpoint/filter_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestDataTransactionalEndpointProtection/basic.tf b/pkg/providers/botman/testdata/TestDataTransactionalEndpointProtection/basic.tf index 13a90845f..a49cb1c4b 100644 --- a/pkg/providers/botman/testdata/TestDataTransactionalEndpointProtection/basic.tf +++ b/pkg/providers/botman/testdata/TestDataTransactionalEndpointProtection/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceAkamaiBotCategoryAction/create.tf b/pkg/providers/botman/testdata/TestResourceAkamaiBotCategoryAction/create.tf index e790a7783..ab7ffd845 100644 --- a/pkg/providers/botman/testdata/TestResourceAkamaiBotCategoryAction/create.tf +++ b/pkg/providers/botman/testdata/TestResourceAkamaiBotCategoryAction/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceAkamaiBotCategoryAction/update.tf b/pkg/providers/botman/testdata/TestResourceAkamaiBotCategoryAction/update.tf index 8136f441e..c0386d613 100644 --- a/pkg/providers/botman/testdata/TestResourceAkamaiBotCategoryAction/update.tf +++ b/pkg/providers/botman/testdata/TestResourceAkamaiBotCategoryAction/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceBotAnalyticsCookie/create.tf b/pkg/providers/botman/testdata/TestResourceBotAnalyticsCookie/create.tf index 504137edd..fb2530dd3 100644 --- a/pkg/providers/botman/testdata/TestResourceBotAnalyticsCookie/create.tf +++ b/pkg/providers/botman/testdata/TestResourceBotAnalyticsCookie/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceBotAnalyticsCookie/update.tf b/pkg/providers/botman/testdata/TestResourceBotAnalyticsCookie/update.tf index 117f5b6d3..333258303 100644 --- a/pkg/providers/botman/testdata/TestResourceBotAnalyticsCookie/update.tf +++ b/pkg/providers/botman/testdata/TestResourceBotAnalyticsCookie/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceBotCategoryException/create.tf b/pkg/providers/botman/testdata/TestResourceBotCategoryException/create.tf index 5bbdc0b2a..b564b0414 100644 --- a/pkg/providers/botman/testdata/TestResourceBotCategoryException/create.tf +++ b/pkg/providers/botman/testdata/TestResourceBotCategoryException/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceBotCategoryException/update.tf b/pkg/providers/botman/testdata/TestResourceBotCategoryException/update.tf index 4f4fdabe6..7b21bb7cb 100644 --- a/pkg/providers/botman/testdata/TestResourceBotCategoryException/update.tf +++ b/pkg/providers/botman/testdata/TestResourceBotCategoryException/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceBotDetectionAction/create.tf b/pkg/providers/botman/testdata/TestResourceBotDetectionAction/create.tf index 8061723d1..62682923a 100644 --- a/pkg/providers/botman/testdata/TestResourceBotDetectionAction/create.tf +++ b/pkg/providers/botman/testdata/TestResourceBotDetectionAction/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceBotDetectionAction/update.tf b/pkg/providers/botman/testdata/TestResourceBotDetectionAction/update.tf index b0dafd6b3..f69170e10 100644 --- a/pkg/providers/botman/testdata/TestResourceBotDetectionAction/update.tf +++ b/pkg/providers/botman/testdata/TestResourceBotDetectionAction/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceBotManagementSettings/create.tf b/pkg/providers/botman/testdata/TestResourceBotManagementSettings/create.tf index c50e189ff..ac73c7ad3 100644 --- a/pkg/providers/botman/testdata/TestResourceBotManagementSettings/create.tf +++ b/pkg/providers/botman/testdata/TestResourceBotManagementSettings/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceBotManagementSettings/update.tf b/pkg/providers/botman/testdata/TestResourceBotManagementSettings/update.tf index 9c9231786..edd068104 100644 --- a/pkg/providers/botman/testdata/TestResourceBotManagementSettings/update.tf +++ b/pkg/providers/botman/testdata/TestResourceBotManagementSettings/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceChallengeAction/create.tf b/pkg/providers/botman/testdata/TestResourceChallengeAction/create.tf index b9cb1a70b..50f88cd2e 100644 --- a/pkg/providers/botman/testdata/TestResourceChallengeAction/create.tf +++ b/pkg/providers/botman/testdata/TestResourceChallengeAction/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceChallengeAction/update.tf b/pkg/providers/botman/testdata/TestResourceChallengeAction/update.tf index b937c7db4..3c81a2a38 100644 --- a/pkg/providers/botman/testdata/TestResourceChallengeAction/update.tf +++ b/pkg/providers/botman/testdata/TestResourceChallengeAction/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceChallengeInjectionRules/create.tf b/pkg/providers/botman/testdata/TestResourceChallengeInjectionRules/create.tf index cb1cee91c..b600c95f7 100644 --- a/pkg/providers/botman/testdata/TestResourceChallengeInjectionRules/create.tf +++ b/pkg/providers/botman/testdata/TestResourceChallengeInjectionRules/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceChallengeInjectionRules/update.tf b/pkg/providers/botman/testdata/TestResourceChallengeInjectionRules/update.tf index 10b261c70..9bd4cd756 100644 --- a/pkg/providers/botman/testdata/TestResourceChallengeInjectionRules/update.tf +++ b/pkg/providers/botman/testdata/TestResourceChallengeInjectionRules/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceChallengeInterceptionRules/create.tf b/pkg/providers/botman/testdata/TestResourceChallengeInterceptionRules/create.tf index 35b50dc71..d636171e9 100644 --- a/pkg/providers/botman/testdata/TestResourceChallengeInterceptionRules/create.tf +++ b/pkg/providers/botman/testdata/TestResourceChallengeInterceptionRules/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceChallengeInterceptionRules/update.tf b/pkg/providers/botman/testdata/TestResourceChallengeInterceptionRules/update.tf index 5fce1db3e..cee8f66a9 100644 --- a/pkg/providers/botman/testdata/TestResourceChallengeInterceptionRules/update.tf +++ b/pkg/providers/botman/testdata/TestResourceChallengeInterceptionRules/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceClientSideSecurity/create.tf b/pkg/providers/botman/testdata/TestResourceClientSideSecurity/create.tf index 6eca1f10e..f44a96472 100644 --- a/pkg/providers/botman/testdata/TestResourceClientSideSecurity/create.tf +++ b/pkg/providers/botman/testdata/TestResourceClientSideSecurity/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceClientSideSecurity/update.tf b/pkg/providers/botman/testdata/TestResourceClientSideSecurity/update.tf index cc58a92d5..9bfb0892a 100644 --- a/pkg/providers/botman/testdata/TestResourceClientSideSecurity/update.tf +++ b/pkg/providers/botman/testdata/TestResourceClientSideSecurity/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceConditionalAction/create.tf b/pkg/providers/botman/testdata/TestResourceConditionalAction/create.tf index 6381d8348..d3ba4b7ff 100644 --- a/pkg/providers/botman/testdata/TestResourceConditionalAction/create.tf +++ b/pkg/providers/botman/testdata/TestResourceConditionalAction/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceConditionalAction/update.tf b/pkg/providers/botman/testdata/TestResourceConditionalAction/update.tf index 672492793..fb20bffbd 100644 --- a/pkg/providers/botman/testdata/TestResourceConditionalAction/update.tf +++ b/pkg/providers/botman/testdata/TestResourceConditionalAction/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceCustomBotCategory/create.tf b/pkg/providers/botman/testdata/TestResourceCustomBotCategory/create.tf index 159473dea..cd88ccf32 100644 --- a/pkg/providers/botman/testdata/TestResourceCustomBotCategory/create.tf +++ b/pkg/providers/botman/testdata/TestResourceCustomBotCategory/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceCustomBotCategory/update.tf b/pkg/providers/botman/testdata/TestResourceCustomBotCategory/update.tf index 0842a57ab..454fae5df 100644 --- a/pkg/providers/botman/testdata/TestResourceCustomBotCategory/update.tf +++ b/pkg/providers/botman/testdata/TestResourceCustomBotCategory/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceCustomBotCategoryAction/create.tf b/pkg/providers/botman/testdata/TestResourceCustomBotCategoryAction/create.tf index 360792a7d..b47539202 100644 --- a/pkg/providers/botman/testdata/TestResourceCustomBotCategoryAction/create.tf +++ b/pkg/providers/botman/testdata/TestResourceCustomBotCategoryAction/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceCustomBotCategoryAction/update.tf b/pkg/providers/botman/testdata/TestResourceCustomBotCategoryAction/update.tf index 50366934d..5e73f4df0 100644 --- a/pkg/providers/botman/testdata/TestResourceCustomBotCategoryAction/update.tf +++ b/pkg/providers/botman/testdata/TestResourceCustomBotCategoryAction/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceCustomBotCategorySequence/create.tf b/pkg/providers/botman/testdata/TestResourceCustomBotCategorySequence/create.tf index 2a84f5579..1b602b3a4 100644 --- a/pkg/providers/botman/testdata/TestResourceCustomBotCategorySequence/create.tf +++ b/pkg/providers/botman/testdata/TestResourceCustomBotCategorySequence/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceCustomBotCategorySequence/update.tf b/pkg/providers/botman/testdata/TestResourceCustomBotCategorySequence/update.tf index 05287788e..b2fce3828 100644 --- a/pkg/providers/botman/testdata/TestResourceCustomBotCategorySequence/update.tf +++ b/pkg/providers/botman/testdata/TestResourceCustomBotCategorySequence/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceCustomClient/create.tf b/pkg/providers/botman/testdata/TestResourceCustomClient/create.tf index 750f050ff..270297c43 100644 --- a/pkg/providers/botman/testdata/TestResourceCustomClient/create.tf +++ b/pkg/providers/botman/testdata/TestResourceCustomClient/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceCustomClient/update.tf b/pkg/providers/botman/testdata/TestResourceCustomClient/update.tf index 58cd153ff..d0c778146 100644 --- a/pkg/providers/botman/testdata/TestResourceCustomClient/update.tf +++ b/pkg/providers/botman/testdata/TestResourceCustomClient/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceCustomClientSequence/create.tf b/pkg/providers/botman/testdata/TestResourceCustomClientSequence/create.tf index 40d1b4a60..ed7e13543 100644 --- a/pkg/providers/botman/testdata/TestResourceCustomClientSequence/create.tf +++ b/pkg/providers/botman/testdata/TestResourceCustomClientSequence/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceCustomClientSequence/update.tf b/pkg/providers/botman/testdata/TestResourceCustomClientSequence/update.tf index 4e9d4d321..b2c606483 100644 --- a/pkg/providers/botman/testdata/TestResourceCustomClientSequence/update.tf +++ b/pkg/providers/botman/testdata/TestResourceCustomClientSequence/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceCustomDefinedBot/create.tf b/pkg/providers/botman/testdata/TestResourceCustomDefinedBot/create.tf index 0d4254d88..f96a553fc 100644 --- a/pkg/providers/botman/testdata/TestResourceCustomDefinedBot/create.tf +++ b/pkg/providers/botman/testdata/TestResourceCustomDefinedBot/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceCustomDefinedBot/update.tf b/pkg/providers/botman/testdata/TestResourceCustomDefinedBot/update.tf index e597ff17b..7cf6f9f69 100644 --- a/pkg/providers/botman/testdata/TestResourceCustomDefinedBot/update.tf +++ b/pkg/providers/botman/testdata/TestResourceCustomDefinedBot/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceCustomDenyAction/create.tf b/pkg/providers/botman/testdata/TestResourceCustomDenyAction/create.tf index 4d6285199..67539300f 100644 --- a/pkg/providers/botman/testdata/TestResourceCustomDenyAction/create.tf +++ b/pkg/providers/botman/testdata/TestResourceCustomDenyAction/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceCustomDenyAction/update.tf b/pkg/providers/botman/testdata/TestResourceCustomDenyAction/update.tf index 3b1c5a9b8..3c5d36250 100644 --- a/pkg/providers/botman/testdata/TestResourceCustomDenyAction/update.tf +++ b/pkg/providers/botman/testdata/TestResourceCustomDenyAction/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceJavascriptInjection/create.tf b/pkg/providers/botman/testdata/TestResourceJavascriptInjection/create.tf index c84b76dbd..21a9a59f7 100644 --- a/pkg/providers/botman/testdata/TestResourceJavascriptInjection/create.tf +++ b/pkg/providers/botman/testdata/TestResourceJavascriptInjection/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceJavascriptInjection/update.tf b/pkg/providers/botman/testdata/TestResourceJavascriptInjection/update.tf index 879b9e6ee..27d0d2667 100644 --- a/pkg/providers/botman/testdata/TestResourceJavascriptInjection/update.tf +++ b/pkg/providers/botman/testdata/TestResourceJavascriptInjection/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceRecategorizedAkamaiDefinedBot/create.tf b/pkg/providers/botman/testdata/TestResourceRecategorizedAkamaiDefinedBot/create.tf index 091dca269..91ef9e9be 100644 --- a/pkg/providers/botman/testdata/TestResourceRecategorizedAkamaiDefinedBot/create.tf +++ b/pkg/providers/botman/testdata/TestResourceRecategorizedAkamaiDefinedBot/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceRecategorizedAkamaiDefinedBot/update.tf b/pkg/providers/botman/testdata/TestResourceRecategorizedAkamaiDefinedBot/update.tf index 0e99187d0..3b345693f 100644 --- a/pkg/providers/botman/testdata/TestResourceRecategorizedAkamaiDefinedBot/update.tf +++ b/pkg/providers/botman/testdata/TestResourceRecategorizedAkamaiDefinedBot/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceServeAlternateAction/create.tf b/pkg/providers/botman/testdata/TestResourceServeAlternateAction/create.tf index 673276076..e63e3de48 100644 --- a/pkg/providers/botman/testdata/TestResourceServeAlternateAction/create.tf +++ b/pkg/providers/botman/testdata/TestResourceServeAlternateAction/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceServeAlternateAction/update.tf b/pkg/providers/botman/testdata/TestResourceServeAlternateAction/update.tf index 096c56c03..1a9471567 100644 --- a/pkg/providers/botman/testdata/TestResourceServeAlternateAction/update.tf +++ b/pkg/providers/botman/testdata/TestResourceServeAlternateAction/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceTransactionalEndpoint/create.tf b/pkg/providers/botman/testdata/TestResourceTransactionalEndpoint/create.tf index 7ff73007c..c677b916d 100644 --- a/pkg/providers/botman/testdata/TestResourceTransactionalEndpoint/create.tf +++ b/pkg/providers/botman/testdata/TestResourceTransactionalEndpoint/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceTransactionalEndpoint/update.tf b/pkg/providers/botman/testdata/TestResourceTransactionalEndpoint/update.tf index 193f3b0c9..4aafac0c5 100644 --- a/pkg/providers/botman/testdata/TestResourceTransactionalEndpoint/update.tf +++ b/pkg/providers/botman/testdata/TestResourceTransactionalEndpoint/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceTransactionalEndpointProtection/create.tf b/pkg/providers/botman/testdata/TestResourceTransactionalEndpointProtection/create.tf index cdffc090c..3f3a5e375 100644 --- a/pkg/providers/botman/testdata/TestResourceTransactionalEndpointProtection/create.tf +++ b/pkg/providers/botman/testdata/TestResourceTransactionalEndpointProtection/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceTransactionalEndpointProtection/update.tf b/pkg/providers/botman/testdata/TestResourceTransactionalEndpointProtection/update.tf index af14fb023..e2442c61a 100644 --- a/pkg/providers/botman/testdata/TestResourceTransactionalEndpointProtection/update.tf +++ b/pkg/providers/botman/testdata/TestResourceTransactionalEndpointProtection/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/clientlists/testData/TestDSClientList/match_all.tf b/pkg/providers/clientlists/testData/TestDSClientList/match_all.tf index 21aa02f6d..7f724cd92 100644 --- a/pkg/providers/clientlists/testData/TestDSClientList/match_all.tf +++ b/pkg/providers/clientlists/testData/TestDSClientList/match_all.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_clientlist_lists" "lists" {} diff --git a/pkg/providers/clientlists/testData/TestDSClientList/match_by_filters.tf b/pkg/providers/clientlists/testData/TestDSClientList/match_by_filters.tf index f4b97bb2c..31526a2b8 100644 --- a/pkg/providers/clientlists/testData/TestDSClientList/match_by_filters.tf +++ b/pkg/providers/clientlists/testData/TestDSClientList/match_by_filters.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_clientlist_lists" "lists" { diff --git a/pkg/providers/clientlists/testData/TestResActivation/activation_create.tf b/pkg/providers/clientlists/testData/TestResActivation/activation_create.tf index 822860d64..c9cb99e37 100644 --- a/pkg/providers/clientlists/testData/TestResActivation/activation_create.tf +++ b/pkg/providers/clientlists/testData/TestResActivation/activation_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_clientlist_activation" "activation_ASN_LIST_1" { diff --git a/pkg/providers/clientlists/testData/TestResActivation/activation_missing_param.tf b/pkg/providers/clientlists/testData/TestResActivation/activation_missing_param.tf index 62712dce8..26d107b15 100644 --- a/pkg/providers/clientlists/testData/TestResActivation/activation_missing_param.tf +++ b/pkg/providers/clientlists/testData/TestResActivation/activation_missing_param.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_clientlist_activation" "activation_ASN_LIST_1" { diff --git a/pkg/providers/clientlists/testData/TestResActivation/activation_update.tf b/pkg/providers/clientlists/testData/TestResActivation/activation_update.tf index 66f37a584..2a339404c 100644 --- a/pkg/providers/clientlists/testData/TestResActivation/activation_update.tf +++ b/pkg/providers/clientlists/testData/TestResActivation/activation_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_clientlist_activation" "activation_ASN_LIST_1" { diff --git a/pkg/providers/clientlists/testData/TestResActivation/activation_update_comments_suppressed.tf b/pkg/providers/clientlists/testData/TestResActivation/activation_update_comments_suppressed.tf index 9c8e78a72..4e7d301cc 100644 --- a/pkg/providers/clientlists/testData/TestResActivation/activation_update_comments_suppressed.tf +++ b/pkg/providers/clientlists/testData/TestResActivation/activation_update_comments_suppressed.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_clientlist_activation" "activation_ASN_LIST_1" { diff --git a/pkg/providers/clientlists/testData/TestResActivation/activation_update_siebelTicketId.tf b/pkg/providers/clientlists/testData/TestResActivation/activation_update_siebelTicketId.tf index 943888ac3..6975213ea 100644 --- a/pkg/providers/clientlists/testData/TestResActivation/activation_update_siebelTicketId.tf +++ b/pkg/providers/clientlists/testData/TestResActivation/activation_update_siebelTicketId.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_clientlist_activation" "activation_ASN_LIST_1" { diff --git a/pkg/providers/clientlists/testData/TestResActivation/activation_update_version_only.tf b/pkg/providers/clientlists/testData/TestResActivation/activation_update_version_only.tf index 366bd43a0..9720f72ac 100644 --- a/pkg/providers/clientlists/testData/TestResActivation/activation_update_version_only.tf +++ b/pkg/providers/clientlists/testData/TestResActivation/activation_update_version_only.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_clientlist_activation" "activation_ASN_LIST_1" { diff --git a/pkg/providers/clientlists/testData/TestResClientList/list_and_duplicate_items_create.tf b/pkg/providers/clientlists/testData/TestResClientList/list_and_duplicate_items_create.tf index fb0ed14e3..58ad5e977 100644 --- a/pkg/providers/clientlists/testData/TestResClientList/list_and_duplicate_items_create.tf +++ b/pkg/providers/clientlists/testData/TestResClientList/list_and_duplicate_items_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_clientlist_list" "test_list" { diff --git a/pkg/providers/clientlists/testData/TestResClientList/list_and_items_create.tf b/pkg/providers/clientlists/testData/TestResClientList/list_and_items_create.tf index 223c0ec7c..a32c86e4a 100644 --- a/pkg/providers/clientlists/testData/TestResClientList/list_and_items_create.tf +++ b/pkg/providers/clientlists/testData/TestResClientList/list_and_items_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_clientlist_list" "test_list" { diff --git a/pkg/providers/clientlists/testData/TestResClientList/list_and_items_create_one_item.tf b/pkg/providers/clientlists/testData/TestResClientList/list_and_items_create_one_item.tf index 0a0115318..3f6fc7900 100644 --- a/pkg/providers/clientlists/testData/TestResClientList/list_and_items_create_one_item.tf +++ b/pkg/providers/clientlists/testData/TestResClientList/list_and_items_create_one_item.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_clientlist_list" "test_list" { diff --git a/pkg/providers/clientlists/testData/TestResClientList/list_and_items_update.tf b/pkg/providers/clientlists/testData/TestResClientList/list_and_items_update.tf index 9ae6383a0..4f26c2ea5 100644 --- a/pkg/providers/clientlists/testData/TestResClientList/list_and_items_update.tf +++ b/pkg/providers/clientlists/testData/TestResClientList/list_and_items_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_clientlist_list" "test_list" { diff --git a/pkg/providers/clientlists/testData/TestResClientList/list_create.tf b/pkg/providers/clientlists/testData/TestResClientList/list_create.tf index 505bd9112..64ab49313 100644 --- a/pkg/providers/clientlists/testData/TestResClientList/list_create.tf +++ b/pkg/providers/clientlists/testData/TestResClientList/list_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_clientlist_list" "test_list" { diff --git a/pkg/providers/clientlists/testData/TestResClientList/list_create_empty_tags.tf b/pkg/providers/clientlists/testData/TestResClientList/list_create_empty_tags.tf index aaa793e1c..b7ae9fffb 100644 --- a/pkg/providers/clientlists/testData/TestResClientList/list_create_empty_tags.tf +++ b/pkg/providers/clientlists/testData/TestResClientList/list_create_empty_tags.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_clientlist_list" "test_list" { diff --git a/pkg/providers/clientlists/testData/TestResClientList/list_items_only_update.tf b/pkg/providers/clientlists/testData/TestResClientList/list_items_only_update.tf index 7e918f423..e023309cf 100644 --- a/pkg/providers/clientlists/testData/TestResClientList/list_items_only_update.tf +++ b/pkg/providers/clientlists/testData/TestResClientList/list_items_only_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_clientlist_list" "test_list" { diff --git a/pkg/providers/clientlists/testData/TestResClientList/list_items_update_compute_version.tf b/pkg/providers/clientlists/testData/TestResClientList/list_items_update_compute_version.tf index f976e1a21..8bc678974 100644 --- a/pkg/providers/clientlists/testData/TestResClientList/list_items_update_compute_version.tf +++ b/pkg/providers/clientlists/testData/TestResClientList/list_items_update_compute_version.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_clientlist_list" "test_list" { diff --git a/pkg/providers/clientlists/testData/TestResClientList/list_items_update_not_compute_version.tf b/pkg/providers/clientlists/testData/TestResClientList/list_items_update_not_compute_version.tf index e3443a849..c4cd247a8 100644 --- a/pkg/providers/clientlists/testData/TestResClientList/list_items_update_not_compute_version.tf +++ b/pkg/providers/clientlists/testData/TestResClientList/list_items_update_not_compute_version.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_clientlist_list" "test_list" { diff --git a/pkg/providers/clientlists/testData/TestResClientList/list_update.tf b/pkg/providers/clientlists/testData/TestResClientList/list_update.tf index 1addc2b33..3021c71e9 100644 --- a/pkg/providers/clientlists/testData/TestResClientList/list_update.tf +++ b/pkg/providers/clientlists/testData/TestResClientList/list_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_clientlist_list" "test_list" { diff --git a/pkg/providers/clientlists/testData/TestResClientList/list_update_remove_tags.tf b/pkg/providers/clientlists/testData/TestResClientList/list_update_remove_tags.tf index 29eea7eaa..3171d7af7 100644 --- a/pkg/providers/clientlists/testData/TestResClientList/list_update_remove_tags.tf +++ b/pkg/providers/clientlists/testData/TestResClientList/list_update_remove_tags.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_clientlist_list" "test_list" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/invalid_pass_through_percent.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/invalid_pass_through_percent.tf index b44e500dd..4134c6b5d 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/invalid_pass_through_percent.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/invalid_pass_through_percent.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_api_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/match_value_and_omv_together.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/match_value_and_omv_together.tf index 50842bb59..5a5b2717b 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/match_value_and_omv_together.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/match_value_and_omv_together.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_api_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/matches_invalid_checkips.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/matches_invalid_checkips.tf index 0d5881121..300a45bc2 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/matches_invalid_checkips.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/matches_invalid_checkips.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_api_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/matches_invalid_operator.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/matches_invalid_operator.tf index 1f1557f54..6f20cb064 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/matches_invalid_operator.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/matches_invalid_operator.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/minimal_vars_map.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/minimal_vars_map.tf index 7e8e2f3e1..badf85903 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/minimal_vars_map.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/minimal_vars_map.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_api_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/missing_argument.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/missing_argument.tf index 06e96c04a..8d3ec2ae4 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/missing_argument.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/missing_argument.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_api_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/no_match_value_and_omv.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/no_match_value_and_omv.tf index 0a06643af..4e8c77a3c 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/no_match_value_and_omv.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/no_match_value_and_omv.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_api_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/omv_invalid_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/omv_invalid_type.tf index 0f6889e7d..aa3942549 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/omv_invalid_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/omv_invalid_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_api_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/omv_object.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/omv_object.tf index 6aae45a50..beed0b21f 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/omv_object.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/omv_object.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_api_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/omv_simple.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/omv_simple.tf index cc0be32b1..40b273058 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/omv_simple.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/omv_simple.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_api_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/vars_map.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/vars_map.tf index ecf214a55..e825a59a1 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/vars_map.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/vars_map.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_api_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsApplicationLoadBalancer/application_load_balancer.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsApplicationLoadBalancer/application_load_balancer.tf index afed52c99..2ff73b5ac 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsApplicationLoadBalancer/application_load_balancer.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsApplicationLoadBalancer/application_load_balancer.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_application_load_balancer" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsApplicationLoadBalancer/application_load_balancer_version.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsApplicationLoadBalancer/application_load_balancer_version.tf index 84e417b14..c69266b98 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsApplicationLoadBalancer/application_load_balancer_version.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsApplicationLoadBalancer/application_load_balancer_version.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_application_load_balancer" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/basic.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/basic.tf index 75a8c61be..b6390e737 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/basic.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/duplicate_values.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/duplicate_values.tf index 75ffe7c21..494d16ade 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/duplicate_values.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/duplicate_values.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_check_ips.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_check_ips.tf index fbc66f29b..26f2e2f6f 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_check_ips.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_check_ips.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_match_operator.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_match_operator.tf index 61f0d4cba..c302d1274 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_match_operator.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_match_operator.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_match_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_match_type.tf index bd24c230a..41dce8c14 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_match_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_match_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_type.tf index 014a12c70..46fe2f46b 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_enum_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_type_range.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_type_range.tf index b3913ad3b..06eddb062 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_type_range.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/invalid_type_range.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/missing_forward_settings.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/missing_forward_settings.tf index 76ba007ee..abeb534dc 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/missing_forward_settings.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/missing_forward_settings.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/missing_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/missing_type.tf index f0c284d28..4e0b10b36 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/missing_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/missing_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/missing_value.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/missing_value.tf index bc4e8f1bc..335e2b8e5 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/missing_value.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/missing_value.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_complex.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_complex.tf index 0fabfb424..7bea80494 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_complex.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_complex.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_empty.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_empty.tf index b40e52738..2f91d0d26 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_empty.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_empty.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_object.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_object.tf index 8fab660dc..6732df207 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_object.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_object.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_range.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_range.tf index 1ce758c43..90fda5d69 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_range.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_range.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_simple.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_simple.tf index 5496ccfda..2be45e40c 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_simple.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/omv_simple.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/empty_relative_url_vars_map.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/empty_relative_url_vars_map.tf index 3f319d055..8fe252977 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/empty_relative_url_vars_map.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/empty_relative_url_vars_map.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_edge_redirector_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/invalid_status_code.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/invalid_status_code.tf index f60559974..d5cadd093 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/invalid_status_code.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/invalid_status_code.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_edge_redirector_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/match_value_and_omv_together.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/match_value_and_omv_together.tf index 6925065c1..7dfd00e90 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/match_value_and_omv_together.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/match_value_and_omv_together.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_edge_redirector_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/matches_always.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/matches_always.tf index 3c3e2b1f4..ef980437f 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/matches_always.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/matches_always.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_edge_redirector_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/matches_invalid_checkips.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/matches_invalid_checkips.tf index b9f4bfe6e..dfa3a52e9 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/matches_invalid_checkips.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/matches_invalid_checkips.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_edge_redirector_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/matches_invalid_operator.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/matches_invalid_operator.tf index d8ead58ab..de2abe568 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/matches_invalid_operator.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/matches_invalid_operator.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/matches_with_matches_always.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/matches_with_matches_always.tf index 3d199c2a0..d9866e6b6 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/matches_with_matches_always.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/matches_with_matches_always.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_edge_redirector_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/minimal_vars_map.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/minimal_vars_map.tf index e53c50dc8..6ca048e7a 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/minimal_vars_map.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/minimal_vars_map.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_edge_redirector_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/no_match_value_and_omv.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/no_match_value_and_omv.tf index c7fff6912..02ad52e77 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/no_match_value_and_omv.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/no_match_value_and_omv.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_edge_redirector_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_empty.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_empty.tf index d9aefd2cc..8d6905736 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_empty.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_empty.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_edge_redirector_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_invalid_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_invalid_type.tf index 94a2555be..b7742fdc8 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_invalid_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_invalid_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_edge_redirector_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_missed_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_missed_type.tf index 764a475f8..17d54828a 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_missed_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_missed_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_edge_redirector_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_object.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_object.tf index f3de0d2e2..912b1f6da 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_object.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_object.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_edge_redirector_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_simple.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_simple.tf index 45721adb7..11ebe26b9 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_simple.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/omv_simple.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_edge_redirector_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/vars_map.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/vars_map.tf index a65523526..1e0898a8e 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/vars_map.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/vars_map.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_edge_redirector_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/basic.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/basic.tf index 9da9f8359..7f2555ca0 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/basic.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_forward_rewrite_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/match_value_and_omv_together.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/match_value_and_omv_together.tf index 509349647..7f9bf6a31 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/match_value_and_omv_together.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/match_value_and_omv_together.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_forward_rewrite_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/matches_invalid_checkips.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/matches_invalid_checkips.tf index 2d172723b..11c10b9bd 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/matches_invalid_checkips.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/matches_invalid_checkips.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_forward_rewrite_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/matches_invalid_operator.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/matches_invalid_operator.tf index 72ef67943..2dd5c6432 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/matches_invalid_operator.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/matches_invalid_operator.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_forward_rewrite_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/no_match_value_and_omv.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/no_match_value_and_omv.tf index 74c91124f..0023b46ba 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/no_match_value_and_omv.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/no_match_value_and_omv.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_forward_rewrite_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_empty.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_empty.tf index 0a80a5914..857cf5377 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_empty.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_empty.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_forward_rewrite_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_invalid_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_invalid_type.tf index 020079e7d..45db027ba 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_invalid_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_invalid_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_forward_rewrite_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_missed_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_missed_type.tf index 9bd9d6840..be8ca0ac9 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_missed_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_missed_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_forward_rewrite_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_object.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_object.tf index 0fc4ad753..f24fa590e 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_object.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_object.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_forward_rewrite_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_simple.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_simple.tf index 911329e93..d6b3218fc 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_simple.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/omv_simple.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_forward_rewrite_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/basic.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/basic.tf index 4483337c5..e2b724442 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/basic.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_application_load_balancer_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/match_value_and_omv_together.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/match_value_and_omv_together.tf index 7b9484974..84d440739 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/match_value_and_omv_together.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/match_value_and_omv_together.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_application_load_balancer_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/matches_invalid_checkips.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/matches_invalid_checkips.tf index 6cfb43d41..18ed118e7 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/matches_invalid_checkips.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/matches_invalid_checkips.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_application_load_balancer_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/matches_invalid_operator.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/matches_invalid_operator.tf index d9d19d467..4b8aabea7 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/matches_invalid_operator.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/matches_invalid_operator.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_application_load_balancer_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/no_match_value_and_omv.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/no_match_value_and_omv.tf index 6970774e2..535fbe5d5 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/no_match_value_and_omv.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/no_match_value_and_omv.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_application_load_balancer_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_empty.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_empty.tf index 5e2d1e598..aab6f1eaf 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_empty.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_empty.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_application_load_balancer_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_incorrect_range.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_incorrect_range.tf index 2e73a44dd..dc9149741 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_incorrect_range.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_incorrect_range.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_application_load_balancer_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_invalid_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_invalid_type.tf index 8180d1d68..d01b5a379 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_invalid_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_invalid_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_application_load_balancer_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_missed_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_missed_type.tf index 3afa9edfa..0ae46991c 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_missed_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_missed_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_application_load_balancer_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_object.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_object.tf index b5603df11..c13c4baa9 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_object.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_object.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_application_load_balancer_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_range.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_range.tf index 5e556d48f..a1caa617e 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_range.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_range.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_application_load_balancer_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_simple.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_simple.tf index 8d81c2888..bec45bf60 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_simple.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/omv_simple.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_application_load_balancer_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/basic.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/basic.tf index 2e5706cd5..f99e0a361 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/basic.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_phased_release_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/invalid_percent.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/invalid_percent.tf index 316a0a550..3d65cbb47 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/invalid_percent.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/invalid_percent.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_phased_release_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/match_value_and_omv_together.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/match_value_and_omv_together.tf index f9bec7a98..810667ba4 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/match_value_and_omv_together.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/match_value_and_omv_together.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_phased_release_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/matches_invalid_checkips.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/matches_invalid_checkips.tf index 8683b651e..406631b6e 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/matches_invalid_checkips.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/matches_invalid_checkips.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_phased_release_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/matches_invalid_operator.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/matches_invalid_operator.tf index 20c315bce..4bc9c8bfe 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/matches_invalid_operator.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/matches_invalid_operator.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_phased_release_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/no_match_value_and_omv.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/no_match_value_and_omv.tf index e89ca64e8..86b2ba16c 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/no_match_value_and_omv.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/no_match_value_and_omv.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_phased_release_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_empty.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_empty.tf index 774262025..ff22ac8f3 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_empty.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_empty.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_phased_release_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_invalid_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_invalid_type.tf index f1f53676e..5f95de831 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_invalid_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_invalid_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_phased_release_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_missed_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_missed_type.tf index d19cc9cb4..45ac905cf 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_missed_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_missed_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_phased_release_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_object.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_object.tf index fce13acb1..6f103bafb 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_object.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_object.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_phased_release_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_simple.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_simple.tf index 4ed575074..b46e0e5ab 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_simple.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/omv_simple.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_phased_release_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicy/policy.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicy/policy.tf index ae0e80c45..5bfaab165 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicy/policy.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicy/policy.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_policy" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicy/policy_with_version.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicy/policy_with_version.tf index 0aba6f960..e64927667 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicy/policy_with_version.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicy/policy_with_version.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_policy" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/basic.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/basic.tf index 4c8fe715d..7acb3775d 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/basic.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/duplicate_values.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/duplicate_values.tf index 14b9e6508..ee2e07e38 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/duplicate_values.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/duplicate_values.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_allow_deny.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_allow_deny.tf index 6d656529e..86ccc9501 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_allow_deny.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_allow_deny.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_check_ips.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_check_ips.tf index 0782b126b..d5bcb783a 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_check_ips.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_check_ips.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_match_operator.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_match_operator.tf index 4ec43b09d..c1baf9d87 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_match_operator.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_match_operator.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_match_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_match_type.tf index bc3eec3c0..bfa17d468 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_match_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_match_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_type.tf index 347243a04..84406d59e 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/invalid_enum_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/missing_allow_deny.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/missing_allow_deny.tf index 4173ffe6c..5b6b6e7d7 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/missing_allow_deny.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/missing_allow_deny.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/missing_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/missing_type.tf index 313306e05..a99f453d1 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/missing_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/missing_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/missing_value.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/missing_value.tf index ec1bd6171..364e2ee59 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/missing_value.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/missing_value.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_complex.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_complex.tf index 0e4984c3f..217f4d875 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_complex.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_complex.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_empty.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_empty.tf index 372530a5c..ef7bf8a0d 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_empty.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_empty.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_object.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_object.tf index 07dd1eb65..2f9b6c64a 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_object.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_object.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_simple.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_simple.tf index 341706755..5ec2d235c 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_simple.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/omv_simple.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/invalid_pass_through_percent.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/invalid_pass_through_percent.tf index 766155e91..d52e56941 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/invalid_pass_through_percent.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/invalid_pass_through_percent.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_visitor_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/match_value_and_omv_together.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/match_value_and_omv_together.tf index 1528adc2e..8cd55bd91 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/match_value_and_omv_together.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/match_value_and_omv_together.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_visitor_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/matches_invalid_operator.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/matches_invalid_operator.tf index cd2f096c3..7241be483 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/matches_invalid_operator.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/matches_invalid_operator.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_visitor_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/minimal_vars_map.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/minimal_vars_map.tf index 9fb731d31..bb78c6dd1 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/minimal_vars_map.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/minimal_vars_map.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_visitor_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/missing_argument.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/missing_argument.tf index f00373a9f..f362f53e4 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/missing_argument.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/missing_argument.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_visitor_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/no_match_value_and_omv.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/no_match_value_and_omv.tf index 624cef441..e8f3cb6f3 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/no_match_value_and_omv.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/no_match_value_and_omv.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_visitor_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/omv_invalid_type.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/omv_invalid_type.tf index 8333d6003..34da4cab4 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/omv_invalid_type.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/omv_invalid_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_visitor_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/omv_object.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/omv_object.tf index db9671374..4ff375c7e 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/omv_object.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/omv_object.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_visitor_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/omv_simple.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/omv_simple.tf index ed4732ffd..d007ce48a 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/omv_simple.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/omv_simple.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_visitor_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/vars_map.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/vars_map.tf index 5d99ad996..f76d82b6f 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/vars_map.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/vars_map.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_visitor_prioritization_match_rule" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_no_properties.tf b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_no_properties.tf index 0200b15cb..4623228a6 100644 --- a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_no_properties.tf +++ b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_no_properties.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy_activation" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_update_version2.tf b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_update_version2.tf index e08eace02..84f3ad0f0 100644 --- a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_update_version2.tf +++ b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_update_version2.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy_activation" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_version1.tf b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_version1.tf index 1aae5270e..969fcfa36 100644 --- a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_version1.tf +++ b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_version1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy_activation" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_version1_prod.tf b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_version1_prod.tf index fe9adcf97..b23c3cfd4 100644 --- a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_version1_prod.tf +++ b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_version1_prod.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy_activation" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_version1_production.tf b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_version1_production.tf index 3ad73c543..89682e0fc 100644 --- a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_version1_production.tf +++ b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyActivation/policy_activation_version1_production.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy_activation" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle/alb_create.tf b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle/alb_create.tf index 322a0e837..ca10a66f6 100644 --- a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle/alb_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle/alb_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_application_load_balancer" "alb" { diff --git a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle/alb_update.tf b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle/alb_update.tf index f94e4dd31..9b8df27ba 100644 --- a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle/alb_update.tf +++ b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle/alb_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_application_load_balancer" "alb" { diff --git a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_dc_update/alb_create.tf b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_dc_update/alb_create.tf index 75959c56c..8477bec05 100644 --- a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_dc_update/alb_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_dc_update/alb_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_application_load_balancer" "alb" { diff --git a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_dc_update/alb_update.tf b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_dc_update/alb_update.tf index 2a4db3e4d..4285d2cfa 100644 --- a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_dc_update/alb_update.tf +++ b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_dc_update/alb_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_application_load_balancer" "alb" { diff --git a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_no_liveness_settings/alb_create.tf b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_no_liveness_settings/alb_create.tf index 08497fafb..b62706182 100644 --- a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_no_liveness_settings/alb_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_no_liveness_settings/alb_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_application_load_balancer" "alb" { diff --git a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_no_liveness_settings/alb_update.tf b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_no_liveness_settings/alb_update.tf index 9521ecc95..046a747a9 100644 --- a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_no_liveness_settings/alb_update.tf +++ b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_no_liveness_settings/alb_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_application_load_balancer" "alb" { diff --git a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_origin_update/alb_create.tf b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_origin_update/alb_create.tf index 08497fafb..b62706182 100644 --- a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_origin_update/alb_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_origin_update/alb_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_application_load_balancer" "alb" { diff --git a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_origin_update/alb_update.tf b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_origin_update/alb_update.tf index c506369cf..aa7cc6f45 100644 --- a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_origin_update/alb_update.tf +++ b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_origin_update/alb_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_application_load_balancer" "alb" { diff --git a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_version_update/alb_create.tf b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_version_update/alb_create.tf index 08497fafb..b62706182 100644 --- a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_version_update/alb_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_version_update/alb_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_application_load_balancer" "alb" { diff --git a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_version_update/alb_update.tf b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_version_update/alb_update.tf index ba28bab3a..7d7b045fd 100644 --- a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_version_update/alb_update.tf +++ b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_version_update/alb_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_application_load_balancer" "alb" { diff --git a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/percentage_validation/alb_create.tf b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/percentage_validation/alb_create.tf index 630495080..1d713cb9e 100644 --- a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/percentage_validation/alb_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/percentage_validation/alb_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_application_load_balancer" "alb" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/create_no_match_rules/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/create_no_match_rules/policy_create.tf index d7be6a07f..176a377e2 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/create_no_match_rules/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/create_no_match_rules/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/import/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/import/policy_create.tf index 9f9118414..fd220592b 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/import/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/import/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/import_no_match_rules/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/import_no_match_rules/policy_create.tf index d7be6a07f..176a377e2 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/import_no_match_rules/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/import_no_match_rules/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/invalid_group_id/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/invalid_group_id/policy_create.tf index 2e917d93d..5c2d9246a 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/invalid_group_id/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/invalid_group_id/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle/policy_create.tf index 9f9118414..fd220592b 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle/policy_update.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle/policy_update.tf index bc71767d7..d2255e063 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle/policy_update.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_policy_update/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_policy_update/policy_create.tf index 9f9118414..fd220592b 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_policy_update/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_policy_update/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_policy_update/policy_update.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_policy_update/policy_update.tf index 5dfdc3d76..c279a912f 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_policy_update/policy_update.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_policy_update/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_remove_match_rules/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_remove_match_rules/policy_create.tf index 9f9118414..fd220592b 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_remove_match_rules/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_remove_match_rules/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_remove_match_rules/policy_update.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_remove_match_rules/policy_update.tf index d7be6a07f..176a377e2 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_remove_match_rules/policy_update.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_remove_match_rules/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_version_update/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_version_update/policy_create.tf index 545dcb80d..8ad81806c 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_version_update/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_version_update/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_version_update/policy_update.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_version_update/policy_update.tf index b1c8e7bcc..ba7469579 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_version_update/policy_update.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_version_update/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/timeouts/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/timeouts/policy_create.tf index c44cc9026..5f3697a5f 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/timeouts/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/timeouts/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_timeouts.tf b/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_timeouts.tf index 1ca38094f..87ca11482 100644 --- a/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_timeouts.tf +++ b/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_timeouts.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_application_load_balancer_activation" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_update.tf b/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_update.tf index 351db17e1..b82790779 100644 --- a/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_update.tf +++ b/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_application_load_balancer_activation" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_update_prod.tf b/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_update_prod.tf index 74db038b4..923654932 100644 --- a/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_update_prod.tf +++ b/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_update_prod.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_application_load_balancer_activation" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_version1.tf b/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_version1.tf index b7348a20f..bc03da285 100644 --- a/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_version1.tf +++ b/pkg/providers/cloudlets/testdata/TestResourceCloudletsApplicationLoadBalancerActivation/alb_activation_version1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_application_load_balancer_activation" "test" { diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_capacities_test.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_capacities_test.go index 1b3797244..bc7719ee4 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_capacities_test.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_capacities_test.go @@ -157,7 +157,7 @@ func dataCloudWrapperCapacityConfig(contracts []string) string { return fmt.Sprintf(` provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudwrapper_capacities" "test" { diff --git a/pkg/providers/cloudwrapper/testdata/TestDataConfiguration/default.tf b/pkg/providers/cloudwrapper/testdata/TestDataConfiguration/default.tf index b91562c57..438c9be4c 100644 --- a/pkg/providers/cloudwrapper/testdata/TestDataConfiguration/default.tf +++ b/pkg/providers/cloudwrapper/testdata/TestDataConfiguration/default.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudwrapper_configuration" "test" { diff --git a/pkg/providers/cloudwrapper/testdata/TestDataConfiguration/no_config_id.tf b/pkg/providers/cloudwrapper/testdata/TestDataConfiguration/no_config_id.tf index 143be10fc..4757333db 100644 --- a/pkg/providers/cloudwrapper/testdata/TestDataConfiguration/no_config_id.tf +++ b/pkg/providers/cloudwrapper/testdata/TestDataConfiguration/no_config_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudwrapper_configuration" "test" {} \ No newline at end of file diff --git a/pkg/providers/cloudwrapper/testdata/TestDataConfigurations/default.tf b/pkg/providers/cloudwrapper/testdata/TestDataConfigurations/default.tf index 0cd5a2f01..46c91fba5 100644 --- a/pkg/providers/cloudwrapper/testdata/TestDataConfigurations/default.tf +++ b/pkg/providers/cloudwrapper/testdata/TestDataConfigurations/default.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudwrapper_configurations" "test" {} \ No newline at end of file diff --git a/pkg/providers/cloudwrapper/testdata/TestDataLocation/invalid_type.tf b/pkg/providers/cloudwrapper/testdata/TestDataLocation/invalid_type.tf index f27072d8a..459cb3c7d 100644 --- a/pkg/providers/cloudwrapper/testdata/TestDataLocation/invalid_type.tf +++ b/pkg/providers/cloudwrapper/testdata/TestDataLocation/invalid_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudwrapper_location" "test" { diff --git a/pkg/providers/cloudwrapper/testdata/TestDataLocation/location.tf b/pkg/providers/cloudwrapper/testdata/TestDataLocation/location.tf index e52614629..4e208d50c 100644 --- a/pkg/providers/cloudwrapper/testdata/TestDataLocation/location.tf +++ b/pkg/providers/cloudwrapper/testdata/TestDataLocation/location.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudwrapper_location" "test" { diff --git a/pkg/providers/cloudwrapper/testdata/TestDataLocation/no_location.tf b/pkg/providers/cloudwrapper/testdata/TestDataLocation/no_location.tf index 49ccc8dc7..3ae5ccb00 100644 --- a/pkg/providers/cloudwrapper/testdata/TestDataLocation/no_location.tf +++ b/pkg/providers/cloudwrapper/testdata/TestDataLocation/no_location.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudwrapper_location" "test" { diff --git a/pkg/providers/cloudwrapper/testdata/TestDataLocations/location.tf b/pkg/providers/cloudwrapper/testdata/TestDataLocations/location.tf index f221f002c..6223046b4 100644 --- a/pkg/providers/cloudwrapper/testdata/TestDataLocations/location.tf +++ b/pkg/providers/cloudwrapper/testdata/TestDataLocations/location.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudwrapper_locations" "test" {} \ No newline at end of file diff --git a/pkg/providers/cloudwrapper/testdata/TestDataProperties/default_unused_false.tf b/pkg/providers/cloudwrapper/testdata/TestDataProperties/default_unused_false.tf index 1f2918c25..11da6aaf0 100644 --- a/pkg/providers/cloudwrapper/testdata/TestDataProperties/default_unused_false.tf +++ b/pkg/providers/cloudwrapper/testdata/TestDataProperties/default_unused_false.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudwrapper_properties" "test" { diff --git a/pkg/providers/cloudwrapper/testdata/TestDataProperties/default_unused_true.tf b/pkg/providers/cloudwrapper/testdata/TestDataProperties/default_unused_true.tf index b7d59d145..2edd195b0 100644 --- a/pkg/providers/cloudwrapper/testdata/TestDataProperties/default_unused_true.tf +++ b/pkg/providers/cloudwrapper/testdata/TestDataProperties/default_unused_true.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudwrapper_properties" "test" { diff --git a/pkg/providers/cloudwrapper/testdata/TestDataProperties/missing_contract_ids.tf b/pkg/providers/cloudwrapper/testdata/TestDataProperties/missing_contract_ids.tf index bb353c081..31d486e90 100644 --- a/pkg/providers/cloudwrapper/testdata/TestDataProperties/missing_contract_ids.tf +++ b/pkg/providers/cloudwrapper/testdata/TestDataProperties/missing_contract_ids.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudwrapper_properties" "test" {} \ No newline at end of file diff --git a/pkg/providers/cloudwrapper/testdata/TestDataProperties/no_attributes.tf b/pkg/providers/cloudwrapper/testdata/TestDataProperties/no_attributes.tf index bb353c081..31d486e90 100644 --- a/pkg/providers/cloudwrapper/testdata/TestDataProperties/no_attributes.tf +++ b/pkg/providers/cloudwrapper/testdata/TestDataProperties/no_attributes.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudwrapper_properties" "test" {} \ No newline at end of file diff --git a/pkg/providers/cloudwrapper/testdata/TestResActivation/create.tf b/pkg/providers/cloudwrapper/testdata/TestResActivation/create.tf index 48c75b4e0..151c47094 100644 --- a/pkg/providers/cloudwrapper/testdata/TestResActivation/create.tf +++ b/pkg/providers/cloudwrapper/testdata/TestResActivation/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudwrapper_activation" "act" { diff --git a/pkg/providers/cloudwrapper/testdata/TestResActivation/create_missing_required.tf b/pkg/providers/cloudwrapper/testdata/TestResActivation/create_missing_required.tf index 965e444b9..71c09de59 100644 --- a/pkg/providers/cloudwrapper/testdata/TestResActivation/create_missing_required.tf +++ b/pkg/providers/cloudwrapper/testdata/TestResActivation/create_missing_required.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudwrapper_activation" "act" { diff --git a/pkg/providers/cloudwrapper/testdata/TestResActivation/create_timeout.tf b/pkg/providers/cloudwrapper/testdata/TestResActivation/create_timeout.tf index d2685072d..6a8da64d7 100644 --- a/pkg/providers/cloudwrapper/testdata/TestResActivation/create_timeout.tf +++ b/pkg/providers/cloudwrapper/testdata/TestResActivation/create_timeout.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudwrapper_activation" "act" { diff --git a/pkg/providers/cloudwrapper/testdata/TestResActivation/update.tf b/pkg/providers/cloudwrapper/testdata/TestResActivation/update.tf index 9758f0701..3920e7bfa 100644 --- a/pkg/providers/cloudwrapper/testdata/TestResActivation/update.tf +++ b/pkg/providers/cloudwrapper/testdata/TestResActivation/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudwrapper_activation" "act" { diff --git a/pkg/providers/cloudwrapper/testdata/TestResActivation/update_forcenew.tf b/pkg/providers/cloudwrapper/testdata/TestResActivation/update_forcenew.tf index a8cdfa00c..ca0e64e5d 100644 --- a/pkg/providers/cloudwrapper/testdata/TestResActivation/update_forcenew.tf +++ b/pkg/providers/cloudwrapper/testdata/TestResActivation/update_forcenew.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudwrapper_activation" "act" { diff --git a/pkg/providers/cloudwrapper/testdata/TestResActivation/update_timeout.tf b/pkg/providers/cloudwrapper/testdata/TestResActivation/update_timeout.tf index fdc71e493..5c0235c85 100644 --- a/pkg/providers/cloudwrapper/testdata/TestResActivation/update_timeout.tf +++ b/pkg/providers/cloudwrapper/testdata/TestResActivation/update_timeout.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudwrapper_activation" "act" { diff --git a/pkg/providers/cloudwrapper/testdata/TestResConfiguration/computed_email.tf b/pkg/providers/cloudwrapper/testdata/TestResConfiguration/computed_email.tf index c1fd7a461..da8a9a0a0 100644 --- a/pkg/providers/cloudwrapper/testdata/TestResConfiguration/computed_email.tf +++ b/pkg/providers/cloudwrapper/testdata/TestResConfiguration/computed_email.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudwrapper_configuration" "test" { diff --git a/pkg/providers/cloudwrapper/testdata/TestResConfiguration/computed_retain_idle_obj.tf b/pkg/providers/cloudwrapper/testdata/TestResConfiguration/computed_retain_idle_obj.tf index d580b8169..0592ba3c6 100644 --- a/pkg/providers/cloudwrapper/testdata/TestResConfiguration/computed_retain_idle_obj.tf +++ b/pkg/providers/cloudwrapper/testdata/TestResConfiguration/computed_retain_idle_obj.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudwrapper_configuration" "test" { diff --git a/pkg/providers/cloudwrapper/testdata/TestResConfiguration/contract_id_no_prefix.tf b/pkg/providers/cloudwrapper/testdata/TestResConfiguration/contract_id_no_prefix.tf index 60ebe6cc0..0cb18009c 100644 --- a/pkg/providers/cloudwrapper/testdata/TestResConfiguration/contract_id_no_prefix.tf +++ b/pkg/providers/cloudwrapper/testdata/TestResConfiguration/contract_id_no_prefix.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudwrapper_configuration" "test" { diff --git a/pkg/providers/cloudwrapper/testdata/TestResConfiguration/create.tf b/pkg/providers/cloudwrapper/testdata/TestResConfiguration/create.tf index 9f346914a..39a9934aa 100644 --- a/pkg/providers/cloudwrapper/testdata/TestResConfiguration/create.tf +++ b/pkg/providers/cloudwrapper/testdata/TestResConfiguration/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudwrapper_configuration" "test" { diff --git a/pkg/providers/cloudwrapper/testdata/TestResConfiguration/missing_capacity.tf b/pkg/providers/cloudwrapper/testdata/TestResConfiguration/missing_capacity.tf index 8dd5428bf..c381443aa 100644 --- a/pkg/providers/cloudwrapper/testdata/TestResConfiguration/missing_capacity.tf +++ b/pkg/providers/cloudwrapper/testdata/TestResConfiguration/missing_capacity.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudwrapper_configuration" "test" { diff --git a/pkg/providers/cloudwrapper/testdata/TestResConfiguration/missing_location.tf b/pkg/providers/cloudwrapper/testdata/TestResConfiguration/missing_location.tf index a83f2b6b2..17344daac 100644 --- a/pkg/providers/cloudwrapper/testdata/TestResConfiguration/missing_location.tf +++ b/pkg/providers/cloudwrapper/testdata/TestResConfiguration/missing_location.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudwrapper_configuration" "test" { diff --git a/pkg/providers/cloudwrapper/testdata/TestResConfiguration/missing_location_comments.tf b/pkg/providers/cloudwrapper/testdata/TestResConfiguration/missing_location_comments.tf index b709c5ad1..36ad9fa4b 100644 --- a/pkg/providers/cloudwrapper/testdata/TestResConfiguration/missing_location_comments.tf +++ b/pkg/providers/cloudwrapper/testdata/TestResConfiguration/missing_location_comments.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudwrapper_configuration" "test" { diff --git a/pkg/providers/cloudwrapper/testdata/TestResConfiguration/missing_required.tf b/pkg/providers/cloudwrapper/testdata/TestResConfiguration/missing_required.tf index 85371c44a..0da467b72 100644 --- a/pkg/providers/cloudwrapper/testdata/TestResConfiguration/missing_required.tf +++ b/pkg/providers/cloudwrapper/testdata/TestResConfiguration/missing_required.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudwrapper_configuration" "test" { diff --git a/pkg/providers/cloudwrapper/testdata/TestResConfiguration/property_ids_with_prefix.tf b/pkg/providers/cloudwrapper/testdata/TestResConfiguration/property_ids_with_prefix.tf index fc1d3100b..676e76c46 100644 --- a/pkg/providers/cloudwrapper/testdata/TestResConfiguration/property_ids_with_prefix.tf +++ b/pkg/providers/cloudwrapper/testdata/TestResConfiguration/property_ids_with_prefix.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudwrapper_configuration" "test" { diff --git a/pkg/providers/cloudwrapper/testdata/TestResConfiguration/update_alerts_threshold.tf b/pkg/providers/cloudwrapper/testdata/TestResConfiguration/update_alerts_threshold.tf index 8df0de903..ad2291381 100644 --- a/pkg/providers/cloudwrapper/testdata/TestResConfiguration/update_alerts_threshold.tf +++ b/pkg/providers/cloudwrapper/testdata/TestResConfiguration/update_alerts_threshold.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudwrapper_configuration" "test" { diff --git a/pkg/providers/cloudwrapper/testdata/TestResConfiguration/update_config_name.tf b/pkg/providers/cloudwrapper/testdata/TestResConfiguration/update_config_name.tf index 962aadec6..ffa55b503 100644 --- a/pkg/providers/cloudwrapper/testdata/TestResConfiguration/update_config_name.tf +++ b/pkg/providers/cloudwrapper/testdata/TestResConfiguration/update_config_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudwrapper_configuration" "test" { diff --git a/pkg/providers/cloudwrapper/testdata/TestResConfiguration/update_contract_id.tf b/pkg/providers/cloudwrapper/testdata/TestResConfiguration/update_contract_id.tf index 517f27ebf..3c6543472 100644 --- a/pkg/providers/cloudwrapper/testdata/TestResConfiguration/update_contract_id.tf +++ b/pkg/providers/cloudwrapper/testdata/TestResConfiguration/update_contract_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudwrapper_configuration" "test" { diff --git a/pkg/providers/cps/testdata/TestDataCPSCSR/default.tf b/pkg/providers/cps/testdata/TestDataCPSCSR/default.tf index e48b2a6a5..6fb85c489 100644 --- a/pkg/providers/cps/testdata/TestDataCPSCSR/default.tf +++ b/pkg/providers/cps/testdata/TestDataCPSCSR/default.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cps_csr" "test" { diff --git a/pkg/providers/cps/testdata/TestDataCPSCSR/no_algorithms.tf b/pkg/providers/cps/testdata/TestDataCPSCSR/no_algorithms.tf index f2f3a1264..5bd318b60 100644 --- a/pkg/providers/cps/testdata/TestDataCPSCSR/no_algorithms.tf +++ b/pkg/providers/cps/testdata/TestDataCPSCSR/no_algorithms.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cps_csr" "test" { diff --git a/pkg/providers/cps/testdata/TestDataCPSCSR/no_enrollment_id.tf b/pkg/providers/cps/testdata/TestDataCPSCSR/no_enrollment_id.tf index 2a101ea6b..46d3d12cb 100644 --- a/pkg/providers/cps/testdata/TestDataCPSCSR/no_enrollment_id.tf +++ b/pkg/providers/cps/testdata/TestDataCPSCSR/no_enrollment_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cps_csr" "test" {} \ No newline at end of file diff --git a/pkg/providers/cps/testdata/TestDataDeployments/deployments.tf b/pkg/providers/cps/testdata/TestDataDeployments/deployments.tf index e125a7203..ab65eae4e 100644 --- a/pkg/providers/cps/testdata/TestDataDeployments/deployments.tf +++ b/pkg/providers/cps/testdata/TestDataDeployments/deployments.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cps_deployments" "test" { diff --git a/pkg/providers/cps/testdata/TestDataEnrollment/enrollment_with_challenges.tf b/pkg/providers/cps/testdata/TestDataEnrollment/enrollment_with_challenges.tf index fcddc375a..6644a1695 100644 --- a/pkg/providers/cps/testdata/TestDataEnrollment/enrollment_with_challenges.tf +++ b/pkg/providers/cps/testdata/TestDataEnrollment/enrollment_with_challenges.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cps_enrollment" "test" { diff --git a/pkg/providers/cps/testdata/TestDataEnrollment/enrollment_with_ev_challenges.tf b/pkg/providers/cps/testdata/TestDataEnrollment/enrollment_with_ev_challenges.tf index eddc619f4..ff383b21a 100644 --- a/pkg/providers/cps/testdata/TestDataEnrollment/enrollment_with_ev_challenges.tf +++ b/pkg/providers/cps/testdata/TestDataEnrollment/enrollment_with_ev_challenges.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cps_enrollment" "test" { diff --git a/pkg/providers/cps/testdata/TestDataEnrollment/enrollment_with_third_party_challenges.tf b/pkg/providers/cps/testdata/TestDataEnrollment/enrollment_with_third_party_challenges.tf index fb39a786c..596c74edd 100644 --- a/pkg/providers/cps/testdata/TestDataEnrollment/enrollment_with_third_party_challenges.tf +++ b/pkg/providers/cps/testdata/TestDataEnrollment/enrollment_with_third_party_challenges.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cps_enrollment" "test" { diff --git a/pkg/providers/cps/testdata/TestDataEnrollment/enrollment_without_challenges.tf b/pkg/providers/cps/testdata/TestDataEnrollment/enrollment_without_challenges.tf index aab49e7c3..45aa17141 100644 --- a/pkg/providers/cps/testdata/TestDataEnrollment/enrollment_without_challenges.tf +++ b/pkg/providers/cps/testdata/TestDataEnrollment/enrollment_without_challenges.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cps_enrollment" "test" { diff --git a/pkg/providers/cps/testdata/TestDataEnrollments/enrollments.tf b/pkg/providers/cps/testdata/TestDataEnrollments/enrollments.tf index ece924257..2dbed876f 100644 --- a/pkg/providers/cps/testdata/TestDataEnrollments/enrollments.tf +++ b/pkg/providers/cps/testdata/TestDataEnrollments/enrollments.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cps_enrollments" "test" { diff --git a/pkg/providers/cps/testdata/TestDataWarnings/warnings.tf b/pkg/providers/cps/testdata/TestDataWarnings/warnings.tf index c5328e355..4640f654b 100644 --- a/pkg/providers/cps/testdata/TestDataWarnings/warnings.tf +++ b/pkg/providers/cps/testdata/TestDataWarnings/warnings.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cps_warnings" "test" {} diff --git a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/ack_post_verification_warnings/ack_false.tf b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/ack_post_verification_warnings/ack_false.tf index 61eac90d4..3aac670c2 100644 --- a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/ack_post_verification_warnings/ack_false.tf +++ b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/ack_post_verification_warnings/ack_false.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_upload_certificate" "test" { diff --git a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/ack_post_verification_warnings/ack_true.tf b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/ack_post_verification_warnings/ack_true.tf index 0d63372de..9ff29dffc 100644 --- a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/ack_post_verification_warnings/ack_true.tf +++ b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/ack_post_verification_warnings/ack_true.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_upload_certificate" "test" { diff --git a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/auto_approve_warnings/auto_approve_warnings.tf b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/auto_approve_warnings/auto_approve_warnings.tf index e601a977e..22535c82e 100644 --- a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/auto_approve_warnings/auto_approve_warnings.tf +++ b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/auto_approve_warnings/auto_approve_warnings.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_upload_certificate" "test" { diff --git a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/auto_approve_warnings/auto_approve_warnings_empty.tf b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/auto_approve_warnings/auto_approve_warnings_empty.tf index f7e709a51..b60f8e732 100644 --- a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/auto_approve_warnings/auto_approve_warnings_empty.tf +++ b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/auto_approve_warnings/auto_approve_warnings_empty.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_upload_certificate" "test" { diff --git a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/auto_approve_warnings/auto_approve_warnings_not_provided.tf b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/auto_approve_warnings/auto_approve_warnings_not_provided.tf index 9dd969e00..7079eea0a 100644 --- a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/auto_approve_warnings/auto_approve_warnings_not_provided.tf +++ b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/auto_approve_warnings/auto_approve_warnings_not_provided.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_upload_certificate" "test" { diff --git a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/auto_approve_warnings/auto_approve_warnings_updated.tf b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/auto_approve_warnings/auto_approve_warnings_updated.tf index f24395c64..0afeff873 100644 --- a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/auto_approve_warnings/auto_approve_warnings_updated.tf +++ b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/auto_approve_warnings/auto_approve_warnings_updated.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_upload_certificate" "test" { diff --git a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/auto_approve_warnings/auto_approve_warnings_with_chM_true.tf b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/auto_approve_warnings/auto_approve_warnings_with_chM_true.tf index 77e03f8c1..776d384ca 100644 --- a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/auto_approve_warnings/auto_approve_warnings_with_chM_true.tf +++ b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/auto_approve_warnings/auto_approve_warnings_with_chM_true.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_upload_certificate" "test" { diff --git a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/changed_both_certificates.tf b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/changed_both_certificates.tf index 5d6bf941b..28d1701d5 100644 --- a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/changed_both_certificates.tf +++ b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/changed_both_certificates.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_upload_certificate" "test" { diff --git a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/changed_certificate.tf b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/changed_certificate.tf index 7340e1a01..5bc626509 100644 --- a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/changed_certificate.tf +++ b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/changed_certificate.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_upload_certificate" "test" { diff --git a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/changed_certificates_with_auto_approve_warnings.tf b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/changed_certificates_with_auto_approve_warnings.tf index 47b5cbb41..485ff8676 100644 --- a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/changed_certificates_with_auto_approve_warnings.tf +++ b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/changed_certificates_with_auto_approve_warnings.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_upload_certificate" "test" { diff --git a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/changed_certificates_with_auto_approve_warnings_accept.tf b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/changed_certificates_with_auto_approve_warnings_accept.tf index b09b42e92..fb330ad61 100644 --- a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/changed_certificates_with_auto_approve_warnings_accept.tf +++ b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/changed_certificates_with_auto_approve_warnings_accept.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_upload_certificate" "test" { diff --git a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/create_both_certificates.tf b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/create_both_certificates.tf index 21a672048..5daa351de 100644 --- a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/create_both_certificates.tf +++ b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/create_both_certificates.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_upload_certificate" "test" { diff --git a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/create_certificate_ecdsa.tf b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/create_certificate_ecdsa.tf index 99ffa7e51..036c88c83 100644 --- a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/create_certificate_ecdsa.tf +++ b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/create_certificate_ecdsa.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_upload_certificate" "test" { diff --git a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/create_certificate_rsa.tf b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/create_certificate_rsa.tf index 0d63372de..9ff29dffc 100644 --- a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/create_certificate_rsa.tf +++ b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/create_certificate_rsa.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_upload_certificate" "test" { diff --git a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/create_certificate_timeouts.tf b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/create_certificate_timeouts.tf index 659fc071d..c98879969 100644 --- a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/create_certificate_timeouts.tf +++ b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/create_certificate_timeouts.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_upload_certificate" "test" { diff --git a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/no_certificates.tf b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/no_certificates.tf index 2eee57f90..feac3828a 100644 --- a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/no_certificates.tf +++ b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/no_certificates.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_upload_certificate" "test" { diff --git a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/trust_chain_without_cert.tf b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/trust_chain_without_cert.tf index 89a31511b..a722e0c98 100644 --- a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/trust_chain_without_cert.tf +++ b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/certificates/trust_chain_without_cert.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_upload_certificate" "test" { diff --git a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/change_management/change_management_false.tf b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/change_management/change_management_false.tf index 0d63372de..9ff29dffc 100644 --- a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/change_management/change_management_false.tf +++ b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/change_management/change_management_false.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_upload_certificate" "test" { diff --git a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/change_management/change_management_not_specified.tf b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/change_management/change_management_not_specified.tf index fc27cf134..28ea13ee1 100644 --- a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/change_management/change_management_not_specified.tf +++ b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/change_management/change_management_not_specified.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_upload_certificate" "test" { diff --git a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/change_management/change_management_true.tf b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/change_management/change_management_true.tf index 63804d766..835202ef5 100644 --- a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/change_management/change_management_true.tf +++ b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/change_management/change_management_true.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_upload_certificate" "test" { diff --git a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/import/import_upload.tf b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/import/import_upload.tf index 5e3e3d812..0bea9b8c0 100644 --- a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/import/import_upload.tf +++ b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/import/import_upload.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_upload_certificate" "import" { diff --git a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/third_party_enrollment_with_upload_cert.tf b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/third_party_enrollment_with_upload_cert.tf index ade699b16..c9dc26ad6 100644 --- a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/third_party_enrollment_with_upload_cert.tf +++ b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/third_party_enrollment_with_upload_cert.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_third_party_enrollment" "test_enrollment" { diff --git a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/wait_for_deployment/status_changes_slowly.tf b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/wait_for_deployment/status_changes_slowly.tf index e5cda2dae..2d368a17d 100644 --- a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/wait_for_deployment/status_changes_slowly.tf +++ b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/wait_for_deployment/status_changes_slowly.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_upload_certificate" "test" { diff --git a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/wait_for_deployment/wait_for_deployment_false.tf b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/wait_for_deployment/wait_for_deployment_false.tf index 5e4d35f0f..a8d0578f9 100644 --- a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/wait_for_deployment/wait_for_deployment_false.tf +++ b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/wait_for_deployment/wait_for_deployment_false.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_upload_certificate" "test" { diff --git a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/wait_for_deployment/wait_for_deployment_true.tf b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/wait_for_deployment/wait_for_deployment_true.tf index 984b2eec5..632ba24dc 100644 --- a/pkg/providers/cps/testdata/TestResCPSUploadCertificate/wait_for_deployment/wait_for_deployment_true.tf +++ b/pkg/providers/cps/testdata/TestResCPSUploadCertificate/wait_for_deployment/wait_for_deployment_true.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_upload_certificate" "test" { diff --git a/pkg/providers/cps/testdata/TestResDVEnrollment/acknowledge_warnings/create_enrollment.tf b/pkg/providers/cps/testdata/TestResDVEnrollment/acknowledge_warnings/create_enrollment.tf index 1cb8ccbb8..8a10a92bd 100644 --- a/pkg/providers/cps/testdata/TestResDVEnrollment/acknowledge_warnings/create_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResDVEnrollment/acknowledge_warnings/create_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_dv_enrollment" "dv" { diff --git a/pkg/providers/cps/testdata/TestResDVEnrollment/allow_duplicate_cn/create_enrollment.tf b/pkg/providers/cps/testdata/TestResDVEnrollment/allow_duplicate_cn/create_enrollment.tf index 03cdab2ba..3f85534d0 100644 --- a/pkg/providers/cps/testdata/TestResDVEnrollment/allow_duplicate_cn/create_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResDVEnrollment/allow_duplicate_cn/create_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_dv_enrollment" "dv" { diff --git a/pkg/providers/cps/testdata/TestResDVEnrollment/client_mutual_auth/create_enrollment.tf b/pkg/providers/cps/testdata/TestResDVEnrollment/client_mutual_auth/create_enrollment.tf index bd0969e33..2055fe66b 100644 --- a/pkg/providers/cps/testdata/TestResDVEnrollment/client_mutual_auth/create_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResDVEnrollment/client_mutual_auth/create_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_dv_enrollment" "dv" { diff --git a/pkg/providers/cps/testdata/TestResDVEnrollment/empty_sans/create_enrollment.tf b/pkg/providers/cps/testdata/TestResDVEnrollment/empty_sans/create_enrollment.tf index 30428f70f..8452891e1 100644 --- a/pkg/providers/cps/testdata/TestResDVEnrollment/empty_sans/create_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResDVEnrollment/empty_sans/create_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_dv_enrollment" "dv" { diff --git a/pkg/providers/cps/testdata/TestResDVEnrollment/import/import_enrollment.tf b/pkg/providers/cps/testdata/TestResDVEnrollment/import/import_enrollment.tf index 758076d70..53e6748ae 100644 --- a/pkg/providers/cps/testdata/TestResDVEnrollment/import/import_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResDVEnrollment/import/import_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_dv_enrollment" "dv" { diff --git a/pkg/providers/cps/testdata/TestResDVEnrollment/lifecycle/create_enrollment.tf b/pkg/providers/cps/testdata/TestResDVEnrollment/lifecycle/create_enrollment.tf index 206d56e4d..fc1eb6018 100644 --- a/pkg/providers/cps/testdata/TestResDVEnrollment/lifecycle/create_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResDVEnrollment/lifecycle/create_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_dv_enrollment" "dv" { diff --git a/pkg/providers/cps/testdata/TestResDVEnrollment/lifecycle/update_enrollment.tf b/pkg/providers/cps/testdata/TestResDVEnrollment/lifecycle/update_enrollment.tf index ef3df0cd9..8828e4d1d 100644 --- a/pkg/providers/cps/testdata/TestResDVEnrollment/lifecycle/update_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResDVEnrollment/lifecycle/update_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_dv_enrollment" "dv" { diff --git a/pkg/providers/cps/testdata/TestResDVEnrollment/lifecycle_cn_in_sans/create_enrollment.tf b/pkg/providers/cps/testdata/TestResDVEnrollment/lifecycle_cn_in_sans/create_enrollment.tf index 7abe37629..a6b7545e6 100644 --- a/pkg/providers/cps/testdata/TestResDVEnrollment/lifecycle_cn_in_sans/create_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResDVEnrollment/lifecycle_cn_in_sans/create_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_dv_enrollment" "dv" { diff --git a/pkg/providers/cps/testdata/TestResDVEnrollment/no_acknowledge_warnings/create_enrollment.tf b/pkg/providers/cps/testdata/TestResDVEnrollment/no_acknowledge_warnings/create_enrollment.tf index bfeba4e95..29bc258af 100644 --- a/pkg/providers/cps/testdata/TestResDVEnrollment/no_acknowledge_warnings/create_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResDVEnrollment/no_acknowledge_warnings/create_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_dv_enrollment" "dv" { diff --git a/pkg/providers/cps/testdata/TestResDVValidation/create_validation.tf b/pkg/providers/cps/testdata/TestResDVValidation/create_validation.tf index ed8fd593a..59f514ef2 100644 --- a/pkg/providers/cps/testdata/TestResDVValidation/create_validation.tf +++ b/pkg/providers/cps/testdata/TestResDVValidation/create_validation.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_dv_validation" "dv_validation" { diff --git a/pkg/providers/cps/testdata/TestResDVValidation/create_validation_with_timeout.tf b/pkg/providers/cps/testdata/TestResDVValidation/create_validation_with_timeout.tf index 5c40c4861..6382c45e4 100644 --- a/pkg/providers/cps/testdata/TestResDVValidation/create_validation_with_timeout.tf +++ b/pkg/providers/cps/testdata/TestResDVValidation/create_validation_with_timeout.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_dv_validation" "dv_validation" { diff --git a/pkg/providers/cps/testdata/TestResDVValidation/update_validation.tf b/pkg/providers/cps/testdata/TestResDVValidation/update_validation.tf index 07db69088..79a16cc31 100644 --- a/pkg/providers/cps/testdata/TestResDVValidation/update_validation.tf +++ b/pkg/providers/cps/testdata/TestResDVValidation/update_validation.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_dv_validation" "dv_validation" { diff --git a/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/acknowledge_warnings/create_enrollment.tf b/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/acknowledge_warnings/create_enrollment.tf index 59c52de5b..db90c3446 100644 --- a/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/acknowledge_warnings/create_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/acknowledge_warnings/create_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_third_party_enrollment" "third_party" { diff --git a/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/allow_duplicate_cn/create_enrollment.tf b/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/allow_duplicate_cn/create_enrollment.tf index 7ad647158..1e1fb6a02 100644 --- a/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/allow_duplicate_cn/create_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/allow_duplicate_cn/create_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_third_party_enrollment" "third_party" { diff --git a/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/auto_approve_warnings/create_enrollment.tf b/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/auto_approve_warnings/create_enrollment.tf index e6cfcc1b0..d2d5f3fba 100644 --- a/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/auto_approve_warnings/create_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/auto_approve_warnings/create_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_third_party_enrollment" "third_party" { diff --git a/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/client_mutual_auth/create_enrollment.tf b/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/client_mutual_auth/create_enrollment.tf index b59e2b28c..70e722cd5 100644 --- a/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/client_mutual_auth/create_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/client_mutual_auth/create_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_third_party_enrollment" "third_party" { diff --git a/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/empty_sans/create_enrollment.tf b/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/empty_sans/create_enrollment.tf index 972703cea..be5bcd324 100644 --- a/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/empty_sans/create_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/empty_sans/create_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_third_party_enrollment" "third_party" { diff --git a/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/import/import_enrollment.tf b/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/import/import_enrollment.tf index 0b6f757f6..8ae1c6e7f 100644 --- a/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/import/import_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/import/import_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_third_party_enrollment" "third_party" { diff --git a/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/lifecycle/create_enrollment.tf b/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/lifecycle/create_enrollment.tf index e00c25e67..5fe91f84d 100644 --- a/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/lifecycle/create_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/lifecycle/create_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_third_party_enrollment" "third_party" { diff --git a/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/lifecycle/update_enrollment.tf b/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/lifecycle/update_enrollment.tf index 3a4c4439c..a67dc2581 100644 --- a/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/lifecycle/update_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/lifecycle/update_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_third_party_enrollment" "third_party" { diff --git a/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/lifecycle_cn_in_sans/create_enrollment.tf b/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/lifecycle_cn_in_sans/create_enrollment.tf index 802dd2031..6cf9d9b1b 100644 --- a/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/lifecycle_cn_in_sans/create_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/lifecycle_cn_in_sans/create_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_third_party_enrollment" "third_party" { diff --git a/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/lifecycle_no_cn_in_sans/create_enrollment.tf b/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/lifecycle_no_cn_in_sans/create_enrollment.tf index c45d3a62c..6c72b980b 100644 --- a/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/lifecycle_no_cn_in_sans/create_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/lifecycle_no_cn_in_sans/create_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_third_party_enrollment" "third_party" { diff --git a/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/lifecycle_no_sans/create_enrollment.tf b/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/lifecycle_no_sans/create_enrollment.tf index effa03fac..36d2c01b9 100644 --- a/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/lifecycle_no_sans/create_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/lifecycle_no_sans/create_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_third_party_enrollment" "third_party" { diff --git a/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/lifecycle_no_sans/update_enrollment.tf b/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/lifecycle_no_sans/update_enrollment.tf index ca0b31005..d693d91d5 100644 --- a/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/lifecycle_no_sans/update_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/lifecycle_no_sans/update_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_third_party_enrollment" "third_party" { diff --git a/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/no_acknowledge_warnings/create_enrollment.tf b/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/no_acknowledge_warnings/create_enrollment.tf index 0b6f757f6..8ae1c6e7f 100644 --- a/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/no_acknowledge_warnings/create_enrollment.tf +++ b/pkg/providers/cps/testdata/TestResThirdPartyEnrollment/no_acknowledge_warnings/create_enrollment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_third_party_enrollment" "third_party" { diff --git a/pkg/providers/cps/testdata/TestResThirdPartyValidation/create_validation.tf b/pkg/providers/cps/testdata/TestResThirdPartyValidation/create_validation.tf index 38e7e95af..5d9fc7035 100644 --- a/pkg/providers/cps/testdata/TestResThirdPartyValidation/create_validation.tf +++ b/pkg/providers/cps/testdata/TestResThirdPartyValidation/create_validation.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_third_party_validation" "third_party_validation" { diff --git a/pkg/providers/cps/testdata/TestResThirdPartyValidation/update_validation.tf b/pkg/providers/cps/testdata/TestResThirdPartyValidation/update_validation.tf index ca274a61b..2435e5faa 100644 --- a/pkg/providers/cps/testdata/TestResThirdPartyValidation/update_validation.tf +++ b/pkg/providers/cps/testdata/TestResThirdPartyValidation/update_validation.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cps_third_party_validation" "third_party_validation" { diff --git a/pkg/providers/datastream/testdata/TestDataAkamaiDatastreamActivationHistoryRead/activation_history.tf b/pkg/providers/datastream/testdata/TestDataAkamaiDatastreamActivationHistoryRead/activation_history.tf index cf2889fc9..eb117dc81 100644 --- a/pkg/providers/datastream/testdata/TestDataAkamaiDatastreamActivationHistoryRead/activation_history.tf +++ b/pkg/providers/datastream/testdata/TestDataAkamaiDatastreamActivationHistoryRead/activation_history.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_datastream_activation_history" "test" { diff --git a/pkg/providers/datastream/testdata/TestDataAkamaiDatastreamActivationHistoryRead/empty_activation_history.tf b/pkg/providers/datastream/testdata/TestDataAkamaiDatastreamActivationHistoryRead/empty_activation_history.tf index c5c9a5d81..e202ac835 100644 --- a/pkg/providers/datastream/testdata/TestDataAkamaiDatastreamActivationHistoryRead/empty_activation_history.tf +++ b/pkg/providers/datastream/testdata/TestDataAkamaiDatastreamActivationHistoryRead/empty_activation_history.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_datastream_activation_history" "test" { diff --git a/pkg/providers/datastream/testdata/TestDataDatastreams/list_streams_with_groupid.tf b/pkg/providers/datastream/testdata/TestDataDatastreams/list_streams_with_groupid.tf index 50158f805..b13896aa5 100644 --- a/pkg/providers/datastream/testdata/TestDataDatastreams/list_streams_with_groupid.tf +++ b/pkg/providers/datastream/testdata/TestDataDatastreams/list_streams_with_groupid.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_datastreams" "test" { diff --git a/pkg/providers/datastream/testdata/TestDataDatastreams/list_streams_with_groupid_with_invalid_prefix.tf b/pkg/providers/datastream/testdata/TestDataDatastreams/list_streams_with_groupid_with_invalid_prefix.tf index f3c163fb7..d37b8f874 100644 --- a/pkg/providers/datastream/testdata/TestDataDatastreams/list_streams_with_groupid_with_invalid_prefix.tf +++ b/pkg/providers/datastream/testdata/TestDataDatastreams/list_streams_with_groupid_with_invalid_prefix.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_datastreams" "test" { diff --git a/pkg/providers/datastream/testdata/TestDataDatastreams/list_streams_with_groupid_with_prefix.tf b/pkg/providers/datastream/testdata/TestDataDatastreams/list_streams_with_groupid_with_prefix.tf index 50158f805..b13896aa5 100644 --- a/pkg/providers/datastream/testdata/TestDataDatastreams/list_streams_with_groupid_with_prefix.tf +++ b/pkg/providers/datastream/testdata/TestDataDatastreams/list_streams_with_groupid_with_prefix.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_datastreams" "test" { diff --git a/pkg/providers/datastream/testdata/TestDataDatastreams/list_streams_without_groupid.tf b/pkg/providers/datastream/testdata/TestDataDatastreams/list_streams_without_groupid.tf index a61569888..fae7bca02 100644 --- a/pkg/providers/datastream/testdata/TestDataDatastreams/list_streams_without_groupid.tf +++ b/pkg/providers/datastream/testdata/TestDataDatastreams/list_streams_without_groupid.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_datastreams" "test" {} \ No newline at end of file diff --git a/pkg/providers/datastream/testdata/TestDataSourceDatasetFieldsRead/list_dataset_fields_default_product.tf b/pkg/providers/datastream/testdata/TestDataSourceDatasetFieldsRead/list_dataset_fields_default_product.tf index f9118bbb6..732dd0e33 100644 --- a/pkg/providers/datastream/testdata/TestDataSourceDatasetFieldsRead/list_dataset_fields_default_product.tf +++ b/pkg/providers/datastream/testdata/TestDataSourceDatasetFieldsRead/list_dataset_fields_default_product.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_datastream_dataset_fields" "test" {} \ No newline at end of file diff --git a/pkg/providers/datastream/testdata/TestDataSourceDatasetFieldsRead/list_dataset_fields_with_product.tf b/pkg/providers/datastream/testdata/TestDataSourceDatasetFieldsRead/list_dataset_fields_with_product.tf index a9c3cee3d..864ecbabe 100644 --- a/pkg/providers/datastream/testdata/TestDataSourceDatasetFieldsRead/list_dataset_fields_with_product.tf +++ b/pkg/providers/datastream/testdata/TestDataSourceDatasetFieldsRead/list_dataset_fields_with_product.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_datastream_dataset_fields" "test" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/connectors/azure.tf b/pkg/providers/datastream/testdata/TestResourceStream/connectors/azure.tf index ef063eb7d..2dc2faacb 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/connectors/azure.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/connectors/azure.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/connectors/gcs.tf b/pkg/providers/datastream/testdata/TestResourceStream/connectors/gcs.tf index b55269511..f77e96482 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/connectors/gcs.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/connectors/gcs.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff1.tf b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff1.tf index ee8feeb92..40be636fd 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff1.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff2.tf b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff2.tf index c3e738518..2f931308b 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff2.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff2.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff3.tf b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff3.tf index ea6bd4274..9caea8663 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff3.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff3.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff4.tf b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff4.tf index d3a9267e3..e8974b407 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff4.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff4.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff5.tf b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff5.tf index 667fcd874..874c06181 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff5.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff5.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff6.tf b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff6.tf index 0dbbe71cd..feb6ef7e2 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff6.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff6.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff7.tf b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff7.tf index 5a07b16b3..9368902e1 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff7.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff7.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff8.tf b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff8.tf index dbbed4b7d..729b4ffad 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff8.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/custom_diff/custom_diff8.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/custom_headers/custom_headers_elasticsearch.tf b/pkg/providers/datastream/testdata/TestResourceStream/custom_headers/custom_headers_elasticsearch.tf index 2392664a0..a823b947f 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/custom_headers/custom_headers_elasticsearch.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/custom_headers/custom_headers_elasticsearch.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/custom_headers/custom_headers_https.tf b/pkg/providers/datastream/testdata/TestResourceStream/custom_headers/custom_headers_https.tf index b3913ac70..d0e2dd5d9 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/custom_headers/custom_headers_https.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/custom_headers/custom_headers_https.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/custom_headers/custom_headers_loggly.tf b/pkg/providers/datastream/testdata/TestResourceStream/custom_headers/custom_headers_loggly.tf index feb697f0b..2637ad8ee 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/custom_headers/custom_headers_loggly.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/custom_headers/custom_headers_loggly.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/custom_headers/custom_headers_new_relic.tf b/pkg/providers/datastream/testdata/TestResourceStream/custom_headers/custom_headers_new_relic.tf index e40ce4a6d..b1e4b70d4 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/custom_headers/custom_headers_new_relic.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/custom_headers/custom_headers_new_relic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/custom_headers/custom_headers_splunk.tf b/pkg/providers/datastream/testdata/TestResourceStream/custom_headers/custom_headers_splunk.tf index b8b2b56c9..264597f5c 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/custom_headers/custom_headers_splunk.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/custom_headers/custom_headers_splunk.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/custom_headers/custom_headers_sumologic.tf b/pkg/providers/datastream/testdata/TestResourceStream/custom_headers/custom_headers_sumologic.tf index ced438904..a5107d655 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/custom_headers/custom_headers_sumologic.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/custom_headers/custom_headers_sumologic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/dataset_ids_diff/json_config.tf b/pkg/providers/datastream/testdata/TestResourceStream/dataset_ids_diff/json_config.tf index 2668e38ee..4a486ea81 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/dataset_ids_diff/json_config.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/dataset_ids_diff/json_config.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "splunk_stream" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/dataset_ids_diff/json_config_duplicates.tf b/pkg/providers/datastream/testdata/TestResourceStream/dataset_ids_diff/json_config_duplicates.tf index 8c83590f7..edeae8e6d 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/dataset_ids_diff/json_config_duplicates.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/dataset_ids_diff/json_config_duplicates.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "splunk_stream" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/dataset_ids_diff/structured_config.tf b/pkg/providers/datastream/testdata/TestResourceStream/dataset_ids_diff/structured_config.tf index d1f5ac5ad..40dd62c09 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/dataset_ids_diff/structured_config.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/dataset_ids_diff/structured_config.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "splunk_stream" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/email_ids/empty_email_ids.tf b/pkg/providers/datastream/testdata/TestResourceStream/email_ids/empty_email_ids.tf index 9f4c3a4c2..7a9a62325 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/email_ids/empty_email_ids.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/email_ids/empty_email_ids.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/email_ids/no_email_ids.tf b/pkg/providers/datastream/testdata/TestResourceStream/email_ids/no_email_ids.tf index 2164d9244..07708f554 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/email_ids/no_email_ids.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/email_ids/no_email_ids.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/email_ids/one_email.tf b/pkg/providers/datastream/testdata/TestResourceStream/email_ids/one_email.tf index 6f5fc9d47..81df9426d 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/email_ids/one_email.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/email_ids/one_email.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/email_ids/two_emails.tf b/pkg/providers/datastream/testdata/TestResourceStream/email_ids/two_emails.tf index 839db9eb3..72b27b1bc 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/email_ids/two_emails.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/email_ids/two_emails.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/errors/internal_server_error/internal_server_error.tf b/pkg/providers/datastream/testdata/TestResourceStream/errors/internal_server_error/internal_server_error.tf index d3a9267e3..e8974b407 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/errors/internal_server_error/internal_server_error.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/errors/internal_server_error/internal_server_error.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/errors/invalid_email/invalid_email.tf b/pkg/providers/datastream/testdata/TestResourceStream/errors/invalid_email/invalid_email.tf index 27c18e07b..ceb28407d 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/errors/invalid_email/invalid_email.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/errors/invalid_email/invalid_email.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/errors/missing_required_argument/missing_required_argument.tf b/pkg/providers/datastream/testdata/TestResourceStream/errors/missing_required_argument/missing_required_argument.tf index aca71b0db..22e82c8d0 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/errors/missing_required_argument/missing_required_argument.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/errors/missing_required_argument/missing_required_argument.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/errors/stream_name_not_unique/stream_name_not_unique.tf b/pkg/providers/datastream/testdata/TestResourceStream/errors/stream_name_not_unique/stream_name_not_unique.tf index d3a9267e3..e8974b407 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/errors/stream_name_not_unique/stream_name_not_unique.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/errors/stream_name_not_unique/stream_name_not_unique.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/lifecycle/create_stream.tf b/pkg/providers/datastream/testdata/TestResourceStream/lifecycle/create_stream.tf index d49757bfa..6daf3eba2 100755 --- a/pkg/providers/datastream/testdata/TestResourceStream/lifecycle/create_stream.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/lifecycle/create_stream.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/lifecycle/update_stream.tf b/pkg/providers/datastream/testdata/TestResourceStream/lifecycle/update_stream.tf index 5262b533f..af7cc5660 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/lifecycle/update_stream.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/lifecycle/update_stream.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/mtls/mtls_elasticsearch.tf b/pkg/providers/datastream/testdata/TestResourceStream/mtls/mtls_elasticsearch.tf index edf37f5c0..d4f11be1b 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/mtls/mtls_elasticsearch.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/mtls/mtls_elasticsearch.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/mtls/mtls_https.tf b/pkg/providers/datastream/testdata/TestResourceStream/mtls/mtls_https.tf index c0c0f6ed0..0bacab822 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/mtls/mtls_https.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/mtls/mtls_https.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/mtls/mtls_splunk.tf b/pkg/providers/datastream/testdata/TestResourceStream/mtls/mtls_splunk.tf index 802374dd7..6093425ff 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/mtls/mtls_splunk.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/mtls/mtls_splunk.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/update_resource/create_stream_active.tf b/pkg/providers/datastream/testdata/TestResourceStream/update_resource/create_stream_active.tf index c20bd2b5f..e5e526f10 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/update_resource/create_stream_active.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/update_resource/create_stream_active.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/update_resource/create_stream_inactive.tf b/pkg/providers/datastream/testdata/TestResourceStream/update_resource/create_stream_inactive.tf index 82b72c636..f44092a16 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/update_resource/create_stream_inactive.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/update_resource/create_stream_inactive.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/update_resource/update_stream_active.tf b/pkg/providers/datastream/testdata/TestResourceStream/update_resource/update_stream_active.tf index c20bd2b5f..e5e526f10 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/update_resource/update_stream_active.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/update_resource/update_stream_active.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/update_resource/update_stream_inactive.tf b/pkg/providers/datastream/testdata/TestResourceStream/update_resource/update_stream_inactive.tf index 82b72c636..f44092a16 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/update_resource/update_stream_inactive.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/update_resource/update_stream_inactive.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/adding_fields/create_stream.tf b/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/adding_fields/create_stream.tf index bd0ff93e5..f02fac593 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/adding_fields/create_stream.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/adding_fields/create_stream.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/adding_fields/update_stream.tf b/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/adding_fields/update_stream.tf index 5290ab6d4..46bd36a63 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/adding_fields/update_stream.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/adding_fields/update_stream.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/change_connector/create_stream.tf b/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/change_connector/create_stream.tf index 0c537f6e6..c8d6bf2cd 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/change_connector/create_stream.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/change_connector/create_stream.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/change_connector/update_stream.tf b/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/change_connector/update_stream.tf index 8d46e9bdb..ecd0bd1f5 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/change_connector/update_stream.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/change_connector/update_stream.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/idempotency/create_stream.tf b/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/idempotency/create_stream.tf index 1f6c727e8..32978323a 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/idempotency/create_stream.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/idempotency/create_stream.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/idempotency/update_stream.tf b/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/idempotency/update_stream.tf index 8518c4a5d..b9f562fd3 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/idempotency/update_stream.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/idempotency/update_stream.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/update_endpoint_field/create_stream.tf b/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/update_endpoint_field/create_stream.tf index 8518c4a5d..b9f562fd3 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/update_endpoint_field/create_stream.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/update_endpoint_field/create_stream.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/update_endpoint_field/update_stream.tf b/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/update_endpoint_field/update_stream.tf index 4e3a5ebda..14745f3bc 100644 --- a/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/update_endpoint_field/update_stream.tf +++ b/pkg/providers/datastream/testdata/TestResourceStream/urlSuppressor/update_endpoint_field/update_stream.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_datastream" "s" { diff --git a/pkg/providers/dns/testdata/TestDataDnsRecordSet/basic.tf b/pkg/providers/dns/testdata/TestDataDnsRecordSet/basic.tf index 8577121a3..26fcddde9 100644 --- a/pkg/providers/dns/testdata/TestDataDnsRecordSet/basic.tf +++ b/pkg/providers/dns/testdata/TestDataDnsRecordSet/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_dns_record_set" "test" { diff --git a/pkg/providers/dns/testdata/TestDataSetAuthorities/basic.tf b/pkg/providers/dns/testdata/TestDataSetAuthorities/basic.tf index 62ae844c3..e916329f0 100644 --- a/pkg/providers/dns/testdata/TestDataSetAuthorities/basic.tf +++ b/pkg/providers/dns/testdata/TestDataSetAuthorities/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_authorities_set" "test" { diff --git a/pkg/providers/dns/testdata/TestDataSetAuthorities/missing_contract.tf b/pkg/providers/dns/testdata/TestDataSetAuthorities/missing_contract.tf index b90725db7..c933149f9 100644 --- a/pkg/providers/dns/testdata/TestDataSetAuthorities/missing_contract.tf +++ b/pkg/providers/dns/testdata/TestDataSetAuthorities/missing_contract.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_authorities_set" "test" { diff --git a/pkg/providers/dns/testdata/TestResDnsRecord/create_basic.tf b/pkg/providers/dns/testdata/TestResDnsRecord/create_basic.tf index a23c51091..089414244 100644 --- a/pkg/providers/dns/testdata/TestResDnsRecord/create_basic.tf +++ b/pkg/providers/dns/testdata/TestResDnsRecord/create_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_dns_record" "a_record" { diff --git a/pkg/providers/dns/testdata/TestResDnsRecord/create_basic_txt.tf b/pkg/providers/dns/testdata/TestResDnsRecord/create_basic_txt.tf index 68cf2d550..aec1ca1fc 100644 --- a/pkg/providers/dns/testdata/TestResDnsRecord/create_basic_txt.tf +++ b/pkg/providers/dns/testdata/TestResDnsRecord/create_basic_txt.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_dns_record" "txt_record" { diff --git a/pkg/providers/dns/testdata/TestResDnsRecord/update_basic.tf b/pkg/providers/dns/testdata/TestResDnsRecord/update_basic.tf index dd8401c96..a8d448d96 100644 --- a/pkg/providers/dns/testdata/TestResDnsRecord/update_basic.tf +++ b/pkg/providers/dns/testdata/TestResDnsRecord/update_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_dns_record" "a_record" { diff --git a/pkg/providers/dns/testdata/TestResDnsZone/create_primary.tf b/pkg/providers/dns/testdata/TestResDnsZone/create_primary.tf index 52c1f466b..bcfb77036 100644 --- a/pkg/providers/dns/testdata/TestResDnsZone/create_primary.tf +++ b/pkg/providers/dns/testdata/TestResDnsZone/create_primary.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_dns_zone" "primary_test_zone" { diff --git a/pkg/providers/dns/testdata/TestResDnsZone/update_primary.tf b/pkg/providers/dns/testdata/TestResDnsZone/update_primary.tf index 9f6808c0f..938a6632b 100644 --- a/pkg/providers/dns/testdata/TestResDnsZone/update_primary.tf +++ b/pkg/providers/dns/testdata/TestResDnsZone/update_primary.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_dns_zone" "primary_test_zone" { diff --git a/pkg/providers/edgeworkers/data_akamai_edgekv_group_items_test.go b/pkg/providers/edgeworkers/data_akamai_edgekv_group_items_test.go index c0ec232f4..b1503eec3 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgekv_group_items_test.go +++ b/pkg/providers/edgeworkers/data_akamai_edgekv_group_items_test.go @@ -6,14 +6,13 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) func TestEdgeKVGroupItems(t *testing.T) { client := &edgeworkers.Mock{} - client.Test(test.TattleT{T: t}) + client.Test(testutils.TattleT{T: t}) items := map[string]string{ "TestItem1": "TestValue1", @@ -40,7 +39,7 @@ func TestEdgeKVGroupItems(t *testing.T) { IsUnitTest: true, Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataEdgeKVGroupItems/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataEdgeKVGroupItems/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttrSet("data.akamai_edgekv_group_items.test", "id"), resource.TestCheckResourceAttr("data.akamai_edgekv_group_items.test", "id", "test_namespace:staging:TestGroup"), @@ -64,7 +63,7 @@ func TestEdgeKVGroupItems(t *testing.T) { IsUnitTest: true, Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataEdgeKVGroupItems/missed_namespace_name.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataEdgeKVGroupItems/missed_namespace_name.tf"), ExpectError: regexp.MustCompile(`The argument "namespace_name" is required, but no definition was found.`), }, }, @@ -81,7 +80,7 @@ func TestEdgeKVGroupItems(t *testing.T) { IsUnitTest: true, Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataEdgeKVGroupItems/missed_network.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataEdgeKVGroupItems/missed_network.tf"), ExpectError: regexp.MustCompile(`The argument "network" is required, but no definition was found.`), }, }, @@ -98,7 +97,7 @@ func TestEdgeKVGroupItems(t *testing.T) { IsUnitTest: true, Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataEdgeKVGroupItems/missed_group.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataEdgeKVGroupItems/missed_group.tf"), ExpectError: regexp.MustCompile(`The argument "group_name" is required, but no definition was found.`), }, }, @@ -115,7 +114,7 @@ func TestEdgeKVGroupItems(t *testing.T) { IsUnitTest: true, Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataEdgeKVGroupItems/incorrect_network.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataEdgeKVGroupItems/incorrect_network.tf"), ExpectError: regexp.MustCompile(`expected network to be one of \[staging production], got incorrect_network`), }, }, diff --git a/pkg/providers/edgeworkers/data_akamai_edgekv_groups_test.go b/pkg/providers/edgeworkers/data_akamai_edgekv_groups_test.go index 144ca688a..0647b13b1 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgekv_groups_test.go +++ b/pkg/providers/edgeworkers/data_akamai_edgekv_groups_test.go @@ -6,14 +6,13 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) func TestEdgeKVGroups(t *testing.T) { client := &edgeworkers.Mock{} - client.Test(test.TattleT{T: t}) + client.Test(testutils.TattleT{T: t}) t.Run("happy path", func(t *testing.T) { client.On("ListGroupsWithinNamespace", mock.Anything, edgeworkers.ListGroupsWithinNamespaceRequest{ @@ -26,7 +25,7 @@ func TestEdgeKVGroups(t *testing.T) { IsUnitTest: true, Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataEdgeKVNamespaceGroups/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataEdgeKVNamespaceGroups/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttrSet("data.akamai_edgekv_groups.test", "id"), resource.TestCheckResourceAttr("data.akamai_edgekv_groups.test", "id", "test_namespace:staging"), @@ -52,7 +51,7 @@ func TestEdgeKVGroups(t *testing.T) { IsUnitTest: true, Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataEdgeKVNamespaceGroups/missed_namespace_name.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataEdgeKVNamespaceGroups/missed_namespace_name.tf"), ExpectError: regexp.MustCompile(`The argument "namespace_name" is required, but no definition was found.`), }, }, @@ -69,7 +68,7 @@ func TestEdgeKVGroups(t *testing.T) { IsUnitTest: true, Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataEdgeKVNamespaceGroups/missed_network.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataEdgeKVNamespaceGroups/missed_network.tf"), ExpectError: regexp.MustCompile(`The argument "network" is required, but no definition was found.`), }, }, @@ -86,7 +85,7 @@ func TestEdgeKVGroups(t *testing.T) { IsUnitTest: true, Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataEdgeKVNamespaceGroups/incorrect_network.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataEdgeKVNamespaceGroups/incorrect_network.tf"), ExpectError: regexp.MustCompile("expected network to be one of \\[staging production], got incorrect_network"), }, }, diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeKVGroupItems/basic.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeKVGroupItems/basic.tf index d9037e250..79f536519 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeKVGroupItems/basic.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeKVGroupItems/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgekv_group_items" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeKVGroupItems/incorrect_network.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeKVGroupItems/incorrect_network.tf index 44b503d10..e66d18001 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeKVGroupItems/incorrect_network.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeKVGroupItems/incorrect_network.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgekv_group_items" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeKVGroupItems/missed_group.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeKVGroupItems/missed_group.tf index 10a8b522f..c551b29e6 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeKVGroupItems/missed_group.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeKVGroupItems/missed_group.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgekv_group_items" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeKVGroupItems/missed_namespace_name.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeKVGroupItems/missed_namespace_name.tf index 3c49a6001..11a8cdd2e 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeKVGroupItems/missed_namespace_name.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeKVGroupItems/missed_namespace_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgekv_group_items" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeKVGroupItems/missed_network.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeKVGroupItems/missed_network.tf index 1cd2ee89a..9c55b5e84 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeKVGroupItems/missed_network.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeKVGroupItems/missed_network.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgekv_group_items" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeKVNamespaceGroups/basic.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeKVNamespaceGroups/basic.tf index 5a76d8cb4..fe49cd7b0 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeKVNamespaceGroups/basic.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeKVNamespaceGroups/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgekv_groups" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeKVNamespaceGroups/incorrect_network.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeKVNamespaceGroups/incorrect_network.tf index 6aafbfd67..0fef7de4f 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeKVNamespaceGroups/incorrect_network.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeKVNamespaceGroups/incorrect_network.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgekv_groups" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeKVNamespaceGroups/missed_namespace_name.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeKVNamespaceGroups/missed_namespace_name.tf index f84e43864..92f1ab5e7 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeKVNamespaceGroups/missed_namespace_name.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeKVNamespaceGroups/missed_namespace_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgekv_groups" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeKVNamespaceGroups/missed_network.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeKVNamespaceGroups/missed_network.tf index 1ffe3bf02..4f77abd7a 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeKVNamespaceGroups/missed_network.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeKVNamespaceGroups/missed_network.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgekv_groups" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersActivation/no_activations.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersActivation/no_activations.tf index 818fb6430..cada5384c 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersActivation/no_activations.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersActivation/no_activations.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgeworker_activation" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersActivation/no_edgeworker_id.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersActivation/no_edgeworker_id.tf index 1f9435a3a..4d162ad01 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersActivation/no_edgeworker_id.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersActivation/no_edgeworker_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgeworker_activation" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersActivation/no_network.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersActivation/no_network.tf index 08832b474..e3c55e3db 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersActivation/no_network.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersActivation/no_network.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgeworker_activation" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersActivation/one_activation.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersActivation/one_activation.tf index acea24b10..9609d80de 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersActivation/one_activation.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersActivation/one_activation.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgeworker_activation" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersActivation/three_activations.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersActivation/three_activations.tf index af217f351..1710179c6 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersActivation/three_activations.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersActivation/three_activations.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgeworker_activation" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersActivation/wrong_status.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersActivation/wrong_status.tf index 1d81c5033..c0c7053d3 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersActivation/wrong_status.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersActivation/wrong_status.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgeworker_activation" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_no_edgeworker_id.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_no_edgeworker_id.tf index 259ddc5b6..ddcba3e24 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_no_edgeworker_id.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_no_edgeworker_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgeworker" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_no_local_bundle.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_no_local_bundle.tf index abc1493d6..57d93bd35 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_no_local_bundle.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_no_local_bundle.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgeworker" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_no_versions.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_no_versions.tf index f7850432e..45f155553 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_no_versions.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_no_versions.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgeworker" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_one_version.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_one_version.tf index 90a4d4f98..f03f7004e 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_one_version.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_one_version.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgeworker" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_one_warning.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_one_warning.tf index 9ee5115be..00750f396 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_one_warning.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_one_warning.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgeworker" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_three_warnings.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_three_warnings.tf index d0badd65c..4a03b90ee 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_three_warnings.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_three_warnings.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgeworker" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_two_versions.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_two_versions.tf index b1cf34c83..a918f0b99 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_two_versions.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersEdgeWorker/edgeworker_two_versions.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgeworker" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersPropertyRules/basic.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersPropertyRules/basic.tf index eade3df87..bb206bb5d 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersPropertyRules/basic.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersPropertyRules/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgeworkers_property_rules" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/basic.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/basic.tf index 257020d87..5ebf87818 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/basic.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgeworkers_resource_tier" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/ctr_prefix.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/ctr_prefix.tf index cca069ace..64e591858 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/ctr_prefix.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/ctr_prefix.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgeworkers_resource_tier" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/incorrect_resource_tier_name.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/incorrect_resource_tier_name.tf index 79d0a6cb2..8c82d4170 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/incorrect_resource_tier_name.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/incorrect_resource_tier_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgeworkers_resource_tier" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/missing_contract_id.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/missing_contract_id.tf index fb2b22357..b67c65cad 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/missing_contract_id.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/missing_contract_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgeworkers_resource_tier" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/missing_resource_tier_name.tf b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/missing_resource_tier_name.tf index e2efeafbb..4d456ff1b 100644 --- a/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/missing_resource_tier_name.tf +++ b/pkg/providers/edgeworkers/testdata/TestDataEdgeWorkersResourceTier/missing_resource_tier_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_edgeworkers_resource_tier" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_create.tf b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_create.tf index d891a1d6d..2383cc1af 100644 --- a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_create.tf +++ b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgeworker" "edgeworker" { diff --git a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_create_with_timeout.tf b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_create_with_timeout.tf index 511b6c6c3..c4c3a2656 100644 --- a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_create_with_timeout.tf +++ b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_create_with_timeout.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgeworker" "edgeworker" { diff --git a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_no_bundle.tf b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_no_bundle.tf index fa4b67157..cea32fceb 100644 --- a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_no_bundle.tf +++ b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_no_bundle.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgeworker" "edgeworker" { diff --git a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_temp_bundle.tf b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_temp_bundle.tf index cf9dd7695..fb3a70677 100644 --- a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_temp_bundle.tf +++ b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_temp_bundle.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgeworker" "edgeworker" { diff --git a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_group_id.tf b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_group_id.tf index f658de41f..923940ce2 100644 --- a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_group_id.tf +++ b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_group_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgeworker" "edgeworker" { diff --git a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_group_id_prefix.tf b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_group_id_prefix.tf index 9b658663a..e6d4a5275 100644 --- a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_group_id_prefix.tf +++ b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_group_id_prefix.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgeworker" "edgeworker" { diff --git a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_local_bundle.tf b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_local_bundle.tf index 8504b50df..bf02000a4 100644 --- a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_local_bundle.tf +++ b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_local_bundle.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgeworker" "edgeworker" { diff --git a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_name.tf b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_name.tf index b501a9ee3..6efd10af4 100644 --- a/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_name.tf +++ b/pkg/providers/edgeworkers/testdata/TestResEdgeWorkersEdgeWorker/edgeworker_lifecycle/edgeworker_update_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgeworker" "edgeworker" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/basic_2_items.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/basic_2_items.tf index ff8ce6f10..ef48a3d9d 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/basic_2_items.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/basic_2_items.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgekv_group_items" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/basic_3_items.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/basic_3_items.tf index 62ad15346..6b15daee3 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/basic_3_items.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/basic_3_items.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgekv_group_items" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/empty_items.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/empty_items.tf index 5d9f94999..a49a1b74a 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/empty_items.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/empty_items.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgekv_group_items" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/no_group.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/no_group.tf index 795978158..11f421a5c 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/no_group.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/no_group.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgekv_group_items" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/no_items.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/no_items.tf index 4a4724e64..a46f7682b 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/no_items.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/no_items.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgekv_group_items" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/no_namespace.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/no_namespace.tf index ad98dc7b4..8dab2c52e 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/no_namespace.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/no_namespace.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgekv_group_items" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/no_network.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/no_network.tf index 3a975b22c..1c67f4ef5 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/no_network.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/no_network.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgekv_group_items" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/with_timeout.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/with_timeout.tf index b848be0c9..372fd4143 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/with_timeout.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/create/with_timeout.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgekv_group_items" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/add_1_item.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/add_1_item.tf index 62ad15346..6b15daee3 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/add_1_item.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/add_1_item.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgekv_group_items" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/add_remove_upsert_items.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/add_remove_upsert_items.tf index 5b56aae7f..c9eaa9672 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/add_remove_upsert_items.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/add_remove_upsert_items.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgekv_group_items" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/basic_upsert_key.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/basic_upsert_key.tf index 6d855c26b..5e99a878e 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/basic_upsert_key.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/basic_upsert_key.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgekv_group_items" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/change_all_keys.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/change_all_keys.tf index 4712d469f..47e619ef5 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/change_all_keys.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/change_all_keys.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgekv_group_items" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/changed_order.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/changed_order.tf index 6fd60ab9f..981e314f9 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/changed_order.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/changed_order.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgekv_group_items" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/check_counting_logic.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/check_counting_logic.tf index 1188cf460..dbfa55568 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/check_counting_logic.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/check_counting_logic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgekv_group_items" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/remove_1_item.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/remove_1_item.tf index 3b1d8c6e6..ce81c02b0 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/remove_1_item.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/remove_1_item.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgekv_group_items" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/remove_1_item_of_3.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/remove_1_item_of_3.tf index be436eda8..b121dfc2b 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/remove_1_item_of_3.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/remove_1_item_of_3.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgekv_group_items" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/remove_2_items.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/remove_2_items.tf index 5d9f94999..a49a1b74a 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/remove_2_items.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/remove_2_items.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgekv_group_items" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/remove_fail.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/remove_fail.tf index 9ce06f6c8..7cef792c3 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/remove_fail.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/remove_fail.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgekv_group_items" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/upsert_1_item.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/upsert_1_item.tf index fd77ccdd0..a93f6ea40 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/upsert_1_item.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeKVGroupItems/update/upsert_1_item.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgekv_group_items" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_different_edgeworker_id.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_different_edgeworker_id.tf index ae808d429..eb52d7b65 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_different_edgeworker_id.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_different_edgeworker_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgeworkers_activation" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_import.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_import.tf index 284069251..81e68879c 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_import.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_import.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgeworkers_activation" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_missing_required_args.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_missing_required_args.tf index 2c00c0949..514c981eb 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_missing_required_args.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_missing_required_args.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgeworkers_activation" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test1_stag.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test1_stag.tf index bd2b73d76..eb0b7b54e 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test1_stag.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test1_stag.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgeworkers_activation" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test_prod.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test_prod.tf index bbc4a1428..ae599cfe1 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test_prod.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test_prod.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgeworkers_activation" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test_stag.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test_stag.tf index ed6c5320e..d9f6288ac 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test_stag.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test_stag.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgeworkers_activation" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test_with_timeout.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test_with_timeout.tf index f82b57a92..012ff8ac3 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test_with_timeout.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_version_test_with_timeout.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgeworkers_activation" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/basic.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/basic.tf index 88e7546ed..d165a5866 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/basic.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgekv" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/basic_retention_0.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/basic_retention_0.tf index d6e791d18..36396c67f 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/basic_retention_0.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/basic_retention_0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgekv" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/ekv_with_data.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/ekv_with_data.tf index b9ee1ac48..94ed97d97 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/ekv_with_data.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/ekv_with_data.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgekv" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/import.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/import.tf index 09aa40954..f8a1211d2 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/import.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/import.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgekv" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/update_data.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/update_data.tf index a63e0cf8e..4d2b2d33b 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/update_data.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/update_data.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgekv" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/update_diff_group_id.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/update_diff_group_id.tf index 12345c842..f3abce356 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/update_diff_group_id.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/update_diff_group_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgekv" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/update_retention.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/update_retention.tf index 9ff96ce7a..8e8d3b192 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/update_retention.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersEdgeKV/update_retention.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgekv" "test" { diff --git a/pkg/providers/gtm/testdata/TestDataDefaultDatacenter/basic.tf b/pkg/providers/gtm/testdata/TestDataDefaultDatacenter/basic.tf index cfe1641f2..9950f0697 100644 --- a/pkg/providers/gtm/testdata/TestDataDefaultDatacenter/basic.tf +++ b/pkg/providers/gtm/testdata/TestDataDefaultDatacenter/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_gtm_default_datacenter" "test" { diff --git a/pkg/providers/gtm/testdata/TestDataGTMDatacenter/default.tf b/pkg/providers/gtm/testdata/TestDataGTMDatacenter/default.tf index 731fbdfbd..8d4737529 100644 --- a/pkg/providers/gtm/testdata/TestDataGTMDatacenter/default.tf +++ b/pkg/providers/gtm/testdata/TestDataGTMDatacenter/default.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_gtm_datacenter" "test" { diff --git a/pkg/providers/gtm/testdata/TestDataGTMDatacenter/no_datacenter_id.tf b/pkg/providers/gtm/testdata/TestDataGTMDatacenter/no_datacenter_id.tf index 1fabb59db..a36a10b3f 100644 --- a/pkg/providers/gtm/testdata/TestDataGTMDatacenter/no_datacenter_id.tf +++ b/pkg/providers/gtm/testdata/TestDataGTMDatacenter/no_datacenter_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_gtm_datacenter" "test" { diff --git a/pkg/providers/gtm/testdata/TestDataGTMDatacenter/no_domain.tf b/pkg/providers/gtm/testdata/TestDataGTMDatacenter/no_domain.tf index 5bc0b391d..e5f394256 100644 --- a/pkg/providers/gtm/testdata/TestDataGTMDatacenter/no_domain.tf +++ b/pkg/providers/gtm/testdata/TestDataGTMDatacenter/no_domain.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_gtm_datacenter" "test" { diff --git a/pkg/providers/gtm/testdata/TestDataGTMDatacenters/default.tf b/pkg/providers/gtm/testdata/TestDataGTMDatacenters/default.tf index 4f871c849..50ca5e3e3 100644 --- a/pkg/providers/gtm/testdata/TestDataGTMDatacenters/default.tf +++ b/pkg/providers/gtm/testdata/TestDataGTMDatacenters/default.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_gtm_datacenters" "test" { diff --git a/pkg/providers/gtm/testdata/TestDataGTMDatacenters/no_domain.tf b/pkg/providers/gtm/testdata/TestDataGTMDatacenters/no_domain.tf index 306dc261d..6151a06d9 100644 --- a/pkg/providers/gtm/testdata/TestDataGTMDatacenters/no_domain.tf +++ b/pkg/providers/gtm/testdata/TestDataGTMDatacenters/no_domain.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_gtm_datacenters" "test" { diff --git a/pkg/providers/gtm/testdata/TestResGtmAsmap/create_basic.tf b/pkg/providers/gtm/testdata/TestResGtmAsmap/create_basic.tf index 38c293593..1a30fe2ba 100644 --- a/pkg/providers/gtm/testdata/TestResGtmAsmap/create_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmAsmap/create_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmAsmap/import_basic.tf b/pkg/providers/gtm/testdata/TestResGtmAsmap/import_basic.tf index e526ecf7f..6444ed554 100644 --- a/pkg/providers/gtm/testdata/TestResGtmAsmap/import_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmAsmap/import_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmAsmap/order/as_numbers/reorder.tf b/pkg/providers/gtm/testdata/TestResGtmAsmap/order/as_numbers/reorder.tf index 608eca749..6d51b899e 100644 --- a/pkg/providers/gtm/testdata/TestResGtmAsmap/order/as_numbers/reorder.tf +++ b/pkg/providers/gtm/testdata/TestResGtmAsmap/order/as_numbers/reorder.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmAsmap/order/as_numbers/reorder_and_update.tf b/pkg/providers/gtm/testdata/TestResGtmAsmap/order/as_numbers/reorder_and_update.tf index 793a34b65..be06ceed3 100644 --- a/pkg/providers/gtm/testdata/TestResGtmAsmap/order/as_numbers/reorder_and_update.tf +++ b/pkg/providers/gtm/testdata/TestResGtmAsmap/order/as_numbers/reorder_and_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmAsmap/order/assignments/reorder.tf b/pkg/providers/gtm/testdata/TestResGtmAsmap/order/assignments/reorder.tf index 4c1945bcc..f29b41004 100644 --- a/pkg/providers/gtm/testdata/TestResGtmAsmap/order/assignments/reorder.tf +++ b/pkg/providers/gtm/testdata/TestResGtmAsmap/order/assignments/reorder.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmAsmap/order/assignments/reorder_and_update_as_numbers.tf b/pkg/providers/gtm/testdata/TestResGtmAsmap/order/assignments/reorder_and_update_as_numbers.tf index 00ac45448..bb38f363a 100644 --- a/pkg/providers/gtm/testdata/TestResGtmAsmap/order/assignments/reorder_and_update_as_numbers.tf +++ b/pkg/providers/gtm/testdata/TestResGtmAsmap/order/assignments/reorder_and_update_as_numbers.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmAsmap/order/assignments/reorder_and_update_nickname.tf b/pkg/providers/gtm/testdata/TestResGtmAsmap/order/assignments/reorder_and_update_nickname.tf index 32ffe42f6..956c1d008 100644 --- a/pkg/providers/gtm/testdata/TestResGtmAsmap/order/assignments/reorder_and_update_nickname.tf +++ b/pkg/providers/gtm/testdata/TestResGtmAsmap/order/assignments/reorder_and_update_nickname.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmAsmap/order/create.tf b/pkg/providers/gtm/testdata/TestResGtmAsmap/order/create.tf index b2b7c8f91..a1e8d1cf2 100644 --- a/pkg/providers/gtm/testdata/TestResGtmAsmap/order/create.tf +++ b/pkg/providers/gtm/testdata/TestResGtmAsmap/order/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmAsmap/order/reorder_assignments_as_numbers.tf b/pkg/providers/gtm/testdata/TestResGtmAsmap/order/reorder_assignments_as_numbers.tf index 95ebf94b5..aa2bb5a94 100644 --- a/pkg/providers/gtm/testdata/TestResGtmAsmap/order/reorder_assignments_as_numbers.tf +++ b/pkg/providers/gtm/testdata/TestResGtmAsmap/order/reorder_assignments_as_numbers.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmAsmap/order/update_domain.tf b/pkg/providers/gtm/testdata/TestResGtmAsmap/order/update_domain.tf index a48cb1f12..e40f2a60b 100644 --- a/pkg/providers/gtm/testdata/TestResGtmAsmap/order/update_domain.tf +++ b/pkg/providers/gtm/testdata/TestResGtmAsmap/order/update_domain.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmAsmap/order/update_name.tf b/pkg/providers/gtm/testdata/TestResGtmAsmap/order/update_name.tf index 7568979d2..dcba4881a 100644 --- a/pkg/providers/gtm/testdata/TestResGtmAsmap/order/update_name.tf +++ b/pkg/providers/gtm/testdata/TestResGtmAsmap/order/update_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmAsmap/order/update_wait_on_complete.tf b/pkg/providers/gtm/testdata/TestResGtmAsmap/order/update_wait_on_complete.tf index 0ae237e3f..3858e74c6 100644 --- a/pkg/providers/gtm/testdata/TestResGtmAsmap/order/update_wait_on_complete.tf +++ b/pkg/providers/gtm/testdata/TestResGtmAsmap/order/update_wait_on_complete.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmAsmap/update_basic.tf b/pkg/providers/gtm/testdata/TestResGtmAsmap/update_basic.tf index c2beb3bed..12897470a 100644 --- a/pkg/providers/gtm/testdata/TestResGtmAsmap/update_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmAsmap/update_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmCidrmap/create_basic.tf b/pkg/providers/gtm/testdata/TestResGtmCidrmap/create_basic.tf index 127016210..f2bb98b29 100644 --- a/pkg/providers/gtm/testdata/TestResGtmCidrmap/create_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmCidrmap/create_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/assignments/reorder.tf b/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/assignments/reorder.tf index 753461bfc..681e7c3b6 100644 --- a/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/assignments/reorder.tf +++ b/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/assignments/reorder.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/assignments/reorder_and_update_block.tf b/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/assignments/reorder_and_update_block.tf index 6fd9cbcf1..99a2374bd 100644 --- a/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/assignments/reorder_and_update_block.tf +++ b/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/assignments/reorder_and_update_block.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/assignments/reorder_and_update_nickname.tf b/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/assignments/reorder_and_update_nickname.tf index 06efb72b3..31dcac237 100644 --- a/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/assignments/reorder_and_update_nickname.tf +++ b/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/assignments/reorder_and_update_nickname.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/blocks/reorder.tf b/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/blocks/reorder.tf index 366374762..fca359bac 100644 --- a/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/blocks/reorder.tf +++ b/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/blocks/reorder.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/blocks/reorder_and_update.tf b/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/blocks/reorder_and_update.tf index c8cde1acd..ebbcf839e 100644 --- a/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/blocks/reorder_and_update.tf +++ b/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/blocks/reorder_and_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/create.tf b/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/create.tf index 682beb614..369c4d87c 100644 --- a/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/create.tf +++ b/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/reorder_assignments_and_blocks.tf b/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/reorder_assignments_and_blocks.tf index 53c5b1603..6bc664650 100644 --- a/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/reorder_assignments_and_blocks.tf +++ b/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/reorder_assignments_and_blocks.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/update_domain.tf b/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/update_domain.tf index 44d99edaf..79b246122 100644 --- a/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/update_domain.tf +++ b/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/update_domain.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/update_name.tf b/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/update_name.tf index 26922179a..1f5063879 100644 --- a/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/update_name.tf +++ b/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/update_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/update_wait_on_complete.tf b/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/update_wait_on_complete.tf index 188a495ea..37b958e36 100644 --- a/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/update_wait_on_complete.tf +++ b/pkg/providers/gtm/testdata/TestResGtmCidrmap/order/update_wait_on_complete.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmCidrmap/update_basic.tf b/pkg/providers/gtm/testdata/TestResGtmCidrmap/update_basic.tf index 2a1ebdca4..43fea87e8 100644 --- a/pkg/providers/gtm/testdata/TestResGtmCidrmap/update_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmCidrmap/update_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmDatacenter/create_basic.tf b/pkg/providers/gtm/testdata/TestResGtmDatacenter/create_basic.tf index f85a18ecc..a12de3e20 100644 --- a/pkg/providers/gtm/testdata/TestResGtmDatacenter/create_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmDatacenter/create_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmDatacenter/update_basic.tf b/pkg/providers/gtm/testdata/TestResGtmDatacenter/update_basic.tf index 4453f2200..cd5d136bd 100644 --- a/pkg/providers/gtm/testdata/TestResGtmDatacenter/update_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmDatacenter/update_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmDomain/create_basic.tf b/pkg/providers/gtm/testdata/TestResGtmDomain/create_basic.tf index 44fdadf20..c9058f31a 100644 --- a/pkg/providers/gtm/testdata/TestResGtmDomain/create_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmDomain/create_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_gtm_domain" "testdomain" { diff --git a/pkg/providers/gtm/testdata/TestResGtmDomain/order/email_notification_list/create.tf b/pkg/providers/gtm/testdata/TestResGtmDomain/order/email_notification_list/create.tf index f0373a079..4d467beac 100644 --- a/pkg/providers/gtm/testdata/TestResGtmDomain/order/email_notification_list/create.tf +++ b/pkg/providers/gtm/testdata/TestResGtmDomain/order/email_notification_list/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_gtm_domain" "testdomain" { diff --git a/pkg/providers/gtm/testdata/TestResGtmDomain/order/email_notification_list/reorder.tf b/pkg/providers/gtm/testdata/TestResGtmDomain/order/email_notification_list/reorder.tf index d92f76180..2382e5b3e 100644 --- a/pkg/providers/gtm/testdata/TestResGtmDomain/order/email_notification_list/reorder.tf +++ b/pkg/providers/gtm/testdata/TestResGtmDomain/order/email_notification_list/reorder.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_gtm_domain" "testdomain" { diff --git a/pkg/providers/gtm/testdata/TestResGtmDomain/order/email_notification_list/reorder_and_update_comment.tf b/pkg/providers/gtm/testdata/TestResGtmDomain/order/email_notification_list/reorder_and_update_comment.tf index 64b82e3cc..a3145453c 100644 --- a/pkg/providers/gtm/testdata/TestResGtmDomain/order/email_notification_list/reorder_and_update_comment.tf +++ b/pkg/providers/gtm/testdata/TestResGtmDomain/order/email_notification_list/reorder_and_update_comment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_gtm_domain" "testdomain" { diff --git a/pkg/providers/gtm/testdata/TestResGtmDomain/update_basic.tf b/pkg/providers/gtm/testdata/TestResGtmDomain/update_basic.tf index 49a167fac..4f6d71ed9 100644 --- a/pkg/providers/gtm/testdata/TestResGtmDomain/update_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmDomain/update_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_gtm_domain" "testdomain" { diff --git a/pkg/providers/gtm/testdata/TestResGtmDomain/update_domain_name.tf b/pkg/providers/gtm/testdata/TestResGtmDomain/update_domain_name.tf index 4fc0fe1b0..63c384211 100644 --- a/pkg/providers/gtm/testdata/TestResGtmDomain/update_domain_name.tf +++ b/pkg/providers/gtm/testdata/TestResGtmDomain/update_domain_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_gtm_domain" "testdomain" { diff --git a/pkg/providers/gtm/testdata/TestResGtmGeomap/create_basic.tf b/pkg/providers/gtm/testdata/TestResGtmGeomap/create_basic.tf index c4f32ac24..170db2de8 100644 --- a/pkg/providers/gtm/testdata/TestResGtmGeomap/create_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmGeomap/create_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmGeomap/order/assignments/reorder.tf b/pkg/providers/gtm/testdata/TestResGtmGeomap/order/assignments/reorder.tf index 842b41194..3ef6fed0b 100644 --- a/pkg/providers/gtm/testdata/TestResGtmGeomap/order/assignments/reorder.tf +++ b/pkg/providers/gtm/testdata/TestResGtmGeomap/order/assignments/reorder.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmGeomap/order/assignments/reorder_and_update_countries.tf b/pkg/providers/gtm/testdata/TestResGtmGeomap/order/assignments/reorder_and_update_countries.tf index ab13e6cad..6bb77b35f 100644 --- a/pkg/providers/gtm/testdata/TestResGtmGeomap/order/assignments/reorder_and_update_countries.tf +++ b/pkg/providers/gtm/testdata/TestResGtmGeomap/order/assignments/reorder_and_update_countries.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmGeomap/order/assignments/reorder_and_update_nickname.tf b/pkg/providers/gtm/testdata/TestResGtmGeomap/order/assignments/reorder_and_update_nickname.tf index 9c442f1cd..10ee7a59f 100644 --- a/pkg/providers/gtm/testdata/TestResGtmGeomap/order/assignments/reorder_and_update_nickname.tf +++ b/pkg/providers/gtm/testdata/TestResGtmGeomap/order/assignments/reorder_and_update_nickname.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmGeomap/order/countries/reorder.tf b/pkg/providers/gtm/testdata/TestResGtmGeomap/order/countries/reorder.tf index 3d6470676..6b75803b0 100644 --- a/pkg/providers/gtm/testdata/TestResGtmGeomap/order/countries/reorder.tf +++ b/pkg/providers/gtm/testdata/TestResGtmGeomap/order/countries/reorder.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmGeomap/order/countries/reorder_and_update.tf b/pkg/providers/gtm/testdata/TestResGtmGeomap/order/countries/reorder_and_update.tf index bd4a2d2d0..1ebb16f39 100644 --- a/pkg/providers/gtm/testdata/TestResGtmGeomap/order/countries/reorder_and_update.tf +++ b/pkg/providers/gtm/testdata/TestResGtmGeomap/order/countries/reorder_and_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmGeomap/order/create.tf b/pkg/providers/gtm/testdata/TestResGtmGeomap/order/create.tf index 0e83777af..b11f7ff7a 100644 --- a/pkg/providers/gtm/testdata/TestResGtmGeomap/order/create.tf +++ b/pkg/providers/gtm/testdata/TestResGtmGeomap/order/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmGeomap/order/reorder_assignments_and_countries.tf b/pkg/providers/gtm/testdata/TestResGtmGeomap/order/reorder_assignments_and_countries.tf index d26d24433..c93ca1a81 100644 --- a/pkg/providers/gtm/testdata/TestResGtmGeomap/order/reorder_assignments_and_countries.tf +++ b/pkg/providers/gtm/testdata/TestResGtmGeomap/order/reorder_assignments_and_countries.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmGeomap/order/update_domain.tf b/pkg/providers/gtm/testdata/TestResGtmGeomap/order/update_domain.tf index bdcd6e1f5..3eb545f46 100644 --- a/pkg/providers/gtm/testdata/TestResGtmGeomap/order/update_domain.tf +++ b/pkg/providers/gtm/testdata/TestResGtmGeomap/order/update_domain.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmGeomap/order/update_name.tf b/pkg/providers/gtm/testdata/TestResGtmGeomap/order/update_name.tf index 5dc86b085..a031fff87 100644 --- a/pkg/providers/gtm/testdata/TestResGtmGeomap/order/update_name.tf +++ b/pkg/providers/gtm/testdata/TestResGtmGeomap/order/update_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmGeomap/order/update_wait_on_complete.tf b/pkg/providers/gtm/testdata/TestResGtmGeomap/order/update_wait_on_complete.tf index b7967bc70..c8ca2d9e4 100644 --- a/pkg/providers/gtm/testdata/TestResGtmGeomap/order/update_wait_on_complete.tf +++ b/pkg/providers/gtm/testdata/TestResGtmGeomap/order/update_wait_on_complete.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmGeomap/update_basic.tf b/pkg/providers/gtm/testdata/TestResGtmGeomap/update_basic.tf index 2a6e2cb69..f0d4c594d 100644 --- a/pkg/providers/gtm/testdata/TestResGtmGeomap/update_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmGeomap/update_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/create_basic.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/create_basic.tf index a4891ed85..a1dfcdb99 100644 --- a/pkg/providers/gtm/testdata/TestResGtmProperty/create_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/create_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/create_basic_without_datacenter_id.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/create_basic_without_datacenter_id.tf index 5d51bd950..ac3608f2c 100644 --- a/pkg/providers/gtm/testdata/TestResGtmProperty/create_basic_without_datacenter_id.tf +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/create_basic_without_datacenter_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/create_multiple_traffic_targets.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/create_multiple_traffic_targets.tf index f2c140245..b749bba7d 100644 --- a/pkg/providers/gtm/testdata/TestResGtmProperty/create_multiple_traffic_targets.tf +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/create_multiple_traffic_targets.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/multiple_servers.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/multiple_servers.tf index f29edd9f7..6bd019f5e 100644 --- a/pkg/providers/gtm/testdata/TestResGtmProperty/multiple_servers.tf +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/multiple_servers.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_gtm_property" "tfexample_prop_1" { diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/servers/change_server.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/servers/change_server.tf index 92882a171..6ff17b062 100644 --- a/pkg/providers/gtm/testdata/TestResGtmProperty/servers/change_server.tf +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/servers/change_server.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_gtm_property" "tfexample_prop_1" { diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/servers/change_server_and_diff_traffic_target_order.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/servers/change_server_and_diff_traffic_target_order.tf index 870ef39e4..918b1ef61 100644 --- a/pkg/providers/gtm/testdata/TestResGtmProperty/servers/change_server_and_diff_traffic_target_order.tf +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/servers/change_server_and_diff_traffic_target_order.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_gtm_property" "tfexample_prop_1" { diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/servers/changed_and_diff_order.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/servers/changed_and_diff_order.tf index ad80b1492..b18315c6c 100644 --- a/pkg/providers/gtm/testdata/TestResGtmProperty/servers/changed_and_diff_order.tf +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/servers/changed_and_diff_order.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_gtm_property" "tfexample_prop_1" { diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/servers/diff_order.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/servers/diff_order.tf index 862c8a687..0cd5fbcea 100644 --- a/pkg/providers/gtm/testdata/TestResGtmProperty/servers/diff_order.tf +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/servers/diff_order.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_gtm_property" "tfexample_prop_1" { diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/test_object/test_object_not_required.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/test_object/test_object_not_required.tf index c79e9ae7a..d69cf75ca 100644 --- a/pkg/providers/gtm/testdata/TestResGtmProperty/test_object/test_object_not_required.tf +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/test_object/test_object_not_required.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/test_object/test_object_protocol_ftp.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/test_object/test_object_protocol_ftp.tf index f75b31db3..6f18e67e0 100644 --- a/pkg/providers/gtm/testdata/TestResGtmProperty/test_object/test_object_protocol_ftp.tf +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/test_object/test_object_protocol_ftp.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/test_object/test_object_protocol_http.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/test_object/test_object_protocol_http.tf index f75b31db3..6f18e67e0 100644 --- a/pkg/providers/gtm/testdata/TestResGtmProperty/test_object/test_object_protocol_http.tf +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/test_object/test_object_protocol_http.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/test_object/test_object_protocol_https.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/test_object/test_object_protocol_https.tf index f75b31db3..6f18e67e0 100644 --- a/pkg/providers/gtm/testdata/TestResGtmProperty/test_object/test_object_protocol_https.tf +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/test_object/test_object_protocol_https.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/add_traffic_target.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/add_traffic_target.tf index 31051f8c5..a6dd25945 100644 --- a/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/add_traffic_target.tf +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/add_traffic_target.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_gtm_property" "tfexample_prop_1" { diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/change_enabled_field.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/change_enabled_field.tf index 837cfc982..13d6fdab8 100644 --- a/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/change_enabled_field.tf +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/change_enabled_field.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_gtm_property" "tfexample_prop_1" { diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/change_enabled_field_diff_order.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/change_enabled_field_diff_order.tf index 823706fde..6e1547235 100644 --- a/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/change_enabled_field_diff_order.tf +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/change_enabled_field_diff_order.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_gtm_property" "tfexample_prop_1" { diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/diff_order.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/diff_order.tf index 67da56855..bed9e3a14 100644 --- a/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/diff_order.tf +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/diff_order.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_gtm_property" "tfexample_prop_1" { diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/no_datacenter_id.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/no_datacenter_id.tf index 0b49ec5a7..8b2c5b82b 100644 --- a/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/no_datacenter_id.tf +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/no_datacenter_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_gtm_property" "tfexample_prop_1" { diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/no_datacenter_id_diff_order.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/no_datacenter_id_diff_order.tf index c47fae853..0b6e13cc4 100644 --- a/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/no_datacenter_id_diff_order.tf +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/no_datacenter_id_diff_order.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_gtm_property" "tfexample_prop_1" { diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/remove_traffic_target.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/remove_traffic_target.tf index fd463b0a2..e4a62a5a3 100644 --- a/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/remove_traffic_target.tf +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/traffic_target/remove_traffic_target.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_gtm_property" "tfexample_prop_1" { diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/update_basic.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/update_basic.tf index 3d1f847be..6c829fcd0 100644 --- a/pkg/providers/gtm/testdata/TestResGtmProperty/update_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/update_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/update_name.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/update_name.tf index 4bae3852c..6c6191801 100644 --- a/pkg/providers/gtm/testdata/TestResGtmProperty/update_name.tf +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/update_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmResource/create_basic.tf b/pkg/providers/gtm/testdata/TestResGtmResource/create_basic.tf index 72127610b..407c120f7 100644 --- a/pkg/providers/gtm/testdata/TestResGtmResource/create_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmResource/create_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmResource/order/create.tf b/pkg/providers/gtm/testdata/TestResGtmResource/order/create.tf index 80e12e8ae..4ee494665 100644 --- a/pkg/providers/gtm/testdata/TestResGtmResource/order/create.tf +++ b/pkg/providers/gtm/testdata/TestResGtmResource/order/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmResource/order/load_servers/reorder.tf b/pkg/providers/gtm/testdata/TestResGtmResource/order/load_servers/reorder.tf index e8f084e96..ae142999c 100644 --- a/pkg/providers/gtm/testdata/TestResGtmResource/order/load_servers/reorder.tf +++ b/pkg/providers/gtm/testdata/TestResGtmResource/order/load_servers/reorder.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmResource/order/load_servers/reorder_and_update.tf b/pkg/providers/gtm/testdata/TestResGtmResource/order/load_servers/reorder_and_update.tf index 2ffc46063..c2b099902 100644 --- a/pkg/providers/gtm/testdata/TestResGtmResource/order/load_servers/reorder_and_update.tf +++ b/pkg/providers/gtm/testdata/TestResGtmResource/order/load_servers/reorder_and_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmResource/order/reorder_resource_instance_load_servers.tf b/pkg/providers/gtm/testdata/TestResGtmResource/order/reorder_resource_instance_load_servers.tf index e6ea4be13..ceea8d472 100644 --- a/pkg/providers/gtm/testdata/TestResGtmResource/order/reorder_resource_instance_load_servers.tf +++ b/pkg/providers/gtm/testdata/TestResGtmResource/order/reorder_resource_instance_load_servers.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmResource/order/resource_instance/reorder.tf b/pkg/providers/gtm/testdata/TestResGtmResource/order/resource_instance/reorder.tf index 4c31d481a..84c3e1c97 100644 --- a/pkg/providers/gtm/testdata/TestResGtmResource/order/resource_instance/reorder.tf +++ b/pkg/providers/gtm/testdata/TestResGtmResource/order/resource_instance/reorder.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmResource/order/resource_instance/reorder_and_update_load_servers.tf b/pkg/providers/gtm/testdata/TestResGtmResource/order/resource_instance/reorder_and_update_load_servers.tf index 0b80a20b2..5c936725c 100644 --- a/pkg/providers/gtm/testdata/TestResGtmResource/order/resource_instance/reorder_and_update_load_servers.tf +++ b/pkg/providers/gtm/testdata/TestResGtmResource/order/resource_instance/reorder_and_update_load_servers.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmResource/order/update_name.tf b/pkg/providers/gtm/testdata/TestResGtmResource/order/update_name.tf index 704bd9fdb..f3f4d07ee 100644 --- a/pkg/providers/gtm/testdata/TestResGtmResource/order/update_name.tf +++ b/pkg/providers/gtm/testdata/TestResGtmResource/order/update_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/gtm/testdata/TestResGtmResource/update_basic.tf b/pkg/providers/gtm/testdata/TestResGtmResource/update_basic.tf index 7b9a55a2f..85c1bf920 100644 --- a/pkg/providers/gtm/testdata/TestResGtmResource/update_basic.tf +++ b/pkg/providers/gtm/testdata/TestResGtmResource/update_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } locals { diff --git a/pkg/providers/iam/data_akamai_iam_contact_types_test.go b/pkg/providers/iam/data_akamai_iam_contact_types_test.go index a2fad15c2..b1696ff42 100644 --- a/pkg/providers/iam/data_akamai_iam_contact_types_test.go +++ b/pkg/providers/iam/data_akamai_iam_contact_types_test.go @@ -7,7 +7,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -15,7 +14,7 @@ import ( func TestDataContactTypes(t *testing.T) { t.Run("happy path", func(t *testing.T) { client := &iam.Mock{} - client.Test(test.TattleT{T: t}) + client.Test(testutils.TattleT{T: t}) client.On("SupportedContactTypes", mock.Anything).Return([]string{"first", "second", "third"}, nil) useClient(client, func() { @@ -24,7 +23,7 @@ func TestDataContactTypes(t *testing.T) { IsUnitTest: true, Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/%s/step0.tf", t.Name()), + Config: testutils.LoadFixtureString(t, "testdata/%s/step0.tf", t.Name()), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttrSet("data.akamai_iam_contact_types.test", "id"), resource.TestCheckResourceAttr("data.akamai_iam_contact_types.test", "contact_types.#", "3"), @@ -42,7 +41,7 @@ func TestDataContactTypes(t *testing.T) { t.Run("fail path", func(t *testing.T) { client := &iam.Mock{} - client.Test(test.TattleT{T: t}) + client.Test(testutils.TattleT{T: t}) client.On("SupportedContactTypes", mock.Anything).Return(nil, errors.New("failed to get supported contact types")) useClient(client, func() { @@ -51,7 +50,7 @@ func TestDataContactTypes(t *testing.T) { IsUnitTest: true, Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/%v/step0.tf", t.Name()), + Config: testutils.LoadFixtureString(t, "testdata/%v/step0.tf", t.Name()), ExpectError: regexp.MustCompile(`failed to get supported contact types`), }, }, diff --git a/pkg/providers/iam/data_akamai_iam_countries_test.go b/pkg/providers/iam/data_akamai_iam_countries_test.go index 026bd24aa..5b8630da2 100644 --- a/pkg/providers/iam/data_akamai_iam_countries_test.go +++ b/pkg/providers/iam/data_akamai_iam_countries_test.go @@ -7,7 +7,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -15,7 +14,7 @@ import ( func TestDataCountries(t *testing.T) { t.Run("happy path", func(t *testing.T) { client := &iam.Mock{} - client.Test(test.TattleT{T: t}) + client.Test(testutils.TattleT{T: t}) client.On("SupportedCountries", mock.Anything).Return([]string{"first", "second", "third"}, nil) useClient(client, func() { @@ -24,7 +23,7 @@ func TestDataCountries(t *testing.T) { IsUnitTest: true, Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/%s/step0.tf", t.Name()), + Config: testutils.LoadFixtureString(t, "testdata/%s/step0.tf", t.Name()), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttrSet("data.akamai_iam_countries.test", "id"), resource.TestCheckResourceAttr("data.akamai_iam_countries.test", "countries.#", "3"), @@ -42,7 +41,7 @@ func TestDataCountries(t *testing.T) { t.Run("fail path", func(t *testing.T) { client := &iam.Mock{} - client.Test(test.TattleT{T: t}) + client.Test(testutils.TattleT{T: t}) client.On("SupportedCountries", mock.Anything).Return([]string{}, errors.New("Could not get supported countries")) useClient(client, func() { @@ -51,7 +50,7 @@ func TestDataCountries(t *testing.T) { IsUnitTest: true, Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/%s/step0.tf", t.Name()), + Config: testutils.LoadFixtureString(t, "testdata/%s/step0.tf", t.Name()), ExpectError: regexp.MustCompile(`Could not get supported countries`), }, }, diff --git a/pkg/providers/iam/data_akamai_iam_grantable_roles_test.go b/pkg/providers/iam/data_akamai_iam_grantable_roles_test.go index abe76bfbf..41cc081df 100644 --- a/pkg/providers/iam/data_akamai_iam_grantable_roles_test.go +++ b/pkg/providers/iam/data_akamai_iam_grantable_roles_test.go @@ -7,7 +7,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -15,7 +14,7 @@ import ( func TestGrantableRoles(t *testing.T) { t.Run("happy path", func(t *testing.T) { client := &iam.Mock{} - client.Test(test.TattleT{T: t}) + client.Test(testutils.TattleT{T: t}) client.On("ListGrantableRoles", mock.Anything).Return([]iam.RoleGrantedRole{ {Description: "A", RoleID: 1, RoleName: "Can print A"}, {Description: "B", RoleID: 2, RoleName: "Can print B"}, @@ -27,7 +26,7 @@ func TestGrantableRoles(t *testing.T) { IsUnitTest: true, Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/%s/step0.tf", t.Name()), + Config: testutils.LoadFixtureString(t, "testdata/%s/step0.tf", t.Name()), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttrSet("data.akamai_iam_grantable_roles.test", "id"), resource.TestCheckResourceAttr("data.akamai_iam_grantable_roles.test", "grantable_roles.#", "2"), @@ -48,7 +47,7 @@ func TestGrantableRoles(t *testing.T) { t.Run("fail path", func(t *testing.T) { client := &iam.Mock{} - client.Test(test.TattleT{T: t}) + client.Test(testutils.TattleT{T: t}) client.On("ListGrantableRoles", mock.Anything).Return([]iam.RoleGrantedRole{}, errors.New("could not get grantable roles")) useClient(client, func() { @@ -57,7 +56,7 @@ func TestGrantableRoles(t *testing.T) { IsUnitTest: true, Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/%s/step0.tf", t.Name()), + Config: testutils.LoadFixtureString(t, "testdata/%s/step0.tf", t.Name()), ExpectError: regexp.MustCompile(`could not get grantable roles`), }, }, diff --git a/pkg/providers/iam/data_akamai_iam_groups_test.go b/pkg/providers/iam/data_akamai_iam_groups_test.go index 632301351..0f41a0b1b 100644 --- a/pkg/providers/iam/data_akamai_iam_groups_test.go +++ b/pkg/providers/iam/data_akamai_iam_groups_test.go @@ -7,7 +7,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/assert" @@ -22,7 +21,7 @@ func TestDataGroups(t *testing.T) { t.Run("happy path", func(t *testing.T) { client := &iam.Mock{} - client.Test(test.TattleT{T: t}) + client.Test(testutils.TattleT{T: t}) { req := iam.ListGroupsRequest{} @@ -42,7 +41,7 @@ func TestDataGroups(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/%s/step0.tf", t.Name()), + Config: testutils.LoadFixtureString(t, "testdata/%s/step0.tf", t.Name()), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_iam_groups.test", "id", "akamai_iam_groups"), @@ -80,7 +79,7 @@ func TestDataGroups(t *testing.T) { t.Run("fail path", func(t *testing.T) { client := &iam.Mock{} - client.Test(test.TattleT{T: t}) + client.Test(testutils.TattleT{T: t}) { req := iam.ListGroupsRequest{} @@ -93,7 +92,7 @@ func TestDataGroups(t *testing.T) { ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/%s/step0.tf", t.Name()), + Config: testutils.LoadFixtureString(t, "testdata/%s/step0.tf", t.Name()), ExpectError: regexp.MustCompile(`failed to list groups`), }, }, diff --git a/pkg/providers/iam/data_akamai_iam_roles_test.go b/pkg/providers/iam/data_akamai_iam_roles_test.go index ac25bd07a..af9206d39 100644 --- a/pkg/providers/iam/data_akamai_iam_roles_test.go +++ b/pkg/providers/iam/data_akamai_iam_roles_test.go @@ -7,7 +7,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -29,7 +28,7 @@ func TestDataRoles(t *testing.T) { req := iam.ListRolesRequest{} - client.Test(test.TattleT{T: t}) + client.Test(testutils.TattleT{T: t}) client.On("ListRoles", mock.Anything, req).Return(roles, nil) useClient(client, func() { @@ -38,7 +37,7 @@ func TestDataRoles(t *testing.T) { IsUnitTest: true, Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/%s.tf", t.Name()), + Config: testutils.LoadFixtureString(t, "testdata/%s.tf", t.Name()), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttrSet("data.akamai_iam_roles.test", "id"), resource.TestCheckResourceAttr("data.akamai_iam_roles.test", "roles.0.name", "test role name"), @@ -62,7 +61,7 @@ func TestDataRoles(t *testing.T) { req := iam.ListRolesRequest{} client := &iam.Mock{} - client.Test(test.TattleT{T: t}) + client.Test(testutils.TattleT{T: t}) client.On("ListRoles", mock.Anything, req).Return(nil, errors.New("failed to get roles")) useClient(client, func() { @@ -71,7 +70,7 @@ func TestDataRoles(t *testing.T) { IsUnitTest: true, Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/%s/step0.tf", t.Name()), + Config: testutils.LoadFixtureString(t, "testdata/%s/step0.tf", t.Name()), ExpectError: regexp.MustCompile(`failed to get roles`), }, }, diff --git a/pkg/providers/iam/data_akamai_iam_states_test.go b/pkg/providers/iam/data_akamai_iam_states_test.go index d935a77ba..654a59653 100644 --- a/pkg/providers/iam/data_akamai_iam_states_test.go +++ b/pkg/providers/iam/data_akamai_iam_states_test.go @@ -7,7 +7,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -15,7 +14,7 @@ import ( func TestDataStates(t *testing.T) { t.Run("happy path", func(t *testing.T) { client := &iam.Mock{} - client.Test(test.TattleT{T: t}) + client.Test(testutils.TattleT{T: t}) req := iam.ListStatesRequest{Country: "test country"} client.On("ListStates", mock.Anything, req).Return([]string{"first", "second", "third"}, nil) @@ -26,7 +25,7 @@ func TestDataStates(t *testing.T) { IsUnitTest: true, Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/%s/step0.tf", t.Name()), + Config: testutils.LoadFixtureString(t, "testdata/%s/step0.tf", t.Name()), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttrSet("data.akamai_iam_states.test", "id"), resource.TestCheckResourceAttr("data.akamai_iam_states.test", "states.#", "3"), @@ -43,7 +42,7 @@ func TestDataStates(t *testing.T) { }) t.Run("fail path", func(t *testing.T) { client := &iam.Mock{} - client.Test(test.TattleT{T: t}) + client.Test(testutils.TattleT{T: t}) req := iam.ListStatesRequest{Country: "test country"} client.On("ListStates", mock.Anything, req).Return([]string{}, errors.New("Could not get states")) @@ -54,7 +53,7 @@ func TestDataStates(t *testing.T) { IsUnitTest: true, Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/%s/step0.tf", t.Name()), + Config: testutils.LoadFixtureString(t, "testdata/%s/step0.tf", t.Name()), ExpectError: regexp.MustCompile(`Could not get states`), }, }, diff --git a/pkg/providers/iam/data_akamai_iam_supported_langs_test.go b/pkg/providers/iam/data_akamai_iam_supported_langs_test.go index 99a9a97aa..914e4ef6d 100644 --- a/pkg/providers/iam/data_akamai_iam_supported_langs_test.go +++ b/pkg/providers/iam/data_akamai_iam_supported_langs_test.go @@ -7,7 +7,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -15,7 +14,7 @@ import ( func TestDataSupportedLangs(t *testing.T) { t.Run("happy path", func(t *testing.T) { client := &iam.Mock{} - client.Test(test.TattleT{T: t}) + client.Test(testutils.TattleT{T: t}) client.On("SupportedLanguages", mock.Anything).Return([]string{"first", "second", "third"}, nil) useClient(client, func() { @@ -24,7 +23,7 @@ func TestDataSupportedLangs(t *testing.T) { IsUnitTest: true, Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/%s/step0.tf", t.Name()), + Config: testutils.LoadFixtureString(t, "testdata/%s/step0.tf", t.Name()), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttrSet("data.akamai_iam_supported_langs.test", "id"), resource.TestCheckResourceAttr("data.akamai_iam_supported_langs.test", "languages.#", "3"), @@ -41,7 +40,7 @@ func TestDataSupportedLangs(t *testing.T) { }) t.Run("fail path", func(t *testing.T) { client := &iam.Mock{} - client.Test(test.TattleT{T: t}) + client.Test(testutils.TattleT{T: t}) client.On("SupportedLanguages", mock.Anything).Return([]string{}, errors.New("Could not set supported languages in state")) useClient(client, func() { @@ -50,7 +49,7 @@ func TestDataSupportedLangs(t *testing.T) { IsUnitTest: true, Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/%s/step0.tf", t.Name()), + Config: testutils.LoadFixtureString(t, "testdata/%s/step0.tf", t.Name()), ExpectError: regexp.MustCompile(`Could not set supported languages in state`), }, }, diff --git a/pkg/providers/iam/data_akamai_iam_timeout_policies_test.go b/pkg/providers/iam/data_akamai_iam_timeout_policies_test.go index ab4f21e2b..c65e70489 100644 --- a/pkg/providers/iam/data_akamai_iam_timeout_policies_test.go +++ b/pkg/providers/iam/data_akamai_iam_timeout_policies_test.go @@ -7,7 +7,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -15,7 +14,7 @@ import ( func TestDataTimeoutPolicies(t *testing.T) { t.Run("happy path", func(t *testing.T) { client := &iam.Mock{} - client.Test(test.TattleT{T: t}) + client.Test(testutils.TattleT{T: t}) res := []iam.TimeoutPolicy{ {Name: "first", Value: 11}, @@ -30,7 +29,7 @@ func TestDataTimeoutPolicies(t *testing.T) { IsUnitTest: true, Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/%s/step0.tf", t.Name()), + Config: testutils.LoadFixtureString(t, "testdata/%s/step0.tf", t.Name()), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttrSet("data.akamai_iam_timeout_policies.test", "id"), resource.TestCheckResourceAttr("data.akamai_iam_timeout_policies.test", "policies.%", "3"), @@ -48,7 +47,7 @@ func TestDataTimeoutPolicies(t *testing.T) { t.Run("fail path", func(t *testing.T) { client := &iam.Mock{} - client.Test(test.TattleT{T: t}) + client.Test(testutils.TattleT{T: t}) client.On("ListTimeoutPolicies", mock.Anything).Return(nil, errors.New("Could not get supported timeout policies")) useClient(client, func() { @@ -57,7 +56,7 @@ func TestDataTimeoutPolicies(t *testing.T) { IsUnitTest: true, Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/%s/step0.tf", t.Name()), + Config: testutils.LoadFixtureString(t, "testdata/%s/step0.tf", t.Name()), ExpectError: regexp.MustCompile(`Could not get supported timeout policies`), }, }, diff --git a/pkg/providers/iam/data_akamai_iam_timezones_test.go b/pkg/providers/iam/data_akamai_iam_timezones_test.go index 253cf1715..cdec86e0e 100644 --- a/pkg/providers/iam/data_akamai_iam_timezones_test.go +++ b/pkg/providers/iam/data_akamai_iam_timezones_test.go @@ -7,7 +7,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -16,7 +15,7 @@ func TestDataTimezones(t *testing.T) { workDir := t.Name() t.Run("happy path", func(t *testing.T) { client := &iam.Mock{} - client.Test(test.TattleT{T: t}) + client.Test(testutils.TattleT{T: t}) client.On("SupportedTimezones", mock.Anything).Return([]iam.Timezone{ { @@ -46,7 +45,7 @@ func TestDataTimezones(t *testing.T) { IsUnitTest: true, Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/%s/timezones.tf", workDir), + Config: testutils.LoadFixtureString(t, "testdata/%s/timezones.tf", workDir), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttrSet(resourceName, "id"), resource.TestCheckResourceAttr(resourceName, "timezones.#", "3"), @@ -73,7 +72,7 @@ func TestDataTimezones(t *testing.T) { t.Run("fail path", func(t *testing.T) { client := &iam.Mock{} - client.Test(test.TattleT{T: t}) + client.Test(testutils.TattleT{T: t}) client.On("SupportedTimezones", mock.Anything).Return([]iam.Timezone{}, fmt.Errorf("supported timezones: timezones could not be fetched")) useClient(client, func() { @@ -82,7 +81,7 @@ func TestDataTimezones(t *testing.T) { IsUnitTest: true, Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/%s/timezones.tf", workDir), + Config: testutils.LoadFixtureString(t, "testdata/%s/timezones.tf", workDir), ExpectError: regexp.MustCompile("supported timezones: timezones could not be fetched"), }, }, diff --git a/pkg/providers/iam/testdata/TestDataContactTypes/fail_path/step0.tf b/pkg/providers/iam/testdata/TestDataContactTypes/fail_path/step0.tf index ae0898313..ccd45a2f4 100644 --- a/pkg/providers/iam/testdata/TestDataContactTypes/fail_path/step0.tf +++ b/pkg/providers/iam/testdata/TestDataContactTypes/fail_path/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_iam_contact_types" "test" {} diff --git a/pkg/providers/iam/testdata/TestDataContactTypes/happy_path/step0.tf b/pkg/providers/iam/testdata/TestDataContactTypes/happy_path/step0.tf index ae0898313..ccd45a2f4 100644 --- a/pkg/providers/iam/testdata/TestDataContactTypes/happy_path/step0.tf +++ b/pkg/providers/iam/testdata/TestDataContactTypes/happy_path/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_iam_contact_types" "test" {} diff --git a/pkg/providers/iam/testdata/TestDataCountries/fail_path/step0.tf b/pkg/providers/iam/testdata/TestDataCountries/fail_path/step0.tf index f276223d4..bb69d6df5 100644 --- a/pkg/providers/iam/testdata/TestDataCountries/fail_path/step0.tf +++ b/pkg/providers/iam/testdata/TestDataCountries/fail_path/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_iam_countries" "test" {} diff --git a/pkg/providers/iam/testdata/TestDataCountries/happy_path/step0.tf b/pkg/providers/iam/testdata/TestDataCountries/happy_path/step0.tf index f276223d4..bb69d6df5 100644 --- a/pkg/providers/iam/testdata/TestDataCountries/happy_path/step0.tf +++ b/pkg/providers/iam/testdata/TestDataCountries/happy_path/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_iam_countries" "test" {} diff --git a/pkg/providers/iam/testdata/TestDataGroups/fail_path/step0.tf b/pkg/providers/iam/testdata/TestDataGroups/fail_path/step0.tf index e5b7103df..639303062 100644 --- a/pkg/providers/iam/testdata/TestDataGroups/fail_path/step0.tf +++ b/pkg/providers/iam/testdata/TestDataGroups/fail_path/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_iam_groups" "test" {} diff --git a/pkg/providers/iam/testdata/TestDataGroups/happy_path/step0.tf b/pkg/providers/iam/testdata/TestDataGroups/happy_path/step0.tf index e5b7103df..639303062 100644 --- a/pkg/providers/iam/testdata/TestDataGroups/happy_path/step0.tf +++ b/pkg/providers/iam/testdata/TestDataGroups/happy_path/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_iam_groups" "test" {} diff --git a/pkg/providers/iam/testdata/TestDataNotificationProds/happy_path/step0.tf b/pkg/providers/iam/testdata/TestDataNotificationProds/happy_path/step0.tf index f1605a1dc..b7a263e57 100644 --- a/pkg/providers/iam/testdata/TestDataNotificationProds/happy_path/step0.tf +++ b/pkg/providers/iam/testdata/TestDataNotificationProds/happy_path/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_iam_notification_prods" "test" {} diff --git a/pkg/providers/iam/testdata/TestDataRoles/fail_path/step0.tf b/pkg/providers/iam/testdata/TestDataRoles/fail_path/step0.tf index 269edfe9d..0b54fb38d 100644 --- a/pkg/providers/iam/testdata/TestDataRoles/fail_path/step0.tf +++ b/pkg/providers/iam/testdata/TestDataRoles/fail_path/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_iam_roles" "test" {} diff --git a/pkg/providers/iam/testdata/TestDataRoles/happy_path/no_args.tf b/pkg/providers/iam/testdata/TestDataRoles/happy_path/no_args.tf index 269edfe9d..0b54fb38d 100644 --- a/pkg/providers/iam/testdata/TestDataRoles/happy_path/no_args.tf +++ b/pkg/providers/iam/testdata/TestDataRoles/happy_path/no_args.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_iam_roles" "test" {} diff --git a/pkg/providers/iam/testdata/TestDataStates/fail_path/step0.tf b/pkg/providers/iam/testdata/TestDataStates/fail_path/step0.tf index 5f6e9be36..ded46b428 100644 --- a/pkg/providers/iam/testdata/TestDataStates/fail_path/step0.tf +++ b/pkg/providers/iam/testdata/TestDataStates/fail_path/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_iam_states" "test" { diff --git a/pkg/providers/iam/testdata/TestDataStates/happy_path/step0.tf b/pkg/providers/iam/testdata/TestDataStates/happy_path/step0.tf index 5f6e9be36..ded46b428 100644 --- a/pkg/providers/iam/testdata/TestDataStates/happy_path/step0.tf +++ b/pkg/providers/iam/testdata/TestDataStates/happy_path/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_iam_states" "test" { diff --git a/pkg/providers/iam/testdata/TestDataSupportedLangs/fail_path/step0.tf b/pkg/providers/iam/testdata/TestDataSupportedLangs/fail_path/step0.tf index 26156b6e2..e4e40d9a5 100644 --- a/pkg/providers/iam/testdata/TestDataSupportedLangs/fail_path/step0.tf +++ b/pkg/providers/iam/testdata/TestDataSupportedLangs/fail_path/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_iam_supported_langs" "test" {} diff --git a/pkg/providers/iam/testdata/TestDataSupportedLangs/happy_path/step0.tf b/pkg/providers/iam/testdata/TestDataSupportedLangs/happy_path/step0.tf index 26156b6e2..e4e40d9a5 100644 --- a/pkg/providers/iam/testdata/TestDataSupportedLangs/happy_path/step0.tf +++ b/pkg/providers/iam/testdata/TestDataSupportedLangs/happy_path/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_iam_supported_langs" "test" {} diff --git a/pkg/providers/iam/testdata/TestDataTimeoutPolicies/fail_path/step0.tf b/pkg/providers/iam/testdata/TestDataTimeoutPolicies/fail_path/step0.tf index 7161f67b2..06ecfb1e9 100644 --- a/pkg/providers/iam/testdata/TestDataTimeoutPolicies/fail_path/step0.tf +++ b/pkg/providers/iam/testdata/TestDataTimeoutPolicies/fail_path/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_iam_timeout_policies" "test" {} diff --git a/pkg/providers/iam/testdata/TestDataTimeoutPolicies/happy_path/step0.tf b/pkg/providers/iam/testdata/TestDataTimeoutPolicies/happy_path/step0.tf index 7161f67b2..06ecfb1e9 100644 --- a/pkg/providers/iam/testdata/TestDataTimeoutPolicies/happy_path/step0.tf +++ b/pkg/providers/iam/testdata/TestDataTimeoutPolicies/happy_path/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_iam_timeout_policies" "test" {} diff --git a/pkg/providers/iam/testdata/TestDataTimezones/timezones.tf b/pkg/providers/iam/testdata/TestDataTimezones/timezones.tf index e4aab68b1..92a513970 100644 --- a/pkg/providers/iam/testdata/TestDataTimezones/timezones.tf +++ b/pkg/providers/iam/testdata/TestDataTimezones/timezones.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_iam_timezones" "test" {} \ No newline at end of file diff --git a/pkg/providers/iam/testdata/TestGrantableRoles/fail_path/step0.tf b/pkg/providers/iam/testdata/TestGrantableRoles/fail_path/step0.tf index 10098ff80..ff6ac7286 100644 --- a/pkg/providers/iam/testdata/TestGrantableRoles/fail_path/step0.tf +++ b/pkg/providers/iam/testdata/TestGrantableRoles/fail_path/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_iam_grantable_roles" "test" {} diff --git a/pkg/providers/iam/testdata/TestGrantableRoles/happy_path/step0.tf b/pkg/providers/iam/testdata/TestGrantableRoles/happy_path/step0.tf index 10098ff80..ff6ac7286 100644 --- a/pkg/providers/iam/testdata/TestGrantableRoles/happy_path/step0.tf +++ b/pkg/providers/iam/testdata/TestGrantableRoles/happy_path/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_iam_grantable_roles" "test" {} diff --git a/pkg/providers/iam/testdata/TestResGroup/basic/basic.tf b/pkg/providers/iam/testdata/TestResGroup/basic/basic.tf index 9c251da81..ad583e4be 100644 --- a/pkg/providers/iam/testdata/TestResGroup/basic/basic.tf +++ b/pkg/providers/iam/testdata/TestResGroup/basic/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_group" "test" { diff --git a/pkg/providers/iam/testdata/TestResGroup/update/update.tf b/pkg/providers/iam/testdata/TestResGroup/update/update.tf index 2b4c2cc1e..23fa05f8d 100644 --- a/pkg/providers/iam/testdata/TestResGroup/update/update.tf +++ b/pkg/providers/iam/testdata/TestResGroup/update/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_group" "test" { diff --git a/pkg/providers/iam/testdata/TestResUserLifecycle/step00-all basic info A with grants.tf b/pkg/providers/iam/testdata/TestResUserLifecycle/step00-all basic info A with grants.tf index 7e07440b1..6b0c4ca5b 100644 --- a/pkg/providers/iam/testdata/TestResUserLifecycle/step00-all basic info A with grants.tf +++ b/pkg/providers/iam/testdata/TestResUserLifecycle/step00-all basic info A with grants.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_user" "test" { diff --git a/pkg/providers/iam/testdata/TestResUserLifecycle/step00-all basic info A with notifications A.tf b/pkg/providers/iam/testdata/TestResUserLifecycle/step00-all basic info A with notifications A.tf index 7e07440b1..6b0c4ca5b 100644 --- a/pkg/providers/iam/testdata/TestResUserLifecycle/step00-all basic info A with notifications A.tf +++ b/pkg/providers/iam/testdata/TestResUserLifecycle/step00-all basic info A with notifications A.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_user" "test" { diff --git a/pkg/providers/iam/testdata/TestResUserLifecycle/step00-all basic info A with notifications B.tf b/pkg/providers/iam/testdata/TestResUserLifecycle/step00-all basic info A with notifications B.tf index 7e07440b1..6b0c4ca5b 100644 --- a/pkg/providers/iam/testdata/TestResUserLifecycle/step00-all basic info A with notifications B.tf +++ b/pkg/providers/iam/testdata/TestResUserLifecycle/step00-all basic info A with notifications B.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_user" "test" { diff --git a/pkg/providers/iam/testdata/TestResUserLifecycle/step00-all basic info A with notifications C and grants.tf b/pkg/providers/iam/testdata/TestResUserLifecycle/step00-all basic info A with notifications C and grants.tf index 7e07440b1..6b0c4ca5b 100644 --- a/pkg/providers/iam/testdata/TestResUserLifecycle/step00-all basic info A with notifications C and grants.tf +++ b/pkg/providers/iam/testdata/TestResUserLifecycle/step00-all basic info A with notifications C and grants.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_user" "test" { diff --git a/pkg/providers/iam/testdata/TestResUserLifecycle/step00-all basic info A with notifications C.tf b/pkg/providers/iam/testdata/TestResUserLifecycle/step00-all basic info A with notifications C.tf index 7e07440b1..6b0c4ca5b 100644 --- a/pkg/providers/iam/testdata/TestResUserLifecycle/step00-all basic info A with notifications C.tf +++ b/pkg/providers/iam/testdata/TestResUserLifecycle/step00-all basic info A with notifications C.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_user" "test" { diff --git a/pkg/providers/iam/testdata/TestResUserLifecycle/step00-all basic info A.tf b/pkg/providers/iam/testdata/TestResUserLifecycle/step00-all basic info A.tf index 7e07440b1..6b0c4ca5b 100644 --- a/pkg/providers/iam/testdata/TestResUserLifecycle/step00-all basic info A.tf +++ b/pkg/providers/iam/testdata/TestResUserLifecycle/step00-all basic info A.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_user" "test" { diff --git a/pkg/providers/iam/testdata/TestResUserLifecycle/step00-minimum basic info A.tf b/pkg/providers/iam/testdata/TestResUserLifecycle/step00-minimum basic info A.tf index 30aecf0f6..490338cce 100644 --- a/pkg/providers/iam/testdata/TestResUserLifecycle/step00-minimum basic info A.tf +++ b/pkg/providers/iam/testdata/TestResUserLifecycle/step00-minimum basic info A.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_user" "test" { diff --git a/pkg/providers/iam/testdata/TestResUserLifecycle/step01.tf b/pkg/providers/iam/testdata/TestResUserLifecycle/step01.tf index e9ce37918..cf5b03d4e 100644 --- a/pkg/providers/iam/testdata/TestResUserLifecycle/step01.tf +++ b/pkg/providers/iam/testdata/TestResUserLifecycle/step01.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_user" "test" { diff --git a/pkg/providers/iam/testdata/TestResUserLifecycle/step02.tf b/pkg/providers/iam/testdata/TestResUserLifecycle/step02.tf index cf7381e4f..642dca6f0 100644 --- a/pkg/providers/iam/testdata/TestResUserLifecycle/step02.tf +++ b/pkg/providers/iam/testdata/TestResUserLifecycle/step02.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_user" "test" { diff --git a/pkg/providers/iam/testdata/TestResUserLifecycle/step03.tf b/pkg/providers/iam/testdata/TestResUserLifecycle/step03.tf index bfafe004b..8a5852019 100644 --- a/pkg/providers/iam/testdata/TestResUserLifecycle/step03.tf +++ b/pkg/providers/iam/testdata/TestResUserLifecycle/step03.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_user" "test" { diff --git a/pkg/providers/iam/testdata/TestResUserLifecycle/step04.tf b/pkg/providers/iam/testdata/TestResUserLifecycle/step04.tf index cf7381e4f..642dca6f0 100644 --- a/pkg/providers/iam/testdata/TestResUserLifecycle/step04.tf +++ b/pkg/providers/iam/testdata/TestResUserLifecycle/step04.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_user" "test" { diff --git a/pkg/providers/iam/testdata/TestResUserLifecycle/step05.tf b/pkg/providers/iam/testdata/TestResUserLifecycle/step05.tf index cf7381e4f..642dca6f0 100644 --- a/pkg/providers/iam/testdata/TestResUserLifecycle/step05.tf +++ b/pkg/providers/iam/testdata/TestResUserLifecycle/step05.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_user" "test" { diff --git a/pkg/providers/iam/testdata/TestResUserLifecycle/step06.tf b/pkg/providers/iam/testdata/TestResUserLifecycle/step06.tf index cf7381e4f..642dca6f0 100644 --- a/pkg/providers/iam/testdata/TestResUserLifecycle/step06.tf +++ b/pkg/providers/iam/testdata/TestResUserLifecycle/step06.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_user" "test" { diff --git a/pkg/providers/iam/testdata/TestResUserLifecycle/step07.tf b/pkg/providers/iam/testdata/TestResUserLifecycle/step07.tf index b714fb9c0..03d602e0a 100644 --- a/pkg/providers/iam/testdata/TestResUserLifecycle/step07.tf +++ b/pkg/providers/iam/testdata/TestResUserLifecycle/step07.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_user" "test" { diff --git a/pkg/providers/iam/testdata/TestResourceIAMBlockedUserProperties/create-empty-properties.tf b/pkg/providers/iam/testdata/TestResourceIAMBlockedUserProperties/create-empty-properties.tf index f665c7250..d1f0f56a0 100644 --- a/pkg/providers/iam/testdata/TestResourceIAMBlockedUserProperties/create-empty-properties.tf +++ b/pkg/providers/iam/testdata/TestResourceIAMBlockedUserProperties/create-empty-properties.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_blocked_user_properties" "test" { diff --git a/pkg/providers/iam/testdata/TestResourceIAMBlockedUserProperties/create.tf b/pkg/providers/iam/testdata/TestResourceIAMBlockedUserProperties/create.tf index 67a6e97f6..0602c660c 100644 --- a/pkg/providers/iam/testdata/TestResourceIAMBlockedUserProperties/create.tf +++ b/pkg/providers/iam/testdata/TestResourceIAMBlockedUserProperties/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_blocked_user_properties" "test" { diff --git a/pkg/providers/iam/testdata/TestResourceIAMBlockedUserProperties/update-group-id.tf b/pkg/providers/iam/testdata/TestResourceIAMBlockedUserProperties/update-group-id.tf index cd2fb2e9b..369fda24f 100644 --- a/pkg/providers/iam/testdata/TestResourceIAMBlockedUserProperties/update-group-id.tf +++ b/pkg/providers/iam/testdata/TestResourceIAMBlockedUserProperties/update-group-id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_blocked_user_properties" "test" { diff --git a/pkg/providers/iam/testdata/TestResourceIAMBlockedUserProperties/update.tf b/pkg/providers/iam/testdata/TestResourceIAMBlockedUserProperties/update.tf index 25e2843c5..a0414d285 100644 --- a/pkg/providers/iam/testdata/TestResourceIAMBlockedUserProperties/update.tf +++ b/pkg/providers/iam/testdata/TestResourceIAMBlockedUserProperties/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_blocked_user_properties" "test" { diff --git a/pkg/providers/iam/testdata/TestResourceRoleLifecycle/role_create.tf b/pkg/providers/iam/testdata/TestResourceRoleLifecycle/role_create.tf index 6601e5a38..fa7c47a81 100644 --- a/pkg/providers/iam/testdata/TestResourceRoleLifecycle/role_create.tf +++ b/pkg/providers/iam/testdata/TestResourceRoleLifecycle/role_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_role" "role" { diff --git a/pkg/providers/iam/testdata/TestResourceRoleLifecycle/role_update.tf b/pkg/providers/iam/testdata/TestResourceRoleLifecycle/role_update.tf index db5eedcda..9206ab12b 100644 --- a/pkg/providers/iam/testdata/TestResourceRoleLifecycle/role_update.tf +++ b/pkg/providers/iam/testdata/TestResourceRoleLifecycle/role_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_role" "role" { diff --git a/pkg/providers/iam/testdata/TestResourceRoleLifecycle/role_with_reordered_granted_roles.tf b/pkg/providers/iam/testdata/TestResourceRoleLifecycle/role_with_reordered_granted_roles.tf index 7573463d3..c9ca4d0d9 100644 --- a/pkg/providers/iam/testdata/TestResourceRoleLifecycle/role_with_reordered_granted_roles.tf +++ b/pkg/providers/iam/testdata/TestResourceRoleLifecycle/role_with_reordered_granted_roles.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_role" "role" { diff --git a/pkg/providers/iam/testdata/TestResourceUserLifecycle/auth_grants_interpolated.tf b/pkg/providers/iam/testdata/TestResourceUserLifecycle/auth_grants_interpolated.tf index 0a5f863c9..68c0d5af0 100644 --- a/pkg/providers/iam/testdata/TestResourceUserLifecycle/auth_grants_interpolated.tf +++ b/pkg/providers/iam/testdata/TestResourceUserLifecycle/auth_grants_interpolated.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_user" "test" { diff --git a/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_auth_grants.tf b/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_auth_grants.tf index 4c9fbd885..dc8c2f097 100644 --- a/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_auth_grants.tf +++ b/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_auth_grants.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_user" "test" { diff --git a/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_basic.tf b/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_basic.tf index 016f378f5..5f448e0fb 100644 --- a/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_basic.tf +++ b/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_user" "test" { diff --git a/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_basic_ext_phone.tf b/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_basic_ext_phone.tf index 77ebe160e..97e50362c 100644 --- a/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_basic_ext_phone.tf +++ b/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_basic_ext_phone.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_user" "test" { diff --git a/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_basic_grants.tf b/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_basic_grants.tf index de5f5b756..b5d20e899 100644 --- a/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_basic_grants.tf +++ b/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_basic_grants.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_user" "test" { diff --git a/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_basic_grants_swap.tf b/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_basic_grants_swap.tf index 3925f2b1b..ed456d1db 100644 --- a/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_basic_grants_swap.tf +++ b/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_basic_grants_swap.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_user" "test" { diff --git a/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_basic_invalid_phone.tf b/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_basic_invalid_phone.tf index 00d291790..a20796f81 100644 --- a/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_basic_invalid_phone.tf +++ b/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_basic_invalid_phone.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_user" "test" { diff --git a/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_basic_lock.tf b/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_basic_lock.tf index a7bf8897a..6b10c7d9a 100644 --- a/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_basic_lock.tf +++ b/pkg/providers/iam/testdata/TestResourceUserLifecycle/create_basic_lock.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_user" "test" { diff --git a/pkg/providers/iam/testdata/TestResourceUserLifecycle/invalid_auth_grants.tf b/pkg/providers/iam/testdata/TestResourceUserLifecycle/invalid_auth_grants.tf index 64ea229c0..2b3d405ea 100644 --- a/pkg/providers/iam/testdata/TestResourceUserLifecycle/invalid_auth_grants.tf +++ b/pkg/providers/iam/testdata/TestResourceUserLifecycle/invalid_auth_grants.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_user" "test" { diff --git a/pkg/providers/iam/testdata/TestResourceUserLifecycle/update_auth_grants.tf b/pkg/providers/iam/testdata/TestResourceUserLifecycle/update_auth_grants.tf index f5622eadf..43462bdf1 100644 --- a/pkg/providers/iam/testdata/TestResourceUserLifecycle/update_auth_grants.tf +++ b/pkg/providers/iam/testdata/TestResourceUserLifecycle/update_auth_grants.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_user" "test" { diff --git a/pkg/providers/iam/testdata/TestResourceUserLifecycle/update_email.tf b/pkg/providers/iam/testdata/TestResourceUserLifecycle/update_email.tf index 7f4df34a0..e9071846e 100644 --- a/pkg/providers/iam/testdata/TestResourceUserLifecycle/update_email.tf +++ b/pkg/providers/iam/testdata/TestResourceUserLifecycle/update_email.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_user" "test" { diff --git a/pkg/providers/iam/testdata/TestResourceUserLifecycle/update_user_info.tf b/pkg/providers/iam/testdata/TestResourceUserLifecycle/update_user_info.tf index 236e153ae..6179f3876 100644 --- a/pkg/providers/iam/testdata/TestResourceUserLifecycle/update_user_info.tf +++ b/pkg/providers/iam/testdata/TestResourceUserLifecycle/update_user_info.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_iam_user" "test" { diff --git a/pkg/providers/imaging/testdata/TestDataPolicyImage/composite_post_policy/policy.tf b/pkg/providers/imaging/testdata/TestDataPolicyImage/composite_post_policy/policy.tf index 371383de4..cf234bb46 100644 --- a/pkg/providers/imaging/testdata/TestDataPolicyImage/composite_post_policy/policy.tf +++ b/pkg/providers/imaging/testdata/TestDataPolicyImage/composite_post_policy/policy.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestDataPolicyImage/empty_breakpoints/policy.tf b/pkg/providers/imaging/testdata/TestDataPolicyImage/empty_breakpoints/policy.tf index 22ca8677f..71b92141c 100644 --- a/pkg/providers/imaging/testdata/TestDataPolicyImage/empty_breakpoints/policy.tf +++ b/pkg/providers/imaging/testdata/TestDataPolicyImage/empty_breakpoints/policy.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestDataPolicyImage/empty_policy/policy.tf b/pkg/providers/imaging/testdata/TestDataPolicyImage/empty_policy/policy.tf index 0a18e06c8..d249f0929 100644 --- a/pkg/providers/imaging/testdata/TestDataPolicyImage/empty_policy/policy.tf +++ b/pkg/providers/imaging/testdata/TestDataPolicyImage/empty_policy/policy.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestDataPolicyImage/imquery_transformation/policy.tf b/pkg/providers/imaging/testdata/TestDataPolicyImage/imquery_transformation/policy.tf index c956c9197..182655abe 100644 --- a/pkg/providers/imaging/testdata/TestDataPolicyImage/imquery_transformation/policy.tf +++ b/pkg/providers/imaging/testdata/TestDataPolicyImage/imquery_transformation/policy.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestDataPolicyImage/policy_with_nested_transformations/policy.tf b/pkg/providers/imaging/testdata/TestDataPolicyImage/policy_with_nested_transformations/policy.tf index a12a4940f..7e4f85839 100644 --- a/pkg/providers/imaging/testdata/TestDataPolicyImage/policy_with_nested_transformations/policy.tf +++ b/pkg/providers/imaging/testdata/TestDataPolicyImage/policy_with_nested_transformations/policy.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestDataPolicyImage/regular_policy/policy.tf b/pkg/providers/imaging/testdata/TestDataPolicyImage/regular_policy/policy.tf index 73153b7ec..3a624bef4 100644 --- a/pkg/providers/imaging/testdata/TestDataPolicyImage/regular_policy/policy.tf +++ b/pkg/providers/imaging/testdata/TestDataPolicyImage/regular_policy/policy.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestDataPolicyVideo/empty_policy/policy.tf b/pkg/providers/imaging/testdata/TestDataPolicyVideo/empty_policy/policy.tf index 7ebb7b27d..95d58f785 100644 --- a/pkg/providers/imaging/testdata/TestDataPolicyVideo/empty_policy/policy.tf +++ b/pkg/providers/imaging/testdata/TestDataPolicyVideo/empty_policy/policy.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_imaging_policy_video" "policy" { diff --git a/pkg/providers/imaging/testdata/TestDataPolicyVideo/regular_policy/policy.tf b/pkg/providers/imaging/testdata/TestDataPolicyVideo/regular_policy/policy.tf index 8a053b011..5729b55a0 100644 --- a/pkg/providers/imaging/testdata/TestDataPolicyVideo/regular_policy/policy.tf +++ b/pkg/providers/imaging/testdata/TestDataPolicyVideo/regular_policy/policy.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_imaging_policy_video" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/auto_policy/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/auto_policy/policy_create.tf index c085ac113..ddf17ec17 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyImage/auto_policy/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/auto_policy/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/auto_policy/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/auto_policy/policy_update.tf index 0bcfda8f3..742e4011d 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyImage/auto_policy/policy_update.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/auto_policy/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/change_policyset_id/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/change_policyset_id/policy_create.tf index 8a1937c42..3c1ad7de7 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyImage/change_policyset_id/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/change_policyset_id/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/change_policyset_id/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/change_policyset_id/policy_update.tf index 5ae732ae5..084ca324d 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyImage/change_policyset_id/policy_update.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/change_policyset_id/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/diff_suppress/fields/default.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/diff_suppress/fields/default.tf index b8b214663..52e211c39 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyImage/diff_suppress/fields/default.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/diff_suppress/fields/default.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/diff_suppress/fields/diff_order.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/diff_suppress/fields/diff_order.tf index 4064ea3de..969195d23 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyImage/diff_suppress/fields/diff_order.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/diff_suppress/fields/diff_order.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/inconsistent_policy/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/inconsistent_policy/policy_create.tf index de4576246..f458a05e8 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyImage/inconsistent_policy/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/inconsistent_policy/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/invalid_policy/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/invalid_policy/policy_create.tf index a0b88d864..5641c16d9 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyImage/invalid_policy/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/invalid_policy/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy/policy_create.tf index 8a1937c42..3c1ad7de7 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy/policy_update.tf index 2ec31a319..8289df4a6 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy/policy_update.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_activate_same_time/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_activate_same_time/policy_create.tf index 2ec31a319..8289df4a6 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_activate_same_time/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_activate_same_time/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_activate_same_time/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_activate_same_time/policy_update.tf index b642b4e93..b82da9e54 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_activate_same_time/policy_update.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_activate_same_time/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_import/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_import/policy_create.tf index f2318d311..53940ce4d 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_import/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_import/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_no_update/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_no_update/policy_create.tf index 8a1937c42..3c1ad7de7 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_no_update/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_no_update/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_no_update/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_no_update/policy_update.tf index 2ec31a319..8289df4a6 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_no_update/policy_update.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_no_update/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_rollout_duration/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_rollout_duration/policy_create.tf index 8a1937c42..3c1ad7de7 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_rollout_duration/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_rollout_duration/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_rollout_duration/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_rollout_duration/policy_update.tf index ebd4b8760..a79f39936 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_rollout_duration/policy_update.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_rollout_duration/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy_create.tf index 8a1937c42..3c1ad7de7 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy_update.tf index 2ec31a319..8289df4a6 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy_update.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy_update_staging.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy_update_staging.tf index 285745a08..1a11d0388 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy_update_staging.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_staging/policy_update_staging.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicySet/lifecycle/create.tf b/pkg/providers/imaging/testdata/TestResPolicySet/lifecycle/create.tf index c9eef123b..c46d0ecaa 100644 --- a/pkg/providers/imaging/testdata/TestResPolicySet/lifecycle/create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicySet/lifecycle/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_set" "test_image_set" { diff --git a/pkg/providers/imaging/testdata/TestResPolicySet/lifecycle/update_region_us.tf b/pkg/providers/imaging/testdata/TestResPolicySet/lifecycle/update_region_us.tf index 611aeada3..670bd5bc9 100644 --- a/pkg/providers/imaging/testdata/TestResPolicySet/lifecycle/update_region_us.tf +++ b/pkg/providers/imaging/testdata/TestResPolicySet/lifecycle/update_region_us.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_set" "test_image_set" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/auto_policy/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/auto_policy/policy_create.tf index 70d837606..8ec084586 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/auto_policy/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/auto_policy/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_video" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/auto_policy/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/auto_policy/policy_update.tf index 4b2aedc5e..5d03bc200 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/auto_policy/policy_update.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/auto_policy/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_video" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/change_policyset_id/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/change_policyset_id/policy_create.tf index e003eb233..2e1824c1c 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/change_policyset_id/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/change_policyset_id/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_video" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/change_policyset_id/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/change_policyset_id/policy_update.tf index bd6aeac2f..c0a828829 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/change_policyset_id/policy_update.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/change_policyset_id/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_video" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/diff_suppress/fields/default.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/diff_suppress/fields/default.tf index dbac65f93..734c4c14b 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/diff_suppress/fields/default.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/diff_suppress/fields/default.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_video" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/diff_suppress/fields/diff_order.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/diff_suppress/fields/diff_order.tf index 764fa668d..b4744a70e 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/diff_suppress/fields/diff_order.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/diff_suppress/fields/diff_order.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_video" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/invalid_field_transformation_policy/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/invalid_field_transformation_policy/policy_create.tf index ff9b87765..712f50ef8 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/invalid_field_transformation_policy/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/invalid_field_transformation_policy/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_video" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/invalid_policy/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/invalid_policy/policy_create.tf index 18c707378..6149c73f2 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/invalid_policy/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/invalid_policy/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_video" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy/policy_create.tf index e003eb233..2e1824c1c 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_video" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy/policy_update.tf index 92d047fe7..152656687 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy/policy_update.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_video" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_activate_same_time/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_activate_same_time/policy_create.tf index 92d047fe7..152656687 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_activate_same_time/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_activate_same_time/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_video" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_activate_same_time/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_activate_same_time/policy_update.tf index 44916a0a1..bed00aac5 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_activate_same_time/policy_update.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_activate_same_time/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_video" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_no_update/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_no_update/policy_create.tf index e003eb233..2e1824c1c 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_no_update/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_no_update/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_video" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_no_update/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_no_update/policy_update.tf index 92d047fe7..152656687 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_no_update/policy_update.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_no_update/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_video" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_update_staging/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_update_staging/policy_create.tf index e003eb233..2e1824c1c 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_update_staging/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_update_staging/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_video" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_update_staging/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_update_staging/policy_update.tf index 92d047fe7..152656687 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_update_staging/policy_update.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_update_staging/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_video" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_update_staging/policy_update_staging.tf b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_update_staging/policy_update_staging.tf index 303520090..f1032b9d3 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_update_staging/policy_update_staging.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyVideo/regular_policy_update_staging/policy_update_staging.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_video" "policy" { diff --git a/pkg/providers/networklists/testdata/TestDSNetworkList/match_by_id.tf b/pkg/providers/networklists/testdata/TestDSNetworkList/match_by_id.tf index b49dbe332..29dfbf85a 100644 --- a/pkg/providers/networklists/testdata/TestDSNetworkList/match_by_id.tf +++ b/pkg/providers/networklists/testdata/TestDSNetworkList/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_networklist_network_lists" "test" { diff --git a/pkg/providers/networklists/testdata/TestDSNetworkList/match_by_uniqueid.tf b/pkg/providers/networklists/testdata/TestDSNetworkList/match_by_uniqueid.tf index 133da0560..b7aedc46a 100644 --- a/pkg/providers/networklists/testdata/TestDSNetworkList/match_by_uniqueid.tf +++ b/pkg/providers/networklists/testdata/TestDSNetworkList/match_by_uniqueid.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_networklist_network_lists" "test" { diff --git a/pkg/providers/networklists/testdata/TestResActivations/match_by_id.tf b/pkg/providers/networklists/testdata/TestResActivations/match_by_id.tf index d4e9f8f68..288be0b46 100644 --- a/pkg/providers/networklists/testdata/TestResActivations/match_by_id.tf +++ b/pkg/providers/networklists/testdata/TestResActivations/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_networklist_activations" "test" { diff --git a/pkg/providers/networklists/testdata/TestResActivations/update_by_id.tf b/pkg/providers/networklists/testdata/TestResActivations/update_by_id.tf index cc61b838d..b60ac9352 100644 --- a/pkg/providers/networklists/testdata/TestResActivations/update_by_id.tf +++ b/pkg/providers/networklists/testdata/TestResActivations/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_networklist_activations" "test" { diff --git a/pkg/providers/networklists/testdata/TestResActivations/update_notes.tf b/pkg/providers/networklists/testdata/TestResActivations/update_notes.tf index 2d2679c23..79e21016c 100644 --- a/pkg/providers/networklists/testdata/TestResActivations/update_notes.tf +++ b/pkg/providers/networklists/testdata/TestResActivations/update_notes.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_networklist_activations" "test" { diff --git a/pkg/providers/networklists/testdata/TestResNetworkList/changed_contract_id.tf b/pkg/providers/networklists/testdata/TestResNetworkList/changed_contract_id.tf index bb5f72ee8..8e506cff3 100644 --- a/pkg/providers/networklists/testdata/TestResNetworkList/changed_contract_id.tf +++ b/pkg/providers/networklists/testdata/TestResNetworkList/changed_contract_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_networklist_network_list" "test" { diff --git a/pkg/providers/networklists/testdata/TestResNetworkList/changed_group_id.tf b/pkg/providers/networklists/testdata/TestResNetworkList/changed_group_id.tf index 10302ee02..3b9510617 100644 --- a/pkg/providers/networklists/testdata/TestResNetworkList/changed_group_id.tf +++ b/pkg/providers/networklists/testdata/TestResNetworkList/changed_group_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_networklist_network_list" "test" { diff --git a/pkg/providers/networklists/testdata/TestResNetworkList/match_by_id.tf b/pkg/providers/networklists/testdata/TestResNetworkList/match_by_id.tf index 0c4170670..e71178b24 100644 --- a/pkg/providers/networklists/testdata/TestResNetworkList/match_by_id.tf +++ b/pkg/providers/networklists/testdata/TestResNetworkList/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_networklist_network_list" "test" { diff --git a/pkg/providers/networklists/testdata/TestResNetworkList/update_by_id.tf b/pkg/providers/networklists/testdata/TestResNetworkList/update_by_id.tf index 4f2a50ab4..eba06f823 100644 --- a/pkg/providers/networklists/testdata/TestResNetworkList/update_by_id.tf +++ b/pkg/providers/networklists/testdata/TestResNetworkList/update_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_networklist_network_list" "test" { diff --git a/pkg/providers/networklists/testdata/TestResNetworkListDescription/match_by_id.tf b/pkg/providers/networklists/testdata/TestResNetworkListDescription/match_by_id.tf index 8339d3c1e..5d96da858 100644 --- a/pkg/providers/networklists/testdata/TestResNetworkListDescription/match_by_id.tf +++ b/pkg/providers/networklists/testdata/TestResNetworkListDescription/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_networklist_description" "test" { diff --git a/pkg/providers/networklists/testdata/TestResNetworkListSubscription/match_by_id.tf b/pkg/providers/networklists/testdata/TestResNetworkListSubscription/match_by_id.tf index 5edf4bc5f..579e5b5fc 100644 --- a/pkg/providers/networklists/testdata/TestResNetworkListSubscription/match_by_id.tf +++ b/pkg/providers/networklists/testdata/TestResNetworkListSubscription/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_networklist_subscription" "test" { diff --git a/pkg/providers/property/data_akamai_property_products_test.go b/pkg/providers/property/data_akamai_property_products_test.go index f27aabac1..111cfec39 100644 --- a/pkg/providers/property/data_akamai_property_products_test.go +++ b/pkg/providers/property/data_akamai_property_products_test.go @@ -55,7 +55,7 @@ func TestOutputProductsDataSource(t *testing.T) { func testConfig(contractIDConfig string) string { return fmt.Sprintf(` provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_products" "example" { %s } diff --git a/pkg/providers/property/data_property_akamai_groups_test.go b/pkg/providers/property/data_property_akamai_groups_test.go index cc419ec46..33626107e 100644 --- a/pkg/providers/property/data_property_akamai_groups_test.go +++ b/pkg/providers/property/data_property_akamai_groups_test.go @@ -82,7 +82,7 @@ func TestGroup_ContractNotFoundInState(t *testing.T) { func testAccDataSourceMultipleGroupsBasic() string { return ` provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_groups" "test" {} diff --git a/pkg/providers/property/resource_akamai_property_include_test.go b/pkg/providers/property/resource_akamai_property_include_test.go index f583885d1..7455ab2f3 100644 --- a/pkg/providers/property/resource_akamai_property_include_test.go +++ b/pkg/providers/property/resource_akamai_property_include_test.go @@ -11,7 +11,6 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/hapi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" "github.com/hashicorp/go-cty/cty" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-testing/helper/resource" @@ -175,7 +174,7 @@ func TestResourcePropertyInclude(t *testing.T) { } } - expectCreate := func(m *papi.Mock, testData *testData) test.MockCalls { + expectCreate := func(m *papi.Mock, testData *testData) testutils.MockCalls { testData.latestVersion++ createIncludeCall := m.On("CreateInclude", mock.Anything, papi.CreateIncludeRequest{ @@ -189,13 +188,13 @@ func TestResourcePropertyInclude(t *testing.T) { if len(testData.rulesPath) == 0 { testData.rulesPath = "default_rules.json" - return test.MockCalls{createIncludeCall} + return testutils.MockCalls{createIncludeCall} } updateIncludeRuleTreeCall := m.On("UpdateIncludeRuleTree", mock.Anything, newUpdateIncludeRuleTreeReq(testData)).Return(&papi.UpdateIncludeRuleTreeResponse{}, nil) // Return argument is ignored - return test.MockCalls{createIncludeCall, updateIncludeRuleTreeCall} + return testutils.MockCalls{createIncludeCall, updateIncludeRuleTreeCall} } expectGetIncludeRuleTree := func(m *papi.Mock, testData *testData) *mock.Call { @@ -209,7 +208,7 @@ func TestResourcePropertyInclude(t *testing.T) { return call } - expectRead := func(m *papi.Mock, testData *testData) test.MockCalls { + expectRead := func(m *papi.Mock, testData *testData) testutils.MockCalls { getIncludeCall := m.On("GetInclude", mock.Anything, papi.GetIncludeRequest{ ContractID: testData.contractID, GroupID: testData.groupID, @@ -218,10 +217,10 @@ func TestResourcePropertyInclude(t *testing.T) { getIncludeRuleTreeCall := expectGetIncludeRuleTree(m, testData) - return test.MockCalls{getIncludeCall, getIncludeRuleTreeCall} + return testutils.MockCalls{getIncludeCall, getIncludeRuleTreeCall} } - expectUpdate := func(m *papi.Mock, testData *testData) test.MockCalls { + expectUpdate := func(m *papi.Mock, testData *testData) testutils.MockCalls { getIncludeVersionCall := m.On("GetIncludeVersion", mock.Anything, papi.GetIncludeVersionRequest{ Version: testData.latestVersion, GroupID: testData.groupID, @@ -229,7 +228,7 @@ func TestResourcePropertyInclude(t *testing.T) { ContractID: testData.contractID, }).Return(newGetIncludeVersionResp(testData), nil) - calls := test.MockCalls{getIncludeVersionCall} + calls := testutils.MockCalls{getIncludeVersionCall} if testData.stagingVersion != nil || testData.productionVersion != nil { version := testData.latestVersion @@ -251,7 +250,7 @@ func TestResourcePropertyInclude(t *testing.T) { return append(calls, updateIncludeRuleTreeCall) } - expectDelete := func(m *papi.Mock, testData *testData) test.MockCalls { + expectDelete := func(m *papi.Mock, testData *testData) testutils.MockCalls { getIncludeCall := m.On("GetInclude", mock.Anything, papi.GetIncludeRequest{ ContractID: testData.contractID, GroupID: testData.groupID, @@ -264,7 +263,7 @@ func TestResourcePropertyInclude(t *testing.T) { ContractID: testData.contractID, }).Return(&papi.DeleteIncludeResponse{}, nil) - return test.MockCalls{getIncludeCall, deleteCall} + return testutils.MockCalls{getIncludeCall, deleteCall} } simulateActivation := func(testData *testData, version int, network papi.ActivationNetwork) { diff --git a/pkg/providers/property/testdata/TestDSCPCode/match_by_full_id.tf b/pkg/providers/property/testdata/TestDSCPCode/match_by_full_id.tf index 7b0c19605..f773bc576 100644 --- a/pkg/providers/property/testdata/TestDSCPCode/match_by_full_id.tf +++ b/pkg/providers/property/testdata/TestDSCPCode/match_by_full_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestDSCPCode/match_by_name.tf b/pkg/providers/property/testdata/TestDSCPCode/match_by_name.tf index d180a41df..dc534823a 100644 --- a/pkg/providers/property/testdata/TestDSCPCode/match_by_name.tf +++ b/pkg/providers/property/testdata/TestDSCPCode/match_by_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestDSCPCode/match_by_name_output_products.tf b/pkg/providers/property/testdata/TestDSCPCode/match_by_name_output_products.tf index f3f21ddb2..29f89d27f 100644 --- a/pkg/providers/property/testdata/TestDSCPCode/match_by_name_output_products.tf +++ b/pkg/providers/property/testdata/TestDSCPCode/match_by_name_output_products.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestDSCPCode/match_by_unprefixed_id.tf b/pkg/providers/property/testdata/TestDSCPCode/match_by_unprefixed_id.tf index 69106d951..e93e2581a 100644 --- a/pkg/providers/property/testdata/TestDSCPCode/match_by_unprefixed_id.tf +++ b/pkg/providers/property/testdata/TestDSCPCode/match_by_unprefixed_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_id.tf b/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_id.tf index 138dfc70a..a1ad051a6 100644 --- a/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_id.tf +++ b/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_contract" "akacontract" { diff --git a/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_id_without_prefix.tf b/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_id_without_prefix.tf index aa07711c6..98c2a1a1b 100644 --- a/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_id_without_prefix.tf +++ b/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_id_without_prefix.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_contract" "akacontract" { diff --git a/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_name.tf b/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_name.tf index 7989548ed..21941b1c4 100644 --- a/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_name.tf +++ b/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_contract" "akacontract" { diff --git a/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_name_and_group.tf b/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_name_and_group.tf index 5cb2dcb54..4997845c4 100644 --- a/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_name_and_group.tf +++ b/pkg/providers/property/testdata/TestDSContractRequired/ds_contract_with_group_name_and_group.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_contract" "akacontract" { diff --git a/pkg/providers/property/testdata/TestDSContractRequired/groups.tf b/pkg/providers/property/testdata/TestDSContractRequired/groups.tf index a9415ed72..d20b9db31 100644 --- a/pkg/providers/property/testdata/TestDSContractRequired/groups.tf +++ b/pkg/providers/property/testdata/TestDSContractRequired/groups.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_groups" "akagroups" {} diff --git a/pkg/providers/property/testdata/TestDSGroup/ds-group-w-group-name-and-contract_id.tf b/pkg/providers/property/testdata/TestDSGroup/ds-group-w-group-name-and-contract_id.tf index 5970f075d..897d973ef 100644 --- a/pkg/providers/property/testdata/TestDSGroup/ds-group-w-group-name-and-contract_id.tf +++ b/pkg/providers/property/testdata/TestDSGroup/ds-group-w-group-name-and-contract_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_group" "akagroup" { diff --git a/pkg/providers/property/testdata/TestDSGroupNotFound/cp_code.tf b/pkg/providers/property/testdata/TestDSGroupNotFound/cp_code.tf index f12daf6ee..fe4dff4bf 100644 --- a/pkg/providers/property/testdata/TestDSGroupNotFound/cp_code.tf +++ b/pkg/providers/property/testdata/TestDSGroupNotFound/cp_code.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cp_code" "akacpcode" { diff --git a/pkg/providers/property/testdata/TestDSPropertiesSearch/match_by_hostname.tf b/pkg/providers/property/testdata/TestDSPropertiesSearch/match_by_hostname.tf index ec321a0bc..376eed933 100644 --- a/pkg/providers/property/testdata/TestDSPropertiesSearch/match_by_hostname.tf +++ b/pkg/providers/property/testdata/TestDSPropertiesSearch/match_by_hostname.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_properties_search" "test" { diff --git a/pkg/providers/property/testdata/TestDSPropertyActivation/no_contact/datasource_property_activation.tf b/pkg/providers/property/testdata/TestDSPropertyActivation/no_contact/datasource_property_activation.tf index aff28e4e2..cfe587023 100644 --- a/pkg/providers/property/testdata/TestDSPropertyActivation/no_contact/datasource_property_activation.tf +++ b/pkg/providers/property/testdata/TestDSPropertyActivation/no_contact/datasource_property_activation.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestDSPropertyActivation/no_propertyId/datasource_property_activation.tf b/pkg/providers/property/testdata/TestDSPropertyActivation/no_propertyId/datasource_property_activation.tf index 3fdae812e..54c5416ac 100644 --- a/pkg/providers/property/testdata/TestDSPropertyActivation/no_propertyId/datasource_property_activation.tf +++ b/pkg/providers/property/testdata/TestDSPropertyActivation/no_propertyId/datasource_property_activation.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestDSPropertyActivation/ok/datasource_property_activation.tf b/pkg/providers/property/testdata/TestDSPropertyActivation/ok/datasource_property_activation.tf index f93a9898e..baaee74f3 100644 --- a/pkg/providers/property/testdata/TestDSPropertyActivation/ok/datasource_property_activation.tf +++ b/pkg/providers/property/testdata/TestDSPropertyActivation/ok/datasource_property_activation.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestDSPropertyActivation/ok/datasource_property_activation_no_version.tf b/pkg/providers/property/testdata/TestDSPropertyActivation/ok/datasource_property_activation_no_version.tf index 1414a9977..ea836fbf1 100644 --- a/pkg/providers/property/testdata/TestDSPropertyActivation/ok/datasource_property_activation_no_version.tf +++ b/pkg/providers/property/testdata/TestDSPropertyActivation/ok/datasource_property_activation_no_version.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestDSPropertyActivation/ok/datasource_property_activation_prod.tf b/pkg/providers/property/testdata/TestDSPropertyActivation/ok/datasource_property_activation_prod.tf index f05c64472..be3450a36 100644 --- a/pkg/providers/property/testdata/TestDSPropertyActivation/ok/datasource_property_activation_prod.tf +++ b/pkg/providers/property/testdata/TestDSPropertyActivation/ok/datasource_property_activation_prod.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestDSPropertyActivation/ok/datasource_property_activation_update.tf b/pkg/providers/property/testdata/TestDSPropertyActivation/ok/datasource_property_activation_update.tf index b3231a485..84678e090 100644 --- a/pkg/providers/property/testdata/TestDSPropertyActivation/ok/datasource_property_activation_update.tf +++ b/pkg/providers/property/testdata/TestDSPropertyActivation/ok/datasource_property_activation_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestDSPropertyIncludeRules/property_include_rules.tf b/pkg/providers/property/testdata/TestDSPropertyIncludeRules/property_include_rules.tf index 78c1c17b2..ff6f549bb 100644 --- a/pkg/providers/property/testdata/TestDSPropertyIncludeRules/property_include_rules.tf +++ b/pkg/providers/property/testdata/TestDSPropertyIncludeRules/property_include_rules.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_include_rules" "test" { diff --git a/pkg/providers/property/testdata/TestDSPropertyIncludeRules/property_include_rules_api_error.tf b/pkg/providers/property/testdata/TestDSPropertyIncludeRules/property_include_rules_api_error.tf index 01e1b5453..5845b6b7a 100644 --- a/pkg/providers/property/testdata/TestDSPropertyIncludeRules/property_include_rules_api_error.tf +++ b/pkg/providers/property/testdata/TestDSPropertyIncludeRules/property_include_rules_api_error.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_include_rules" "test" { diff --git a/pkg/providers/property/testdata/TestDSPropertyIncludeRules/property_include_rules_no_contract_id.tf b/pkg/providers/property/testdata/TestDSPropertyIncludeRules/property_include_rules_no_contract_id.tf index 6c5077a05..300a18db7 100644 --- a/pkg/providers/property/testdata/TestDSPropertyIncludeRules/property_include_rules_no_contract_id.tf +++ b/pkg/providers/property/testdata/TestDSPropertyIncludeRules/property_include_rules_no_contract_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_include_rules" "test" { diff --git a/pkg/providers/property/testdata/TestDSPropertyIncludeRules/property_include_rules_no_group_id.tf b/pkg/providers/property/testdata/TestDSPropertyIncludeRules/property_include_rules_no_group_id.tf index 955e3ccad..0d0e295d9 100644 --- a/pkg/providers/property/testdata/TestDSPropertyIncludeRules/property_include_rules_no_group_id.tf +++ b/pkg/providers/property/testdata/TestDSPropertyIncludeRules/property_include_rules_no_group_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_include_rules" "test" { diff --git a/pkg/providers/property/testdata/TestDSPropertyIncludeRules/property_include_rules_no_include_id.tf b/pkg/providers/property/testdata/TestDSPropertyIncludeRules/property_include_rules_no_include_id.tf index e4a18a178..dd6e479a5 100644 --- a/pkg/providers/property/testdata/TestDSPropertyIncludeRules/property_include_rules_no_include_id.tf +++ b/pkg/providers/property/testdata/TestDSPropertyIncludeRules/property_include_rules_no_include_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_include_rules" "test" { diff --git a/pkg/providers/property/testdata/TestDSPropertyIncludeRules/property_include_rules_no_version.tf b/pkg/providers/property/testdata/TestDSPropertyIncludeRules/property_include_rules_no_version.tf index 24bd55e52..84613ec56 100644 --- a/pkg/providers/property/testdata/TestDSPropertyIncludeRules/property_include_rules_no_version.tf +++ b/pkg/providers/property/testdata/TestDSPropertyIncludeRules/property_include_rules_no_version.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_include_rules" "test" { diff --git a/pkg/providers/property/testdata/TestDSPropertyRuleFormats/rule_formats.tf b/pkg/providers/property/testdata/TestDSPropertyRuleFormats/rule_formats.tf index 62ade5c98..5166ec983 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRuleFormats/rule_formats.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRuleFormats/rule_formats.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rule_formats" "akarulesformats" {} diff --git a/pkg/providers/property/testdata/TestDSPropertyRules/always_fails.tf b/pkg/providers/property/testdata/TestDSPropertyRules/always_fails.tf index 5fe3e949a..9af0fd256 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRules/always_fails.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRules/always_fails.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules" "rules" { diff --git a/pkg/providers/property/testdata/TestDSPropertyRules/ds_property_rules.tf b/pkg/providers/property/testdata/TestDSPropertyRules/ds_property_rules.tf index 62775c8ef..05923e61e 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRules/ds_property_rules.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRules/ds_property_rules.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules" "rules" { diff --git a/pkg/providers/property/testdata/TestDSPropertyRules/empty_contract_id.tf b/pkg/providers/property/testdata/TestDSPropertyRules/empty_contract_id.tf index cdb330850..ccb3fa51d 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRules/empty_contract_id.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRules/empty_contract_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules" "rules" { diff --git a/pkg/providers/property/testdata/TestDSPropertyRules/empty_group_id.tf b/pkg/providers/property/testdata/TestDSPropertyRules/empty_group_id.tf index ba487e3d3..e3af9de84 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRules/empty_group_id.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRules/empty_group_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules" "rules" { diff --git a/pkg/providers/property/testdata/TestDSPropertyRules/missing_contract_id.tf b/pkg/providers/property/testdata/TestDSPropertyRules/missing_contract_id.tf index a0350d004..417175760 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRules/missing_contract_id.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRules/missing_contract_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules" "rules" { diff --git a/pkg/providers/property/testdata/TestDSPropertyRules/missing_group_id.tf b/pkg/providers/property/testdata/TestDSPropertyRules/missing_group_id.tf index c76307ba1..991e370d4 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRules/missing_group_id.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRules/missing_group_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules" "rules" { diff --git a/pkg/providers/property/testdata/TestDSPropertyRules/with_latest_rule_format.tf b/pkg/providers/property/testdata/TestDSPropertyRules/with_latest_rule_format.tf index 8791ce304..90e82917e 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRules/with_latest_rule_format.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRules/with_latest_rule_format.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules" "rules" { diff --git a/pkg/providers/property/testdata/TestDSPropertyRules/with_versioned_rule_format.tf b/pkg/providers/property/testdata/TestDSPropertyRules/with_versioned_rule_format.tf index 8fb1a63db..d2b9b037f 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRules/with_versioned_rule_format.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRules/with_versioned_rule_format.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules" "rules" { diff --git a/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_error_too_many_elements.tf b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_error_too_many_elements.tf index 3b8366ac1..884a6ea96 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_error_too_many_elements.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_error_too_many_elements.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_builder" "default" { diff --git a/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_mixed_versions.tf b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_mixed_versions.tf index d57e8f11e..162fce700 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_mixed_versions.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_mixed_versions.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_builder" "default" { diff --git a/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2023_01_05.tf b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2023_01_05.tf index 5f73153e1..871c872f7 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2023_01_05.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2023_01_05.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_builder" "default" { diff --git a/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2023_05_30.tf b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2023_05_30.tf index d44f8939c..859841519 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2023_05_30.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2023_05_30.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_builder" "default" { diff --git a/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2023_09_20.tf b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2023_09_20.tf index fedfeaffa..c7a75cc91 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2023_09_20.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2023_09_20.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_builder" "default" { diff --git a/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_variables.tf b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_variables.tf index ed7c027c1..3c77625e6 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_variables.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_variables.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_builder" "default" { diff --git a/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_with_is_secure_outside_default.tf b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_with_is_secure_outside_default.tf index 13733865b..0fc60b6dd 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_with_is_secure_outside_default.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_with_is_secure_outside_default.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_builder" "default" { diff --git a/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_with_variable_outside_default.tf b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_with_variable_outside_default.tf index 413c92f94..de8fcf25f 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_with_variable_outside_default.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_with_variable_outside_default.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_builder" "default" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_child_with_childs.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_child_with_childs.tf index 8beb8d253..9a8827d59 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_child_with_childs.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_child_with_childs.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_data_conflict.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_data_conflict.tf index 573ec8f68..2da72e100 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_data_conflict.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_data_conflict.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_data_missing.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_data_missing.tf index 3154bd65d..432f7e589 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_data_missing.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_data_missing.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_is_empty.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_is_empty.tf index 9c55aa692..d6ac7a222 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_is_empty.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_is_empty.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_not_found.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_not_found.tf index f3260f380..499499e9b 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_not_found.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_file_not_found.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_include_with_variables.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_include_with_variables.tf index 3a2cd986d..891e94de1 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_include_with_variables.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_include_with_variables.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_invalid_json.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_invalid_json.tf index 92c62e43b..36a48b83d 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_invalid_json.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_invalid_json.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_invalid_snippets_file_not_json.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_invalid_snippets_file_not_json.tf index db18cb35d..6db61ca34 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_invalid_snippets_file_not_json.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_invalid_snippets_file_not_json.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_missing_data.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_missing_data.tf index 040f422b3..86b039137 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_missing_data.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_missing_data.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_missing_dir.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_missing_dir.tf index 002ccee4f..7b2e4eb0e 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_missing_dir.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_missing_dir.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_multiple_templates.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_multiple_templates.tf index 8564e7778..21ff9c75a 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_multiple_templates.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_multiple_templates.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "rules1" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_nested_includes.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_nested_includes.tf index 92697b58f..db905b5c4 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_nested_includes.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_nested_includes.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_not_valid_json_includes.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_not_valid_json_includes.tf index 483a08416..078424f3f 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_not_valid_json_includes.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_not_valid_json_includes.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_null_values.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_null_values.tf index a27c63fcd..8d0c3646e 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_null_values.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_null_values.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_null_values_with_data.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_null_values_with_data.tf index f86d3982d..7ec9b0c4b 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_null_values_with_data.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_null_values_with_data.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_simple_cyclic_dependency.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_simple_cyclic_dependency.tf index 411c09454..8e950f1ad 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_simple_cyclic_dependency.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_simple_cyclic_dependency.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_tricky_cyclic_dependency.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_tricky_cyclic_dependency.tf index f88ed829e..bd879a31d 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_tricky_cyclic_dependency.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_tricky_cyclic_dependency.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_var_not_found.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_var_not_found.tf index 967f0ebc0..d333c2582 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_var_not_found.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_var_not_found.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_variable_building_in_include.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_variable_building_in_include.tf index 40f9418cf..bbfc925cf 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_variable_building_in_include.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_variable_building_in_include.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_variables_build.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_variables_build.tf index f02d45ec7..6eebee840 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_variables_build.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_variables_build.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_conflict.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_conflict.tf index 2daeca76e..693a09011 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_conflict.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_conflict.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_file.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_file.tf index 935f61393..0ed1ca9af 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_file.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_file.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_file_not_found.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_file_not_found.tf index e8cb2569c..501bd2128 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_file_not_found.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_file_not_found.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_file_with_data.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_file_with_data.tf index e2d399b49..2af1822cc 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_file_with_data.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_file_with_data.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_invalid_type.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_invalid_type.tf index 61c4e9f61..9a28cf729 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_invalid_type.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_invalid_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_invalid_value.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_invalid_value.tf index 502cd7c61..a3153f85c 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_invalid_value.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_invalid_value.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_map.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_map.tf index 7c108e2b3..818601533 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_map.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_map.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_map_ns.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_map_ns.tf index b48703a6b..407088796 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_map_ns.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_map_ns.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_map_with_data.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_map_with_data.tf index 72361c5b8..e5dc5a473 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_map_with_data.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_map_with_data.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_map_with_data_ns.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_map_with_data_ns.tf index c4b886e9d..e91a3d113 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_map_with_data_ns.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_vars_map_with_data_ns.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "test" { diff --git a/pkg/providers/property/testdata/TestDSRulesTemplate/template_with_list.tf b/pkg/providers/property/testdata/TestDSRulesTemplate/template_with_list.tf index ff96f9c19..0601b6287 100644 --- a/pkg/providers/property/testdata/TestDSRulesTemplate/template_with_list.tf +++ b/pkg/providers/property/testdata/TestDSRulesTemplate/template_with_list.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } variable "a_list" { diff --git a/pkg/providers/property/testdata/TestDataContracts/contracts.tf b/pkg/providers/property/testdata/TestDataContracts/contracts.tf index 0f611245d..cc0b2eb88 100644 --- a/pkg/providers/property/testdata/TestDataContracts/contracts.tf +++ b/pkg/providers/property/testdata/TestDataContracts/contracts.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_contracts" "akacontracts" { diff --git a/pkg/providers/property/testdata/TestDataProperties/properties.tf b/pkg/providers/property/testdata/TestDataProperties/properties.tf index 4af5234e5..48820caf9 100644 --- a/pkg/providers/property/testdata/TestDataProperties/properties.tf +++ b/pkg/providers/property/testdata/TestDataProperties/properties.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_properties" "akaproperties" { diff --git a/pkg/providers/property/testdata/TestDataProperties/properties_no_contract_prefix.tf b/pkg/providers/property/testdata/TestDataProperties/properties_no_contract_prefix.tf index 8e602b6a1..6739f9d12 100644 --- a/pkg/providers/property/testdata/TestDataProperties/properties_no_contract_prefix.tf +++ b/pkg/providers/property/testdata/TestDataProperties/properties_no_contract_prefix.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_properties" "akaproperties" { diff --git a/pkg/providers/property/testdata/TestDataProperties/properties_no_group_prefix.tf b/pkg/providers/property/testdata/TestDataProperties/properties_no_group_prefix.tf index acac30fc7..ba39ebaea 100644 --- a/pkg/providers/property/testdata/TestDataProperties/properties_no_group_prefix.tf +++ b/pkg/providers/property/testdata/TestDataProperties/properties_no_group_prefix.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_properties" "akaproperties" { diff --git a/pkg/providers/property/testdata/TestDataProperty/no_name.tf b/pkg/providers/property/testdata/TestDataProperty/no_name.tf index 92bc4e540..6f39b5ed0 100644 --- a/pkg/providers/property/testdata/TestDataProperty/no_name.tf +++ b/pkg/providers/property/testdata/TestDataProperty/no_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } diff --git a/pkg/providers/property/testdata/TestDataProperty/no_version.tf b/pkg/providers/property/testdata/TestDataProperty/no_version.tf index d158111b0..e954047c1 100644 --- a/pkg/providers/property/testdata/TestDataProperty/no_version.tf +++ b/pkg/providers/property/testdata/TestDataProperty/no_version.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } diff --git a/pkg/providers/property/testdata/TestDataProperty/with_version.tf b/pkg/providers/property/testdata/TestDataProperty/with_version.tf index 1f67772ab..6caca50f7 100644 --- a/pkg/providers/property/testdata/TestDataProperty/with_version.tf +++ b/pkg/providers/property/testdata/TestDataProperty/with_version.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } diff --git a/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames.tf b/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames.tf index 9d02ac536..964b5a926 100644 --- a/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames.tf +++ b/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_hostnames" "akaprophosts" { diff --git a/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_no_contract_prefix.tf b/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_no_contract_prefix.tf index 75c43d7fd..b5ca887f8 100644 --- a/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_no_contract_prefix.tf +++ b/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_no_contract_prefix.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_hostnames" "akaprophosts" { diff --git a/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_no_group_prefix.tf b/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_no_group_prefix.tf index 400d96fd5..75f5014d5 100644 --- a/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_no_group_prefix.tf +++ b/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_no_group_prefix.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_hostnames" "akaprophosts" { diff --git a/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_no_property_prefix.tf b/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_no_property_prefix.tf index b7eae1a77..7a6a1d8c8 100644 --- a/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_no_property_prefix.tf +++ b/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_no_property_prefix.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_hostnames" "akaprophosts" { diff --git a/pkg/providers/property/testdata/TestDataPropertyInclude/missing_contract_id.tf b/pkg/providers/property/testdata/TestDataPropertyInclude/missing_contract_id.tf index cd356a28f..9679998a6 100644 --- a/pkg/providers/property/testdata/TestDataPropertyInclude/missing_contract_id.tf +++ b/pkg/providers/property/testdata/TestDataPropertyInclude/missing_contract_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } diff --git a/pkg/providers/property/testdata/TestDataPropertyInclude/missing_group_id.tf b/pkg/providers/property/testdata/TestDataPropertyInclude/missing_group_id.tf index 9b60f6862..df98f0663 100644 --- a/pkg/providers/property/testdata/TestDataPropertyInclude/missing_group_id.tf +++ b/pkg/providers/property/testdata/TestDataPropertyInclude/missing_group_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } diff --git a/pkg/providers/property/testdata/TestDataPropertyInclude/missing_include_id.tf b/pkg/providers/property/testdata/TestDataPropertyInclude/missing_include_id.tf index 601b4ab21..f6703b3b0 100644 --- a/pkg/providers/property/testdata/TestDataPropertyInclude/missing_include_id.tf +++ b/pkg/providers/property/testdata/TestDataPropertyInclude/missing_include_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } diff --git a/pkg/providers/property/testdata/TestDataPropertyInclude/valid.tf b/pkg/providers/property/testdata/TestDataPropertyInclude/valid.tf index b7c528064..50aa0e0b5 100644 --- a/pkg/providers/property/testdata/TestDataPropertyInclude/valid.tf +++ b/pkg/providers/property/testdata/TestDataPropertyInclude/valid.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } diff --git a/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/no_activation_for_given_network.tf b/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/no_activation_for_given_network.tf index e0d0123dd..19952d6d9 100644 --- a/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/no_activation_for_given_network.tf +++ b/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/no_activation_for_given_network.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } diff --git a/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/no_contract_id.tf b/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/no_contract_id.tf index d8f8d9ae3..68902603c 100644 --- a/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/no_contract_id.tf +++ b/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/no_contract_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } diff --git a/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/no_group_id.tf b/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/no_group_id.tf index 846c401c3..86621fff0 100644 --- a/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/no_group_id.tf +++ b/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/no_group_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } diff --git a/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/no_include_id.tf b/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/no_include_id.tf index d02708deb..cb5e3fe35 100644 --- a/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/no_include_id.tf +++ b/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/no_include_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } diff --git a/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/no_network.tf b/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/no_network.tf index 750aa1a14..505d000ad 100644 --- a/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/no_network.tf +++ b/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/no_network.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } diff --git a/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/valid_production.tf b/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/valid_production.tf index e0d0123dd..19952d6d9 100644 --- a/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/valid_production.tf +++ b/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/valid_production.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } diff --git a/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/valid_staging.tf b/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/valid_staging.tf index bf95e9cee..250a42151 100644 --- a/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/valid_staging.tf +++ b/pkg/providers/property/testdata/TestDataPropertyIncludeActivation/valid_staging.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } diff --git a/pkg/providers/property/testdata/TestDataPropertyIncludeParents/missing_contract_id.tf b/pkg/providers/property/testdata/TestDataPropertyIncludeParents/missing_contract_id.tf index 6e700847c..5e2311bfc 100644 --- a/pkg/providers/property/testdata/TestDataPropertyIncludeParents/missing_contract_id.tf +++ b/pkg/providers/property/testdata/TestDataPropertyIncludeParents/missing_contract_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } diff --git a/pkg/providers/property/testdata/TestDataPropertyIncludeParents/missing_group_id.tf b/pkg/providers/property/testdata/TestDataPropertyIncludeParents/missing_group_id.tf index c77ab1b77..ac27eff53 100644 --- a/pkg/providers/property/testdata/TestDataPropertyIncludeParents/missing_group_id.tf +++ b/pkg/providers/property/testdata/TestDataPropertyIncludeParents/missing_group_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } diff --git a/pkg/providers/property/testdata/TestDataPropertyIncludeParents/missing_include_id.tf b/pkg/providers/property/testdata/TestDataPropertyIncludeParents/missing_include_id.tf index 9de2c4766..724ee2a18 100644 --- a/pkg/providers/property/testdata/TestDataPropertyIncludeParents/missing_include_id.tf +++ b/pkg/providers/property/testdata/TestDataPropertyIncludeParents/missing_include_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } diff --git a/pkg/providers/property/testdata/TestDataPropertyIncludeParents/valid.tf b/pkg/providers/property/testdata/TestDataPropertyIncludeParents/valid.tf index f15cef281..38341d52f 100644 --- a/pkg/providers/property/testdata/TestDataPropertyIncludeParents/valid.tf +++ b/pkg/providers/property/testdata/TestDataPropertyIncludeParents/valid.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } diff --git a/pkg/providers/property/testdata/TestDataPropertyIncludes/invalid_include_type.tf b/pkg/providers/property/testdata/TestDataPropertyIncludes/invalid_include_type.tf index 7050fdafd..694429e0f 100644 --- a/pkg/providers/property/testdata/TestDataPropertyIncludes/invalid_include_type.tf +++ b/pkg/providers/property/testdata/TestDataPropertyIncludes/invalid_include_type.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_includes" "test" { diff --git a/pkg/providers/property/testdata/TestDataPropertyIncludes/no_contract_id.tf b/pkg/providers/property/testdata/TestDataPropertyIncludes/no_contract_id.tf index 61147efc5..c8fd71753 100644 --- a/pkg/providers/property/testdata/TestDataPropertyIncludes/no_contract_id.tf +++ b/pkg/providers/property/testdata/TestDataPropertyIncludes/no_contract_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_includes" "test" { diff --git a/pkg/providers/property/testdata/TestDataPropertyIncludes/no_group_id.tf b/pkg/providers/property/testdata/TestDataPropertyIncludes/no_group_id.tf index 806512259..3435f3b42 100644 --- a/pkg/providers/property/testdata/TestDataPropertyIncludes/no_group_id.tf +++ b/pkg/providers/property/testdata/TestDataPropertyIncludes/no_group_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_includes" "test" { diff --git a/pkg/providers/property/testdata/TestDataPropertyIncludes/no_property_id.tf b/pkg/providers/property/testdata/TestDataPropertyIncludes/no_property_id.tf index 61d83d85f..2b05ee50a 100644 --- a/pkg/providers/property/testdata/TestDataPropertyIncludes/no_property_id.tf +++ b/pkg/providers/property/testdata/TestDataPropertyIncludes/no_property_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_includes" "test" { diff --git a/pkg/providers/property/testdata/TestDataPropertyIncludes/no_property_version.tf b/pkg/providers/property/testdata/TestDataPropertyIncludes/no_property_version.tf index 6ca254cf0..8e7914488 100644 --- a/pkg/providers/property/testdata/TestDataPropertyIncludes/no_property_version.tf +++ b/pkg/providers/property/testdata/TestDataPropertyIncludes/no_property_version.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_includes" "test" { diff --git a/pkg/providers/property/testdata/TestDataPropertyIncludes/with_parent_property/list_available_includes_no_filters.tf b/pkg/providers/property/testdata/TestDataPropertyIncludes/with_parent_property/list_available_includes_no_filters.tf index 5b10a8b5b..ac0bead63 100644 --- a/pkg/providers/property/testdata/TestDataPropertyIncludes/with_parent_property/list_available_includes_no_filters.tf +++ b/pkg/providers/property/testdata/TestDataPropertyIncludes/with_parent_property/list_available_includes_no_filters.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_includes" "test" { diff --git a/pkg/providers/property/testdata/TestDataPropertyIncludes/with_parent_property/list_available_includes_type_common_settings.tf b/pkg/providers/property/testdata/TestDataPropertyIncludes/with_parent_property/list_available_includes_type_common_settings.tf index 23e3efbf8..7d57508bc 100644 --- a/pkg/providers/property/testdata/TestDataPropertyIncludes/with_parent_property/list_available_includes_type_common_settings.tf +++ b/pkg/providers/property/testdata/TestDataPropertyIncludes/with_parent_property/list_available_includes_type_common_settings.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_includes" "test" { diff --git a/pkg/providers/property/testdata/TestDataPropertyIncludes/with_parent_property/list_available_includes_type_microservices.tf b/pkg/providers/property/testdata/TestDataPropertyIncludes/with_parent_property/list_available_includes_type_microservices.tf index d56318a69..cfee3ef31 100644 --- a/pkg/providers/property/testdata/TestDataPropertyIncludes/with_parent_property/list_available_includes_type_microservices.tf +++ b/pkg/providers/property/testdata/TestDataPropertyIncludes/with_parent_property/list_available_includes_type_microservices.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_includes" "test" { diff --git a/pkg/providers/property/testdata/TestDataPropertyIncludes/without_parent_property/list_includes_no_filters.tf b/pkg/providers/property/testdata/TestDataPropertyIncludes/without_parent_property/list_includes_no_filters.tf index d5d5d8d1d..5af77788a 100644 --- a/pkg/providers/property/testdata/TestDataPropertyIncludes/without_parent_property/list_includes_no_filters.tf +++ b/pkg/providers/property/testdata/TestDataPropertyIncludes/without_parent_property/list_includes_no_filters.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_includes" "test" { diff --git a/pkg/providers/property/testdata/TestDataPropertyIncludes/without_parent_property/list_includes_type_common_settings.tf b/pkg/providers/property/testdata/TestDataPropertyIncludes/without_parent_property/list_includes_type_common_settings.tf index 68c29ac5c..36accc919 100644 --- a/pkg/providers/property/testdata/TestDataPropertyIncludes/without_parent_property/list_includes_type_common_settings.tf +++ b/pkg/providers/property/testdata/TestDataPropertyIncludes/without_parent_property/list_includes_type_common_settings.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_includes" "test" { diff --git a/pkg/providers/property/testdata/TestDataPropertyIncludes/without_parent_property/list_includes_type_microservices.tf b/pkg/providers/property/testdata/TestDataPropertyIncludes/without_parent_property/list_includes_type_microservices.tf index d27588eec..8e3594531 100644 --- a/pkg/providers/property/testdata/TestDataPropertyIncludes/without_parent_property/list_includes_type_microservices.tf +++ b/pkg/providers/property/testdata/TestDataPropertyIncludes/without_parent_property/list_includes_type_microservices.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_includes" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/500_on_activation/resource_property_activation.tf b/pkg/providers/property/testdata/TestPropertyActivation/500_on_activation/resource_property_activation.tf index cc107f039..e6fb0f103 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/500_on_activation/resource_property_activation.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/500_on_activation/resource_property_activation.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/500_on_activation/resource_property_activation_update.tf b/pkg/providers/property/testdata/TestPropertyActivation/500_on_activation/resource_property_activation_update.tf index a51dfa37d..e78275e7d 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/500_on_activation/resource_property_activation_update.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/500_on_activation/resource_property_activation_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/cr_validation/resource_property_activation_with_empty_cr.tf b/pkg/providers/property/testdata/TestPropertyActivation/cr_validation/resource_property_activation_with_empty_cr.tf index 07d66eb12..d3cf32bd1 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/cr_validation/resource_property_activation_with_empty_cr.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/cr_validation/resource_property_activation_with_empty_cr.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/cr_validation/resource_property_activation_with_more_than_one_cr.tf b/pkg/providers/property/testdata/TestPropertyActivation/cr_validation/resource_property_activation_with_more_than_one_cr.tf index 04ca1ed93..fdd229184 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/cr_validation/resource_property_activation_with_more_than_one_cr.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/cr_validation/resource_property_activation_with_more_than_one_cr.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/deactivated_in_other_source/resource_property_activation.tf b/pkg/providers/property/testdata/TestPropertyActivation/deactivated_in_other_source/resource_property_activation.tf index cc107f039..e6fb0f103 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/deactivated_in_other_source/resource_property_activation.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/deactivated_in_other_source/resource_property_activation.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/diff_suppress/resource_property_activation.tf b/pkg/providers/property/testdata/TestPropertyActivation/diff_suppress/resource_property_activation.tf index a49ab2a19..57cf442e0 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/diff_suppress/resource_property_activation.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/diff_suppress/resource_property_activation.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/diff_suppress/resource_property_activation_update.tf b/pkg/providers/property/testdata/TestPropertyActivation/diff_suppress/resource_property_activation_update.tf index 977831f47..3b77772e0 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/diff_suppress/resource_property_activation_update.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/diff_suppress/resource_property_activation_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/import/resource_property_activation_creation_for_import.tf b/pkg/providers/property/testdata/TestPropertyActivation/import/resource_property_activation_creation_for_import.tf index 7fcb704ce..6865926c9 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/import/resource_property_activation_creation_for_import.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/import/resource_property_activation_creation_for_import.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/no_contact/resource_property_activation.tf b/pkg/providers/property/testdata/TestPropertyActivation/no_contact/resource_property_activation.tf index c14b6c023..21a422aba 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/no_contact/resource_property_activation.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/no_contact/resource_property_activation.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/no_propertyId/resource_property_activation.tf b/pkg/providers/property/testdata/TestPropertyActivation/no_propertyId/resource_property_activation.tf index 147d63415..e38e3d974 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/no_propertyId/resource_property_activation.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/no_propertyId/resource_property_activation.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation.tf b/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation.tf index a49ab2a19..57cf442e0 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation_minimum_args.tf b/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation_minimum_args.tf index df0ab138c..5fec626bd 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation_minimum_args.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation_minimum_args.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation_update.tf b/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation_update.tf index a89f40e89..477e77cbe 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation_update.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation_with_compliance_record.tf b/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation_with_compliance_record.tf index c704e0be6..0f8faea7b 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation_with_compliance_record.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/ok/resource_property_activation_with_compliance_record.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/timeouts/resource_property_activation_incorrect_timeout.tf b/pkg/providers/property/testdata/TestPropertyActivation/timeouts/resource_property_activation_incorrect_timeout.tf index 78ef32452..a41bb4a7b 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/timeouts/resource_property_activation_incorrect_timeout.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/timeouts/resource_property_activation_incorrect_timeout.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/timeouts/resource_property_activation_with_timeout.tf b/pkg/providers/property/testdata/TestPropertyActivation/timeouts/resource_property_activation_with_timeout.tf index 8e4b5def9..8a3a1fb98 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/timeouts/resource_property_activation_with_timeout.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/timeouts/resource_property_activation_with_timeout.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/timeouts/resource_property_activation_with_timeout_update.tf b/pkg/providers/property/testdata/TestPropertyActivation/timeouts/resource_property_activation_with_timeout_update.tf index 7ef2e0a7f..31f8280ab 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/timeouts/resource_property_activation_with_timeout_update.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/timeouts/resource_property_activation_with_timeout_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_doesnt_exist/resource_property_activation.tf b/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_doesnt_exist/resource_property_activation.tf index e29b33cb5..c9f9070e7 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_doesnt_exist/resource_property_activation.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_doesnt_exist/resource_property_activation.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_doesnt_exist/resource_property_activation_update.tf b/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_doesnt_exist/resource_property_activation_update.tf index ff706398e..5b52c28c0 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_doesnt_exist/resource_property_activation_update.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_doesnt_exist/resource_property_activation_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_exists/resource_property_activation.tf b/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_exists/resource_property_activation.tf index ff706398e..5b52c28c0 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_exists/resource_property_activation.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_exists/resource_property_activation.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_exists/resource_property_activation_update.tf b/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_exists/resource_property_activation_update.tf index f167436f5..3c7c7c726 100644 --- a/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_exists/resource_property_activation_update.tf +++ b/pkg/providers/property/testdata/TestPropertyActivation/update_note_field/note_field_exists/resource_property_activation_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_activation" "test" { diff --git a/pkg/providers/property/testdata/TestResCPCode/change_immutable.tf b/pkg/providers/property/testdata/TestResCPCode/change_immutable.tf index 3cd2af0b6..849da914b 100644 --- a/pkg/providers/property/testdata/TestResCPCode/change_immutable.tf +++ b/pkg/providers/property/testdata/TestResCPCode/change_immutable.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestResCPCode/change_name_step0.tf b/pkg/providers/property/testdata/TestResCPCode/change_name_step0.tf index bc7844289..de6341b88 100644 --- a/pkg/providers/property/testdata/TestResCPCode/change_name_step0.tf +++ b/pkg/providers/property/testdata/TestResCPCode/change_name_step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestResCPCode/change_name_step1.tf b/pkg/providers/property/testdata/TestResCPCode/change_name_step1.tf index 19dafdeae..c53a2a631 100644 --- a/pkg/providers/property/testdata/TestResCPCode/change_name_step1.tf +++ b/pkg/providers/property/testdata/TestResCPCode/change_name_step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestResCPCode/change_product_step0.tf b/pkg/providers/property/testdata/TestResCPCode/change_product_step0.tf index 7a9958c1d..9d09117ef 100644 --- a/pkg/providers/property/testdata/TestResCPCode/change_product_step0.tf +++ b/pkg/providers/property/testdata/TestResCPCode/change_product_step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestResCPCode/change_product_step1.tf b/pkg/providers/property/testdata/TestResCPCode/change_product_step1.tf index 612f85181..5da76c4f5 100644 --- a/pkg/providers/property/testdata/TestResCPCode/change_product_step1.tf +++ b/pkg/providers/property/testdata/TestResCPCode/change_product_step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestResCPCode/create_new_cp_code.tf b/pkg/providers/property/testdata/TestResCPCode/create_new_cp_code.tf index 1b67c69f7..fa71e3cab 100644 --- a/pkg/providers/property/testdata/TestResCPCode/create_new_cp_code.tf +++ b/pkg/providers/property/testdata/TestResCPCode/create_new_cp_code.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestResCPCode/import_cp_code.tf b/pkg/providers/property/testdata/TestResCPCode/import_cp_code.tf index 8f491c3a6..9f836c23c 100644 --- a/pkg/providers/property/testdata/TestResCPCode/import_cp_code.tf +++ b/pkg/providers/property/testdata/TestResCPCode/import_cp_code.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestResCPCode/missing_product.tf b/pkg/providers/property/testdata/TestResCPCode/missing_product.tf index f40f78c40..695eacb38 100644 --- a/pkg/providers/property/testdata/TestResCPCode/missing_product.tf +++ b/pkg/providers/property/testdata/TestResCPCode/missing_product.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestResCPCode/use_existing_cp_code.tf b/pkg/providers/property/testdata/TestResCPCode/use_existing_cp_code.tf index 11c308daa..aae1c3015 100644 --- a/pkg/providers/property/testdata/TestResCPCode/use_existing_cp_code.tf +++ b/pkg/providers/property/testdata/TestResCPCode/use_existing_cp_code.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cp_code" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ConfigError/contract_id_not_given.tf b/pkg/providers/property/testdata/TestResProperty/ConfigError/contract_id_not_given.tf index 57d7ee38e..ab7690ef8 100644 --- a/pkg/providers/property/testdata/TestResProperty/ConfigError/contract_id_not_given.tf +++ b/pkg/providers/property/testdata/TestResProperty/ConfigError/contract_id_not_given.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ConfigError/group_id_not_given.tf b/pkg/providers/property/testdata/TestResProperty/ConfigError/group_id_not_given.tf index 0888de60b..563001ab0 100644 --- a/pkg/providers/property/testdata/TestResProperty/ConfigError/group_id_not_given.tf +++ b/pkg/providers/property/testdata/TestResProperty/ConfigError/group_id_not_given.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ConfigError/invalid_json_rules.tf b/pkg/providers/property/testdata/TestResProperty/ConfigError/invalid_json_rules.tf index 8be1fab30..987bc1840 100644 --- a/pkg/providers/property/testdata/TestResProperty/ConfigError/invalid_json_rules.tf +++ b/pkg/providers/property/testdata/TestResProperty/ConfigError/invalid_json_rules.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ConfigError/invalid_name_given.tf b/pkg/providers/property/testdata/TestResProperty/ConfigError/invalid_name_given.tf index f35371b87..c610bbb1a 100644 --- a/pkg/providers/property/testdata/TestResProperty/ConfigError/invalid_name_given.tf +++ b/pkg/providers/property/testdata/TestResProperty/ConfigError/invalid_name_given.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ConfigError/name_given_too_long.tf b/pkg/providers/property/testdata/TestResProperty/ConfigError/name_given_too_long.tf index 40de3bff3..adc625338 100644 --- a/pkg/providers/property/testdata/TestResProperty/ConfigError/name_given_too_long.tf +++ b/pkg/providers/property/testdata/TestResProperty/ConfigError/name_given_too_long.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ConfigError/name_not_given.tf b/pkg/providers/property/testdata/TestResProperty/ConfigError/name_not_given.tf index 61fae40ba..d3f34c9fc 100644 --- a/pkg/providers/property/testdata/TestResProperty/ConfigError/name_not_given.tf +++ b/pkg/providers/property/testdata/TestResProperty/ConfigError/name_not_given.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ConfigError/product_id_not_given.tf b/pkg/providers/property/testdata/TestResProperty/ConfigError/product_id_not_given.tf index 045f92257..302298122 100644 --- a/pkg/providers/property/testdata/TestResProperty/ConfigError/product_id_not_given.tf +++ b/pkg/providers/property/testdata/TestResProperty/ConfigError/product_id_not_given.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Creation/property.tf b/pkg/providers/property/testdata/TestResProperty/Creation/property.tf index 0dde60adc..b9730bec7 100644 --- a/pkg/providers/property/testdata/TestResProperty/Creation/property.tf +++ b/pkg/providers/property/testdata/TestResProperty/Creation/property.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } diff --git a/pkg/providers/property/testdata/TestResProperty/CreationUpdateIncorrectEdgeHostname/create/property.tf b/pkg/providers/property/testdata/TestResProperty/CreationUpdateIncorrectEdgeHostname/create/property.tf index df94747be..0894ac5b8 100644 --- a/pkg/providers/property/testdata/TestResProperty/CreationUpdateIncorrectEdgeHostname/create/property.tf +++ b/pkg/providers/property/testdata/TestResProperty/CreationUpdateIncorrectEdgeHostname/create/property.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "akarules" { diff --git a/pkg/providers/property/testdata/TestResProperty/CreationUpdateIncorrectEdgeHostname/update/property.tf b/pkg/providers/property/testdata/TestResProperty/CreationUpdateIncorrectEdgeHostname/update/property.tf index 33cc8a9c6..b59a450b9 100644 --- a/pkg/providers/property/testdata/TestResProperty/CreationUpdateIncorrectEdgeHostname/update/property.tf +++ b/pkg/providers/property/testdata/TestResProperty/CreationUpdateIncorrectEdgeHostname/update/property.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_template" "akarules" { diff --git a/pkg/providers/property/testdata/TestResProperty/CreationUpdateNoHostnames/creation/property_create.tf b/pkg/providers/property/testdata/TestResProperty/CreationUpdateNoHostnames/creation/property_create.tf index cb7390366..8f918efa1 100644 --- a/pkg/providers/property/testdata/TestResProperty/CreationUpdateNoHostnames/creation/property_create.tf +++ b/pkg/providers/property/testdata/TestResProperty/CreationUpdateNoHostnames/creation/property_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/CreationUpdateNoHostnames/update/property_update.tf b/pkg/providers/property/testdata/TestResProperty/CreationUpdateNoHostnames/update/property_update.tf index ff8efe220..7d1fb4d46 100644 --- a/pkg/providers/property/testdata/TestResProperty/CreationUpdateNoHostnames/update/property_update.tf +++ b/pkg/providers/property/testdata/TestResProperty/CreationUpdateNoHostnames/update/property_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/contact.tf b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/contact.tf index 8835c54a0..c77b82999 100644 --- a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/contact.tf +++ b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/contact.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/cp_code.tf b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/cp_code.tf index 4f6aa3936..9a9ca9286 100644 --- a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/cp_code.tf +++ b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/cp_code.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/hostnames.tf b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/hostnames.tf index 83710029e..87d6199fe 100644 --- a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/hostnames.tf +++ b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/hostnames.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/is_secure.tf b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/is_secure.tf index a9a705a32..d45f1ede2 100644 --- a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/is_secure.tf +++ b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/is_secure.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/origin.tf b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/origin.tf index c5c2b3450..5a03cf04a 100644 --- a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/origin.tf +++ b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/origin.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/rule_format.tf b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/rule_format.tf index 2595b98dc..050478b00 100644 --- a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/rule_format.tf +++ b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/rule_format.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/rules.tf b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/rules.tf index 52d1d24c9..e0427c743 100644 --- a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/rules.tf +++ b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/rules.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/variables.tf b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/variables.tf index 824ef10db..aeb6b6d1b 100644 --- a/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/variables.tf +++ b/pkg/providers/property/testdata/TestResProperty/ForbiddenAttr/variables.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Immutable/contract/step0.tf b/pkg/providers/property/testdata/TestResProperty/Immutable/contract/step0.tf index a9875bdca..08a4ce970 100644 --- a/pkg/providers/property/testdata/TestResProperty/Immutable/contract/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Immutable/contract/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Immutable/contract/step1.tf b/pkg/providers/property/testdata/TestResProperty/Immutable/contract/step1.tf index 70bcd9162..1534f988c 100644 --- a/pkg/providers/property/testdata/TestResProperty/Immutable/contract/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Immutable/contract/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Immutable/contract_id/step0.tf b/pkg/providers/property/testdata/TestResProperty/Immutable/contract_id/step0.tf index beff48c42..0ad095277 100644 --- a/pkg/providers/property/testdata/TestResProperty/Immutable/contract_id/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Immutable/contract_id/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Immutable/contract_id/step1.tf b/pkg/providers/property/testdata/TestResProperty/Immutable/contract_id/step1.tf index 846af6737..09f701570 100644 --- a/pkg/providers/property/testdata/TestResProperty/Immutable/contract_id/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Immutable/contract_id/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Immutable/group/step0.tf b/pkg/providers/property/testdata/TestResProperty/Immutable/group/step0.tf index 449796bc2..cfda538a1 100644 --- a/pkg/providers/property/testdata/TestResProperty/Immutable/group/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Immutable/group/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Immutable/group/step1.tf b/pkg/providers/property/testdata/TestResProperty/Immutable/group/step1.tf index 44f1bc741..e506bba9f 100644 --- a/pkg/providers/property/testdata/TestResProperty/Immutable/group/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Immutable/group/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Immutable/group_id/step0.tf b/pkg/providers/property/testdata/TestResProperty/Immutable/group_id/step0.tf index beff48c42..0ad095277 100644 --- a/pkg/providers/property/testdata/TestResProperty/Immutable/group_id/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Immutable/group_id/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Immutable/group_id/step1.tf b/pkg/providers/property/testdata/TestResProperty/Immutable/group_id/step1.tf index 64d0158fd..6a681eafe 100644 --- a/pkg/providers/property/testdata/TestResProperty/Immutable/group_id/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Immutable/group_id/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Immutable/product/step0.tf b/pkg/providers/property/testdata/TestResProperty/Immutable/product/step0.tf index f9e2de313..7124e397b 100644 --- a/pkg/providers/property/testdata/TestResProperty/Immutable/product/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Immutable/product/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Immutable/product/step1.tf b/pkg/providers/property/testdata/TestResProperty/Immutable/product/step1.tf index 2ee95e390..61f74a540 100644 --- a/pkg/providers/property/testdata/TestResProperty/Immutable/product/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Immutable/product/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Immutable/product_id/step0.tf b/pkg/providers/property/testdata/TestResProperty/Immutable/product_id/step0.tf index beff48c42..0ad095277 100644 --- a/pkg/providers/property/testdata/TestResProperty/Immutable/product_id/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Immutable/product_id/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Immutable/product_id/step1.tf b/pkg/providers/property/testdata/TestResProperty/Immutable/product_id/step1.tf index 522b10c74..03f44d598 100644 --- a/pkg/providers/property/testdata/TestResProperty/Immutable/product_id/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Immutable/product_id/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Importable/importable.tf b/pkg/providers/property/testdata/TestResProperty/Importable/importable.tf index b07cf05c9..0cb98f01b 100644 --- a/pkg/providers/property/testdata/TestResProperty/Importable/importable.tf +++ b/pkg/providers/property/testdata/TestResProperty/Importable/importable.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Importable/importable_with_property_rules_builder.tf b/pkg/providers/property/testdata/TestResProperty/Importable/importable_with_property_rules_builder.tf index 8d83d5145..69a01e723 100644 --- a/pkg/providers/property/testdata/TestResProperty/Importable/importable_with_property_rules_builder.tf +++ b/pkg/providers/property/testdata/TestResProperty/Importable/importable_with_property_rules_builder.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_builder" "default" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract without prefix/step0.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract without prefix/step0.tf index a05bb6491..339719108 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract without prefix/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract without prefix/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract without prefix/step1.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract without prefix/step1.tf index c06bdc9f3..416e92125 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract without prefix/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract without prefix/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract_id without prefix/step0.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract_id without prefix/step0.tf index 1920bc48e..d302c7fb0 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract_id without prefix/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract_id without prefix/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract_id without prefix/step1.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract_id without prefix/step1.tf index 04c8e7cd1..5b9a64878 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract_id without prefix/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/contract_id without prefix/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/group without prefix/step0.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/group without prefix/step0.tf index ef5c425ed..76313fcce 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/group without prefix/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/group without prefix/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/group without prefix/step1.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/group without prefix/step1.tf index 1d25ed913..613a77357 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/group without prefix/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/group without prefix/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/group_id without prefix/step0.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/group_id without prefix/step0.tf index f7a76e884..f5b017c50 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/group_id without prefix/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/group_id without prefix/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/group_id without prefix/step1.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/group_id without prefix/step1.tf index 3c61f9a71..bdcf7ff9a 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/group_id without prefix/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/group_id without prefix/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/hostnames/step0.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/hostnames/step0.tf index a3bd6b6cd..8ad44067f 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/hostnames/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/hostnames/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/hostnames/step1.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/hostnames/step1.tf index 99d582768..861115922 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/hostnames/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/hostnames/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/new version changed on server/step0.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/new version changed on server/step0.tf index beff48c42..0ad095277 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/new version changed on server/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/new version changed on server/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/no diff/step0.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/no diff/step0.tf index ca7e492bb..133ee1144 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/no diff/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/no diff/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/no diff/step1.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/no diff/step1.tf index c6ff9af2a..b3e4efd8a 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/no diff/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/no diff/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/normal/step0.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/normal/step0.tf index beff48c42..0ad095277 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/normal/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/normal/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/normal/step1.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/normal/step1.tf index e36c50616..2257fe2a6 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/normal/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/normal/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/product without prefix/step0.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/product without prefix/step0.tf index 9030e1aa8..6b22b46c5 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/product without prefix/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/product without prefix/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/product without prefix/step1.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/product without prefix/step1.tf index 54e40c1e6..1ccc9f023 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/product without prefix/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/product without prefix/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/product_id without prefix/step0.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/product_id without prefix/step0.tf index cf1f64d51..b0122f5f5 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/product_id without prefix/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/product_id without prefix/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/product_id without prefix/step1.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/product_id without prefix/step1.tf index 9db4c149b..d40e358ed 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/product_id without prefix/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/product_id without prefix/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules custom diff/step0.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules custom diff/step0.tf index d3406c84f..27a7ef95f 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules custom diff/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules custom diff/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules custom diff/step1.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules custom diff/step1.tf index bd0390d2d..75e8e0e66 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules custom diff/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules custom diff/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules diff cpcode/step0.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules diff cpcode/step0.tf index adec04c2e..088113c23 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules diff cpcode/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules diff cpcode/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules with variables/step0.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules with variables/step0.tf index 71e988e00..d6e318787 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules with variables/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules with variables/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules with variables/step1.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules with variables/step1.tf index 062ea1c41..4a44b64a4 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules with variables/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/rules with variables/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/error_when_creating_property_with_non-unique_name.tf b/pkg/providers/property/testdata/TestResProperty/error_when_creating_property_with_non-unique_name.tf index 47f4dbb01..897b9ca49 100644 --- a/pkg/providers/property/testdata/TestResProperty/error_when_creating_property_with_non-unique_name.tf +++ b/pkg/providers/property/testdata/TestResProperty/error_when_creating_property_with_non-unique_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/error_when_deleting_active_property/step0.tf b/pkg/providers/property/testdata/TestResProperty/error_when_deleting_active_property/step0.tf index 1920bc48e..d302c7fb0 100644 --- a/pkg/providers/property/testdata/TestResProperty/error_when_deleting_active_property/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/error_when_deleting_active_property/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/error_when_deleting_active_property/step1.tf b/pkg/providers/property/testdata/TestResProperty/error_when_deleting_active_property/step1.tf index 661756736..e713fdeb3 100644 --- a/pkg/providers/property/testdata/TestResProperty/error_when_deleting_active_property/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/error_when_deleting_active_property/step1.tf @@ -1,3 +1,3 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } diff --git a/pkg/providers/property/testdata/TestResProperty/property_is_destroyed_and_recreated_when_name_is_changed-step0.tf b/pkg/providers/property/testdata/TestResProperty/property_is_destroyed_and_recreated_when_name_is_changed-step0.tf index 7d2b5f865..f6adb0e3e 100644 --- a/pkg/providers/property/testdata/TestResProperty/property_is_destroyed_and_recreated_when_name_is_changed-step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/property_is_destroyed_and_recreated_when_name_is_changed-step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/property_is_destroyed_and_recreated_when_name_is_changed-step1.tf b/pkg/providers/property/testdata/TestResProperty/property_is_destroyed_and_recreated_when_name_is_changed-step1.tf index 590d00897..005957624 100644 --- a/pkg/providers/property/testdata/TestResProperty/property_is_destroyed_and_recreated_when_name_is_changed-step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/property_is_destroyed_and_recreated_when_name_is_changed-step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/property_update_with_validation_error_for_rules.tf b/pkg/providers/property/testdata/TestResProperty/property_update_with_validation_error_for_rules.tf index 3db80a1d0..b7ea3909e 100644 --- a/pkg/providers/property/testdata/TestResProperty/property_update_with_validation_error_for_rules.tf +++ b/pkg/providers/property/testdata/TestResProperty/property_update_with_validation_error_for_rules.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResPropertyInclude/custom_validation_errors.tf b/pkg/providers/property/testdata/TestResPropertyInclude/custom_validation_errors.tf index 911acfabc..d81ef7c37 100644 --- a/pkg/providers/property/testdata/TestResPropertyInclude/custom_validation_errors.tf +++ b/pkg/providers/property/testdata/TestResPropertyInclude/custom_validation_errors.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_include" "test" { diff --git a/pkg/providers/property/testdata/TestResPropertyInclude/product_id_error.tf b/pkg/providers/property/testdata/TestResPropertyInclude/product_id_error.tf index be4e7b6d8..e65696d9c 100644 --- a/pkg/providers/property/testdata/TestResPropertyInclude/product_id_error.tf +++ b/pkg/providers/property/testdata/TestResPropertyInclude/product_id_error.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_include" "test" { diff --git a/pkg/providers/property/testdata/TestResPropertyInclude/property_include.tf b/pkg/providers/property/testdata/TestResPropertyInclude/property_include.tf index 50f4d74e7..07b5f1fc7 100644 --- a/pkg/providers/property/testdata/TestResPropertyInclude/property_include.tf +++ b/pkg/providers/property/testdata/TestResPropertyInclude/property_include.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_include" "test" { diff --git a/pkg/providers/property/testdata/TestResPropertyInclude/property_include_force_new.tf b/pkg/providers/property/testdata/TestResPropertyInclude/property_include_force_new.tf index 2d19761cc..1bdeafed6 100644 --- a/pkg/providers/property/testdata/TestResPropertyInclude/property_include_force_new.tf +++ b/pkg/providers/property/testdata/TestResPropertyInclude/property_include_force_new.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_include" "test" { diff --git a/pkg/providers/property/testdata/TestResPropertyInclude/property_include_import.tf b/pkg/providers/property/testdata/TestResPropertyInclude/property_include_import.tf index 81c44e80f..fad600726 100644 --- a/pkg/providers/property/testdata/TestResPropertyInclude/property_include_import.tf +++ b/pkg/providers/property/testdata/TestResPropertyInclude/property_include_import.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_include" "test" { diff --git a/pkg/providers/property/testdata/TestResPropertyInclude/property_include_no_rules.tf b/pkg/providers/property/testdata/TestResPropertyInclude/property_include_no_rules.tf index 2ff4814b9..fc0e19409 100644 --- a/pkg/providers/property/testdata/TestResPropertyInclude/property_include_no_rules.tf +++ b/pkg/providers/property/testdata/TestResPropertyInclude/property_include_no_rules.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_include" "test" { diff --git a/pkg/providers/property/testdata/TestResPropertyInclude/property_include_null_cpcode.tf b/pkg/providers/property/testdata/TestResPropertyInclude/property_include_null_cpcode.tf index 04d9d0536..16ea7c7d2 100644 --- a/pkg/providers/property/testdata/TestResPropertyInclude/property_include_null_cpcode.tf +++ b/pkg/providers/property/testdata/TestResPropertyInclude/property_include_null_cpcode.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_include" "test" { diff --git a/pkg/providers/property/testdata/TestResPropertyInclude/property_include_with_comment.tf b/pkg/providers/property/testdata/TestResPropertyInclude/property_include_with_comment.tf index 32db0c933..6f4c9d5cb 100644 --- a/pkg/providers/property/testdata/TestResPropertyInclude/property_include_with_comment.tf +++ b/pkg/providers/property/testdata/TestResPropertyInclude/property_include_with_comment.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_include" "test" { diff --git a/pkg/providers/property/testdata/TestResPropertyInclude/property_include_with_ds_create.tf b/pkg/providers/property/testdata/TestResPropertyInclude/property_include_with_ds_create.tf index cbf99a593..8a7365a5f 100644 --- a/pkg/providers/property/testdata/TestResPropertyInclude/property_include_with_ds_create.tf +++ b/pkg/providers/property/testdata/TestResPropertyInclude/property_include_with_ds_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_include" "test" { diff --git a/pkg/providers/property/testdata/TestResPropertyInclude/property_include_with_ds_update.tf b/pkg/providers/property/testdata/TestResPropertyInclude/property_include_with_ds_update.tf index 9c537ab2b..5a9cac54b 100644 --- a/pkg/providers/property/testdata/TestResPropertyInclude/property_include_with_ds_update.tf +++ b/pkg/providers/property/testdata/TestResPropertyInclude/property_include_with_ds_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_include" "test" { diff --git a/pkg/providers/property/testdata/TestResPropertyInclude/rule_format_blank.tf b/pkg/providers/property/testdata/TestResPropertyInclude/rule_format_blank.tf index b3f0b3e3b..030ebd2b7 100644 --- a/pkg/providers/property/testdata/TestResPropertyInclude/rule_format_blank.tf +++ b/pkg/providers/property/testdata/TestResPropertyInclude/rule_format_blank.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_include" "test" { diff --git a/pkg/providers/property/testdata/TestResPropertyInclude/rule_format_latest.tf b/pkg/providers/property/testdata/TestResPropertyInclude/rule_format_latest.tf index f14b3821d..bf68af9ad 100644 --- a/pkg/providers/property/testdata/TestResPropertyInclude/rule_format_latest.tf +++ b/pkg/providers/property/testdata/TestResPropertyInclude/rule_format_latest.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_include" "test" { diff --git a/pkg/providers/property/testdata/TestResPropertyInclude/validation_required_errors.tf b/pkg/providers/property/testdata/TestResPropertyInclude/validation_required_errors.tf index 20649358f..17b2b3da5 100644 --- a/pkg/providers/property/testdata/TestResPropertyInclude/validation_required_errors.tf +++ b/pkg/providers/property/testdata/TestResPropertyInclude/validation_required_errors.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_include" "test" {} \ No newline at end of file diff --git a/pkg/providers/property/testdata/TestResPropertyIncludeActivation/no_compliance_record_on_production.tf b/pkg/providers/property/testdata/TestResPropertyIncludeActivation/no_compliance_record_on_production.tf index 8e5e5b292..d18276591 100644 --- a/pkg/providers/property/testdata/TestResPropertyIncludeActivation/no_compliance_record_on_production.tf +++ b/pkg/providers/property/testdata/TestResPropertyIncludeActivation/no_compliance_record_on_production.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_include_activation" "activation" { diff --git a/pkg/providers/property/testdata/TestResPropertyIncludeActivation/property_include_activation.tf b/pkg/providers/property/testdata/TestResPropertyIncludeActivation/property_include_activation.tf index 6748c25f1..3cb42c1cf 100644 --- a/pkg/providers/property/testdata/TestResPropertyIncludeActivation/property_include_activation.tf +++ b/pkg/providers/property/testdata/TestResPropertyIncludeActivation/property_include_activation.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_include_activation" "activation" { diff --git a/pkg/providers/property/testdata/TestResPropertyIncludeActivation/property_include_activation_incorrect_timeout.tf b/pkg/providers/property/testdata/TestResPropertyIncludeActivation/property_include_activation_incorrect_timeout.tf index 9a1a81484..3438eaddc 100644 --- a/pkg/providers/property/testdata/TestResPropertyIncludeActivation/property_include_activation_incorrect_timeout.tf +++ b/pkg/providers/property/testdata/TestResPropertyIncludeActivation/property_include_activation_incorrect_timeout.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_include_activation" "activation" { diff --git a/pkg/providers/property/testdata/TestResPropertyIncludeActivation/property_include_activation_update.tf b/pkg/providers/property/testdata/TestResPropertyIncludeActivation/property_include_activation_update.tf index ba60816a8..06c8b943a 100644 --- a/pkg/providers/property/testdata/TestResPropertyIncludeActivation/property_include_activation_update.tf +++ b/pkg/providers/property/testdata/TestResPropertyIncludeActivation/property_include_activation_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_include_activation" "activation" { diff --git a/pkg/providers/property/testdata/TestResPropertyIncludeActivation/property_include_activation_with_timeout.tf b/pkg/providers/property/testdata/TestResPropertyIncludeActivation/property_include_activation_with_timeout.tf index 730830b07..ad7e01d5a 100644 --- a/pkg/providers/property/testdata/TestResPropertyIncludeActivation/property_include_activation_with_timeout.tf +++ b/pkg/providers/property/testdata/TestResPropertyIncludeActivation/property_include_activation_with_timeout.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_include_activation" "activation" { diff --git a/pkg/providers/property/testdata/TestResPropertyIncludeActivation/property_include_activation_with_timeout_update.tf b/pkg/providers/property/testdata/TestResPropertyIncludeActivation/property_include_activation_with_timeout_update.tf index 8dfe8e799..8cf61688e 100644 --- a/pkg/providers/property/testdata/TestResPropertyIncludeActivation/property_include_activation_with_timeout_update.tf +++ b/pkg/providers/property/testdata/TestResPropertyIncludeActivation/property_include_activation_with_timeout_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_include_activation" "activation" { diff --git a/pkg/providers/property/testdata/TestResPropertyIncludeActivation/property_include_update_note_not_suppressed.tf b/pkg/providers/property/testdata/TestResPropertyIncludeActivation/property_include_update_note_not_suppressed.tf index 80eade1eb..a9eba127a 100644 --- a/pkg/providers/property/testdata/TestResPropertyIncludeActivation/property_include_update_note_not_suppressed.tf +++ b/pkg/providers/property/testdata/TestResPropertyIncludeActivation/property_include_update_note_not_suppressed.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property_include_activation" "activation" { diff --git a/pkg/providers/property/testdata/TestResourceEdgeHostname/creation_before_import_edgehostname.tf b/pkg/providers/property/testdata/TestResourceEdgeHostname/creation_before_import_edgehostname.tf index b9d9479ec..42ced5d87 100644 --- a/pkg/providers/property/testdata/TestResourceEdgeHostname/creation_before_import_edgehostname.tf +++ b/pkg/providers/property/testdata/TestResourceEdgeHostname/creation_before_import_edgehostname.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edge_hostname" "createhostname" { diff --git a/pkg/providers/property/testdata/TestResourceEdgeHostname/import_edgehostname.tf b/pkg/providers/property/testdata/TestResourceEdgeHostname/import_edgehostname.tf index e735968df..9afaaba9c 100644 --- a/pkg/providers/property/testdata/TestResourceEdgeHostname/import_edgehostname.tf +++ b/pkg/providers/property/testdata/TestResourceEdgeHostname/import_edgehostname.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edge_hostname" "importedgehostname" { diff --git a/pkg/providers/property/testdata/TestResourceEdgeHostname/missing_certificate.tf b/pkg/providers/property/testdata/TestResourceEdgeHostname/missing_certificate.tf index 622540724..51a343107 100644 --- a/pkg/providers/property/testdata/TestResourceEdgeHostname/missing_certificate.tf +++ b/pkg/providers/property/testdata/TestResourceEdgeHostname/missing_certificate.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edge_hostname" "edgehostname" { diff --git a/pkg/providers/property/testdata/TestResourceEdgeHostname/new.tf b/pkg/providers/property/testdata/TestResourceEdgeHostname/new.tf index 572172f57..e0a165c09 100644 --- a/pkg/providers/property/testdata/TestResourceEdgeHostname/new.tf +++ b/pkg/providers/property/testdata/TestResourceEdgeHostname/new.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edge_hostname" "edgehostname" { diff --git a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_error_update_ipv6_performance.tf b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_error_update_ipv6_performance.tf index 499678245..6e146a2da 100644 --- a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_error_update_ipv6_performance.tf +++ b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_error_update_ipv6_performance.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edge_hostname" "edgehostname" { diff --git a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_ipv4.tf b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_ipv4.tf index 6de1dcba0..64bfc8b50 100644 --- a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_ipv4.tf +++ b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_ipv4.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edge_hostname" "edgehostname" { diff --git a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_ipv4_with_email.tf b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_ipv4_with_email.tf index 8373054f3..f7f0b0a29 100644 --- a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_ipv4_with_email.tf +++ b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_ipv4_with_email.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edge_hostname" "edgehostname" { diff --git a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_net.tf b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_net.tf index 345ccc693..5c3318031 100644 --- a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_net.tf +++ b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_net.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edge_hostname" "edgehostname" { diff --git a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_net_without_product_id.tf b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_net_without_product_id.tf index d6a71a2b5..0f6f82ead 100644 --- a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_net_without_product_id.tf +++ b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_net_without_product_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edge_hostname" "edgehostname" { diff --git a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_update_ip_behavior.tf b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_update_ip_behavior.tf index 1965bad64..59ab1def0 100644 --- a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_update_ip_behavior.tf +++ b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_update_ip_behavior.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edge_hostname" "edgehostname" { diff --git a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_update_ip_behavior_empty_email.tf b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_update_ip_behavior_empty_email.tf index 1f001b8b1..f48cabaef 100644 --- a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_update_ip_behavior_empty_email.tf +++ b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_update_ip_behavior_empty_email.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edge_hostname" "edgehostname" { diff --git a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_update_ip_behavior_no_email.tf b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_update_ip_behavior_no_email.tf index 345ccc693..5c3318031 100644 --- a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_update_ip_behavior_no_email.tf +++ b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_update_ip_behavior_no_email.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edge_hostname" "edgehostname" { diff --git a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_edgekey_net.tf b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_edgekey_net.tf index 1461f0d52..8c7cf1253 100644 --- a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_edgekey_net.tf +++ b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_edgekey_net.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edge_hostname" "edgehostname" { diff --git a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_edgesuite_net.tf b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_edgesuite_net.tf index 80c3747c5..a33d50283 100644 --- a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_edgesuite_net.tf +++ b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_edgesuite_net.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edge_hostname" "edgehostname" { diff --git a/pkg/providers/property/testdata/TestResourceEdgeHostname/update_no_status_update_email.tf b/pkg/providers/property/testdata/TestResourceEdgeHostname/update_no_status_update_email.tf index 345ccc693..5c3318031 100644 --- a/pkg/providers/property/testdata/TestResourceEdgeHostname/update_no_status_update_email.tf +++ b/pkg/providers/property/testdata/TestResourceEdgeHostname/update_no_status_update_email.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edge_hostname" "edgehostname" { diff --git a/pkg/test/fixtures.go b/pkg/test/fixtures.go deleted file mode 100644 index d9e7c399c..000000000 --- a/pkg/test/fixtures.go +++ /dev/null @@ -1,23 +0,0 @@ -// Package test contains set of tools used for testing -package test - -import ( - "fmt" - "io/ioutil" -) - -// FixtureBytes returns the entire contents of the given file as a byte slice. Path can be given as Sprintf format and -// args. Panics on error. -func FixtureBytes(path string, args ...interface{}) []byte { - contents, err := ioutil.ReadFile(fmt.Sprintf(path, args...)) - if err != nil { - panic(err) - } - return contents -} - -// Fixture returns the entire contents of the given file as a string. Path be given as Sprintf format and args. Panics -// on error -func Fixture(path string, args ...interface{}) string { - return string(FixtureBytes(path, args...)) -} diff --git a/pkg/test/helpers.go b/pkg/test/helpers.go deleted file mode 100644 index c88868602..000000000 --- a/pkg/test/helpers.go +++ /dev/null @@ -1,63 +0,0 @@ -package test - -import ( - "fmt" - "os" - "testing" - - "github.com/hashicorp/go-hclog" - "github.com/stretchr/testify/mock" -) - -type ( - // MockCalls is a wrapper around []*mock.Call - MockCalls []*mock.Call -) - -// Times sets how many times we expect each call to execute -func (mc MockCalls) Times(t int) MockCalls { - for _, c := range mc { - c.Times(t) - } - return mc -} - -// Once expects calls to be called only one time -func (mc MockCalls) Once() MockCalls { - return mc.Times(1) -} - -// ReturnErr sets the given error as a last return parameter of the call with the given method -func (mc MockCalls) ReturnErr(method string, err error) MockCalls { - for _, c := range mc { - if c.Method == method { - last := len(c.ReturnArguments) - 1 - c.ReturnArguments[last] = err - } - } - - return mc -} - -// TODO marks a test as being in a "pending" state and logs a message telling the user why. Such tests are expected to -// fail for the time being and may exist for the sake of unfinished/future features or to document known failure cases -// that won't be fixed right away. The failure of a pending test is not considered an error and the test will therefore -// be skipped unless the TEST_TODO environment variable is set to a non-empty value. -func TODO(t *testing.T, message string) { - t.Helper() - t.Log(fmt.Sprintf("TODO: %s (%s)", message, t.Name())) - - if os.Getenv("TEST_TODO") == "" { - t.Skip("TODO: Set TEST_TODO=1 in env to run this test") - } -} - -// MuteLogging globally prevents logging output unless TEST_LOGGING env var is not empty -func MuteLogging(t *testing.T) { - t.Helper() - - if os.Getenv("TEST_LOGGING") == "" { - hclog.SetDefault(hclog.NewNullLogger()) - t.Log("Logging is suppressed. Set TEST_LOGGING=1 in env to see logged messages during test") - } -} diff --git a/pkg/test/tattle_t.go b/pkg/test/tattle_t.go deleted file mode 100644 index f7c39ae63..000000000 --- a/pkg/test/tattle_t.go +++ /dev/null @@ -1,21 +0,0 @@ -package test - -import ( - "testing" -) - -// TattleT wraps a *testing.T to intercept a Testify mock's call of t.FailNow(). When testing.t.FailNow() is called from -// any goroutine other than the one on which a test was created, it causes the test to hang. Testify's mocks fail to -// inform the user which test failed. Use this struct to wrap a *testing.TattleT when you call `mock.Test(TattleT{t})` -// and the mock's failure message will include the failling test's name. Such failures are usually caused by unexpected -// method calls on a mock. -// -// NB: You would only need to use this where Testify mocks are used in tests that spawn goroutines, such as those run by -// the Terraform test driver. -type TattleT struct{ *testing.T } - -// FailNow overrides testing.T.FailNow() so when a test mock fails an assertion, we see which test failed -func (t TattleT) FailNow() { - t.T.Helper() - t.T.Fatalf("FAIL: %s", t.T.Name()) -} From 53b2b492bdb108568100ff6e6ff55025314ffa23 Mon Sep 17 00:00:00 2001 From: Darek Stopka Date: Wed, 29 Nov 2023 14:10:24 +0000 Subject: [PATCH 12/52] DXE-3372 Split pkg/tools into dedicated packages --- pkg/common/collections/slice.go | 10 ++++ pkg/common/collections/slice_test.go | 8 +++ pkg/common/date/parse.go | 28 +++++++++ .../date/parse_test.go} | 10 ++-- pkg/{tools => common/hash}/hash.go | 9 +-- pkg/common/ptr/ptr.go | 7 +++ pkg/{tools => common/str}/prefixes.go | 2 +- pkg/{tools => common/str}/prefixes_test.go | 2 +- .../str/str.go} | 25 +++----- .../str/str_test.go} | 24 +++----- pkg/{tools => common/tf}/diags.go | 6 +- pkg/{tools => common/tf}/diags_test.go | 2 +- pkg/common/tf/tf.go | 2 + pkg/common/tf/util.go | 1 - pkg/providers/botman/custom_validations.go | 6 +- .../data_akamai_botman_akamai_bot_category.go | 4 +- .../data_akamai_botman_akamai_defined_bot.go | 4 +- ...amai_botman_bot_analytics_cookie_values.go | 4 +- .../data_akamai_botman_bot_detection.go | 4 +- ...mai_botman_bot_endpoint_coverage_report.go | 4 +- ...resource_akamai_botman_challenge_action.go | 4 +- ...source_akamai_botman_conditional_action.go | 4 +- ...ource_akamai_botman_custom_bot_category.go | 4 +- ...otman_custom_bot_category_sequence_test.go | 6 +- ...amai_botman_custom_client_sequence_test.go | 6 +- ...source_akamai_botman_custom_deny_action.go | 4 +- ...ce_akamai_botman_serve_alternate_action.go | 4 +- .../data_akamai_clientlist_lists.go | 4 +- ...loudlets_application_load_balancer_test.go | 10 ++-- ...loudlets_application_load_balancer_test.go | 18 +++--- .../resource_akamai_cloudlets_policy.go | 6 +- .../resource_akamai_cloudlets_policy_test.go | 2 +- ..._akamai_cloudwrapper_configuration_test.go | 10 ++-- pkg/providers/cps/data_akamai_cps_csr.go | 4 +- pkg/providers/cps/enrollments.go | 4 +- .../cps/resource_akamai_cps_dv_enrollment.go | 4 +- .../resource_akamai_cps_dv_enrollment_test.go | 8 +-- ...ource_akamai_cps_third_party_enrollment.go | 4 +- ..._akamai_cps_third_party_enrollment_test.go | 8 +-- ...urce_akamai_cps_upload_certificate_test.go | 4 +- .../data_akamai_datastream_dataset_fields.go | 4 +- .../datastream/data_akamai_datastreams.go | 4 +- .../data_akamai_datastreams_test.go | 6 +- .../datastream/resource_akamai_datastream.go | 6 +- .../dns/resource_akamai_dns_record.go | 20 +++---- .../edgeworkers/resource_akamai_edgekv.go | 10 ++-- .../resource_akamai_edgekv_group_items.go | 10 ++-- ...resource_akamai_edgekv_group_items_test.go | 6 +- .../resource_akamai_edgekv_test.go | 10 ++-- .../edgeworkers/resource_akamai_edgeworker.go | 6 +- .../resource_akamai_edgeworkers_activation.go | 6 +- .../iam/resource_akamai_iam_user_test.go | 6 +- .../imaging/imagewriter/convert-image.gen.go | 58 +++++++++---------- ...source_akamai_imaging_policy_image_test.go | 24 ++++---- ...source_akamai_imaging_policy_video_test.go | 6 +- .../imaging/videowriter/convert-video.gen.go | 12 ++-- ...i_networklist_network_list_subscription.go | 10 ++-- .../property/data_akamai_properties.go | 8 +-- .../data_akamai_property_hostnames.go | 8 +-- ...ta_akamai_property_include_parents_test.go | 20 +++---- .../data_akamai_property_include_test.go | 10 ++-- .../data_akamai_property_includes_test.go | 6 +- .../property/data_akamai_property_products.go | 4 +- .../property/data_akamai_property_rules.go | 6 +- .../property/data_property_akamai_contract.go | 6 +- .../property/data_property_akamai_groups.go | 4 +- .../property/diff_suppress_funcs_test.go | 34 +++++------ pkg/providers/property/provider.go | 4 +- .../property/resource_akamai_cp_code.go | 22 +++---- .../property/resource_akamai_edge_hostname.go | 18 +++--- .../property/resource_akamai_property.go | 22 +++---- .../resource_akamai_property_activation.go | 9 +-- ...ce_akamai_property_activation_unit_test.go | 4 +- .../resource_akamai_property_common.go | 4 +- .../resource_akamai_property_helpers_test.go | 16 ++--- ...urce_akamai_property_include_activation.go | 8 +-- .../resource_akamai_property_schema_v0.go | 8 +-- .../property/resource_akamai_property_test.go | 4 +- pkg/providers/property/ruleformats/builder.go | 6 +- pkg/tools/date_conversions.go | 23 -------- pkg/tools/pointers.go | 26 --------- 81 files changed, 378 insertions(+), 386 deletions(-) create mode 100644 pkg/common/date/parse.go rename pkg/{tools/date_conversions_test.go => common/date/parse_test.go} (76%) rename pkg/{tools => common/hash}/hash.go (66%) create mode 100644 pkg/common/ptr/ptr.go rename pkg/{tools => common/str}/prefixes.go (96%) rename pkg/{tools => common/str}/prefixes_test.go (98%) rename pkg/{tools/string_operations.go => common/str/str.go} (52%) rename pkg/{tools/string_operations_test.go => common/str/str_test.go} (64%) rename pkg/{tools => common/tf}/diags.go (81%) rename pkg/{tools => common/tf}/diags_test.go (99%) create mode 100644 pkg/common/tf/tf.go delete mode 100644 pkg/tools/date_conversions.go delete mode 100644 pkg/tools/pointers.go diff --git a/pkg/common/collections/slice.go b/pkg/common/collections/slice.go index 91e09bd43..bca1e0b8c 100644 --- a/pkg/common/collections/slice.go +++ b/pkg/common/collections/slice.go @@ -6,3 +6,13 @@ func ForEachInSlice[S ~[]E, E any](s S, fn func(a E) E) { s[i] = fn(v) } } + +// StringInSlice determines if the searched string appears in the array. +func StringInSlice(s []string, searchTerm string) bool { + for _, v := range s { + if v == searchTerm { + return true + } + } + return false +} diff --git a/pkg/common/collections/slice_test.go b/pkg/common/collections/slice_test.go index f169ad035..b1c99e8fd 100644 --- a/pkg/common/collections/slice_test.go +++ b/pkg/common/collections/slice_test.go @@ -93,3 +93,11 @@ func TestForEachInSlice(t *testing.T) { assert.Equal(t, test.want, test.s) } } + +func TestStringInSlice(t *testing.T) { + assert.False(t, StringInSlice([]string{}, "a")) + assert.True(t, StringInSlice([]string{"a"}, "a")) + assert.True(t, StringInSlice([]string{"b", "a"}, "a")) + assert.False(t, StringInSlice([]string{"b", "c"}, "a")) + assert.False(t, StringInSlice([]string{"", "b"}, "a")) +} diff --git a/pkg/common/date/parse.go b/pkg/common/date/parse.go new file mode 100644 index 000000000..4c06f2afc --- /dev/null +++ b/pkg/common/date/parse.go @@ -0,0 +1,28 @@ +// Package date contains logic for handling operations on datetime values. +package date + +import ( + "errors" + "fmt" + "time" +) + +// ErrDateFormat is returned when there is an error parsing a string date. +var ErrDateFormat = errors.New("unable to parse date") + +// DefaultFormat is the datetime format used across the provider. +const DefaultFormat = "2006-01-02T15:04:05Z" + +// Parse parses the given string datetime using the default DefaultFormat format. +func Parse(value string) (time.Time, error) { + return ParseFormat(DefaultFormat, value) +} + +// ParseFormat parses the given string datetime using the provided format. +func ParseFormat(format, value string) (time.Time, error) { + date, err := time.Parse(format, value) + if err != nil { + return time.Time{}, fmt.Errorf("%w: %s", ErrDateFormat, err.Error()) + } + return date, nil +} diff --git a/pkg/tools/date_conversions_test.go b/pkg/common/date/parse_test.go similarity index 76% rename from pkg/tools/date_conversions_test.go rename to pkg/common/date/parse_test.go index 2c9c114b2..314263f59 100644 --- a/pkg/tools/date_conversions_test.go +++ b/pkg/common/date/parse_test.go @@ -1,4 +1,4 @@ -package tools +package date import ( "errors" @@ -7,26 +7,26 @@ import ( "github.com/stretchr/testify/assert" ) -func TestParseDate(t *testing.T) { +func TestParse(t *testing.T) { tests := map[string]struct { layout string value string expectedError error }{ "ok": { - layout: DateTimeFormat, + layout: DefaultFormat, value: "2016-08-22T23:38:38Z", }, "wrong layout": { expectedError: ErrDateFormat, - layout: DateTimeFormat, + layout: DefaultFormat, value: "2016-22-44T33:88:99Z", }, } for name, test := range tests { t.Run(name, func(t *testing.T) { - parsedDate, err := ParseDate(test.layout, test.value) + parsedDate, err := ParseFormat(test.layout, test.value) assert.True(t, errors.Is(err, test.expectedError)) if err == nil { assert.Equal(t, test.value, parsedDate.Format(test.layout)) diff --git a/pkg/tools/hash.go b/pkg/common/hash/hash.go similarity index 66% rename from pkg/tools/hash.go rename to pkg/common/hash/hash.go index 925a121e4..90e29ae7e 100644 --- a/pkg/tools/hash.go +++ b/pkg/common/hash/hash.go @@ -1,4 +1,5 @@ -package tools +// Package hash contains convenience functions for calculating hashes. +package hash import ( "bytes" @@ -18,9 +19,9 @@ func GetSHAString(rdata string) string { return sha1hashtest } -// GetMd5Sum calculates md5Sum for any given interface{}. -// Passing a nil pointer to GetMd5Sum will panic, as they cannot be transmitted by gob. -func GetMd5Sum(key interface{}) (string, error) { +// GetMD5Sum calculates md5Sum for any given interface{}. +// Passing a nil pointer to GetMD5Sum will panic, as they cannot be transmitted by gob. +func GetMD5Sum(key interface{}) (string, error) { var buffer bytes.Buffer encoder := gob.NewEncoder(&buffer) err := encoder.Encode(key) diff --git a/pkg/common/ptr/ptr.go b/pkg/common/ptr/ptr.go new file mode 100644 index 000000000..d86dc72f1 --- /dev/null +++ b/pkg/common/ptr/ptr.go @@ -0,0 +1,7 @@ +// Package ptr helps with creating pointers to literal values of any type. +package ptr + +// To returns a pointer to the given v of any type. +func To[T any](v T) *T { + return &v +} diff --git a/pkg/tools/prefixes.go b/pkg/common/str/prefixes.go similarity index 96% rename from pkg/tools/prefixes.go rename to pkg/common/str/prefixes.go index da915539e..fb0db1e6d 100644 --- a/pkg/tools/prefixes.go +++ b/pkg/common/str/prefixes.go @@ -1,4 +1,4 @@ -package tools +package str import ( "strconv" diff --git a/pkg/tools/prefixes_test.go b/pkg/common/str/prefixes_test.go similarity index 98% rename from pkg/tools/prefixes_test.go rename to pkg/common/str/prefixes_test.go index f13e864bd..b5f296d70 100644 --- a/pkg/tools/prefixes_test.go +++ b/pkg/common/str/prefixes_test.go @@ -1,4 +1,4 @@ -package tools +package str import ( "testing" diff --git a/pkg/tools/string_operations.go b/pkg/common/str/str.go similarity index 52% rename from pkg/tools/string_operations.go rename to pkg/common/str/str.go index 3274a6055..a9c61fb28 100644 --- a/pkg/tools/string_operations.go +++ b/pkg/common/str/str.go @@ -1,4 +1,5 @@ -package tools +// Package str contains useful functions for string manipulation. +package str import ( "encoding/json" @@ -6,8 +7,9 @@ import ( "strconv" ) -// ConvertToString will convert different types to strings. -func ConvertToString(data interface{}) (res string) { +// From converts any type to string. +func From(data interface{}) string { + var res string switch v := data.(type) { case float32, float64: res = fmt.Sprintf("%g", v) @@ -24,11 +26,12 @@ func ConvertToString(data interface{}) (res string) { default: res = fmt.Sprintf("%v", data) } - return + + return res } -// GetFirstNotEmpty returns first not empty string -func GetFirstNotEmpty(values ...string) string { +// FirstNotEmpty returns first not empty string +func FirstNotEmpty(values ...string) string { for _, s := range values { if s != "" { return s @@ -36,13 +39,3 @@ func GetFirstNotEmpty(values ...string) string { } return "" } - -// ContainsString determines if the searched string appears in the array -func ContainsString(s []string, searchTerm string) bool { - for _, v := range s { - if v == searchTerm { - return true - } - } - return false -} diff --git a/pkg/tools/string_operations_test.go b/pkg/common/str/str_test.go similarity index 64% rename from pkg/tools/string_operations_test.go rename to pkg/common/str/str_test.go index 068ae3a29..d6149a6e5 100644 --- a/pkg/tools/string_operations_test.go +++ b/pkg/common/str/str_test.go @@ -1,4 +1,4 @@ -package tools +package str import ( "encoding/json" @@ -7,7 +7,7 @@ import ( "github.com/tj/assert" ) -func TestConvertToString(t *testing.T) { +func TestFrom(t *testing.T) { type testStr string tests := map[string]struct { @@ -71,24 +71,16 @@ func TestConvertToString(t *testing.T) { t.Run(name, func(t *testing.T) { var res string assert.NotPanics(t, func() { - res = ConvertToString(test.val) + res = From(test.val) }) assert.Equal(t, test.expected, res) }) } } -func TestGetFirstNotEmpty(t *testing.T) { - assert.Equal(t, GetFirstNotEmpty("", "def"), "def") - assert.Equal(t, GetFirstNotEmpty("val", "def"), "val") - assert.Equal(t, GetFirstNotEmpty("val", ""), "val") - assert.Equal(t, GetFirstNotEmpty("", ""), "") -} - -func TestContainsString(t *testing.T) { - assert.False(t, ContainsString([]string{}, "a")) - assert.True(t, ContainsString([]string{"a"}, "a")) - assert.True(t, ContainsString([]string{"b", "a"}, "a")) - assert.False(t, ContainsString([]string{"b", "c"}, "a")) - assert.False(t, ContainsString([]string{"", "b"}, "a")) +func TestFirstNotEmpty(t *testing.T) { + assert.Equal(t, "def", FirstNotEmpty("", "def")) + assert.Equal(t, "val", FirstNotEmpty("val", "def")) + assert.Equal(t, "val", FirstNotEmpty("val", "")) + assert.Equal(t, "", FirstNotEmpty("", "")) } diff --git a/pkg/tools/diags.go b/pkg/common/tf/diags.go similarity index 81% rename from pkg/tools/diags.go rename to pkg/common/tf/diags.go index 68d448208..cab8df9dd 100644 --- a/pkg/tools/diags.go +++ b/pkg/common/tf/diags.go @@ -1,4 +1,4 @@ -package tools +package tf import ( "fmt" @@ -6,7 +6,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" ) -// DiagsWithErrors appends several errors to a diag.Diagnostics +// DiagsWithErrors appends several errors to a diag.Diagnostics. func DiagsWithErrors(d diag.Diagnostics, errs ...error) diag.Diagnostics { for _, e := range errs { d = append(d, diag.FromErr(e)...) @@ -14,7 +14,7 @@ func DiagsWithErrors(d diag.Diagnostics, errs ...error) diag.Diagnostics { return d } -// DiagWarningf creates a diag.Diagnostics with a single Warning level diag.Diagnostic entry +// DiagWarningf creates a diag.Diagnostics with a single Warning level diag.Diagnostic entry. func DiagWarningf(format string, a ...interface{}) diag.Diagnostics { return diag.Diagnostics{ diag.Diagnostic{ diff --git a/pkg/tools/diags_test.go b/pkg/common/tf/diags_test.go similarity index 99% rename from pkg/tools/diags_test.go rename to pkg/common/tf/diags_test.go index bd13a8ac2..18bb25b4f 100644 --- a/pkg/tools/diags_test.go +++ b/pkg/common/tf/diags_test.go @@ -1,4 +1,4 @@ -package tools +package tf import ( "fmt" diff --git a/pkg/common/tf/tf.go b/pkg/common/tf/tf.go new file mode 100644 index 000000000..5a4ff7f60 --- /dev/null +++ b/pkg/common/tf/tf.go @@ -0,0 +1,2 @@ +// Package tf gathers common logic used for terraform-plugin-sdk resources and data sources. +package tf diff --git a/pkg/common/tf/util.go b/pkg/common/tf/util.go index bf70dc856..5c47e4b50 100644 --- a/pkg/common/tf/util.go +++ b/pkg/common/tf/util.go @@ -1,4 +1,3 @@ -// Package tf is where provider functions were dropped package tf import ( diff --git a/pkg/providers/botman/custom_validations.go b/pkg/providers/botman/custom_validations.go index 8fc51372d..05355a9f4 100644 --- a/pkg/providers/botman/custom_validations.go +++ b/pkg/providers/botman/custom_validations.go @@ -6,9 +6,9 @@ import ( "fmt" "strings" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -74,8 +74,8 @@ func verifyIDUnchanged(_ context.Context, d *schema.ResourceDiff, m interface{}, } oldID, newID := d.GetChange(key) - oldValue := tools.ConvertToString(oldID) - newValue := tools.ConvertToString(newID) + oldValue := str.From(oldID) + newValue := str.From(newID) logger.Errorf("%s value %s specified in configuration differs from resource ID's value %s", key, newID, oldValue) return fmt.Errorf("%s value %s specified in configuration differs from resource ID's value %s", key, newValue, oldValue) } diff --git a/pkg/providers/botman/data_akamai_botman_akamai_bot_category.go b/pkg/providers/botman/data_akamai_botman_akamai_bot_category.go index 18d86272c..560505d99 100644 --- a/pkg/providers/botman/data_akamai_botman_akamai_bot_category.go +++ b/pkg/providers/botman/data_akamai_botman_akamai_bot_category.go @@ -6,9 +6,9 @@ import ( "errors" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -56,6 +56,6 @@ func dataSourceAkamaiBotCategoryRead(ctx context.Context, d *schema.ResourceData return diag.Errorf("%s: %s", tf.ErrValueSet, err.Error()) } - d.SetId(tools.GetSHAString(string(jsonBody))) + d.SetId(hash.GetSHAString(string(jsonBody))) return nil } diff --git a/pkg/providers/botman/data_akamai_botman_akamai_defined_bot.go b/pkg/providers/botman/data_akamai_botman_akamai_defined_bot.go index e1c2fa261..633eaf78c 100644 --- a/pkg/providers/botman/data_akamai_botman_akamai_defined_bot.go +++ b/pkg/providers/botman/data_akamai_botman_akamai_defined_bot.go @@ -6,9 +6,9 @@ import ( "errors" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -56,6 +56,6 @@ func dataSourceAkamaiDefinedBotRead(ctx context.Context, d *schema.ResourceData, return diag.Errorf("%s: %s", tf.ErrValueSet, err.Error()) } - d.SetId(tools.GetSHAString(string(jsonBody))) + d.SetId(hash.GetSHAString(string(jsonBody))) return nil } diff --git a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values.go b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values.go index 6775ffb17..d6b4f65a2 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values.go +++ b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values.go @@ -4,9 +4,9 @@ import ( "context" "encoding/json" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -42,6 +42,6 @@ func dataSourceBotAnalyticsCookieValuesRead(ctx context.Context, d *schema.Resou return diag.Errorf("%s: %s", tf.ErrValueSet, err.Error()) } - d.SetId(tools.GetSHAString(string(jsonBody))) + d.SetId(hash.GetSHAString(string(jsonBody))) return nil } diff --git a/pkg/providers/botman/data_akamai_botman_bot_detection.go b/pkg/providers/botman/data_akamai_botman_bot_detection.go index 897c3ac6b..fc52d5f06 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_detection.go +++ b/pkg/providers/botman/data_akamai_botman_bot_detection.go @@ -6,9 +6,9 @@ import ( "errors" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -56,6 +56,6 @@ func dataSourceBotDetectionRead(ctx context.Context, d *schema.ResourceData, m i return diag.Errorf("%s: %s", tf.ErrValueSet, err.Error()) } - d.SetId(tools.GetSHAString(string(jsonBody))) + d.SetId(hash.GetSHAString(string(jsonBody))) return nil } diff --git a/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report.go b/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report.go index 9b1df5d8c..a75e2d256 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report.go +++ b/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report.go @@ -7,9 +7,9 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -81,7 +81,7 @@ func dataSourceBotEndpointCoverageReportRead(ctx context.Context, d *schema.Reso if configID != 0 { d.SetId(fmt.Sprintf("%d", configID)) } else { - d.SetId(tools.GetSHAString(string(jsonBody))) + d.SetId(hash.GetSHAString(string(jsonBody))) } return nil } diff --git a/pkg/providers/botman/resource_akamai_botman_challenge_action.go b/pkg/providers/botman/resource_akamai_botman_challenge_action.go index 2305fbf8f..b982c774a 100644 --- a/pkg/providers/botman/resource_akamai_botman_challenge_action.go +++ b/pkg/providers/botman/resource_akamai_botman_challenge_action.go @@ -7,9 +7,9 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" @@ -81,7 +81,7 @@ func resourceChallengeActionCreate(ctx context.Context, d *schema.ResourceData, return diag.FromErr(err) } - d.SetId(fmt.Sprintf("%d:%s", configID, tools.ConvertToString((response)["actionId"]))) + d.SetId(fmt.Sprintf("%d:%s", configID, str.From((response)["actionId"]))) return resourceChallengeActionRead(ctx, d, m) } diff --git a/pkg/providers/botman/resource_akamai_botman_conditional_action.go b/pkg/providers/botman/resource_akamai_botman_conditional_action.go index 135718ce7..3beefac40 100644 --- a/pkg/providers/botman/resource_akamai_botman_conditional_action.go +++ b/pkg/providers/botman/resource_akamai_botman_conditional_action.go @@ -7,9 +7,9 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" @@ -81,7 +81,7 @@ func resourceConditionalActionCreate(ctx context.Context, d *schema.ResourceData return diag.FromErr(err) } - d.SetId(fmt.Sprintf("%d:%s", configID, tools.ConvertToString((response)["actionId"]))) + d.SetId(fmt.Sprintf("%d:%s", configID, str.From((response)["actionId"]))) return resourceConditionalActionRead(ctx, d, m) } diff --git a/pkg/providers/botman/resource_akamai_botman_custom_bot_category.go b/pkg/providers/botman/resource_akamai_botman_custom_bot_category.go index ee58c153d..83377f13e 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_bot_category.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_bot_category.go @@ -7,9 +7,9 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" @@ -81,7 +81,7 @@ func resourceCustomBotCategoryCreate(ctx context.Context, d *schema.ResourceData return diag.FromErr(err) } - d.SetId(fmt.Sprintf("%d:%s", configID, tools.ConvertToString((response)["categoryId"]))) + d.SetId(fmt.Sprintf("%d:%s", configID, str.From((response)["categoryId"]))) return resourceCustomBotCategoryRead(ctx, d, m) } diff --git a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence_test.go b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence_test.go index db4e7c488..30e54db61 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence_test.go @@ -4,8 +4,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -62,7 +62,7 @@ func TestResourceCustomBotCategorySequence(t *testing.T) { Config: testutils.LoadFixtureString(t, "testdata/TestResourceCustomBotCategorySequence/create.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_custom_bot_category_sequence.test", "id", "43253"), - resource.TestCheckResourceAttr("akamai_botman_custom_bot_category_sequence.test", "category_ids.#", tools.ConvertToString(len(createCategoryIds))), + resource.TestCheckResourceAttr("akamai_botman_custom_bot_category_sequence.test", "category_ids.#", str.From(len(createCategoryIds))), resource.TestCheckResourceAttr("akamai_botman_custom_bot_category_sequence.test", "category_ids.0", createCategoryIds[0]), resource.TestCheckResourceAttr("akamai_botman_custom_bot_category_sequence.test", "category_ids.1", createCategoryIds[1]), resource.TestCheckResourceAttr("akamai_botman_custom_bot_category_sequence.test", "category_ids.2", createCategoryIds[2])), @@ -71,7 +71,7 @@ func TestResourceCustomBotCategorySequence(t *testing.T) { Config: testutils.LoadFixtureString(t, "testdata/TestResourceCustomBotCategorySequence/update.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_custom_bot_category_sequence.test", "id", "43253"), - resource.TestCheckResourceAttr("akamai_botman_custom_bot_category_sequence.test", "category_ids.#", tools.ConvertToString(len(updateCategoryIds))), + resource.TestCheckResourceAttr("akamai_botman_custom_bot_category_sequence.test", "category_ids.#", str.From(len(updateCategoryIds))), resource.TestCheckResourceAttr("akamai_botman_custom_bot_category_sequence.test", "category_ids.0", updateCategoryIds[0]), resource.TestCheckResourceAttr("akamai_botman_custom_bot_category_sequence.test", "category_ids.1", updateCategoryIds[1]), resource.TestCheckResourceAttr("akamai_botman_custom_bot_category_sequence.test", "category_ids.2", updateCategoryIds[2])), diff --git a/pkg/providers/botman/resource_akamai_botman_custom_client_sequence_test.go b/pkg/providers/botman/resource_akamai_botman_custom_client_sequence_test.go index 40a297ec1..29f0d5e00 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_client_sequence_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_client_sequence_test.go @@ -4,8 +4,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -62,7 +62,7 @@ func TestResourceCustomClientSequence(t *testing.T) { Config: testutils.LoadFixtureString(t, "testdata/TestResourceCustomClientSequence/create.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_custom_client_sequence.test", "id", "43253"), - resource.TestCheckResourceAttr("akamai_botman_custom_client_sequence.test", "custom_client_ids.#", tools.ConvertToString(len(createCustomClientIds))), + resource.TestCheckResourceAttr("akamai_botman_custom_client_sequence.test", "custom_client_ids.#", str.From(len(createCustomClientIds))), resource.TestCheckResourceAttr("akamai_botman_custom_client_sequence.test", "custom_client_ids.0", createCustomClientIds[0]), resource.TestCheckResourceAttr("akamai_botman_custom_client_sequence.test", "custom_client_ids.1", createCustomClientIds[1]), resource.TestCheckResourceAttr("akamai_botman_custom_client_sequence.test", "custom_client_ids.2", createCustomClientIds[2])), @@ -71,7 +71,7 @@ func TestResourceCustomClientSequence(t *testing.T) { Config: testutils.LoadFixtureString(t, "testdata/TestResourceCustomClientSequence/update.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_custom_client_sequence.test", "id", "43253"), - resource.TestCheckResourceAttr("akamai_botman_custom_client_sequence.test", "custom_client_ids.#", tools.ConvertToString(len(updateCustomClientIds))), + resource.TestCheckResourceAttr("akamai_botman_custom_client_sequence.test", "custom_client_ids.#", str.From(len(updateCustomClientIds))), resource.TestCheckResourceAttr("akamai_botman_custom_client_sequence.test", "custom_client_ids.0", updateCustomClientIds[0]), resource.TestCheckResourceAttr("akamai_botman_custom_client_sequence.test", "custom_client_ids.1", updateCustomClientIds[1]), resource.TestCheckResourceAttr("akamai_botman_custom_client_sequence.test", "custom_client_ids.2", updateCustomClientIds[2])), diff --git a/pkg/providers/botman/resource_akamai_botman_custom_deny_action.go b/pkg/providers/botman/resource_akamai_botman_custom_deny_action.go index 156689557..9a831338b 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_deny_action.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_deny_action.go @@ -7,9 +7,9 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" @@ -81,7 +81,7 @@ func resourceCustomDenyActionCreate(ctx context.Context, d *schema.ResourceData, return diag.FromErr(err) } - d.SetId(fmt.Sprintf("%d:%s", configID, tools.ConvertToString((response)["actionId"]))) + d.SetId(fmt.Sprintf("%d:%s", configID, str.From((response)["actionId"]))) return resourceCustomDenyActionRead(ctx, d, m) } diff --git a/pkg/providers/botman/resource_akamai_botman_serve_alternate_action.go b/pkg/providers/botman/resource_akamai_botman_serve_alternate_action.go index 6c00e88d6..7c49ef2d7 100644 --- a/pkg/providers/botman/resource_akamai_botman_serve_alternate_action.go +++ b/pkg/providers/botman/resource_akamai_botman_serve_alternate_action.go @@ -7,9 +7,9 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" @@ -81,7 +81,7 @@ func resourceServeAlternateActionCreate(ctx context.Context, d *schema.ResourceD return diag.FromErr(err) } - d.SetId(fmt.Sprintf("%d:%s", configID, tools.ConvertToString((response)["actionId"]))) + d.SetId(fmt.Sprintf("%d:%s", configID, str.From((response)["actionId"]))) return resourceServeAlternateActionRead(ctx, d, m) } diff --git a/pkg/providers/clientlists/data_akamai_clientlist_lists.go b/pkg/providers/clientlists/data_akamai_clientlist_lists.go index ba5615f3d..62035c1f0 100644 --- a/pkg/providers/clientlists/data_akamai_clientlist_lists.go +++ b/pkg/providers/clientlists/data_akamai_clientlist_lists.go @@ -6,9 +6,9 @@ import ( "errors" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/clientlists" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" @@ -207,7 +207,7 @@ func dataSourceClientListRead(ctx context.Context, d *schema.ResourceData, m int return diag.Errorf("%v: %s", tf.ErrValueSet, err.Error()) } - d.SetId(tools.GetSHAString(string(jsonBody))) + d.SetId(hash.GetSHAString(string(jsonBody))) return nil } diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_test.go index 3fa8544ef..970457ce3 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -39,15 +39,15 @@ func TestDataApplicationLoadBalancer(t *testing.T) { Country: "US", City: "Cambridge", Hostname: "example.com", - Latitude: tools.Float64Ptr(102.78108), - StateOrProvince: tools.StringPtr("MA"), + Latitude: ptr.To(102.78108), + StateOrProvince: ptr.To("MA"), LivenessHosts: []string{ "clorigin3.www.example.com", }, - Longitude: tools.Float64Ptr(-116.07064), + Longitude: ptr.To(-116.07064), OriginID: "alb_test_krk_dc1", - Percent: tools.Float64Ptr(100.0), + Percent: ptr.To(100.0), }, }, Deleted: false, diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_test.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_test.go index 73e9fe03a..0ed49085a 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_test.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/jinzhu/copier" @@ -38,12 +38,12 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { Continent: "NA", Country: "US", Hostname: "test-hostname", - Latitude: tools.Float64Ptr(102.78108), + Latitude: ptr.To(102.78108), LivenessHosts: livenessHosts, - Longitude: tools.Float64Ptr(-116.07064), + Longitude: ptr.To(-116.07064), OriginID: "test_origin", - Percent: tools.Float64Ptr(100), - StateOrProvince: tools.StringPtr("MA"), + Percent: ptr.To(100.0), + StateOrProvince: ptr.To("MA"), }, }, LivenessSettings: &cloudlets.LivenessSettings{ @@ -486,12 +486,12 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { Continent: "NA", Country: "US", Hostname: "test-hostname", - Latitude: tools.Float64Ptr(102.78108), + Latitude: ptr.To(102.78108), LivenessHosts: []string{"tf.test"}, - Longitude: tools.Float64Ptr(-116.07064), + Longitude: ptr.To(-116.07064), OriginID: "test_origin", - Percent: tools.Float64Ptr(100), - StateOrProvince: tools.StringPtr("MA"), + Percent: ptr.To(100.0), + StateOrProvince: ptr.To("MA"), }, }, LivenessSettings: &cloudlets.LivenessSettings{ diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy.go index 9dea11dbf..3c6941b07 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy.go @@ -14,11 +14,11 @@ import ( v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets/v3" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" @@ -210,7 +210,7 @@ func resourcePolicyCreate(ctx context.Context, d *schema.ResourceData, m interfa if err != nil { return diag.FromErr(err) } - groupIDNum, err := tools.GetIntID(groupID, "grp_") + groupIDNum, err := str.GetIntID(groupID, "grp_") if err != nil { return diag.Errorf("invalid group_id provided: %s", err) } @@ -330,7 +330,7 @@ func resourcePolicyUpdate(ctx context.Context, d *schema.ResourceData, m interfa if err != nil { return diag.FromErr(err) } - groupIDNum, err := tools.GetIntID(groupID, "grp_") + groupIDNum, err := str.GetIntID(groupID, "grp_") if err != nil { return diag.FromErr(err) } diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go index 9a8c3e012..ecb2b0496 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go @@ -7,8 +7,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets/v3" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/jinzhu/copier" diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configuration_test.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configuration_test.go index 0b091c644..ac4e21e75 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configuration_test.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configuration_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudwrapper" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -27,7 +27,7 @@ var ( configuration = testDataForCWConfiguration{ ID: 1, - CapacityAlertsThreshold: tools.IntPtr(1), + CapacityAlertsThreshold: ptr.To(1), Comments: "Test comments", ContractID: "Test contract", Locations: []cloudwrapper.ConfigLocationResp{ @@ -95,7 +95,7 @@ var ( DataStreams: &cloudwrapper.DataStreams{ DataStreamIDs: []int64{1, 2}, Enabled: true, - SamplingRate: tools.IntPtr(10), + SamplingRate: ptr.To(10), }, EnableSoftAlerts: true, Origins: []cloudwrapper.Origin{ @@ -115,8 +115,8 @@ var ( ConfigName: "Test config name", LastUpdatedBy: "Test user", LastUpdatedDate: "Test date", - LastActivatedBy: tools.StringPtr("Test user 2"), - LastActivatedDate: tools.StringPtr("Test date 2"), + LastActivatedBy: ptr.To("Test user 2"), + LastActivatedDate: ptr.To("Test date 2"), NotificationEmails: []string{"1@a.com", "2@a.com"}, PropertyIDs: []string{"11", "22"}, RetainIdleObjects: true, diff --git a/pkg/providers/cps/data_akamai_cps_csr.go b/pkg/providers/cps/data_akamai_cps_csr.go index 6155398ec..131d887d5 100644 --- a/pkg/providers/cps/data_akamai_cps_csr.go +++ b/pkg/providers/cps/data_akamai_cps_csr.go @@ -7,10 +7,10 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/collections" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" toolsCPS "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/cps/tools" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -83,7 +83,7 @@ func dataCPSCSRRead(ctx context.Context, d *schema.ResourceData, m interface{}) statuses := []string{"wait-upload-third-party", "verify-third-party-cert", "wait-review-third-party-cert"} - if tools.ContainsString(statuses, changeStatus.StatusInfo.Status) { + if collections.StringInSlice(statuses, changeStatus.StatusInfo.Status) { attrs, err = createCSRAttrsFromChange(ctx, client, changeID, enrollmentID) if err != nil { return diag.Errorf("could not get third party CSR: %s", err) diff --git a/pkg/providers/cps/enrollments.go b/pkg/providers/cps/enrollments.go index 35ffd67bc..89dc222c1 100644 --- a/pkg/providers/cps/enrollments.go +++ b/pkg/providers/cps/enrollments.go @@ -11,10 +11,10 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" cpstools "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/cps/tools" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/apex/log" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" @@ -365,7 +365,7 @@ func enrollmentDelete(ctx context.Context, d *schema.ResourceData, m interface{} } req := cps.RemoveEnrollmentRequest{ EnrollmentID: enrollmentID, - AllowCancelPendingChanges: tools.BoolPtr(true), + AllowCancelPendingChanges: ptr.To(true), } if _, err = client.RemoveEnrollment(ctx, req); err != nil { return diag.FromErr(err) diff --git a/pkg/providers/cps/resource_akamai_cps_dv_enrollment.go b/pkg/providers/cps/resource_akamai_cps_dv_enrollment.go index 38da7abbd..13d161b1f 100644 --- a/pkg/providers/cps/resource_akamai_cps_dv_enrollment.go +++ b/pkg/providers/cps/resource_akamai_cps_dv_enrollment.go @@ -10,7 +10,7 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/tools" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" @@ -351,7 +351,7 @@ func resourceCPSDVEnrollmentCreate(ctx context.Context, d *schema.ResourceData, req := cps.UpdateEnrollmentRequest{ EnrollmentID: res.ID, Enrollment: enrollment, - AllowCancelPendingChanges: tools.BoolPtr(true), + AllowCancelPendingChanges: ptr.To(true), } _, err := client.UpdateEnrollment(ctx, req) if err != nil { diff --git a/pkg/providers/cps/resource_akamai_cps_dv_enrollment_test.go b/pkg/providers/cps/resource_akamai_cps_dv_enrollment_test.go index 14f41f27e..2752fdde6 100644 --- a/pkg/providers/cps/resource_akamai_cps_dv_enrollment_test.go +++ b/pkg/providers/cps/resource_akamai_cps_dv_enrollment_test.go @@ -7,7 +7,7 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/tools" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" @@ -581,9 +581,9 @@ func TestResourceDVEnrollment(t *testing.T) { enrollmentUpdate.NetworkConfiguration.ClientMutualAuthentication = &cps.ClientMutualAuthentication{ AuthenticationOptions: &cps.AuthenticationOptions{ OCSP: &cps.OCSP{ - Enabled: tools.BoolPtr(true), + Enabled: ptr.To(true), }, - SendCAListToClient: tools.BoolPtr(false), + SendCAListToClient: ptr.To(false), }, SetID: "12345", } @@ -592,7 +592,7 @@ func TestResourceDVEnrollment(t *testing.T) { cps.UpdateEnrollmentRequest{ EnrollmentID: 1, Enrollment: enrollmentUpdate, - AllowCancelPendingChanges: tools.BoolPtr(true), + AllowCancelPendingChanges: ptr.To(true), }, ).Return(&cps.UpdateEnrollmentResponse{ ID: 1, diff --git a/pkg/providers/cps/resource_akamai_cps_third_party_enrollment.go b/pkg/providers/cps/resource_akamai_cps_third_party_enrollment.go index 7178eea61..c9c236788 100644 --- a/pkg/providers/cps/resource_akamai_cps_third_party_enrollment.go +++ b/pkg/providers/cps/resource_akamai_cps_third_party_enrollment.go @@ -9,11 +9,11 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" cpstools "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/cps/tools" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" @@ -236,7 +236,7 @@ func resourceCPSThirdPartyEnrollmentCreate(ctx context.Context, d *schema.Resour req := cps.UpdateEnrollmentRequest{ EnrollmentID: res.ID, Enrollment: *enrollment, - AllowCancelPendingChanges: tools.BoolPtr(true), + AllowCancelPendingChanges: ptr.To(true), } _, err := client.UpdateEnrollment(ctx, req) if err != nil { diff --git a/pkg/providers/cps/resource_akamai_cps_third_party_enrollment_test.go b/pkg/providers/cps/resource_akamai_cps_third_party_enrollment_test.go index 9b1253013..906e45049 100644 --- a/pkg/providers/cps/resource_akamai_cps_third_party_enrollment_test.go +++ b/pkg/providers/cps/resource_akamai_cps_third_party_enrollment_test.go @@ -7,8 +7,8 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/jinzhu/copier" @@ -401,9 +401,9 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { withMTLS(cps.ClientMutualAuthentication{ AuthenticationOptions: &cps.AuthenticationOptions{ OCSP: &cps.OCSP{ - Enabled: tools.BoolPtr(true), + Enabled: ptr.To(true), }, - SendCAListToClient: tools.BoolPtr(false), + SendCAListToClient: ptr.To(false), }, SetID: "12345", }), @@ -414,7 +414,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { cps.UpdateEnrollmentRequest{ EnrollmentID: 1, Enrollment: enrollmentUpdate, - AllowCancelPendingChanges: tools.BoolPtr(true), + AllowCancelPendingChanges: ptr.To(true), }, ).Return(&cps.UpdateEnrollmentResponse{ ID: 1, diff --git a/pkg/providers/cps/resource_akamai_cps_upload_certificate_test.go b/pkg/providers/cps/resource_akamai_cps_upload_certificate_test.go index 67701d3a3..e05343611 100644 --- a/pkg/providers/cps/resource_akamai_cps_upload_certificate_test.go +++ b/pkg/providers/cps/resource_akamai_cps_upload_certificate_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/stretchr/testify/assert" @@ -151,7 +151,7 @@ func TestResourceCPSUploadCertificateWithThirdPartyEnrollmentDependency(t *testi // Delete third party enrollment client.On("RemoveEnrollment", mock.Anything, cps.RemoveEnrollmentRequest{ EnrollmentID: enrollmentID, - AllowCancelPendingChanges: tools.BoolPtr(true), + AllowCancelPendingChanges: ptr.To(true), }).Return(&cps.RemoveEnrollmentResponse{ Enrollment: fmt.Sprintf("%d", enrollmentID), }, nil).Once() diff --git a/pkg/providers/datastream/data_akamai_datastream_dataset_fields.go b/pkg/providers/datastream/data_akamai_datastream_dataset_fields.go index e403d5a7f..5be4a0d74 100644 --- a/pkg/providers/datastream/data_akamai_datastream_dataset_fields.go +++ b/pkg/providers/datastream/data_akamai_datastream_dataset_fields.go @@ -7,9 +7,9 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/datastream" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -99,7 +99,7 @@ func dataSourceDatasetFieldsRead(ctx context.Context, rd *schema.ResourceData, m } // ignoring the GetMd5Sum error, because `fields` is already initialized - md5Sum, _ := tools.GetMd5Sum(fmt.Sprintf("%v", fields)) + md5Sum, _ := hash.GetMD5Sum(fmt.Sprintf("%v", fields)) rd.SetId(md5Sum) return nil diff --git a/pkg/providers/datastream/data_akamai_datastreams.go b/pkg/providers/datastream/data_akamai_datastreams.go index 904eaba19..437b312c1 100644 --- a/pkg/providers/datastream/data_akamai_datastreams.go +++ b/pkg/providers/datastream/data_akamai_datastreams.go @@ -6,9 +6,9 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/datastream" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" @@ -138,7 +138,7 @@ func dataDatastreamStreamsRead(ctx context.Context, d *schema.ResourceData, m in resID := "akamai_datastreams" if groupIDInt != 0 { - req.GroupID = tools.IntPtr(groupIDInt) + req.GroupID = ptr.To(groupIDInt) resID = fmt.Sprintf("%s_%d", resID, groupIDInt) } diff --git a/pkg/providers/datastream/data_akamai_datastreams_test.go b/pkg/providers/datastream/data_akamai_datastreams_test.go index b6cc927fe..e8042e95c 100644 --- a/pkg/providers/datastream/data_akamai_datastreams_test.go +++ b/pkg/providers/datastream/data_akamai_datastreams_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/datastream" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -80,7 +80,7 @@ func TestDataDatastreams(t *testing.T) { "list streams with specified group id": { init: func(t *testing.T, m *datastream.Mock) { m.On("ListStreams", mock.Anything, datastream.ListStreamsRequest{ - GroupID: tools.IntPtr(1234), + GroupID: ptr.To(1234), }).Return(streamListForSpecificGroup, nil) }, steps: []resource.TestStep{ @@ -93,7 +93,7 @@ func TestDataDatastreams(t *testing.T) { "list streams with specified group id using grp prefix": { init: func(t *testing.T, m *datastream.Mock) { m.On("ListStreams", mock.Anything, datastream.ListStreamsRequest{ - GroupID: tools.IntPtr(1234), + GroupID: ptr.To(1234), }).Return(streamListForSpecificGroup, nil) }, steps: []resource.TestStep{ diff --git a/pkg/providers/datastream/resource_akamai_datastream.go b/pkg/providers/datastream/resource_akamai_datastream.go index 90b99d0f0..868d3b6e1 100644 --- a/pkg/providers/datastream/resource_akamai_datastream.go +++ b/pkg/providers/datastream/resource_akamai_datastream.go @@ -10,10 +10,10 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/datastream" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/collections" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/apex/log" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" @@ -973,7 +973,7 @@ func resourceDatastreamCreate(ctx context.Context, d *schema.ResourceData, m int // FilePrefixSuffixSet is used to set the blank value for prefix and suffix for https based destination as https based destination does not support prefix and suffix func FilePrefixSuffixSet(httpsBaseConnectorName string, config *datastream.DeliveryConfiguration) (*datastream.DeliveryConfiguration, error) { - if tools.ContainsString(ConnectorsWithoutFilenameOptionsConfig, httpsBaseConnectorName) { + if collections.StringInSlice(ConnectorsWithoutFilenameOptionsConfig, httpsBaseConnectorName) { config.UploadFilePrefix = "" config.UploadFileSuffix = "" @@ -1033,7 +1033,7 @@ func resourceDatastreamRead(ctx context.Context, d *schema.ResourceData, m inter if connectorKey != "" { attrs[connectorKey] = []interface{}{connectorProps} - if tools.ContainsString(ConnectorsWithoutFilenameOptionsConfig, connectorKey) { + if collections.StringInSlice(ConnectorsWithoutFilenameOptionsConfig, connectorKey) { // some connectors don't allow setting upload file prefix/suffix (API is ignoring them), // but the documentation specifies default value for these fields (ak/ds respectively) // so these fields should have default values in terraform provider too diff --git a/pkg/providers/dns/resource_akamai_dns_record.go b/pkg/providers/dns/resource_akamai_dns_record.go index 951dcda48..801d5faed 100644 --- a/pkg/providers/dns/resource_akamai_dns_record.go +++ b/pkg/providers/dns/resource_akamai_dns_record.go @@ -20,9 +20,9 @@ import ( "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/dns/internal/txtrecord" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/apex/log" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" @@ -764,7 +764,7 @@ func resourceDNSRecordCreate(ctx context.Context, d *schema.ResourceData, m inte logger.WithField("bind-object", recordCreate).Debug("Record Create") extractString := strings.Join(recordCreate.Target, " ") - sha1hash := tools.GetSHAString(extractString) + sha1hash := hash.GetSHAString(extractString) logger.Debugf("SHA sum for recordcreate [%s]", sha1hash) // First try to get the zone from the API @@ -935,7 +935,7 @@ func resourceDNSRecordUpdate(ctx context.Context, d *schema.ResourceData, m inte }) } extractString := strings.Join(recordCreate.Target, " ") - sha1hash := tools.GetSHAString(extractString) + sha1hash := hash.GetSHAString(extractString) logger.Debugf("UPDATE SHA sum for recordupdate [%s]", sha1hash) // First try to get the zone from the API @@ -960,7 +960,7 @@ func resourceDNSRecordUpdate(ctx context.Context, d *schema.ResourceData, m inte return resourceDNSRecordRead(ctx, d, meta) } extractString = strings.Join(rdata, " ") - sha1hashtest := tools.GetSHAString(extractString) + sha1hashtest := hash.GetSHAString(extractString) logger.Debugf("UPDATE SHA sum from recordread [%s]", sha1hashtest) sort.Strings(rdata) // If there's no existing record we'll create a blank one @@ -1048,7 +1048,7 @@ func resourceDNSRecordRead(ctx context.Context, d *schema.ResourceData, m interf }).Debugf("READ record JSON from bind records: %s ", string(b)) extractString := strings.Join(recordCreate.Target, " ") - sha1hash := tools.GetSHAString(extractString) + sha1hash := hash.GetSHAString(extractString) sort.Strings(recordCreate.Target) logger.Debugf("READ SHA sum for Existing SHA test %s %s", extractString, sha1hash) @@ -1099,7 +1099,7 @@ func resourceDNSRecordRead(ctx context.Context, d *schema.ResourceData, m interf if err != nil && !errors.Is(err, tf.ErrNotFound) { return diag.FromErr(err) } - shaRdata := tools.GetSHAString(rdataString) + shaRdata := hash.GetSHAString(rdataString) if d.HasChange("target") { logger.Debug("MX READ. TARGET HAS CHANGED") // has remote changed independently of TF? @@ -1129,7 +1129,7 @@ func resourceDNSRecordRead(ctx context.Context, d *schema.ResourceData, m interf case RRTypeAaaa: sort.Strings(record.Target) rdataString := strings.Join(record.Target, " ") - shaRdata := tools.GetSHAString(rdataString) + shaRdata := hash.GetSHAString(rdataString) if sha1hash == shaRdata { return nil } @@ -1184,14 +1184,14 @@ func resourceDNSRecordRead(ctx context.Context, d *schema.ResourceData, m interf logger.Debug("READ SOA RECORD CHANGE: SOA OK") if ok := validateSOARecord(d, logger); ok { extractSoaString := strings.Join(targets, " ") - sha1hash = tools.GetSHAString(extractSoaString) + sha1hash = hash.GetSHAString(extractSoaString) logger.Debug("READ SOA RECORD CHANGE: SOA OK") } } } if recordType == "AKAMAITLC" { extractTlcString := strings.Join(targets, " ") - sha1hash = tools.GetSHAString(extractTlcString) + sha1hash = hash.GetSHAString(extractTlcString) } if err := d.Set("record_sha", sha1hash); err != nil { return diag.Errorf("%v: %s", tf.ErrValueSet, err.Error()) @@ -1306,7 +1306,7 @@ func resourceDNSRecordImport(d *schema.ResourceData, m interface{}) ([]*schema.R sort.Strings(targets) } importTargetString = strings.Join(targets, " ") - sha1hash := tools.GetSHAString(importTargetString) + sha1hash := hash.GetSHAString(importTargetString) if err := d.Set("record_sha", sha1hash); err != nil { return nil, fmt.Errorf("%w: %s", tf.ErrValueSet, err.Error()) } diff --git a/pkg/providers/edgeworkers/resource_akamai_edgekv.go b/pkg/providers/edgeworkers/resource_akamai_edgekv.go index 2d4d317db..ce5a75f79 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgekv.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgekv.go @@ -9,9 +9,9 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/go-cty/cty" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" @@ -167,8 +167,8 @@ func resourceEdgeKVCreate(ctx context.Context, rd *schema.ResourceData, m interf Namespace: edgeworkers.Namespace{ Name: name, GeoLocation: geoLocation, - Retention: tools.IntPtr(retention), - GroupID: tools.IntPtr(groupID), + Retention: ptr.To(retention), + GroupID: ptr.To(groupID), }, }) if err != nil { @@ -284,8 +284,8 @@ func resourceEdgeKVUpdate(ctx context.Context, rd *schema.ResourceData, m interf Network: edgeworkers.NamespaceNetwork(network), UpdateNamespace: edgeworkers.UpdateNamespace{ Name: name, - Retention: tools.IntPtr(retention), - GroupID: tools.IntPtr(groupID), + Retention: ptr.To(retention), + GroupID: ptr.To(groupID), }, }) if err != nil { diff --git a/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items.go b/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items.go index afeaa2b16..27846951d 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items.go @@ -9,10 +9,10 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/collections" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" @@ -207,7 +207,7 @@ func resourceEdgeKVGroupItemsUpdate(ctx context.Context, rd *schema.ResourceData if !ok { return diag.Errorf("could not cast value of type %T to string", valueRaw) } - if !tools.ContainsString(remoteStateItemsArray, key) { + if !collections.StringInSlice(remoteStateItemsArray, key) { _, err = client.UpsertItem(ctx, edgeworkers.UpsertItemRequest{ ItemID: key, ItemData: edgeworkers.Item(value), @@ -295,7 +295,7 @@ func resourceEdgeKVGroupItemsDelete(ctx context.Context, rd *schema.ResourceData } for key := range attrs.items { - if !tools.ContainsString(remoteStateItemsArray, key) { + if !collections.StringInSlice(remoteStateItemsArray, key) { return diag.Errorf("item with key '%s' does not exist in the remote state of the database", key) } _, err = client.DeleteItem(ctx, edgeworkers.DeleteItemRequest{ @@ -338,7 +338,7 @@ func waitForEdgeKVGroupCreation(ctx context.Context, client edgeworkers.Edgework return fmt.Errorf("could not list groups within network: `%s` and namespace_name: `%s`: %s", attrs.network, attrs.namespace, err) } - if tools.ContainsString(groups, groupName) { + if collections.StringInSlice(groups, groupName) { groupExists = true } case <-ctx.Done(): @@ -364,7 +364,7 @@ func waitForEdgeKVGroupDeletion(ctx context.Context, client edgeworkers.Edgework return fmt.Errorf("could not list groups within network: `%s` and namespace_name: `%s`: %s", attrs.network, attrs.namespace, err) } - if !tools.ContainsString(groups, groupName) { + if !collections.StringInSlice(groups, groupName) { groupExists = false } case <-ctx.Done(): diff --git a/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items_test.go b/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items_test.go index a3ee71392..34ce8e377 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items_test.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items_test.go @@ -8,8 +8,8 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -1031,7 +1031,7 @@ var ( }, ItemID: itemID, ItemData: edgeworkers.Item(itemData), - }).Return(tools.StringPtr("value1"), nil).Times(timesToRun) + }).Return(ptr.To("value1"), nil).Times(timesToRun) } // mockListItems mocks 'ListItems' call with provided data @@ -1066,7 +1066,7 @@ var ( Network: attrs.network, GroupID: attrs.groupID, }, - }).Return(tools.StringPtr(responseMessage), nil).Times(timesToRun) + }).Return(ptr.To(responseMessage), nil).Times(timesToRun) } // mockListGroupsWithinNamespace mocks 'ListGroupsWithinNamespace' call with provided data diff --git a/pkg/providers/edgeworkers/resource_akamai_edgekv_test.go b/pkg/providers/edgeworkers/resource_akamai_edgekv_test.go index 769668008..3a54a8f74 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgekv_test.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgekv_test.go @@ -10,8 +10,8 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" @@ -22,7 +22,7 @@ func Test_populateEKV(t *testing.T) { maxUpsertAttempts = 1 namespaceName, staging, ekvGroup := "DevExpTest", edgeworkers.ItemStagingNetwork, "greetings" anError, nsCreationError := "an error", "The requested namespace does not exist or namespace type is not configured for 12345" - success := tools.StringPtr("Item was upserted in KV store with database 123456, namespace DevExpTest, group greetings, and key FR.") + success := ptr.To("Item was upserted in KV store with database 123456, namespace DevExpTest, group greetings, and key FR.") tests := map[string]struct { data []interface{} network edgeworkers.ItemNetwork @@ -166,7 +166,7 @@ func TestResourceEdgeKV(t *testing.T) { } initStatusOneAttempt := []*edgeworkers.EdgeKVInitializationStatus{initialized} initNoErrorsOneAttempt := []error{nil} - namespaceName, net, retention, retentionUpdated, groupID := "DevExpTest", "staging", tools.IntPtr(86401), tools.IntPtr(88401), tools.IntPtr(1234) + namespaceName, net, retention, retentionUpdated, groupID := "DevExpTest", "staging", ptr.To(86401), ptr.To(88401), ptr.To(1234) var noData []map[string]interface{} id := fmt.Sprintf("%s:%s", namespaceName, net) tests := map[string]struct { @@ -199,7 +199,7 @@ func TestResourceEdgeKV(t *testing.T) { "basic - retention 0": { init: func(m *edgeworkers.Mock) { // create - retention := tools.IntPtr(0) + retention := ptr.To(0) stubResourceEdgeKVCreatePhase(m, namespaceName, net, retention, groupID, "", "", initStatusOneAttempt, initNoErrorsOneAttempt, noData) // read @@ -572,7 +572,7 @@ func stubResourceEdgeKVCreatePhase(m *edgeworkers.Mock, namespaceName, net strin if err, ok := item["error"]; ok { onUpsert.Return(nil, fmt.Errorf("%s: %s", edgeworkers.ErrUpsertItem, err)).Once() } else { - onUpsert.Return(tools.StringPtr("OK"), nil).Once() + onUpsert.Return(ptr.To("OK"), nil).Once() } } } diff --git a/pkg/providers/edgeworkers/resource_akamai_edgeworker.go b/pkg/providers/edgeworkers/resource_akamai_edgeworker.go index 8661562f7..b85030d72 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgeworker.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgeworker.go @@ -16,10 +16,10 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" @@ -133,7 +133,7 @@ func resourceEdgeWorkerCreate(ctx context.Context, d *schema.ResourceData, m int if err != nil { return diag.FromErr(err) } - groupIDNum, err := tools.GetIntID(groupID, "grp_") + groupIDNum, err := str.GetIntID(groupID, "grp_") if err != nil { return diag.Errorf("invalid group_id provided: %s", err) } @@ -306,7 +306,7 @@ func resourceEdgeWorkerUpdate(ctx context.Context, d *schema.ResourceData, m int if err != nil { return diag.FromErr(err) } - groupIDNum, err := tools.GetIntID(groupID, "grp_") + groupIDNum, err := str.GetIntID(groupID, "grp_") if err != nil { return diag.FromErr(err) } diff --git a/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation.go b/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation.go index 740c511b3..98419446d 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation.go @@ -11,10 +11,10 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/collections" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -245,7 +245,7 @@ func resourceEdgeworkersActivationDelete(ctx context.Context, rd *schema.Resourc if _, err := waitForEdgeworkerDeactivation(ctx, client, edgeworkerID, deactivation.DeactivationID); err != nil { if errors.Is(err, ErrEdgeworkerDeactivationTimeout) { rd.SetId("") - return append(tools.DiagWarningf("%s: %s", ErrEdgeworkerDeactivation, err), tools.DiagWarningf("Resource has been removed from the state, but deactivation is still ongoing on the server")...) + return append(tf.DiagWarningf("%s: %s", ErrEdgeworkerDeactivation, err), tf.DiagWarningf("Resource has been removed from the state, but deactivation is still ongoing on the server")...) } return diag.Errorf("%s: %s", ErrEdgeworkerDeactivation, err) } @@ -271,7 +271,7 @@ func resourceEdgeworkersActivationImport(_ context.Context, rd *schema.ResourceD } network := parts[1] - if !tools.ContainsString(validEdgeworkerActivationNetworks, network) { + if !collections.StringInSlice(validEdgeworkerActivationNetworks, network) { return nil, fmt.Errorf("%s import: network must be 'STAGING' or 'PRODUCTION', got '%s'", ErrEdgeworkerActivation, network) } diff --git a/pkg/providers/iam/resource_akamai_iam_user_test.go b/pkg/providers/iam/resource_akamai_iam_user_test.go index 7f4e8d38d..0737241e5 100644 --- a/pkg/providers/iam/resource_akamai_iam_user_test.go +++ b/pkg/providers/iam/resource_akamai_iam_user_test.go @@ -8,8 +8,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" @@ -41,7 +41,7 @@ func TestResourceUser(t *testing.T) { Country: "country", ContactType: "contact type", PreferredLanguage: "language", - SessionTimeOut: tools.IntPtr(2), + SessionTimeOut: ptr.To(2), } authGrantsCreate := []iam.AuthGrant{ @@ -108,7 +108,7 @@ func TestResourceUser(t *testing.T) { checkUserAttributes := func(user iam.User) resource.TestCheckFunc { if user.SessionTimeOut == nil { - user.SessionTimeOut = tools.IntPtr(0) + user.SessionTimeOut = ptr.To(0) } var authGrantsJSON string diff --git a/pkg/providers/imaging/imagewriter/convert-image.gen.go b/pkg/providers/imaging/imagewriter/convert-image.gen.go index e16535656..1156a423a 100644 --- a/pkg/providers/imaging/imagewriter/convert-image.gen.go +++ b/pkg/providers/imaging/imagewriter/convert-image.gen.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/imaging" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/tools" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -1203,7 +1203,7 @@ func appendGravityPriorityVariableInline(d *schema.ResourceData, key string) *im nameRaw, existVar := extract(d, key+"_var") existVar = existVar && nameRaw.(string) != "" if existVar { - name = tools.StringPtr(nameRaw.(string)) + name = ptr.To(nameRaw.(string)) } if existVal || existVar { @@ -1229,7 +1229,7 @@ func compositePlacementVariableInline(d *schema.ResourceData, key string) *imagi nameRaw, existVar := extract(d, key+"_var") existVar = existVar && nameRaw.(string) != "" if existVar { - name = tools.StringPtr(nameRaw.(string)) + name = ptr.To(nameRaw.(string)) } if existVal || existVar { @@ -1255,7 +1255,7 @@ func compositePostPlacementVariableInline(d *schema.ResourceData, key string) *i nameRaw, existVar := extract(d, key+"_var") existVar = existVar && nameRaw.(string) != "" if existVar { - name = tools.StringPtr(nameRaw.(string)) + name = ptr.To(nameRaw.(string)) } if existVal || existVar { @@ -1281,7 +1281,7 @@ func compositePostScaleDimensionVariableInline(d *schema.ResourceData, key strin nameRaw, existVar := extract(d, key+"_var") existVar = existVar && nameRaw.(string) != "" if existVar { - name = tools.StringPtr(nameRaw.(string)) + name = ptr.To(nameRaw.(string)) } if existVal || existVar { @@ -1307,7 +1307,7 @@ func compositeScaleDimensionVariableInline(d *schema.ResourceData, key string) * nameRaw, existVar := extract(d, key+"_var") existVar = existVar && nameRaw.(string) != "" if existVar { - name = tools.StringPtr(nameRaw.(string)) + name = ptr.To(nameRaw.(string)) } if existVal || existVar { @@ -1333,7 +1333,7 @@ func faceCropAlgorithmVariableInline(d *schema.ResourceData, key string) *imagin nameRaw, existVar := extract(d, key+"_var") existVar = existVar && nameRaw.(string) != "" if existVar { - name = tools.StringPtr(nameRaw.(string)) + name = ptr.To(nameRaw.(string)) } if existVal || existVar { @@ -1359,7 +1359,7 @@ func faceCropFocusVariableInline(d *schema.ResourceData, key string) *imaging.Fa nameRaw, existVar := extract(d, key+"_var") existVar = existVar && nameRaw.(string) != "" if existVar { - name = tools.StringPtr(nameRaw.(string)) + name = ptr.To(nameRaw.(string)) } if existVal || existVar { @@ -1385,7 +1385,7 @@ func faceCropStyleVariableInline(d *schema.ResourceData, key string) *imaging.Fa nameRaw, existVar := extract(d, key+"_var") existVar = existVar && nameRaw.(string) != "" if existVar { - name = tools.StringPtr(nameRaw.(string)) + name = ptr.To(nameRaw.(string)) } if existVal || existVar { @@ -1411,7 +1411,7 @@ func featureCropStyleVariableInline(d *schema.ResourceData, key string) *imaging nameRaw, existVar := extract(d, key+"_var") existVar = existVar && nameRaw.(string) != "" if existVar { - name = tools.StringPtr(nameRaw.(string)) + name = ptr.To(nameRaw.(string)) } if existVal || existVar { @@ -1437,7 +1437,7 @@ func gravityPostVariableInline(d *schema.ResourceData, key string) *imaging.Grav nameRaw, existVar := extract(d, key+"_var") existVar = existVar && nameRaw.(string) != "" if existVar { - name = tools.StringPtr(nameRaw.(string)) + name = ptr.To(nameRaw.(string)) } if existVal || existVar { @@ -1463,7 +1463,7 @@ func gravityVariableInline(d *schema.ResourceData, key string) *imaging.GravityV nameRaw, existVar := extract(d, key+"_var") existVar = existVar && nameRaw.(string) != "" if existVar { - name = tools.StringPtr(nameRaw.(string)) + name = ptr.To(nameRaw.(string)) } if existVal || existVar { @@ -1489,7 +1489,7 @@ func grayscaleTypeVariableInline(d *schema.ResourceData, key string) *imaging.Gr nameRaw, existVar := extract(d, key+"_var") existVar = existVar && nameRaw.(string) != "" if existVar { - name = tools.StringPtr(nameRaw.(string)) + name = ptr.To(nameRaw.(string)) } if existVal || existVar { @@ -1515,7 +1515,7 @@ func ifDimensionDimensionVariableInline(d *schema.ResourceData, key string) *ima nameRaw, existVar := extract(d, key+"_var") existVar = existVar && nameRaw.(string) != "" if existVar { - name = tools.StringPtr(nameRaw.(string)) + name = ptr.To(nameRaw.(string)) } if existVal || existVar { @@ -1541,7 +1541,7 @@ func ifDimensionPostDimensionVariableInline(d *schema.ResourceData, key string) nameRaw, existVar := extract(d, key+"_var") existVar = existVar && nameRaw.(string) != "" if existVar { - name = tools.StringPtr(nameRaw.(string)) + name = ptr.To(nameRaw.(string)) } if existVal || existVar { @@ -1567,7 +1567,7 @@ func outputImagePerceptualQualityVariableInline(d *schema.ResourceData, key stri nameRaw, existVar := extract(d, key+"_var") existVar = existVar && nameRaw.(string) != "" if existVar { - name = tools.StringPtr(nameRaw.(string)) + name = ptr.To(nameRaw.(string)) } if existVal || existVar { @@ -1593,7 +1593,7 @@ func regionOfInterestCropStyleVariableInline(d *schema.ResourceData, key string) nameRaw, existVar := extract(d, key+"_var") existVar = existVar && nameRaw.(string) != "" if existVar { - name = tools.StringPtr(nameRaw.(string)) + name = ptr.To(nameRaw.(string)) } if existVal || existVar { @@ -1619,7 +1619,7 @@ func resizeAspectVariableInline(d *schema.ResourceData, key string) *imaging.Res nameRaw, existVar := extract(d, key+"_var") existVar = existVar && nameRaw.(string) != "" if existVar { - name = tools.StringPtr(nameRaw.(string)) + name = ptr.To(nameRaw.(string)) } if existVal || existVar { @@ -1645,7 +1645,7 @@ func resizeTypeVariableInline(d *schema.ResourceData, key string) *imaging.Resiz nameRaw, existVar := extract(d, key+"_var") existVar = existVar && nameRaw.(string) != "" if existVar { - name = tools.StringPtr(nameRaw.(string)) + name = ptr.To(nameRaw.(string)) } if existVal || existVar { @@ -1666,13 +1666,13 @@ func booleanVariableInline(d *schema.ResourceData, key string) *imaging.BooleanV existVal = existVal && valueRaw.(string) != "" if existVal { valueMapped, _ := strconv.ParseBool(valueRaw.(string)) - value = tools.BoolPtr(valueMapped) + value = ptr.To(valueMapped) } nameRaw, existVar := extract(d, key+"_var") existVar = existVar && nameRaw.(string) != "" if existVar { - name = tools.StringPtr(nameRaw.(string)) + name = ptr.To(nameRaw.(string)) } if existVal || existVar { @@ -1692,13 +1692,13 @@ func integerVariableInline(d *schema.ResourceData, key string) *imaging.IntegerV existVal = existVal && valueRaw.(string) != "" if existVal { valueMapped, _ := strconv.Atoi(valueRaw.(string)) - value = tools.IntPtr(valueMapped) + value = ptr.To(valueMapped) } nameRaw, existVar := extract(d, key+"_var") existVar = existVar && nameRaw.(string) != "" if existVar { - name = tools.StringPtr(nameRaw.(string)) + name = ptr.To(nameRaw.(string)) } if existVal || existVar { @@ -1718,13 +1718,13 @@ func numberVariableInline(d *schema.ResourceData, key string) *imaging.NumberVar existVal = existVal && valueRaw.(string) != "" if existVal { valueMapped, _ := strconv.ParseFloat(valueRaw.(string), 64) - value = tools.Float64Ptr(valueMapped) + value = ptr.To(valueMapped) } nameRaw, existVar := extract(d, key+"_var") existVar = existVar && nameRaw.(string) != "" if existVar { - name = tools.StringPtr(nameRaw.(string)) + name = ptr.To(nameRaw.(string)) } if existVal || existVar { @@ -1742,7 +1742,7 @@ func queryVariableInline(d *schema.ResourceData, key string) *imaging.QueryVaria nameRaw, existVar := extract(d, key+"_var") existVar = existVar && nameRaw.(string) != "" if existVar { - name = tools.StringPtr(nameRaw.(string)) + name = ptr.To(nameRaw.(string)) } if existVar { @@ -1761,13 +1761,13 @@ func stringVariableInline(d *schema.ResourceData, key string) *imaging.StringVar existVal = existVal && valueRaw.(string) != "" if existVal { valueMapped := valueRaw.(string) - value = tools.StringPtr(valueMapped) + value = ptr.To(valueMapped) } nameRaw, existVar := extract(d, key+"_var") existVar = existVar && nameRaw.(string) != "" if existVar { - name = tools.StringPtr(nameRaw.(string)) + name = ptr.To(nameRaw.(string)) } if existVal || existVar { @@ -1809,7 +1809,7 @@ func stringReader(d *schema.ResourceData, key string) string { func stringReaderPtr(d *schema.ResourceData, key string) *string { value, exist := extract(d, key) if exist { - return tools.StringPtr(value.(string)) + return ptr.To(value.(string)) } return nil } diff --git a/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go b/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go index 66a23304b..c3e0525d6 100644 --- a/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go @@ -8,8 +8,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/imaging" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/tj/assert" @@ -40,7 +40,7 @@ func TestResourcePolicyImage(t *testing.T) { Transformations: []imaging.TransformationType{ &imaging.MaxColors{ Colors: &imaging.IntegerVariableInline{ - Value: tools.IntPtr(2), + Value: ptr.To(2), }, Transformation: imaging.MaxColorsTransformationMaxColors, }, @@ -58,13 +58,13 @@ func TestResourcePolicyImage(t *testing.T) { Transformations: []imaging.TransformationType{ &imaging.MaxColors{ Colors: &imaging.IntegerVariableInline{ - Value: tools.IntPtr(2), + Value: ptr.To(2), }, Transformation: imaging.MaxColorsTransformationMaxColors, }, }, Version: 1, - Video: tools.BoolPtr(false), + Video: ptr.To(false), } defaultAllowedFormats = []imaging.OutputImageAllowedFormats{ imaging.OutputImageAllowedFormats("jpeg"), @@ -124,7 +124,7 @@ func TestResourcePolicyImage(t *testing.T) { }, Variables: defaultVariables, Version: 1, - Video: tools.BoolPtr(false), + Video: ptr.To(false), } expectUpsertPolicy = func(client *imaging.Mock, policyID, policySetID, contractID string, network imaging.PolicyNetwork, policy imaging.PolicyInput) { @@ -578,7 +578,7 @@ func TestResourcePolicyImage(t *testing.T) { testDir := "testdata/TestResPolicyImage/regular_policy_update_rollout_duration" policyInputWithRollout := imaging.PolicyInputImage{ - RolloutDuration: tools.IntPtr(3600), + RolloutDuration: ptr.To(3600), Breakpoints: &imaging.Breakpoints{ Widths: []int{320, 640, 1024, 2048, 5000}, }, @@ -590,7 +590,7 @@ func TestResourcePolicyImage(t *testing.T) { Transformations: []imaging.TransformationType{ &imaging.MaxColors{ Colors: &imaging.IntegerVariableInline{ - Value: tools.IntPtr(2), + Value: ptr.To(2), }, Transformation: imaging.MaxColorsTransformationMaxColors, }, @@ -830,7 +830,7 @@ func TestResourcePolicyImage(t *testing.T) { testDir := "testdata/TestResPolicyImage/regular_policy_import" policyInput := policyInput - policyInput.RolloutDuration = tools.IntPtr(3600) + policyInput.RolloutDuration = ptr.To(3600) client := new(imaging.Mock) expectUpsertPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyInput) @@ -970,7 +970,7 @@ func getPolicyOutputV2(policyOutput imaging.PolicyOutputImage) imaging.PolicyOut policyOutputV2.Transformations = []imaging.TransformationType{ &imaging.MaxColors{ Colors: &imaging.IntegerVariableInline{ - Value: tools.IntPtr(3), + Value: ptr.To(3), }, Transformation: imaging.MaxColorsTransformationMaxColors, }, @@ -984,7 +984,7 @@ func getPolicyInputV2(policyInput imaging.PolicyInputImage) imaging.PolicyInputI policyInputV2.Transformations = []imaging.TransformationType{ &imaging.MaxColors{ Colors: &imaging.IntegerVariableInline{ - Value: tools.IntPtr(3), + Value: ptr.To(3), }, Transformation: imaging.MaxColorsTransformationMaxColors, }, @@ -996,12 +996,12 @@ func getPolicyOutputOrderV2(policyOutput imaging.PolicyOutputImage) imaging.Poli var policyOutputV2 = policyOutput policyOutputV2.Transformations = []imaging.TransformationType{ &imaging.Blur{ - Sigma: &imaging.NumberVariableInline{Value: tools.Float64Ptr(5)}, + Sigma: &imaging.NumberVariableInline{Value: ptr.To(5.0)}, Transformation: imaging.BlurTransformationBlur, }, &imaging.MaxColors{ Colors: &imaging.IntegerVariableInline{ - Value: tools.IntPtr(4), + Value: ptr.To(4), }, Transformation: imaging.MaxColorsTransformationMaxColors, }, diff --git a/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go b/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go index cc5db1913..742ac4745 100644 --- a/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go @@ -8,8 +8,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/imaging" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" @@ -48,7 +48,7 @@ func TestResourcePolicyVideo(t *testing.T) { }, }, Version: 1, - Video: tools.BoolPtr(true), + Video: ptr.To(true), } defaultBreakpointsWidths = &imaging.Breakpoints{ Widths: []int{320, 640, 1024, 2048, 5000}, @@ -81,7 +81,7 @@ func TestResourcePolicyVideo(t *testing.T) { Hosts: defaultHosts, Variables: defaultVariables, Version: 1, - Video: tools.BoolPtr(true), + Video: ptr.To(true), } expectUpsertPolicy = func(client *imaging.Mock, policyID, contractID, policySetID string, network imaging.PolicyNetwork, policy imaging.PolicyInput) { diff --git a/pkg/providers/imaging/videowriter/convert-video.gen.go b/pkg/providers/imaging/videowriter/convert-video.gen.go index df2dcd337..0fd49ee3a 100644 --- a/pkg/providers/imaging/videowriter/convert-video.gen.go +++ b/pkg/providers/imaging/videowriter/convert-video.gen.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/imaging" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/tools" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -107,7 +107,7 @@ func outputVideoPerceptualQualityVariableInline(d *schema.ResourceData, key stri nameRaw, existVar := extract(d, key+"_var") existVar = existVar && nameRaw.(string) != "" if existVar { - name = tools.StringPtr(nameRaw.(string)) + name = ptr.To(nameRaw.(string)) } if existVal || existVar { @@ -133,7 +133,7 @@ func outputVideoVideoAdaptiveQualityVariableInline(d *schema.ResourceData, key s nameRaw, existVar := extract(d, key+"_var") existVar = existVar && nameRaw.(string) != "" if existVar { - name = tools.StringPtr(nameRaw.(string)) + name = ptr.To(nameRaw.(string)) } if existVal || existVar { @@ -154,13 +154,13 @@ func stringVariableInline(d *schema.ResourceData, key string) *imaging.StringVar existVal = existVal && valueRaw.(string) != "" if existVal { valueMapped := valueRaw.(string) - value = tools.StringPtr(valueMapped) + value = ptr.To(valueMapped) } nameRaw, existVar := extract(d, key+"_var") existVar = existVar && nameRaw.(string) != "" if existVar { - name = tools.StringPtr(nameRaw.(string)) + name = ptr.To(nameRaw.(string)) } if existVal || existVar { @@ -202,7 +202,7 @@ func stringReader(d *schema.ResourceData, key string) string { func stringReaderPtr(d *schema.ResourceData, key string) *string { value, exist := extract(d, key) if exist { - return tools.StringPtr(value.(string)) + return ptr.To(value.(string)) } return nil } diff --git a/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription.go b/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription.go index e56bf67e7..036bbba0e 100644 --- a/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription.go +++ b/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription.go @@ -6,8 +6,8 @@ import ( "strings" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/networklists" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -53,7 +53,7 @@ func resourceNetworkListSubscriptionRead(ctx context.Context, d *schema.Resource getNetworkListSubscription.Recipients = nru extractString := strings.Join(getNetworkListSubscription.Recipients, " ") - recSHA := tools.GetSHAString(extractString) + recSHA := hash.GetSHAString(extractString) uniqueIDs := d.Get("network_list").([]interface{}) IDs := make([]string, 0, len(uniqueIDs)) @@ -65,7 +65,7 @@ func resourceNetworkListSubscriptionRead(ctx context.Context, d *schema.Resource getNetworkListSubscription.UniqueIds = IDs extractStringUID := strings.Join(getNetworkListSubscription.UniqueIds, " ") - recSHAUID := tools.GetSHAString(extractStringUID) + recSHAUID := hash.GetSHAString(extractStringUID) _, err := client.GetNetworkListSubscription(ctx, getNetworkListSubscription) if err != nil { @@ -124,7 +124,7 @@ func resourceNetworkListSubscriptionUpdate(ctx context.Context, d *schema.Resour updateNetworkListSubscription.Recipients = nru extractString := strings.Join(updateNetworkListSubscription.Recipients, " ") - recSHA := tools.GetSHAString(extractString) + recSHA := hash.GetSHAString(extractString) uniqueIDs := d.Get("network_list").([]interface{}) IDs := make([]string, 0, len(uniqueIDs)) @@ -136,7 +136,7 @@ func resourceNetworkListSubscriptionUpdate(ctx context.Context, d *schema.Resour updateNetworkListSubscription.UniqueIds = IDs extractStringUID := strings.Join(updateNetworkListSubscription.UniqueIds, " ") - recSHAUID := tools.GetSHAString(extractStringUID) + recSHAUID := hash.GetSHAString(extractStringUID) _, err := client.UpdateNetworkListSubscription(ctx, updateNetworkListSubscription) if err != nil { diff --git a/pkg/providers/property/data_akamai_properties.go b/pkg/providers/property/data_akamai_properties.go index 3034948fd..c689dcf97 100644 --- a/pkg/providers/property/data_akamai_properties.go +++ b/pkg/providers/property/data_akamai_properties.go @@ -8,9 +8,9 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" ) func dataSourceProperties() *schema.Resource { @@ -65,18 +65,18 @@ func dataPropertiesRead(ctx context.Context, d *schema.ResourceData, m interface if err != nil { return diag.FromErr(err) } - groupID = tools.AddPrefix(groupID, "grp_") + groupID = str.AddPrefix(groupID, "grp_") contractID, err := tf.GetStringValue("contract_id", d) if err != nil { return diag.FromErr(err) } - contractID = tools.AddPrefix(contractID, "ctr_") + contractID = str.AddPrefix(contractID, "ctr_") propertiesResponse, err := getProperties(ctx, groupID, contractID, meta) if err != nil { return diag.Errorf("error listing properties: %v", err) } - contractID = tools.AddPrefix(contractID, "ctr_") + contractID = str.AddPrefix(contractID, "ctr_") // setting concatenated id to uniquely identify data d.SetId(groupID + contractID) diff --git a/pkg/providers/property/data_akamai_property_hostnames.go b/pkg/providers/property/data_akamai_property_hostnames.go index 96fc8ec2d..7e1efd81e 100644 --- a/pkg/providers/property/data_akamai_property_hostnames.go +++ b/pkg/providers/property/data_akamai_property_hostnames.go @@ -7,9 +7,9 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -79,18 +79,18 @@ func dataPropertyHostnamesRead(ctx context.Context, d *schema.ResourceData, m in if err != nil { return diag.FromErr(err) } - groupID = tools.AddPrefix(groupID, "grp_") + groupID = str.AddPrefix(groupID, "grp_") contractID, err := tf.GetStringValue("contract_id", d) if err != nil { return diag.FromErr(err) } - contractID = tools.AddPrefix(contractID, "ctr_") + contractID = str.AddPrefix(contractID, "ctr_") propertyID, err := tf.GetStringValue("property_id", d) if err != nil { return diag.FromErr(err) } - propertyID = tools.AddPrefix(propertyID, "prp_") + propertyID = str.AddPrefix(propertyID, "prp_") version, err := tf.GetIntValue("version", d) if err != nil && !errors.Is(err, tf.ErrNotFound) { diff --git a/pkg/providers/property/data_akamai_property_include_parents_test.go b/pkg/providers/property/data_akamai_property_include_parents_test.go index ad2206e56..d28f86953 100644 --- a/pkg/providers/property/data_akamai_property_include_parents_test.go +++ b/pkg/providers/property/data_akamai_property_include_parents_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -32,20 +32,20 @@ func TestDataPropertyIncludeParents(t *testing.T) { { PropertyID: "prop_1", PropertyName: "prop_name", - StagingVersion: tools.IntPtr(3), - ProductionVersion: tools.IntPtr(2), + StagingVersion: ptr.To(3), + ProductionVersion: ptr.To(2), }, { PropertyID: "prop_2", PropertyName: "some_other_prop_name", - StagingVersion: tools.IntPtr(5), + StagingVersion: ptr.To(5), ProductionVersion: nil, }, { PropertyID: "prop_3", PropertyName: "third_prop_name", - StagingVersion: tools.IntPtr(5), - ProductionVersion: tools.IntPtr(5), + StagingVersion: ptr.To(5), + ProductionVersion: ptr.To(5), }, }, }, @@ -68,8 +68,8 @@ func TestDataPropertyIncludeParents(t *testing.T) { IncludeName: "test_include", IncludeType: papi.IncludeTypeMicroServices, LatestVersion: 1, - ProductionVersion: tools.IntPtr(2), - StagingVersion: tools.IntPtr(3), + ProductionVersion: ptr.To(2), + StagingVersion: ptr.To(3), }, }, }, @@ -91,8 +91,8 @@ func TestDataPropertyIncludeParents(t *testing.T) { IncludeName: "test_include_2", IncludeType: papi.IncludeTypeMicroServices, LatestVersion: 1, - ProductionVersion: tools.IntPtr(2), - StagingVersion: tools.IntPtr(3), + ProductionVersion: ptr.To(2), + StagingVersion: ptr.To(3), }, }, }, diff --git a/pkg/providers/property/data_akamai_property_include_test.go b/pkg/providers/property/data_akamai_property_include_test.go index bb7d74146..b6691feef 100644 --- a/pkg/providers/property/data_akamai_property_include_test.go +++ b/pkg/providers/property/data_akamai_property_include_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -34,8 +34,8 @@ func TestDataPropertyInclude(t *testing.T) { IncludeName: "inc_name", IncludeType: "MICROSERVICES", LatestVersion: 4, - ProductionVersion: tools.IntPtr(3), - StagingVersion: tools.IntPtr(2), + ProductionVersion: ptr.To(3), + StagingVersion: ptr.To(2), }, }, }, @@ -43,8 +43,8 @@ func TestDataPropertyInclude(t *testing.T) { IncludeName: "inc_name", IncludeType: "MICROSERVICES", LatestVersion: 4, - ProductionVersion: tools.IntPtr(3), - StagingVersion: tools.IntPtr(2), + ProductionVersion: ptr.To(3), + StagingVersion: ptr.To(2), }, }, nil) }, diff --git a/pkg/providers/property/data_akamai_property_includes_test.go b/pkg/providers/property/data_akamai_property_includes_test.go index db4fac6ff..3430be78f 100644 --- a/pkg/providers/property/data_akamai_property_includes_test.go +++ b/pkg/providers/property/data_akamai_property_includes_test.go @@ -9,8 +9,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -358,12 +358,12 @@ var ( var stagingVersion *int if !nilStagVer { - stagingVersion = tools.IntPtr(10) + stagingVersion = ptr.To(10) } var productionVersion *int if !nilStagVer { - productionVersion = tools.IntPtr(10) + productionVersion = ptr.To(10) } for i := 0; i < includesNumber; i++ { diff --git a/pkg/providers/property/data_akamai_property_products.go b/pkg/providers/property/data_akamai_property_products.go index 2a6880eb7..8907326e9 100644 --- a/pkg/providers/property/data_akamai_property_products.go +++ b/pkg/providers/property/data_akamai_property_products.go @@ -7,9 +7,9 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -75,7 +75,7 @@ func dataPropertyProductsRead(ctx context.Context, d *schema.ResourceData, m int return diag.FromErr(err) } - d.SetId(tools.GetSHAString(string(jsonBody))) + d.SetId(hash.GetSHAString(string(jsonBody))) logger.Debugf("[Akamai Property Products] Start searching for product records") diff --git a/pkg/providers/property/data_akamai_property_rules.go b/pkg/providers/property/data_akamai_property_rules.go index b8c3454da..d40519b83 100644 --- a/pkg/providers/property/data_akamai_property_rules.go +++ b/pkg/providers/property/data_akamai_property_rules.go @@ -8,9 +8,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" ) func dataSourcePropertyRules() *schema.Resource { @@ -116,13 +116,13 @@ func dataPropertyRulesRead(ctx context.Context, d *schema.ResourceData, m interf } if contractID != "" { - contractID = tools.AddPrefix(contractID, "ctr_") + contractID = str.AddPrefix(contractID, "ctr_") if err := d.Set("contract_id", contractID); err != nil { return diag.Errorf("%v: %s", tf.ErrValueSet, err.Error()) } } if groupID != "" { - groupID = tools.AddPrefix(groupID, "grp_") + groupID = str.AddPrefix(groupID, "grp_") if err := d.Set("group_id", groupID); err != nil { return diag.Errorf("%v: %s", tf.ErrValueSet, err.Error()) } diff --git a/pkg/providers/property/data_property_akamai_contract.go b/pkg/providers/property/data_property_akamai_contract.go index 628230a60..e10ef4aea 100644 --- a/pkg/providers/property/data_property_akamai_contract.go +++ b/pkg/providers/property/data_property_akamai_contract.go @@ -6,9 +6,9 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" akameta "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -91,7 +91,7 @@ func dataPropertyContractRead(ctx context.Context, d *schema.ResourceData, m int return ErrMultipleContractsInGroup } - if err = d.Set("group_id", tools.AddPrefix(foundGroups[0].GroupID, "grp_")); err != nil { + if err = d.Set("group_id", str.AddPrefix(foundGroups[0].GroupID, "grp_")); err != nil { return diag.Errorf("%v: %s", tf.ErrValueSet, err.Error()) } if err = d.Set("group_name", foundGroups[0].GroupName); err != nil { @@ -104,5 +104,5 @@ func dataPropertyContractRead(ctx context.Context, d *schema.ResourceData, m int } func isGroupEqual(group *papi.Group, target string) bool { - return group.GroupID == target || group.GroupID == tools.AddPrefix(target, "grp_") || group.GroupName == target + return group.GroupID == target || group.GroupID == str.AddPrefix(target, "grp_") || group.GroupName == target } diff --git a/pkg/providers/property/data_property_akamai_groups.go b/pkg/providers/property/data_property_akamai_groups.go index 52dd22771..846804613 100644 --- a/pkg/providers/property/data_property_akamai_groups.go +++ b/pkg/providers/property/data_property_akamai_groups.go @@ -9,9 +9,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" ) func dataSourcePropertyMultipleGroups() *schema.Resource { @@ -90,7 +90,7 @@ func dataPropertyMultipleGroupsRead(ctx context.Context, d *schema.ResourceData, return diag.FromErr(err) } - d.SetId(tools.GetSHAString(string(jsonBody))) + d.SetId(hash.GetSHAString(string(jsonBody))) logger.Debugf("[Akamai Property Groups] Done") diff --git a/pkg/providers/property/diff_suppress_funcs_test.go b/pkg/providers/property/diff_suppress_funcs_test.go index 32996c198..6ad79f331 100644 --- a/pkg/providers/property/diff_suppress_funcs_test.go +++ b/pkg/providers/property/diff_suppress_funcs_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/tj/assert" ) @@ -56,18 +56,18 @@ func TestRulesEqual(t *testing.T) { UUID: "43242", Variables: []papi.RuleVariable{ { - Description: tools.StringPtr("var1"), + Description: ptr.To("var1"), Hidden: true, Name: "VAR1", Sensitive: true, - Value: tools.StringPtr("value 1"), + Value: ptr.To("value 1"), }, { - Description: tools.StringPtr("var1"), + Description: ptr.To("var1"), Hidden: true, Name: "VAR2", Sensitive: true, - Value: tools.StringPtr("value 1"), + Value: ptr.To("value 1"), }}, }, new: &papi.Rules{ @@ -111,18 +111,18 @@ func TestRulesEqual(t *testing.T) { UUID: "43242", Variables: []papi.RuleVariable{ { - Description: tools.StringPtr("var1"), + Description: ptr.To("var1"), Hidden: true, Name: "VAR1", Sensitive: true, - Value: tools.StringPtr("value 1"), + Value: ptr.To("value 1"), }, { - Description: tools.StringPtr("var1"), + Description: ptr.To("var1"), Hidden: true, Name: "VAR2", Sensitive: true, - Value: tools.StringPtr("value 1"), + Value: ptr.To("value 1"), }, }, }, @@ -180,18 +180,18 @@ func TestRulesEqual(t *testing.T) { UUID: "43242", Variables: []papi.RuleVariable{ { - Description: tools.StringPtr("var1"), + Description: ptr.To("var1"), Hidden: true, Name: "VAR2", Sensitive: true, - Value: tools.StringPtr("value 1"), + Value: ptr.To("value 1"), }, { - Description: tools.StringPtr("var1"), + Description: ptr.To("var1"), Hidden: true, Name: "VAR1", Sensitive: true, - Value: tools.StringPtr("value 1"), + Value: ptr.To("value 1"), }, }, }, @@ -245,18 +245,18 @@ func TestRulesEqual(t *testing.T) { UUID: "43242", Variables: []papi.RuleVariable{ { - Description: tools.StringPtr("var1"), + Description: ptr.To("var1"), Hidden: true, Name: "VAR1", Sensitive: true, - Value: tools.StringPtr("value 1"), + Value: ptr.To("value 1"), }, { - Description: tools.StringPtr("var1"), + Description: ptr.To("var1"), Hidden: true, Name: "VAR2", Sensitive: true, - Value: tools.StringPtr("value 1"), + Value: ptr.To("value 1"), }, }, }, diff --git a/pkg/providers/property/provider.go b/pkg/providers/property/provider.go index 01f0e28df..ba84ec909 100644 --- a/pkg/providers/property/provider.go +++ b/pkg/providers/property/provider.go @@ -8,9 +8,9 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/hapi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" @@ -125,6 +125,6 @@ func addPrefixToState(prefix string) schema.SchemaStateFunc { if given.(string) == "" { return "" } - return tools.AddPrefix(given.(string), prefix) + return str.AddPrefix(given.(string), prefix) } } diff --git a/pkg/providers/property/resource_akamai_cp_code.go b/pkg/providers/property/resource_akamai_cp_code.go index 82199ea3f..8dd79db7c 100644 --- a/pkg/providers/property/resource_akamai_cp_code.go +++ b/pkg/providers/property/resource_akamai_cp_code.go @@ -12,10 +12,10 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" ) // PAPI CP Code @@ -105,19 +105,19 @@ func resourceCPCodeCreate(ctx context.Context, d *schema.ResourceData, m interfa if err != nil { return diag.Errorf("`product_id` must be specified for creation") } - productID = tools.AddPrefix(productID, "prd_") + productID = str.AddPrefix(productID, "prd_") contractID, err := tf.GetStringValue("contract_id", d) if err != nil { return diag.FromErr(err) } - contractID = tools.AddPrefix(contractID, "ctr_") + contractID = str.AddPrefix(contractID, "ctr_") groupID, err := tf.GetStringValue("group_id", d) if err != nil { return diag.FromErr(err) } - groupID = tools.AddPrefix(groupID, "grp_") + groupID = str.AddPrefix(groupID, "grp_") var cpCodeID string // Because CPCodes can't be deleted, we re-use an existing CPCode if it's there @@ -149,13 +149,13 @@ func resourceCPCodeRead(ctx context.Context, d *schema.ResourceData, m interface if err != nil { return diag.FromErr(err) } - contractID = tools.AddPrefix(contractID, "ctr_") + contractID = str.AddPrefix(contractID, "ctr_") groupID, err := tf.GetStringValue("group_id", d) if err != nil { return diag.FromErr(err) } - groupID = tools.AddPrefix(groupID, "grp_") + groupID = str.AddPrefix(groupID, "grp_") if err := d.Set("group_id", groupID); err != nil { return diag.Errorf("%s: %s", tf.ErrValueSet, err.Error()) @@ -210,12 +210,12 @@ func resourceCPCodeUpdate(ctx context.Context, d *schema.ResourceData, m interfa if err != nil { return diag.FromErr(err) } - contractID = tools.AddPrefix(contractID, "ctr_") + contractID = str.AddPrefix(contractID, "ctr_") groupID, err := tf.GetStringValue("group_id", d) if err != nil { return diag.FromErr(err) } - groupID = tools.AddPrefix(groupID, "grp_") + groupID = str.AddPrefix(groupID, "grp_") // trimCPCodeID is needed here for backwards compatibility cpCodeID, err := strconv.Atoi(strings.TrimPrefix(d.Id(), cpCodePrefix)) @@ -248,7 +248,7 @@ func resourceCPCodeUpdate(ctx context.Context, d *schema.ResourceData, m interfa // Because we use CPRG API for update, we need to ensure that changes are also present when fetching cpCode with PAPI if err := waitForCPCodeNameUpdate(ctx, client, contractID, groupID, d.Id(), name); err != nil { if errors.Is(err, ErrCPCodeUpdateTimeout) { - return append(tools.DiagWarningf("%s", err), tools.DiagWarningf("Resource has been updated, but the change is still ongoing on the server")...) + return append(tf.DiagWarningf("%s", err), tf.DiagWarningf("Resource has been updated, but the change is still ongoing on the server")...) } return diag.FromErr(err) } @@ -271,8 +271,8 @@ func resourceCPCodeImport(ctx context.Context, d *schema.ResourceData, m interfa return nil, errors.New("CP Code is a mandatory parameter") } cpCodeID := parts[0] - contractID := tools.AddPrefix(parts[1], "ctr_") - groupID := tools.AddPrefix(parts[2], "grp_") + contractID := str.AddPrefix(parts[1], "ctr_") + groupID := str.AddPrefix(parts[2], "grp_") cpCodeResp, err := client.GetCPCode(ctx, papi.GetCPCodeRequest{ CPCodeID: cpCodeID, diff --git a/pkg/providers/property/resource_akamai_edge_hostname.go b/pkg/providers/property/resource_akamai_edge_hostname.go index 211b5cd94..ef58180ca 100644 --- a/pkg/providers/property/resource_akamai_edge_hostname.go +++ b/pkg/providers/property/resource_akamai_edge_hostname.go @@ -11,11 +11,11 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/hapi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" @@ -111,7 +111,7 @@ func resourceSecureEdgeHostNameCreate(ctx context.Context, d *schema.ResourceDat if err != nil { return diag.FromErr(err) } - groupID = tools.AddPrefix(groupID, "grp_") + groupID = str.AddPrefix(groupID, "grp_") if err := d.Set("group_id", groupID); err != nil { return diag.FromErr(fmt.Errorf("%w: %s", tf.ErrValueSet, err.Error())) } @@ -120,7 +120,7 @@ func resourceSecureEdgeHostNameCreate(ctx context.Context, d *schema.ResourceDat if err != nil { return diag.FromErr(err) } - contractID = tools.AddPrefix(contractID, "ctr_") + contractID = str.AddPrefix(contractID, "ctr_") if err := d.Set("contract_id", contractID); err != nil { return diag.FromErr(fmt.Errorf("%w: %s", tf.ErrValueSet, err.Error())) } @@ -133,7 +133,7 @@ func resourceSecureEdgeHostNameCreate(ctx context.Context, d *schema.ResourceDat if err != nil { return diag.Errorf("`product_id` must be specified for creation") } - productID = tools.AddPrefix(productID, "prd_") + productID = str.AddPrefix(productID, "prd_") if err := d.Set("product_id", productID); err != nil { return diag.FromErr(fmt.Errorf("%w: %s", tf.ErrValueSet, err.Error())) } @@ -218,7 +218,7 @@ func resourceSecureEdgeHostNameRead(ctx context.Context, d *schema.ResourceData, if err != nil { return diag.FromErr(err) } - groupID = tools.AddPrefix(groupID, "grp_") + groupID = str.AddPrefix(groupID, "grp_") if err := d.Set("group_id", groupID); err != nil { return diag.FromErr(fmt.Errorf("%w: %s", tf.ErrValueSet, err.Error())) } @@ -227,7 +227,7 @@ func resourceSecureEdgeHostNameRead(ctx context.Context, d *schema.ResourceData, if err != nil { return diag.FromErr(err) } - contractID = tools.AddPrefix(contractID, "ctr_") + contractID = str.AddPrefix(contractID, "ctr_") // set contract/contract_id into ResourceData if err := d.Set("contract_id", contractID); err != nil { return diag.FromErr(fmt.Errorf("%w: %s", tf.ErrValueSet, err.Error())) @@ -238,7 +238,7 @@ func resourceSecureEdgeHostNameRead(ctx context.Context, d *schema.ResourceData, if got, ok := d.GetOk("product_id"); ok { productID = got.(string) } - productID = tools.AddPrefix(productID, "prd_") + productID = str.AddPrefix(productID, "prd_") if err := d.Set("product_id", productID); err != nil { return diag.FromErr(fmt.Errorf("%w: %s", tf.ErrValueSet, err.Error())) } @@ -399,8 +399,8 @@ func resourceSecureEdgeHostNameImport(ctx context.Context, d *schema.ResourceDat } edgehostID := parts[0] - contractID := tools.AddPrefix(parts[1], "ctr_") - groupID := tools.AddPrefix(parts[2], "grp_") + contractID := str.AddPrefix(parts[1], "ctr_") + groupID := str.AddPrefix(parts[2], "grp_") edgehostnameDetails, err := client.GetEdgeHostname(ctx, papi.GetEdgeHostnameRequest{ EdgeHostnameID: edgehostID, diff --git a/pkg/providers/property/resource_akamai_property.go b/pkg/providers/property/resource_akamai_property.go index 546862466..3b203aa07 100644 --- a/pkg/providers/property/resource_akamai_property.go +++ b/pkg/providers/property/resource_akamai_property.go @@ -12,9 +12,9 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/apex/log" "github.com/hashicorp/go-cty/cty" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" @@ -445,19 +445,19 @@ func resourcePropertyCreate(ctx context.Context, d *schema.ResourceData, m inter if err != nil { return diag.FromErr(err) } - groupID = tools.AddPrefix(groupID, "grp_") + groupID = str.AddPrefix(groupID, "grp_") contractID, err := tf.GetStringValue("contract_id", d) if err != nil { return diag.FromErr(err) } - contractID = tools.AddPrefix(contractID, "ctr_") + contractID = str.AddPrefix(contractID, "ctr_") productID, err := tf.GetStringValue("product_id", d) if err != nil { return diag.FromErr(err) } - productID = tools.AddPrefix(productID, "prd_") + productID = str.AddPrefix(productID, "prd_") propertyID, err := tf.GetStringValue("property_id", d) if err != nil && !errors.Is(err, tf.ErrNotFound) { @@ -553,8 +553,8 @@ func resourcePropertyRead(ctx context.Context, d *schema.ResourceData, m interfa client := Client(meta.Must(m)) propertyID := d.Id() - contractID := tools.AddPrefix(d.Get("contract_id").(string), "ctr_") - groupID := tools.AddPrefix(d.Get("group_id").(string), "grp_") + contractID := str.AddPrefix(d.Get("contract_id").(string), "ctr_") + groupID := str.AddPrefix(d.Get("group_id").(string), "grp_") readVersionID := d.Get("read_version").(int) var property *papi.Property @@ -827,14 +827,14 @@ func resourcePropertyImport(ctx context.Context, d *schema.ResourceData, m inter version = parts[3] fallthrough case 3: - propertyID = tools.AddPrefix(parts[0], "prp_") - contractID = tools.AddPrefix(parts[1], "ctr_") - groupID = tools.AddPrefix(parts[2], "grp_") + propertyID = str.AddPrefix(parts[0], "prp_") + contractID = str.AddPrefix(parts[1], "ctr_") + groupID = str.AddPrefix(parts[2], "grp_") case 2: version = parts[1] fallthrough case 1: - propertyID = tools.AddPrefix(parts[0], "prp_") + propertyID = str.AddPrefix(parts[0], "prp_") default: return nil, fmt.Errorf("invalid property identifier: %q", d.Id()) @@ -911,7 +911,7 @@ var versionRegexp = regexp.MustCompile(`^ver_(\d+)$`) // parseVersionNumber parses a version number (format "ver_#" or "#") or throws an error func parseVersionNumber(version string) (int, error) { - v := tools.AddPrefix(version, "ver_") + v := str.AddPrefix(version, "ver_") r := versionRegexp matches := r.FindStringSubmatch(v) if len(matches) < 2 { diff --git a/pkg/providers/property/resource_akamai_property_activation.go b/pkg/providers/property/resource_akamai_property_activation.go index d910fe43c..dff25b952 100644 --- a/pkg/providers/property/resource_akamai_property_activation.go +++ b/pkg/providers/property/resource_akamai_property_activation.go @@ -11,10 +11,11 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/date" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/apex/log" "github.com/hashicorp/go-hclog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" @@ -435,7 +436,7 @@ func resourcePropertyActivationDelete(ctx context.Context, d *schema.ResourceDat func flattenErrorArray(errors []*papi.Error) string { var errorStrArr = make([]string, len(errors)) for i, err := range errors { - strError := tools.ConvertToString(err.Error()) + strError := str.From(err.Error()) errorStrArr[i] = strError } return strings.Join(errorStrArr, "\n") @@ -831,7 +832,7 @@ func setErrorsAndWarnings(d *schema.ResourceData, errors, warnings string) error func resolvePropertyID(d *schema.ResourceData) (string, error) { propertyID, err := tf.GetStringValue("property_id", d) - return tools.AddPrefix(propertyID, "prp_"), err + return str.AddPrefix(propertyID, "prp_"), err } type lookupActivationRequest struct { @@ -873,7 +874,7 @@ func lookupActivation(ctx context.Context, client papi.PAPI, query lookupActivat if a.PropertyVersion == query.version && matchingActivationType && a.Network == query.network { // find the most recent activation - var aSubmitDate, err = tools.ParseDate(tools.DateTimeFormat, a.SubmitDate) + var aSubmitDate, err = date.Parse(a.SubmitDate) if err != nil { return nil, err } diff --git a/pkg/providers/property/resource_akamai_property_activation_unit_test.go b/pkg/providers/property/resource_akamai_property_activation_unit_test.go index 3e71d3d0e..e7a9570f0 100644 --- a/pkg/providers/property/resource_akamai_property_activation_unit_test.go +++ b/pkg/providers/property/resource_akamai_property_activation_unit_test.go @@ -8,8 +8,8 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/date" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" @@ -260,7 +260,7 @@ func TestLookupActivation(t *testing.T) { activationType: map[papi.ActivationType]struct{}{"ACTIVATE": {}}, }, mostRecentActivationDate: "2016-03-22T15:04:05Z", - expectedError: tools.ErrDateFormat, + expectedError: date.ErrDateFormat, expectedActivation: &papi.Activation{ AccountID: "act_1234", ActivationID: "1234", diff --git a/pkg/providers/property/resource_akamai_property_common.go b/pkg/providers/property/resource_akamai_property_common.go index 6a4bb938f..f4c1a323e 100644 --- a/pkg/providers/property/resource_akamai_property_common.go +++ b/pkg/providers/property/resource_akamai_property_common.go @@ -8,9 +8,9 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" ) func getGroup(ctx context.Context, client papi.PAPI, groupID string) (*papi.Group, error) { @@ -21,7 +21,7 @@ func getGroup(ctx context.Context, client papi.PAPI, groupID string) (*papi.Grou if err != nil { return nil, fmt.Errorf("%w: %s", ErrFetchingGroups, err.Error()) } - groupID = tools.AddPrefix(groupID, "grp_") + groupID = str.AddPrefix(groupID, "grp_") var group *papi.Group var groupFound bool diff --git a/pkg/providers/property/resource_akamai_property_helpers_test.go b/pkg/providers/property/resource_akamai_property_helpers_test.go index 2d61c4d2f..9b44b5539 100644 --- a/pkg/providers/property/resource_akamai_property_helpers_test.go +++ b/pkg/providers/property/resource_akamai_property_helpers_test.go @@ -4,7 +4,7 @@ import ( "context" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/tools" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/stretchr/testify/mock" ) @@ -360,15 +360,15 @@ func updateRuleTreeWithVariablesStep1() *papi.RulesUpdate { return updateRuleTreeWithVariables([]papi.RuleVariable{ { Name: "TEST_EMPTY_FIELDS", - Value: tools.StringPtr(""), - Description: tools.StringPtr(""), + Value: ptr.To(""), + Description: ptr.To(""), Hidden: true, Sensitive: false, }, { Name: "TEST_NIL_FIELD", - Description: tools.StringPtr(""), - Value: tools.StringPtr(""), + Description: ptr.To(""), + Value: ptr.To(""), Hidden: true, Sensitive: false, }, @@ -379,15 +379,15 @@ func updateRuleTreeWithVariablesStep0() *papi.RulesUpdate { return updateRuleTreeWithVariables([]papi.RuleVariable{ { Name: "TEST_EMPTY_FIELDS", - Value: tools.StringPtr(""), - Description: tools.StringPtr(""), + Value: ptr.To(""), + Description: ptr.To(""), Hidden: true, Sensitive: false, }, { Name: "TEST_NIL_FIELD", Description: nil, - Value: tools.StringPtr(""), + Value: ptr.To(""), Hidden: true, Sensitive: false, }, diff --git a/pkg/providers/property/resource_akamai_property_include_activation.go b/pkg/providers/property/resource_akamai_property_include_activation.go index ba11b0c71..7b53adebd 100644 --- a/pkg/providers/property/resource_akamai_property_include_activation.go +++ b/pkg/providers/property/resource_akamai_property_include_activation.go @@ -13,11 +13,11 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" @@ -369,18 +369,18 @@ func (p *propertyIncludeActivationData) populateFromResource(d *schema.ResourceD if err != nil { return err } - p.includeID = tools.AddPrefix(includeID, "inc_") + p.includeID = str.AddPrefix(includeID, "inc_") contractID, err := tf.GetStringValue("contract_id", d) if err != nil { return err } - p.contractID = tools.AddPrefix(contractID, "ctr_") + p.contractID = str.AddPrefix(contractID, "ctr_") groupID, err := tf.GetStringValue("group_id", d) if err != nil { return err } - p.groupID = tools.AddPrefix(groupID, "grp_") + p.groupID = str.AddPrefix(groupID, "grp_") p.network, err = tf.GetStringValue("network", d) if err != nil { return err diff --git a/pkg/providers/property/resource_akamai_property_schema_v0.go b/pkg/providers/property/resource_akamai_property_schema_v0.go index 83adc71cf..e48b2bd3c 100644 --- a/pkg/providers/property/resource_akamai_property_schema_v0.go +++ b/pkg/providers/property/resource_akamai_property_schema_v0.go @@ -3,7 +3,7 @@ package property import ( "context" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -63,7 +63,7 @@ func upgradePropV0(_ context.Context, rawState map[string]interface{}, _ interfa // Deprecated attribute contract checked for prefixed ID and copied to contract_id if v, ok := rawState["contract"]; ok { - s := tools.AddPrefix(v.(string), "ctr_") // Schema guarantees this is a string + s := str.AddPrefix(v.(string), "ctr_") // Schema guarantees this is a string rawState["contract_id"] = s rawState["contract"] = s @@ -71,7 +71,7 @@ func upgradePropV0(_ context.Context, rawState map[string]interface{}, _ interfa // Deprecated attribute group checked for prefixed ID and copied to group_id if v, ok := rawState["group"]; ok { - s := tools.AddPrefix(v.(string), "grp_") // Schema guarantees this is a string + s := str.AddPrefix(v.(string), "grp_") // Schema guarantees this is a string rawState["group_id"] = s rawState["group"] = s @@ -79,7 +79,7 @@ func upgradePropV0(_ context.Context, rawState map[string]interface{}, _ interfa // Deprecated attribute product checked for prefixed ID and copied to product_id if v, ok := rawState["product"]; ok { - s := tools.AddPrefix(v.(string), "prd_") // Schema guarantees this is a string + s := str.AddPrefix(v.(string), "prd_") // Schema guarantees this is a string rawState["product_id"] = s rawState["product"] = s diff --git a/pkg/providers/property/resource_akamai_property_test.go b/pkg/providers/property/resource_akamai_property_test.go index 4e9975e0f..acfa31879 100644 --- a/pkg/providers/property/resource_akamai_property_test.go +++ b/pkg/providers/property/resource_akamai_property_test.go @@ -11,8 +11,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/go-cty/cty" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-testing/helper/resource" @@ -1312,7 +1312,7 @@ func TestResProperty(t *testing.T) { CertProvisioningType: "DEFAULT", }}, &papi.Error{ StatusCode: http.StatusTooManyRequests, - Remaining: tools.IntPtr(0), + Remaining: ptr.To(0), LimitKey: "DEFAULT_CERTS_PER_CONTRACT", }, ).Once() diff --git a/pkg/providers/property/ruleformats/builder.go b/pkg/providers/property/ruleformats/builder.go index 340e6b876..4d06bd39e 100644 --- a/pkg/providers/property/ruleformats/builder.go +++ b/pkg/providers/property/ruleformats/builder.go @@ -7,8 +7,8 @@ import ( "reflect" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/iancoleman/strcase" ) @@ -172,8 +172,8 @@ func (r RulesBuilder) ruleVariables() ([]papi.RuleVariable, error) { for _, variable := range variableList { variables = append(variables, papi.RuleVariable{ Name: variable["name"].(string), - Description: tools.StringPtr(variable["description"].(string)), - Value: tools.StringPtr(variable["value"].(string)), + Description: ptr.To(variable["description"].(string)), + Value: ptr.To(variable["value"].(string)), Sensitive: variable["sensitive"].(bool), Hidden: variable["hidden"].(bool), }) diff --git a/pkg/tools/date_conversions.go b/pkg/tools/date_conversions.go deleted file mode 100644 index 2b72da8aa..000000000 --- a/pkg/tools/date_conversions.go +++ /dev/null @@ -1,23 +0,0 @@ -// Package tools is where some legacy provider functions were dropped -package tools - -import ( - "errors" - "fmt" - "time" -) - -// ErrDateFormat is returned when there is an error parsing a string date -var ErrDateFormat = errors.New("unable to parse date") - -// DateTimeFormat is the layout used across the provider. -const DateTimeFormat = "2006-01-02T15:04:05Z" - -// ParseDate is used to parse the date with default layout as DateTimeFormat. -func ParseDate(layout, value string) (time.Time, error) { - date, err := time.Parse(layout, value) - if err != nil { - return time.Time{}, fmt.Errorf("%w: %s", ErrDateFormat, err.Error()) - } - return date, nil -} diff --git a/pkg/tools/pointers.go b/pkg/tools/pointers.go deleted file mode 100644 index 7ff628632..000000000 --- a/pkg/tools/pointers.go +++ /dev/null @@ -1,26 +0,0 @@ -package tools - -// IntPtr returns a pointer to an integer passed as an argument -func IntPtr(i int) *int { - return &i -} - -// Int64Ptr returns a pointer to an int64 passed as an argument -func Int64Ptr(i int64) *int64 { - return &i -} - -// Float64Ptr returns a pointer to a float64 passed as an argument -func Float64Ptr(f float64) *float64 { - return &f -} - -// StringPtr returns a pointer to a string passed as an argument -func StringPtr(s string) *string { - return &s -} - -// BoolPtr returns a pointer to a bool passed as an argument -func BoolPtr(b bool) *bool { - return &b -} From 1892b52bc411c6d72fdcc28020bdc97bcae648ca Mon Sep 17 00:00:00 2001 From: Darek Stopka Date: Thu, 30 Nov 2023 12:16:50 +0000 Subject: [PATCH 13/52] DXE-3358 Improve readability of akamai_edgeworkers_activation resource --- .../data_akamai_edgeworker_activation.go | 3 +- .../edgeworkers/edgeworkers_errors.go | 4 + .../edgeworkers/resource_akamai_edgeworker.go | 2 +- .../resource_akamai_edgeworkers_activation.go | 123 ++++++++++-------- ...urce_akamai_edgeworkers_activation_test.go | 4 +- 5 files changed, 78 insertions(+), 58 deletions(-) diff --git a/pkg/providers/edgeworkers/data_akamai_edgeworker_activation.go b/pkg/providers/edgeworkers/data_akamai_edgeworker_activation.go index 2733907a7..cad1c9064 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgeworker_activation.go +++ b/pkg/providers/edgeworkers/data_akamai_edgeworker_activation.go @@ -2,6 +2,7 @@ package edgeworkers import ( "context" + "errors" "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" @@ -69,7 +70,7 @@ func dataEdgeWorkerActivationRead(ctx context.Context, d *schema.ResourceData, m } activation, err := getCurrentActivation(ctx, client, edgeworkerID, network, false) - if err != nil { + if err != nil && !errors.Is(err, ErrEdgeworkerNoCurrentActivation) { return diag.Errorf("could not get current activation: %s", err) } diff --git a/pkg/providers/edgeworkers/edgeworkers_errors.go b/pkg/providers/edgeworkers/edgeworkers_errors.go index e15c8b5b7..5d60cfe09 100644 --- a/pkg/providers/edgeworkers/edgeworkers_errors.go +++ b/pkg/providers/edgeworkers/edgeworkers_errors.go @@ -7,8 +7,12 @@ import ( var ( // ErrEdgeworkerActivation is returned when edgeworker activation fails ErrEdgeworkerActivation = errors.New("edgeworker activation") + // ErrEdgeworkerNoCurrentActivation is returned when edgeworker activation fails + ErrEdgeworkerNoCurrentActivation = errors.New("edgeworker is not active") // ErrEdgeworkerDeactivation is returned when edgeworker deactivation fails ErrEdgeworkerDeactivation = errors.New("edgeworker deactivation") + // ErrEdgeworkerNoLatestDeactivation is returned when edgeworker deactivation fails + ErrEdgeworkerNoLatestDeactivation = errors.New("edgeworker does not have any deactivations") // ErrEdgeworkerActivationFailure is returned when edgeworker activation fails due to a timeout ErrEdgeworkerActivationFailure = errors.New("edgeworker activation failure") // ErrEdgeworkerDeactivationFailure is returned when edgeworker deactivation fails due to a timeout diff --git a/pkg/providers/edgeworkers/resource_akamai_edgeworker.go b/pkg/providers/edgeworkers/resource_akamai_edgeworker.go index b85030d72..5257c6b44 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgeworker.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgeworker.go @@ -387,7 +387,7 @@ func checkEdgeWorkerActivations(ctx context.Context, client edgeworkers.Edgework for _, network := range validEdgeworkerActivationNetworks { act, err := getCurrentActivation(ctx, client, edgeWorkerID, network, false) - if err != nil { + if err != nil && !errors.Is(err, ErrEdgeworkerNoCurrentActivation) { return nil, err } if act != nil { diff --git a/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation.go b/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation.go index 98419446d..fb9e3376f 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation.go @@ -97,24 +97,30 @@ func resourceEdgeworkersActivationSchema() map[string]*schema.Schema { } const ( - stagingNetwork = "STAGING" - productionNetwork = "PRODUCTION" - activationStatusComplete = "COMPLETE" - activationStatusPresubmit = "PRESUBMIT" - activationStatusPending = "PENDING" - activationStatusInProgress = "IN_PROGRESS" + stagingNetwork = "STAGING" + productionNetwork = "PRODUCTION" + activationStatusComplete = "COMPLETE" + activationStatusPresubmit = "PRESUBMIT" + activationStatusPending = "PENDING" + activationStatusInProgress = "IN_PROGRESS" +) + +const ( errorCodeVersionIsBeingDeactivated = "EW1031" errorCodeVersionAlreadyDeactivated = "EW1032" ) +var validEdgeworkerActivationNetworks = []string{stagingNetwork, productionNetwork} + var ( activationPollMinimum = time.Minute activationPollInterval = activationPollMinimum edgeworkersActivationResourceDefaultTimeout = time.Minute * 30 edgeworkersActivationResourceDeleteTimeout = time.Minute * 60 - validEdgeworkerActivationNetworks = []string{stagingNetwork, productionNetwork} ) +const timeLayout = time.RFC3339 + func resourceEdgeworkersActivationCreate(ctx context.Context, rd *schema.ResourceData, m interface{}) diag.Diagnostics { meta := meta.Must(m) logger := meta.Log("Edgeworkers", "resourceEdgeworkersActivationCreate") @@ -146,13 +152,12 @@ func resourceEdgeworkersActivationRead(ctx context.Context, rd *schema.ResourceD activation, err := getCurrentActivation(ctx, client, edgeworkerID, network, false) if err != nil { + if errors.Is(err, ErrEdgeworkerNoCurrentActivation) { + return diag.Errorf(`%s read: no version active on network '%s' for edgeworker with id=%d`, ErrEdgeworkerActivation, network, edgeworkerID) + } return diag.Errorf("%s read: %s", ErrEdgeworkerActivation, err) } - if activation == nil { - return diag.Errorf(`%s read: no version active on network '%s' for edgeworker with id=%d`, ErrEdgeworkerActivation, network, edgeworkerID) - } - if err := rd.Set("version", activation.Version); err != nil { return diag.Errorf("%v: %s", tf.ErrValueSet, err.Error()) } @@ -211,6 +216,7 @@ func resourceEdgeworkersActivationDelete(ctx context.Context, rd *schema.Resourc return diag.FromErr(err) } + findLatestDeactivation := false deactivation, err := client.DeactivateVersion(ctx, edgeworkers.DeactivateVersionRequest{ EdgeWorkerID: edgeworkerID, DeactivateVersion: edgeworkers.DeactivateVersion{ @@ -220,26 +226,23 @@ func resourceEdgeworkersActivationDelete(ctx context.Context, rd *schema.Resourc }, }) if err != nil { - var e *edgeworkers.Error - ok := errors.As(err, &e) - if !ok { + if errors.Is(err, edgeworkers.ErrVersionAlreadyDeactivated) { + logger.Info(fmt.Sprintf("Version '%s' has already been deactivated on network '%s' for edgeworker with id=%d. Removing from state", version, network, edgeworkerID)) + return nil + } + if errors.Is(err, edgeworkers.ErrVersionBeingDeactivated) { + findLatestDeactivation = true + } else { return diag.Errorf("%s: %s", ErrEdgeworkerDeactivation, err) } + } - switch e.ErrorCode { - case errorCodeVersionAlreadyDeactivated: - logger.Info(fmt.Sprintf("Version '%s' has already been deactivated on network '%s' for edgeworker with id=%d. Removing from state", version, network, edgeworkerID)) - rd.SetId("") - return nil - case errorCodeVersionIsBeingDeactivated: - deactivations, err := getDeactivationsByVersionAndNetwork(ctx, client, edgeworkerID, version, network) - if err != nil { - return diag.Errorf("%s: %s", ErrEdgeworkerDeactivation, err) - } - deactivation = &deactivations[0] - default: + if findLatestDeactivation { + deactivations, err := getDeactivationsByVersionAndNetwork(ctx, client, edgeworkerID, version, network) + if err != nil { return diag.Errorf("%s: %s", ErrEdgeworkerDeactivation, err) } + deactivation = &deactivations[0] } if _, err := waitForEdgeworkerDeactivation(ctx, client, edgeworkerID, deactivation.DeactivationID); err != nil { @@ -250,7 +253,6 @@ func resourceEdgeworkersActivationDelete(ctx context.Context, rd *schema.Resourc return diag.Errorf("%s: %s", ErrEdgeworkerDeactivation, err) } - rd.SetId("") return nil } @@ -313,7 +315,7 @@ func upsertActivation(ctx context.Context, rd *schema.ResourceData, m interface{ } currentActivation, err := getCurrentActivation(ctx, client, edgeworkerID, network, true) - if err != nil { + if err != nil && !errors.Is(err, ErrEdgeworkerNoCurrentActivation) { return diag.Errorf("%s: %s", ErrEdgeworkerActivation, err.Error()) } @@ -358,48 +360,55 @@ func getCurrentActivation(ctx context.Context, client edgeworkers.Edgeworkers, e activations := sortActivationsByDate(filterActivationsByNetwork(activationsResp.Activations, network)) if len(activations) == 0 { - return nil, nil + return nil, ErrEdgeworkerNoCurrentActivation } + latestActivation := &activations[0] + if !statusOngoingOrReady(latestActivation.Status) { + return nil, ErrEdgeworkerNoCurrentActivation + } - switch latestActivation.Status { - case activationStatusComplete: - // do nothing - case activationStatusPresubmit, activationStatusPending, activationStatusInProgress: + if statusOngoing(latestActivation.Status) { latestActivation, err = waitForEdgeworkerActivation(ctx, client, edgeworkerID, latestActivation.ActivationID) if err != nil { return nil, err } return latestActivation, nil - default: - return nil, nil } latestDeactivation, err := getLatestCompletedDeactivation(ctx, client, edgeworkerID, latestActivation.Version, network, waitForDeactivation) if err != nil { + if errors.Is(err, ErrEdgeworkerNoLatestDeactivation) { + return latestActivation, nil + } return nil, err } - if latestDeactivation == nil { - return latestActivation, nil - } - timeLayout := time.RFC3339 - activationTime, err := time.Parse(timeLayout, latestActivation.CreatedTime) + isDeactivated, err := wasDeactivationLater(latestActivation, latestDeactivation) if err != nil { - return nil, fmt.Errorf("failed to parse activation time") - } - deactivationTime, err := time.Parse(timeLayout, latestDeactivation.CreatedTime) - if err != nil { - return nil, fmt.Errorf("failed to parse deactivation time") + return nil, err } - if deactivationTime.After(activationTime) { - return nil, nil + if isDeactivated { + return nil, ErrEdgeworkerNoCurrentActivation } return latestActivation, nil } +func wasDeactivationLater(activation *edgeworkers.Activation, deactivation *edgeworkers.Deactivation) (bool, error) { + activationTime, err := time.Parse(timeLayout, activation.CreatedTime) + if err != nil { + return false, fmt.Errorf("failed to parse activation time") + } + deactivationTime, err := time.Parse(timeLayout, deactivation.CreatedTime) + if err != nil { + return false, fmt.Errorf("failed to parse deactivation time") + } + + return deactivationTime.After(activationTime), nil +} + func getDeactivationsByVersionAndNetwork(ctx context.Context, client edgeworkers.Edgeworkers, edgeworkerID int, version, network string) ([]edgeworkers.Deactivation, error) { deactivationsResp, err := client.ListDeactivations(ctx, edgeworkers.ListDeactivationsRequest{ EdgeWorkerID: edgeworkerID, @@ -418,12 +427,12 @@ func getLatestCompletedDeactivation(ctx context.Context, client edgeworkers.Edge return nil, err } if len(deactivations) == 0 { - return nil, nil + return nil, ErrEdgeworkerNoLatestDeactivation } for i := range deactivations { d := &deactivations[i] - if wait && (d.Status == activationStatusPresubmit || d.Status == activationStatusPending || d.Status == activationStatusInProgress) { + if wait && statusOngoing(d.Status) { d, err = waitForEdgeworkerDeactivation(ctx, client, edgeworkerID, d.DeactivationID) if err != nil { return nil, err @@ -433,7 +442,7 @@ func getLatestCompletedDeactivation(ctx context.Context, client edgeworkers.Edge return d, nil } } - return nil, nil + return nil, ErrEdgeworkerNoLatestDeactivation } func versionExists(version string, versions []edgeworkers.EdgeWorkerVersion) bool { @@ -454,7 +463,7 @@ func waitForEdgeworkerActivation(ctx context.Context, client edgeworkers.Edgewor return nil, err } for activation != nil && activation.Status != activationStatusComplete { - if activation.Status != activationStatusPresubmit && activation.Status != activationStatusPending && activation.Status != activationStatusInProgress { + if !statusOngoing(activation.Status) { return nil, ErrEdgeworkerActivationFailure } select { @@ -488,7 +497,7 @@ func waitForEdgeworkerDeactivation(ctx context.Context, client edgeworkers.Edgew return nil, err } for deactivation != nil && deactivation.Status != activationStatusComplete { - if deactivation.Status != activationStatusPresubmit && deactivation.Status != activationStatusPending && deactivation.Status != activationStatusInProgress { + if !statusOngoing(deactivation.Status) { return nil, ErrEdgeworkerDeactivationFailure } select { @@ -533,7 +542,6 @@ func filterDeactivationsByNetwork(deacts []edgeworkers.Deactivation, net string) func sortActivationsByDate(activations []edgeworkers.Activation) []edgeworkers.Activation { sort.Slice(activations, func(i, j int) bool { - timeLayout := time.RFC3339 t1, err := time.Parse(timeLayout, activations[i].CreatedTime) if err != nil { panic(err) @@ -549,7 +557,6 @@ func sortActivationsByDate(activations []edgeworkers.Activation) []edgeworkers.A func sortDeactivationsByDate(deactivations []edgeworkers.Deactivation) []edgeworkers.Deactivation { sort.Slice(deactivations, func(i, j int) bool { - timeLayout := time.RFC3339 t1, err := time.Parse(timeLayout, deactivations[i].CreatedTime) if err != nil { panic(err) @@ -603,3 +610,11 @@ func suppressNoteFieldForEdgeWorkersActivation(_, oldValue, newValue string, d * } return true } + +func statusOngoing(status string) bool { + return status == activationStatusInProgress || status == activationStatusPending || status == activationStatusPresubmit +} + +func statusOngoingOrReady(status string) bool { + return status == activationStatusComplete || statusOngoing(status) +} diff --git a/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation_test.go b/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation_test.go index ff102204f..f970d2b9a 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation_test.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation_test.go @@ -738,7 +738,7 @@ func TestResourceEdgeworkersActivation(t *testing.T) { // test cleanup - destroy expectDeactivateVersion(m, edgeworkerID, 1, net, version, note, - fmt.Errorf("%w: %s", &edgeworkers.Error{ErrorCode: errorCodeVersionAlreadyDeactivated}, "oops")) + fmt.Errorf("%w: %s", edgeworkers.ErrVersionAlreadyDeactivated, "oops")) }, steps: []resource.TestStep{ { @@ -774,7 +774,7 @@ func TestResourceEdgeworkersActivation(t *testing.T) { // test cleanup - destroy expectDeactivateVersion(m, edgeworkerID, 1, net, version, note, - fmt.Errorf("%w: %s", &edgeworkers.Error{ErrorCode: errorCodeVersionIsBeingDeactivated}, "oops")) + fmt.Errorf("%w: %s", edgeworkers.ErrVersionBeingDeactivated, "oops")) expectListDeactivations(m, edgeworkerID, version, []edgeworkers.Deactivation{ *createStubDeactivation(edgeworkerID, 1, net, version, activationStatusInProgress, ""), }, nil) From dcecc4677517689bd359b634e1bbf6e0c52515ff Mon Sep 17 00:00:00 2001 From: Dawid Dzhafarov Date: Fri, 8 Dec 2023 09:08:59 +0000 Subject: [PATCH 14/52] DXE-3326 Align CPS TFP with changes from edgegrid-golang --- CHANGELOG.md | 3 +- pkg/providers/cps/data_akamai_cps_csr_test.go | 18 +-- .../cps/data_akamai_cps_deployments_test.go | 10 +- .../cps/data_akamai_cps_enrollment.go | 29 +++- .../cps/data_akamai_cps_enrollment_test.go | 71 +++++--- .../cps/data_akamai_cps_enrollments.go | 23 +++ .../cps/data_akamai_cps_enrollments_test.go | 14 +- pkg/providers/cps/enrollments.go | 8 +- .../cps/resource_akamai_cps_dv_enrollment.go | 58 +++---- .../resource_akamai_cps_dv_enrollment_test.go | 120 +++++++++----- .../resource_akamai_cps_dv_validation_test.go | 14 +- ...ource_akamai_cps_third_party_enrollment.go | 46 +++--- ..._akamai_cps_third_party_enrollment_test.go | 151 ++++++++++-------- ...urce_akamai_cps_upload_certificate_test.go | 143 +++++++++-------- 14 files changed, 424 insertions(+), 284 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b01b70d18..3c6dfe648 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,7 +47,8 @@ - +* CPS + * Added fields: `org_id`, `assigned_slots`, `staging_slots` and `production_slots` to `data_akamai_cps_enrollment` and `data_akamai_cps_enrollments` data sources diff --git a/pkg/providers/cps/data_akamai_cps_csr_test.go b/pkg/providers/cps/data_akamai_cps_csr_test.go index c3ac3ae62..941857acc 100644 --- a/pkg/providers/cps/data_akamai_cps_csr_test.go +++ b/pkg/providers/cps/data_akamai_cps_csr_test.go @@ -13,7 +13,7 @@ import ( ) type testDataForCPSCSR struct { - Enrollment cps.Enrollment + Enrollment cps.GetEnrollmentResponse EnrollmentID int GetChangeStatusResponse cps.Change GetChangeHistoryResponse *cps.GetChangeHistoryResponse @@ -25,7 +25,7 @@ var ( getEnrollmentReq := cps.GetEnrollmentRequest{ EnrollmentID: data.EnrollmentID, } - getEnrollmentRes := &data.Enrollment + getEnrollmentRes := data.Enrollment changeID, _ := tools.GetChangeIDFromPendingChanges(data.Enrollment.PendingChanges) @@ -41,7 +41,7 @@ var ( } getChangeThirdPartyCSRRes := &data.ThirdPartyCSRResponse - client.On("GetEnrollment", mock.Anything, getEnrollmentReq).Return(getEnrollmentRes, nil).Times(timesToRun) + client.On("GetEnrollment", mock.Anything, getEnrollmentReq).Return(&getEnrollmentRes, nil).Times(timesToRun) client.On("GetChangeStatus", mock.Anything, getChangeStatusReq).Return(getChangeStatusRes, nil).Times(timesToRun) client.On("GetChangeThirdPartyCSR", mock.Anything, getChangeThirdPartyCSRReq).Return(getChangeThirdPartyCSRRes, nil).Times(timesToRun) } @@ -50,7 +50,7 @@ var ( getEnrollmentReq := cps.GetEnrollmentRequest{ EnrollmentID: data.EnrollmentID, } - getEnrollmentRes := &data.Enrollment + getEnrollmentRes := data.Enrollment changeID, _ := tools.GetChangeIDFromPendingChanges(data.Enrollment.PendingChanges) @@ -65,7 +65,7 @@ var ( Changes: data.GetChangeHistoryResponse.Changes, } - client.On("GetEnrollment", mock.Anything, getEnrollmentReq).Return(getEnrollmentRes, nil).Times(timesToRun) + client.On("GetEnrollment", mock.Anything, getEnrollmentReq).Return(&getEnrollmentRes, nil).Times(timesToRun) client.On("GetChangeStatus", mock.Anything, getChangeStatusReq).Return(getChangeStatusRes, nil).Times(timesToRun) client.On("GetChangeHistory", mock.Anything, getChangeHistoryReq).Return(&getChangeHistoryRes, nil).Times(timesToRun) } @@ -88,7 +88,7 @@ var ( getEnrollmentReq := cps.GetEnrollmentRequest{ EnrollmentID: data.EnrollmentID, } - getEnrollmentRes := &data.Enrollment + getEnrollmentRes := data.Enrollment changeID, _ := tools.GetChangeIDFromPendingChanges(data.Enrollment.PendingChanges) getChangeStatusReq := cps.GetChangeStatusRequest{ @@ -102,7 +102,7 @@ var ( ChangeID: changeID, } - client.On("GetEnrollment", mock.Anything, getEnrollmentReq).Return(getEnrollmentRes, nil).Once() + client.On("GetEnrollment", mock.Anything, getEnrollmentReq).Return(&getEnrollmentRes, nil).Once() client.On("GetChangeStatus", mock.Anything, getChangeStatusReq).Return(getChangeStatusRes, nil).Once() client.On("GetChangeThirdPartyCSR", mock.Anything, getChangeThirdPartyCSRReq).Return(nil, fmt.Errorf(errorMessage)).Once() } @@ -112,13 +112,13 @@ var ( getEnrollmentReq := cps.GetEnrollmentRequest{ EnrollmentID: data.EnrollmentID, } - getEnrollmentRes := &data.Enrollment + getEnrollmentRes := data.Enrollment getChangeHistoryReq := cps.GetChangeHistoryRequest{EnrollmentID: data.EnrollmentID} getChangeHistoryRes := cps.GetChangeHistoryResponse{ Changes: data.GetChangeHistoryResponse.Changes, } - client.On("GetEnrollment", mock.Anything, getEnrollmentReq).Return(getEnrollmentRes, nil).Times(timesToRun) + client.On("GetEnrollment", mock.Anything, getEnrollmentReq).Return(&getEnrollmentRes, nil).Times(timesToRun) client.On("GetChangeHistory", mock.Anything, getChangeHistoryReq).Return(&getChangeHistoryRes, nil).Times(timesToRun) } diff --git a/pkg/providers/cps/data_akamai_cps_deployments_test.go b/pkg/providers/cps/data_akamai_cps_deployments_test.go index 32e95bfa3..e5e1368b1 100644 --- a/pkg/providers/cps/data_akamai_cps_deployments_test.go +++ b/pkg/providers/cps/data_akamai_cps_deployments_test.go @@ -23,7 +23,7 @@ func TestDataCPSDeployments(t *testing.T) { init: func(m *cps.Mock) { m.On("GetEnrollment", mock.Anything, cps.GetEnrollmentRequest{ EnrollmentID: 123, - }).Return(&cps.Enrollment{ + }).Return(&cps.GetEnrollmentResponse{ Location: "/cps/v2/enrollments/123", AutoRenewalStartTime: "2024-10-17T12:08:13Z", }, nil) @@ -74,7 +74,7 @@ func TestDataCPSDeployments(t *testing.T) { init: func(m *cps.Mock) { m.On("GetEnrollment", mock.Anything, cps.GetEnrollmentRequest{ EnrollmentID: 123, - }).Return(&cps.Enrollment{ + }).Return(&cps.GetEnrollmentResponse{ Location: "/cps/v2/enrollments/123", AutoRenewalStartTime: "2024-10-17T12:08:13Z", }, nil) @@ -125,7 +125,7 @@ func TestDataCPSDeployments(t *testing.T) { init: func(m *cps.Mock) { m.On("GetEnrollment", mock.Anything, cps.GetEnrollmentRequest{ EnrollmentID: 123, - }).Return(&cps.Enrollment{ + }).Return(&cps.GetEnrollmentResponse{ Location: "/cps/v2/enrollments/123", AutoRenewalStartTime: "2024-10-17T12:08:13Z", }, nil) @@ -162,7 +162,7 @@ func TestDataCPSDeployments(t *testing.T) { init: func(m *cps.Mock) { m.On("GetEnrollment", mock.Anything, cps.GetEnrollmentRequest{ EnrollmentID: 123, - }).Return(&cps.Enrollment{ + }).Return(&cps.GetEnrollmentResponse{ Location: "/cps/v2/enrollments/123", AutoRenewalStartTime: "2024-10-17T12:08:13Z", }, nil) @@ -212,7 +212,7 @@ func TestDataCPSDeployments(t *testing.T) { init: func(m *cps.Mock) { m.On("GetEnrollment", mock.Anything, cps.GetEnrollmentRequest{ EnrollmentID: 123, - }).Return(&cps.Enrollment{ + }).Return(&cps.GetEnrollmentResponse{ Location: "/cps/v2/enrollments/123", AutoRenewalStartTime: "2024-10-17T12:08:13Z", }, nil) diff --git a/pkg/providers/cps/data_akamai_cps_enrollment.go b/pkg/providers/cps/data_akamai_cps_enrollment.go index ecf51fcc2..9f372daee 100644 --- a/pkg/providers/cps/data_akamai_cps_enrollment.go +++ b/pkg/providers/cps/data_akamai_cps_enrollment.go @@ -228,6 +228,11 @@ func dataSourceCPSEnrollment() *schema.Resource { }, }, }, + "org_id": { + Type: schema.TypeInt, + Computed: true, + Description: "The Digicert unique identifier for the organization", + }, "contract_id": { Type: schema.TypeString, Computed: true, @@ -303,6 +308,24 @@ func dataSourceCPSEnrollment() *schema.Resource { }, Set: cpstools.HashFromChallengesMap, }, + "assigned_slots": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeInt}, + Description: "Slots where the certificate either will be deployed or is already deployed", + }, + "staging_slots": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeInt}, + Description: "Slots where the certificate is deployed on the staging network", + }, + "production_slots": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeInt}, + Description: "Slots where the certificate is deployed on the production network", + }, }, } } @@ -327,7 +350,7 @@ func dataCPSEnrollmentRead(ctx context.Context, d *schema.ResourceData, m interf return diag.FromErr(err) } - attrs := createAttrs(enrollment, enrollmentID) + attrs := createAttrs(convertGetEnrollmentResponseToEnrollment(enrollment), enrollmentID) attrs["pending_changes"] = len(enrollment.PendingChanges) > 0 @@ -347,3 +370,7 @@ func dataCPSEnrollmentRead(ctx context.Context, d *schema.ResourceData, m interf d.SetId(strconv.Itoa(enrollmentID)) return nil } + +func convertGetEnrollmentResponseToEnrollment(getEnrollmentResp *cps.GetEnrollmentResponse) *cps.Enrollment { + return (*cps.Enrollment)(getEnrollmentResp) +} diff --git a/pkg/providers/cps/data_akamai_cps_enrollment_test.go b/pkg/providers/cps/data_akamai_cps_enrollment_test.go index cc1617a5e..9401cf882 100644 --- a/pkg/providers/cps/data_akamai_cps_enrollment_test.go +++ b/pkg/providers/cps/data_akamai_cps_enrollment_test.go @@ -7,6 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" + "github.com/akamai/cli-terraform/pkg/tools" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -21,18 +22,19 @@ const ( ) var ( - enrollmentDV1 = &cps.Enrollment{AdminContact: &cps.Contact{ - AddressLineOne: "150 Broadway", - City: "Cambridge", - Country: "US", - Email: "r1d1@akamai.com", - FirstName: "R1", - LastName: "D1", - OrganizationName: "Akamai", - Phone: "123123123", - PostalCode: "12345", - Region: "MA", - }, + enrollmentDV1 = &cps.GetEnrollmentResponse{ + AdminContact: &cps.Contact{ + AddressLineOne: "150 Broadway", + City: "Cambridge", + Country: "US", + Email: "r1d1@akamai.com", + FirstName: "R1", + LastName: "D1", + OrganizationName: "Akamai", + Phone: "123123123", + PostalCode: "12345", + Region: "MA", + }, CertificateChainType: "default", CertificateType: "san", ChangeManagement: false, @@ -71,6 +73,7 @@ var ( PostalCode: "12345", Region: "MA", }, + OrgID: tools.IntPtr(123), RA: "lets-encrypt", SignatureAlgorithm: "SHA-256", TechContact: &cps.Contact{ @@ -85,8 +88,12 @@ var ( PostalCode: "12345", Region: "MA", }, - ValidationType: "dv"} - enrollmentDV2 = &cps.Enrollment{ + ValidationType: "dv", + AssignedSlots: []int{1}, + StagingSlots: []int{2}, + ProductionSlots: []int{3}, + } + enrollmentDV2 = &cps.GetEnrollmentResponse{ AdminContact: &cps.Contact{ AddressLineOne: "150 Broadway", City: "Cambridge", @@ -138,6 +145,7 @@ var ( PostalCode: "55555", Region: "MA", }, + OrgID: tools.IntPtr(123), RA: "lets-encrypt", SignatureAlgorithm: "SHA-256", TechContact: &cps.Contact{ @@ -161,9 +169,12 @@ var ( ChangeType: "new-certificate", }, }, - ValidationType: "dv", + ValidationType: "dv", + AssignedSlots: []int{1}, + StagingSlots: []int{2}, + ProductionSlots: []int{3}, } - enrollmentThirdParty = &cps.Enrollment{ + enrollmentThirdParty = &cps.GetEnrollmentResponse{ AdminContact: &cps.Contact{ AddressLineOne: "150 Broadway", City: "Cambridge", @@ -215,6 +226,7 @@ var ( PostalCode: "55555", Region: "MA", }, + OrgID: tools.IntPtr(123), RA: "lets-encrypt", SignatureAlgorithm: "SHA-256", TechContact: &cps.Contact{ @@ -238,9 +250,12 @@ var ( ChangeType: "new-certificate", }, }, - ValidationType: "third-party", + ValidationType: "third-party", + AssignedSlots: []int{1}, + StagingSlots: []int{2}, + ProductionSlots: []int{3}, } - enrollmentEV = &cps.Enrollment{ + enrollmentEV = &cps.GetEnrollmentResponse{ AdminContact: &cps.Contact{ AddressLineOne: "150 Broadway", City: "Cambridge", @@ -292,6 +307,7 @@ var ( PostalCode: "55555", Region: "MA", }, + OrgID: tools.IntPtr(123), RA: "lets-encrypt", SignatureAlgorithm: "SHA-256", TechContact: &cps.Contact{ @@ -315,13 +331,16 @@ var ( ChangeType: "new-certificate", }, }, - ValidationType: "ev", + ValidationType: "ev", + AssignedSlots: []int{1}, + StagingSlots: []int{2}, + ProductionSlots: []int{3}, } ) func TestDataEnrollment(t *testing.T) { tests := map[string]struct { - enrollment *cps.Enrollment + enrollment *cps.GetEnrollmentResponse enrollmentID int init func(*testing.T, *cps.Mock) steps []resource.TestStep @@ -495,7 +514,7 @@ func TestDataEnrollment(t *testing.T) { } } -func checkAttributesForEnrollment(en *cps.Enrollment, enID int, changes *cps.Change, dvArray *cps.DVArray) resource.TestCheckFunc { +func checkAttributesForEnrollment(en *cps.GetEnrollmentResponse, enID int, changes *cps.Change, dvArray *cps.DVArray) resource.TestCheckFunc { return resource.ComposeAggregateTestCheckFunc( checkCommonAttrs(en, enID), checkSetTypeAttrs(en), @@ -504,7 +523,7 @@ func checkAttributesForEnrollment(en *cps.Enrollment, enID int, changes *cps.Cha ) } -func checkCommonAttrs(en *cps.Enrollment, enID int) resource.TestCheckFunc { +func checkCommonAttrs(en *cps.GetEnrollmentResponse, enID int) resource.TestCheckFunc { return resource.ComposeAggregateTestCheckFunc( // Admin Contact resource.TestCheckResourceAttr("data.akamai_cps_enrollment.test", "admin_contact.#", "1"), @@ -569,10 +588,14 @@ func checkCommonAttrs(en *cps.Enrollment, enID int) resource.TestCheckFunc { resource.TestCheckResourceAttr("data.akamai_cps_enrollment.test", "signature_algorithm", en.SignatureAlgorithm), resource.TestCheckResourceAttr("data.akamai_cps_enrollment.test", "sni_only", strconv.FormatBool(en.NetworkConfiguration.SNIOnly)), resource.TestCheckResourceAttr("data.akamai_cps_enrollment.test", "secure_network", en.NetworkConfiguration.SecureNetwork), + resource.TestCheckResourceAttr("data.akamai_cps_enrollment.test", "org_id", strconv.Itoa(*en.OrgID)), + resource.TestCheckResourceAttr("data.akamai_cps_enrollment.test", "assigned_slots.#", strconv.Itoa(len(en.AssignedSlots))), + resource.TestCheckResourceAttr("data.akamai_cps_enrollment.test", "staging_slots.#", strconv.Itoa(len(en.StagingSlots))), + resource.TestCheckResourceAttr("data.akamai_cps_enrollment.test", "production_slots.#", strconv.Itoa(len(en.ProductionSlots))), ) } -func checkSetTypeAttrs(en *cps.Enrollment) resource.TestCheckFunc { +func checkSetTypeAttrs(en *cps.GetEnrollmentResponse) resource.TestCheckFunc { var checkFunctions []resource.TestCheckFunc sansCount := len(en.CSR.SANS) checkFunctions = append(checkFunctions, resource.TestCheckResourceAttr("data.akamai_cps_enrollment.test", "sans.#", strconv.Itoa(sansCount))) @@ -638,7 +661,7 @@ func checkChallenges(changes *cps.Change, dvArray *cps.DVArray) resource.TestChe return resource.ComposeAggregateTestCheckFunc(checkFunctions...) } -func checkPendingChangesEnrollment(en *cps.Enrollment) resource.TestCheckFunc { +func checkPendingChangesEnrollment(en *cps.GetEnrollmentResponse) resource.TestCheckFunc { if len(en.PendingChanges) > 0 { return resource.TestCheckResourceAttr("data.akamai_cps_enrollment.test", "pending_changes", "true") } diff --git a/pkg/providers/cps/data_akamai_cps_enrollments.go b/pkg/providers/cps/data_akamai_cps_enrollments.go index afe9bacdd..9b0cdc16a 100644 --- a/pkg/providers/cps/data_akamai_cps_enrollments.go +++ b/pkg/providers/cps/data_akamai_cps_enrollments.go @@ -238,6 +238,11 @@ func dataSourceCPSEnrollments() *schema.Resource { }, }, }, + "org_id": { + Type: schema.TypeInt, + Computed: true, + Description: "The Digicert unique identifier for the organization", + }, "certificate_type": { Type: schema.TypeString, Computed: true, @@ -258,6 +263,24 @@ func dataSourceCPSEnrollments() *schema.Resource { Computed: true, Description: "Whether some changes are pending", }, + "assigned_slots": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeInt}, + Description: "Slots where the certificate either will be deployed or is already deployed", + }, + "staging_slots": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeInt}, + Description: "Slots where the certificate is deployed on the staging network", + }, + "production_slots": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeInt}, + Description: "Slots where the certificate is deployed on the production network", + }, }, }, }, diff --git a/pkg/providers/cps/data_akamai_cps_enrollments_test.go b/pkg/providers/cps/data_akamai_cps_enrollments_test.go index dd4d84ae9..cb61440b8 100644 --- a/pkg/providers/cps/data_akamai_cps_enrollments_test.go +++ b/pkg/providers/cps/data_akamai_cps_enrollments_test.go @@ -17,11 +17,15 @@ const contractID = "testing" var ( enrollmentsList = &cps.ListEnrollmentsResponse{ - Enrollments: []cps.Enrollment{*enrollmentDV1, *enrollmentDV2}, + Enrollments: []cps.Enrollment{*convertGetEnrollmentResponseToEnrollment(enrollmentDV1), *convertGetEnrollmentResponseToEnrollment(enrollmentDV2)}, } emptyEnrollmentList = &cps.ListEnrollmentsResponse{} enrollmentsThirdPartyList = &cps.ListEnrollmentsResponse{ - Enrollments: []cps.Enrollment{*enrollmentDV1, *enrollmentDV2, *enrollmentThirdParty, *enrollmentEV}, + Enrollments: []cps.Enrollment{ + *convertGetEnrollmentResponseToEnrollment(enrollmentDV1), + *convertGetEnrollmentResponseToEnrollment(enrollmentDV2), + *convertGetEnrollmentResponseToEnrollment(enrollmentThirdParty), + *convertGetEnrollmentResponseToEnrollment(enrollmentEV)}, } ) @@ -33,7 +37,7 @@ func TestDataEnrollments(t *testing.T) { steps []resource.TestStep }{ "happy path": { - enrollments: cps.ListEnrollmentsResponse{Enrollments: []cps.Enrollment{*enrollmentDV1, *enrollmentDV2}}, + enrollments: *enrollmentsList, init: func(t *testing.T, m *cps.Mock) { m.On("ListEnrollments", mock.Anything, cps.ListEnrollmentsRequest{ ContractID: contractID, @@ -47,7 +51,7 @@ func TestDataEnrollments(t *testing.T) { }, }, "could not fetch list of enrollments": { - enrollments: cps.ListEnrollmentsResponse{Enrollments: []cps.Enrollment{*enrollmentDV1, *enrollmentDV2}}, + enrollments: *enrollmentsList, init: func(t *testing.T, m *cps.Mock) { m.On("ListEnrollments", mock.Anything, cps.ListEnrollmentsRequest{ ContractID: contractID, @@ -61,7 +65,7 @@ func TestDataEnrollments(t *testing.T) { }, }, "different change type enrollments": { - enrollments: cps.ListEnrollmentsResponse{Enrollments: []cps.Enrollment{*enrollmentDV1, *enrollmentDV2, *enrollmentThirdParty, *enrollmentEV}}, + enrollments: *enrollmentsThirdPartyList, init: func(t *testing.T, m *cps.Mock) { m.On("ListEnrollments", mock.Anything, cps.ListEnrollmentsRequest{ ContractID: contractID, diff --git a/pkg/providers/cps/enrollments.go b/pkg/providers/cps/enrollments.go index 89dc222c1..607eef349 100644 --- a/pkg/providers/cps/enrollments.go +++ b/pkg/providers/cps/enrollments.go @@ -275,10 +275,14 @@ func createAttrs(en *cps.Enrollment, enID int) map[string]interface{} { "certificate_type": en.CertificateType, "validation_type": en.ValidationType, "registration_authority": en.RA, + "org_id": en.OrgID, + "assigned_slots": en.AssignedSlots, + "staging_slots": en.StagingSlots, + "production_slots": en.ProductionSlots, } } -func getChallengesAttrs(ctx context.Context, en *cps.Enrollment, client cps.CPS) (map[string]interface{}, error) { +func getChallengesAttrs(ctx context.Context, en *cps.GetEnrollmentResponse, client cps.CPS) (map[string]interface{}, error) { changeID, err := cpstools.GetChangeIDFromPendingChanges(en.PendingChanges) if err != nil { @@ -373,7 +377,7 @@ func enrollmentDelete(ctx context.Context, d *schema.ResourceData, m interface{} return nil } -func readAttrs(enrollment *cps.Enrollment, d *schema.ResourceData) (map[string]interface{}, error) { +func readAttrs(enrollment *cps.GetEnrollmentResponse, d *schema.ResourceData) (map[string]interface{}, error) { attrs := make(map[string]interface{}) adminContact := cpstools.ContactInfoToMap(*enrollment.AdminContact) attrs["common_name"] = enrollment.CSR.CN diff --git a/pkg/providers/cps/resource_akamai_cps_dv_enrollment.go b/pkg/providers/cps/resource_akamai_cps_dv_enrollment.go index 13d161b1f..e1fa5ad63 100644 --- a/pkg/providers/cps/resource_akamai_cps_dv_enrollment.go +++ b/pkg/providers/cps/resource_akamai_cps_dv_enrollment.go @@ -249,18 +249,18 @@ func resourceCPSDVEnrollmentCreate(ctx context.Context, d *schema.ResourceData, client := inst.Client(meta) logger.Debug("Creating enrollment") - enrollment := cps.Enrollment{ + enrollmentReqBody := cps.EnrollmentRequestBody{ CertificateType: "san", ValidationType: "dv", RA: "lets-encrypt", } - if err := d.Set("certificate_type", enrollment.CertificateType); err != nil { + if err := d.Set("certificate_type", enrollmentReqBody.CertificateType); err != nil { return diag.Errorf("%v: %s", tf.ErrValueSet, err.Error()) } - if err := d.Set("validation_type", enrollment.ValidationType); err != nil { + if err := d.Set("validation_type", enrollmentReqBody.ValidationType); err != nil { return diag.Errorf("%v: %s", tf.ErrValueSet, err.Error()) } - if err := d.Set("registration_authority", enrollment.RA); err != nil { + if err := d.Set("registration_authority", enrollmentReqBody.RA); err != nil { return diag.Errorf("%v: %s", tf.ErrValueSet, err.Error()) } adminContactSet, err := tf.GetSetValue("admin_contact", d) @@ -271,7 +271,7 @@ func resourceCPSDVEnrollmentCreate(ctx context.Context, d *schema.ResourceData, if err != nil { return diag.Errorf("'admin_contact' - %s", err) } - enrollment.AdminContact = adminContact + enrollmentReqBody.AdminContact = adminContact techContactSet, err := tf.GetSetValue("tech_contact", d) if err != nil { return diag.FromErr(err) @@ -280,39 +280,39 @@ func resourceCPSDVEnrollmentCreate(ctx context.Context, d *schema.ResourceData, if err != nil { return diag.Errorf("'tech_contact' - %s", err) } - enrollment.TechContact = techContact + enrollmentReqBody.TechContact = techContact certificateChainType, err := tf.GetStringValue("certificate_chain_type", d) if err != nil && !errors.Is(err, tf.ErrNotFound) { return diag.FromErr(err) } - enrollment.CertificateChainType = certificateChainType + enrollmentReqBody.CertificateChainType = certificateChainType csr, err := cpstools.GetCSR(d) if err != nil { return diag.FromErr(err) } - enrollment.CSR = csr + enrollmentReqBody.CSR = csr // DV does not support multi stack certificates - enrollment.EnableMultiStackedCertificates = false + enrollmentReqBody.EnableMultiStackedCertificates = false networkConfig, err := cpstools.GetNetworkConfig(d) if err != nil { return diag.FromErr(err) } - enrollment.NetworkConfiguration = networkConfig + enrollmentReqBody.NetworkConfiguration = networkConfig signatureAlgorithm, err := tf.GetStringValue("signature_algorithm", d) if err != nil { return diag.FromErr(err) } - enrollment.SignatureAlgorithm = signatureAlgorithm + enrollmentReqBody.SignatureAlgorithm = signatureAlgorithm organization, err := cpstools.GetOrg(d) if err != nil { return diag.FromErr(err) } - enrollment.Org = organization + enrollmentReqBody.Org = organization contractID, err := tf.GetStringValue("contract_id", d) if err != nil { @@ -325,13 +325,13 @@ func resourceCPSDVEnrollmentCreate(ctx context.Context, d *schema.ResourceData, // save ClientMutualAuthentication and unset it in enrollment request struct // create request must not have it set; in case its not nil, we will run update later to add it - clientMutualAuthentication := enrollment.NetworkConfiguration.ClientMutualAuthentication - enrollment.NetworkConfiguration.ClientMutualAuthentication = nil + clientMutualAuthentication := enrollmentReqBody.NetworkConfiguration.ClientMutualAuthentication + enrollmentReqBody.NetworkConfiguration.ClientMutualAuthentication = nil req := cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: strings.TrimPrefix(contractID, "ctr_"), - AllowDuplicateCN: allowDuplicateCN, + EnrollmentRequestBody: enrollmentReqBody, + ContractID: strings.TrimPrefix(contractID, "ctr_"), + AllowDuplicateCN: allowDuplicateCN, } res, err := client.CreateEnrollment(ctx, req) if err != nil { @@ -347,10 +347,10 @@ func resourceCPSDVEnrollmentCreate(ctx context.Context, d *schema.ResourceData, // when clientMutualAuthentication was provided, insert it back to enrollment and send the update request if clientMutualAuthentication != nil { logger.Debug("Updating ClientMutualAuthentication configuration") - enrollment.NetworkConfiguration.ClientMutualAuthentication = clientMutualAuthentication + enrollmentReqBody.NetworkConfiguration.ClientMutualAuthentication = clientMutualAuthentication req := cps.UpdateEnrollmentRequest{ EnrollmentID: res.ID, - Enrollment: enrollment, + EnrollmentRequestBody: enrollmentReqBody, AllowCancelPendingChanges: ptr.To(true), } _, err := client.UpdateEnrollment(ctx, req) @@ -508,7 +508,7 @@ func resourceCPSDVEnrollmentUpdate(ctx context.Context, d *schema.ResourceData, } return resourceCPSDVEnrollmentRead(ctx, d, m) } - enrollment := cps.Enrollment{ + enrollmentReqBody := cps.EnrollmentRequestBody{ CertificateType: "san", ValidationType: "dv", RA: "lets-encrypt", @@ -531,7 +531,7 @@ func resourceCPSDVEnrollmentUpdate(ctx context.Context, d *schema.ResourceData, if err != nil { return diag.Errorf("'admin_contact' - %s", err) } - enrollment.AdminContact = adminContact + enrollmentReqBody.AdminContact = adminContact techContactSet, err := tf.GetSetValue("tech_contact", d) if err != nil { return diag.FromErr(err) @@ -540,43 +540,43 @@ func resourceCPSDVEnrollmentUpdate(ctx context.Context, d *schema.ResourceData, if err != nil { return diag.Errorf("'tech_contact' - %s", err) } - enrollment.TechContact = techContact + enrollmentReqBody.TechContact = techContact certificateChainType, err := tf.GetStringValue("certificate_chain_type", d) if err != nil && !errors.Is(err, tf.ErrNotFound) { return diag.FromErr(err) } - enrollment.CertificateChainType = certificateChainType + enrollmentReqBody.CertificateChainType = certificateChainType csr, err := cpstools.GetCSR(d) if err != nil { return diag.FromErr(err) } - enrollment.CSR = csr + enrollmentReqBody.CSR = csr // DV does not support multi stack certificates - enrollment.EnableMultiStackedCertificates = false + enrollmentReqBody.EnableMultiStackedCertificates = false networkConfig, err := cpstools.GetNetworkConfig(d) if err != nil { return diag.FromErr(err) } - enrollment.NetworkConfiguration = networkConfig + enrollmentReqBody.NetworkConfiguration = networkConfig signatureAlgorithm, err := tf.GetStringValue("signature_algorithm", d) if err != nil && !errors.Is(err, tf.ErrNotFound) { return diag.FromErr(err) } - enrollment.SignatureAlgorithm = signatureAlgorithm + enrollmentReqBody.SignatureAlgorithm = signatureAlgorithm organization, err := cpstools.GetOrg(d) if err != nil { return diag.FromErr(err) } - enrollment.Org = organization + enrollmentReqBody.Org = organization allowCancel := true req := cps.UpdateEnrollmentRequest{ - Enrollment: enrollment, + EnrollmentRequestBody: enrollmentReqBody, EnrollmentID: enrollmentID, AllowCancelPendingChanges: &allowCancel, } diff --git a/pkg/providers/cps/resource_akamai_cps_dv_enrollment_test.go b/pkg/providers/cps/resource_akamai_cps_dv_enrollment_test.go index 2752fdde6..0ac61586b 100644 --- a/pkg/providers/cps/resource_akamai_cps_dv_enrollment_test.go +++ b/pkg/providers/cps/resource_akamai_cps_dv_enrollment_test.go @@ -21,7 +21,7 @@ func TestResourceDVEnrollment(t *testing.T) { t.Run("lifecycle test", func(t *testing.T) { PollForChangeStatusInterval = 1 * time.Millisecond client := &cps.Mock{} - enrollment := cps.Enrollment{ + enrollment := cps.GetEnrollmentResponse{ AdminContact: &cps.Contact{ AddressLineOne: "150 Broadway", City: "Cambridge", @@ -86,12 +86,13 @@ func TestResourceDVEnrollment(t *testing.T) { }, ValidationType: "dv", } + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", }, ).Return(&cps.CreateEnrollmentResponse{ ID: 1, @@ -181,7 +182,7 @@ func TestResourceDVEnrollment(t *testing.T) { }, }}, nil).Times(3) - var enrollmentUpdate cps.Enrollment + var enrollmentUpdate cps.GetEnrollmentResponse err := copier.CopyWithOption(&enrollmentUpdate, enrollment, copier.Option{DeepCopy: true}) require.NoError(t, err) enrollmentUpdate.AdminContact.FirstName = "R5" @@ -191,11 +192,13 @@ func TestResourceDVEnrollment(t *testing.T) { enrollmentUpdate.NetworkConfiguration.DNSNameSettings.DNSNames = []string{"san2.test.akamai.com", "san.test.akamai.com"} enrollmentUpdate.Location = "" enrollmentUpdate.PendingChanges = nil + + enrollmentUpdateReqBody := createEnrollmentReqBodyFromEnrollment(enrollmentUpdate) allowCancel := true client.On("UpdateEnrollment", mock.Anything, cps.UpdateEnrollmentRequest{ - Enrollment: enrollmentUpdate, + EnrollmentRequestBody: enrollmentUpdateReqBody, EnrollmentID: 1, AllowCancelPendingChanges: &allowCancel, }, @@ -315,7 +318,7 @@ func TestResourceDVEnrollment(t *testing.T) { t.Run("create enrollment, empty sans", func(t *testing.T) { PollForChangeStatusInterval = 1 * time.Millisecond client := &cps.Mock{} - enrollment := cps.Enrollment{ + enrollment := cps.GetEnrollmentResponse{ AdminContact: &cps.Contact{ AddressLineOne: "150 Broadway", City: "Cambridge", @@ -377,12 +380,13 @@ func TestResourceDVEnrollment(t *testing.T) { }, ValidationType: "dv", } + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", }, ).Return(&cps.CreateEnrollmentResponse{ ID: 1, @@ -397,7 +401,7 @@ func TestResourceDVEnrollment(t *testing.T) { ChangeType: "new-certificate", }, } - var enrollmentGet cps.Enrollment + var enrollmentGet cps.GetEnrollmentResponse require.NoError(t, copier.CopyWithOption(&enrollmentGet, enrollment, copier.Option{DeepCopy: true})) enrollmentGet.CSR.SANS = []string{enrollment.CSR.CN} client.On("GetEnrollment", mock.Anything, cps.GetEnrollmentRequest{EnrollmentID: 1}). @@ -501,7 +505,7 @@ func TestResourceDVEnrollment(t *testing.T) { t.Run("create enrollment, MTLS", func(t *testing.T) { PollForChangeStatusInterval = 1 * time.Millisecond client := &cps.Mock{} - enrollment := cps.Enrollment{ + enrollment := cps.GetEnrollmentResponse{ AdminContact: &cps.Contact{ AddressLineOne: "150 Broadway", City: "Cambridge", @@ -563,12 +567,13 @@ func TestResourceDVEnrollment(t *testing.T) { }, ValidationType: "dv", } + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", }, ).Return(&cps.CreateEnrollmentResponse{ ID: 1, @@ -576,7 +581,7 @@ func TestResourceDVEnrollment(t *testing.T) { Changes: []string{"/cps/v2/enrollments/1/changes/2"}, }, nil).Once() - var enrollmentUpdate cps.Enrollment + var enrollmentUpdate cps.GetEnrollmentResponse require.NoError(t, copier.CopyWithOption(&enrollmentUpdate, enrollment, copier.Option{DeepCopy: true, IgnoreEmpty: true})) enrollmentUpdate.NetworkConfiguration.ClientMutualAuthentication = &cps.ClientMutualAuthentication{ AuthenticationOptions: &cps.AuthenticationOptions{ @@ -587,11 +592,13 @@ func TestResourceDVEnrollment(t *testing.T) { }, SetID: "12345", } + enrollmentUpdateReqBody := createEnrollmentReqBodyFromEnrollment(enrollmentUpdate) + client.On("UpdateEnrollment", mock.Anything, cps.UpdateEnrollmentRequest{ EnrollmentID: 1, - Enrollment: enrollmentUpdate, + EnrollmentRequestBody: enrollmentUpdateReqBody, AllowCancelPendingChanges: ptr.To(true), }, ).Return(&cps.UpdateEnrollmentResponse{ @@ -607,7 +614,7 @@ func TestResourceDVEnrollment(t *testing.T) { ChangeType: "new-certificate", }, } - var enrollmentGet cps.Enrollment + var enrollmentGet cps.GetEnrollmentResponse require.NoError(t, copier.CopyWithOption(&enrollmentGet, enrollmentUpdate, copier.Option{DeepCopy: true})) enrollmentGet.CSR.SANS = []string{enrollmentUpdate.CSR.CN} client.On("GetEnrollment", mock.Anything, cps.GetEnrollmentRequest{EnrollmentID: 1}). @@ -710,7 +717,7 @@ func TestResourceDVEnrollment(t *testing.T) { PollForChangeStatusInterval = 1 * time.Millisecond client := &cps.Mock{} commonName := "test.akamai.com" - enrollment := cps.Enrollment{ + enrollment := cps.GetEnrollmentResponse{ AdminContact: &cps.Contact{ AddressLineOne: "150 Broadway", City: "Cambridge", @@ -774,12 +781,13 @@ func TestResourceDVEnrollment(t *testing.T) { }, ValidationType: "dv", } + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", }, ).Return(&cps.CreateEnrollmentResponse{ ID: 1, @@ -914,7 +922,7 @@ func TestResourceDVEnrollment(t *testing.T) { t.Run("set challenges arrays to empty if no allowedInput found", func(t *testing.T) { client := &cps.Mock{} - enrollment := cps.Enrollment{ + enrollment := cps.GetEnrollmentResponse{ AdminContact: &cps.Contact{ AddressLineOne: "150 Broadway", City: "Cambridge", @@ -979,12 +987,13 @@ func TestResourceDVEnrollment(t *testing.T) { }, ValidationType: "dv", } + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", }, ).Return(&cps.CreateEnrollmentResponse{ ID: 1, @@ -1059,7 +1068,7 @@ func TestResourceDVEnrollment(t *testing.T) { t.Run("update with acknowledge warnings change, no enrollment update", func(t *testing.T) { client := &cps.Mock{} - enrollment := cps.Enrollment{ + enrollment := cps.GetEnrollmentResponse{ AdminContact: &cps.Contact{ AddressLineOne: "150 Broadway", City: "Cambridge", @@ -1115,12 +1124,13 @@ func TestResourceDVEnrollment(t *testing.T) { }, ValidationType: "dv", } + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", }, ).Return(&cps.CreateEnrollmentResponse{ ID: 1, @@ -1280,7 +1290,7 @@ func TestResourceDVEnrollment(t *testing.T) { t.Run("acknowledge warnings", func(t *testing.T) { client := &cps.Mock{} PollForChangeStatusInterval = 1 * time.Millisecond - enrollment := cps.Enrollment{ + enrollment := cps.GetEnrollmentResponse{ AdminContact: &cps.Contact{ AddressLineOne: "150 Broadway", City: "Cambridge", @@ -1336,12 +1346,13 @@ func TestResourceDVEnrollment(t *testing.T) { }, ValidationType: "dv", } + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", }, ).Return(&cps.CreateEnrollmentResponse{ ID: 1, @@ -1461,7 +1472,7 @@ func TestResourceDVEnrollment(t *testing.T) { t.Run("create enrollment, allow duplicate common name", func(t *testing.T) { PollForChangeStatusInterval = 1 * time.Millisecond client := &cps.Mock{} - enrollment := cps.Enrollment{ + enrollment := cps.GetEnrollmentResponse{ AdminContact: &cps.Contact{ AddressLineOne: "150 Broadway", City: "Cambridge", @@ -1523,13 +1534,14 @@ func TestResourceDVEnrollment(t *testing.T) { }, ValidationType: "dv", } + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", - AllowDuplicateCN: true, + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", + AllowDuplicateCN: true, }, ).Return(&cps.CreateEnrollmentResponse{ ID: 1, @@ -1544,7 +1556,7 @@ func TestResourceDVEnrollment(t *testing.T) { ChangeType: "new-certificate", }, } - var enrollmentGet cps.Enrollment + var enrollmentGet cps.GetEnrollmentResponse require.NoError(t, copier.CopyWithOption(&enrollmentGet, enrollment, copier.Option{DeepCopy: true})) enrollmentGet.CSR.SANS = []string{enrollment.CSR.CN} client.On("GetEnrollment", mock.Anything, cps.GetEnrollmentRequest{EnrollmentID: 1}). @@ -1656,7 +1668,7 @@ func TestResourceDVEnrollment(t *testing.T) { t.Run("verification failed with warnings, no acknowledgement", func(t *testing.T) { client := &cps.Mock{} PollForChangeStatusInterval = 1 * time.Millisecond - enrollment := cps.Enrollment{ + enrollment := cps.GetEnrollmentResponse{ AdminContact: &cps.Contact{ AddressLineOne: "150 Broadway", City: "Cambridge", @@ -1712,12 +1724,13 @@ func TestResourceDVEnrollment(t *testing.T) { }, ValidationType: "dv", } + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", }, ).Return(&cps.CreateEnrollmentResponse{ ID: 1, @@ -1777,7 +1790,7 @@ func TestResourceDVEnrollment(t *testing.T) { t.Run("create enrollment returns an error", func(t *testing.T) { client := &cps.Mock{} PollForChangeStatusInterval = 1 * time.Millisecond - enrollment := cps.Enrollment{ + enrollment := cps.GetEnrollmentResponse{ AdminContact: &cps.Contact{ AddressLineOne: "150 Broadway", City: "Cambridge", @@ -1833,12 +1846,13 @@ func TestResourceDVEnrollment(t *testing.T) { }, ValidationType: "dv", } + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", }, ).Return(nil, fmt.Errorf("error creating enrollment")).Once() @@ -1863,7 +1877,7 @@ func TestResourceDVEnrollmentImport(t *testing.T) { client := &cps.Mock{} id := "1,ctr_1" - enrollment := cps.Enrollment{ + enrollment := cps.GetEnrollmentResponse{ AdminContact: &cps.Contact{ AddressLineOne: "150 Broadway", City: "Cambridge", @@ -1920,11 +1934,13 @@ func TestResourceDVEnrollmentImport(t *testing.T) { }, ValidationType: "dv", } + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) + client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", }, ).Return(&cps.CreateEnrollmentResponse{ ID: 1, @@ -2025,7 +2041,7 @@ func TestResourceDVEnrollmentImport(t *testing.T) { client := &cps.Mock{} id := "1,ctr_1" - enrollment := cps.Enrollment{ + enrollment := cps.GetEnrollmentResponse{ ValidationType: "third-party", } @@ -2048,3 +2064,23 @@ func TestResourceDVEnrollmentImport(t *testing.T) { }) }) } + +func createEnrollmentReqBodyFromEnrollment(en cps.GetEnrollmentResponse) cps.EnrollmentRequestBody { + return cps.EnrollmentRequestBody{ + AdminContact: en.AdminContact, + AutoRenewalStartTime: en.AutoRenewalStartTime, + CertificateChainType: en.CertificateChainType, + CertificateType: en.CertificateType, + ChangeManagement: en.ChangeManagement, + CSR: en.CSR, + EnableMultiStackedCertificates: en.EnableMultiStackedCertificates, + NetworkConfiguration: en.NetworkConfiguration, + Org: en.Org, + OrgID: en.OrgID, + RA: en.RA, + SignatureAlgorithm: en.SignatureAlgorithm, + TechContact: en.TechContact, + ThirdParty: en.ThirdParty, + ValidationType: en.ValidationType, + } +} diff --git a/pkg/providers/cps/resource_akamai_cps_dv_validation_test.go b/pkg/providers/cps/resource_akamai_cps_dv_validation_test.go index 0ed507011..31fd09e82 100644 --- a/pkg/providers/cps/resource_akamai_cps_dv_validation_test.go +++ b/pkg/providers/cps/resource_akamai_cps_dv_validation_test.go @@ -17,7 +17,7 @@ func TestDVValidation(t *testing.T) { client := &cps.Mock{} PollForChangeStatusInterval = 1 * time.Millisecond client.On("GetEnrollment", mock.Anything, cps.GetEnrollmentRequest{EnrollmentID: 1}). - Return(&cps.Enrollment{PendingChanges: []cps.PendingChange{ + Return(&cps.GetEnrollmentResponse{PendingChanges: []cps.PendingChange{ { Location: "/cps/v2/enrollments/1/changes/2", ChangeType: "new-certificate", @@ -42,7 +42,7 @@ func TestDVValidation(t *testing.T) { }).Return(nil) client.On("GetEnrollment", mock.Anything, cps.GetEnrollmentRequest{EnrollmentID: 1}). - Return(&cps.Enrollment{PendingChanges: []cps.PendingChange{ + Return(&cps.GetEnrollmentResponse{PendingChanges: []cps.PendingChange{ { Location: "/cps/v2/enrollments/1/changes/2", ChangeType: "new-certificate", @@ -56,7 +56,7 @@ func TestDVValidation(t *testing.T) { }}, nil).Times(3) client.On("GetEnrollment", mock.Anything, cps.GetEnrollmentRequest{EnrollmentID: 1}). - Return(&cps.Enrollment{PendingChanges: []cps.PendingChange{ + Return(&cps.GetEnrollmentResponse{PendingChanges: []cps.PendingChange{ { Location: "/cps/v2/enrollments/1/changes/2", ChangeType: "new-certificate", @@ -81,7 +81,7 @@ func TestDVValidation(t *testing.T) { }).Return(nil) client.On("GetEnrollment", mock.Anything, cps.GetEnrollmentRequest{EnrollmentID: 1}). - Return(&cps.Enrollment{PendingChanges: []cps.PendingChange{ + Return(&cps.GetEnrollmentResponse{PendingChanges: []cps.PendingChange{ { Location: "/cps/v2/enrollments/1/changes/2", ChangeType: "new-certificate", @@ -126,7 +126,7 @@ func TestDVValidation(t *testing.T) { client := &cps.Mock{} changeAckRetryInterval = 1 * time.Millisecond client.On("GetEnrollment", mock.Anything, cps.GetEnrollmentRequest{EnrollmentID: 1}). - Return(&cps.Enrollment{PendingChanges: []cps.PendingChange{ + Return(&cps.GetEnrollmentResponse{PendingChanges: []cps.PendingChange{ { Location: "/cps/v2/enrollments/1/changes/2", ChangeType: "new-certificate", @@ -152,7 +152,7 @@ func TestDVValidation(t *testing.T) { }).Return(nil).Once() client.On("GetEnrollment", mock.Anything, cps.GetEnrollmentRequest{EnrollmentID: 1}). - Return(&cps.Enrollment{PendingChanges: []cps.PendingChange{ + Return(&cps.GetEnrollmentResponse{PendingChanges: []cps.PendingChange{ { Location: "/cps/v2/enrollments/1/changes/2", ChangeType: "new-certificate", @@ -186,7 +186,7 @@ func TestDVValidation(t *testing.T) { client := &cps.Mock{} changeAckRetryInterval = 1 * time.Millisecond client.On("GetEnrollment", mock.Anything, cps.GetEnrollmentRequest{EnrollmentID: 1}). - Return(&cps.Enrollment{PendingChanges: []cps.PendingChange{ + Return(&cps.GetEnrollmentResponse{PendingChanges: []cps.PendingChange{ { Location: "/cps/v2/enrollments/1/changes/2", ChangeType: "new-certificate", diff --git a/pkg/providers/cps/resource_akamai_cps_third_party_enrollment.go b/pkg/providers/cps/resource_akamai_cps_third_party_enrollment.go index c9c236788..1ba99ce72 100644 --- a/pkg/providers/cps/resource_akamai_cps_third_party_enrollment.go +++ b/pkg/providers/cps/resource_akamai_cps_third_party_enrollment.go @@ -208,20 +208,20 @@ func resourceCPSThirdPartyEnrollmentCreate(ctx context.Context, d *schema.Resour return diag.FromErr(err) } - enrollment, err := prepareThirdPartyEnrollment(d) + enrollmentReqBody, err := prepareThirdPartyEnrollment(d) if err != nil { return diag.FromErr(err) } // save ClientMutualAuthentication and unset it in enrollment request struct // create request must not have it set; in case its not nil, we will run update later to add it - clientMutualAuthentication := enrollment.NetworkConfiguration.ClientMutualAuthentication - enrollment.NetworkConfiguration.ClientMutualAuthentication = nil + clientMutualAuthentication := enrollmentReqBody.NetworkConfiguration.ClientMutualAuthentication + enrollmentReqBody.NetworkConfiguration.ClientMutualAuthentication = nil req := cps.CreateEnrollmentRequest{ - Enrollment: *enrollment, - ContractID: strings.TrimPrefix(contractID, "ctr_"), - AllowDuplicateCN: allowDuplicateCN, + EnrollmentRequestBody: *enrollmentReqBody, + ContractID: strings.TrimPrefix(contractID, "ctr_"), + AllowDuplicateCN: allowDuplicateCN, } res, err := client.CreateEnrollment(ctx, req) if err != nil { @@ -232,10 +232,10 @@ func resourceCPSThirdPartyEnrollmentCreate(ctx context.Context, d *schema.Resour // when clientMutualAuthentication was provided, insert it back to enrollment and send the update request if clientMutualAuthentication != nil { logger.Debug("Updating ClientMutualAuthentication configuration") - enrollment.NetworkConfiguration.ClientMutualAuthentication = clientMutualAuthentication + enrollmentReqBody.NetworkConfiguration.ClientMutualAuthentication = clientMutualAuthentication req := cps.UpdateEnrollmentRequest{ EnrollmentID: res.ID, - Enrollment: *enrollment, + EnrollmentRequestBody: *enrollmentReqBody, AllowCancelPendingChanges: ptr.To(true), } _, err := client.UpdateEnrollment(ctx, req) @@ -344,14 +344,14 @@ func resourceCPSThirdPartyEnrollmentUpdate(ctx context.Context, d *schema.Resour } return resourceCPSThirdPartyEnrollmentRead(ctx, d, m) } - enrollment, err := prepareThirdPartyEnrollment(d) + enrollmentReqBody, err := prepareThirdPartyEnrollment(d) if err != nil { return diag.FromErr(err) } allowCancel := true req := cps.UpdateEnrollmentRequest{ - Enrollment: *enrollment, + EnrollmentRequestBody: *enrollmentReqBody, EnrollmentID: enrollmentID, AllowCancelPendingChanges: &allowCancel, } @@ -367,8 +367,8 @@ func resourceCPSThirdPartyEnrollmentUpdate(ctx context.Context, d *schema.Resour return resourceCPSThirdPartyEnrollmentRead(ctx, d, m) } -func prepareThirdPartyEnrollment(d *schema.ResourceData) (*cps.Enrollment, error) { - enrollment := cps.Enrollment{ +func prepareThirdPartyEnrollment(d *schema.ResourceData) (*cps.EnrollmentRequestBody, error) { + enrollmentReqBody := cps.EnrollmentRequestBody{ CertificateType: "third-party", ValidationType: "third-party", RA: "third-party", @@ -382,7 +382,7 @@ func prepareThirdPartyEnrollment(d *schema.ResourceData) (*cps.Enrollment, error if err != nil { return nil, fmt.Errorf("'admin_contact' - %s", err) } - enrollment.AdminContact = adminContact + enrollmentReqBody.AdminContact = adminContact techContactSet, err := tf.GetSetValue("tech_contact", d) if err != nil { return nil, err @@ -391,52 +391,52 @@ func prepareThirdPartyEnrollment(d *schema.ResourceData) (*cps.Enrollment, error if err != nil { return nil, fmt.Errorf("'tech_contact' - %s", err) } - enrollment.TechContact = techContact + enrollmentReqBody.TechContact = techContact certificateChainType, err := tf.GetStringValue("certificate_chain_type", d) if err != nil && !errors.Is(err, tf.ErrNotFound) { return nil, err } - enrollment.CertificateChainType = certificateChainType + enrollmentReqBody.CertificateChainType = certificateChainType csr, err := cpstools.GetCSR(d) if err != nil { return nil, err } - enrollment.CSR = csr + enrollmentReqBody.CSR = csr // for third-party certificates, multi-stack it is always enabled - enrollment.EnableMultiStackedCertificates = true + enrollmentReqBody.EnableMultiStackedCertificates = true networkConfig, err := cpstools.GetNetworkConfig(d) if err != nil { return nil, err } - enrollment.NetworkConfiguration = networkConfig + enrollmentReqBody.NetworkConfiguration = networkConfig signatureAlgorithm, err := tf.GetStringValue("signature_algorithm", d) if err != nil && !errors.Is(err, tf.ErrNotFound) { return nil, err } - enrollment.SignatureAlgorithm = signatureAlgorithm + enrollmentReqBody.SignatureAlgorithm = signatureAlgorithm organization, err := cpstools.GetOrg(d) if err != nil { return nil, err } - enrollment.Org = organization + enrollmentReqBody.Org = organization changeManagement, err := tf.GetBoolValue("change_management", d) if err != nil { return nil, err } - enrollment.ChangeManagement = changeManagement + enrollmentReqBody.ChangeManagement = changeManagement excludeSANS, err := tf.GetBoolValue("exclude_sans", d) if err != nil { return nil, err } - enrollment.ThirdParty = &cps.ThirdParty{ + enrollmentReqBody.ThirdParty = &cps.ThirdParty{ ExcludeSANS: excludeSANS, } - return &enrollment, nil + return &enrollmentReqBody, nil } func resourceCPSThirdPartyEnrollmentDelete(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { diff --git a/pkg/providers/cps/resource_akamai_cps_third_party_enrollment_test.go b/pkg/providers/cps/resource_akamai_cps_third_party_enrollment_test.go index 906e45049..2bf7ac59d 100644 --- a/pkg/providers/cps/resource_akamai_cps_third_party_enrollment_test.go +++ b/pkg/providers/cps/resource_akamai_cps_third_party_enrollment_test.go @@ -21,12 +21,13 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { PollForChangeStatusInterval = 1 * time.Millisecond client := &cps.Mock{} enrollment := newEnrollment() + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", }, ).Return(&cps.CreateEnrollmentResponse{ ID: 1, @@ -85,7 +86,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { enrollmentUpdate := newEnrollment( WithBase(&enrollment), - WithUpdateFunc(func(e *cps.Enrollment) { + WithUpdateFunc(func(e *cps.GetEnrollmentResponse) { e.AdminContact.FirstName = "R5" e.AdminContact.LastName = "D5" e.CSR.SANS = []string{"san2.test.akamai.com", "san.test.akamai.com"} @@ -96,11 +97,12 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { }), ) + enrollmentUpdateReqBody := createEnrollmentReqBodyFromEnrollment(enrollmentUpdate) allowCancel := true client.On("UpdateEnrollment", mock.Anything, cps.UpdateEnrollmentRequest{ - Enrollment: enrollmentUpdate, + EnrollmentRequestBody: enrollmentUpdateReqBody, EnrollmentID: 1, AllowCancelPendingChanges: &allowCancel, }, @@ -169,12 +171,13 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { WithCN(commonName), WithEmptySans, ) + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", }, ).Return(&cps.CreateEnrollmentResponse{ ID: 1, @@ -231,11 +234,12 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { WithSans(commonName), ) + enrollmentUpdateReqBody := createEnrollmentReqBodyFromEnrollment(enrollmentUpdate) allowCancel := true client.On("UpdateEnrollment", mock.Anything, cps.UpdateEnrollmentRequest{ - Enrollment: enrollmentUpdate, + EnrollmentRequestBody: enrollmentUpdateReqBody, EnrollmentID: 1, AllowCancelPendingChanges: &allowCancel, }, @@ -297,12 +301,13 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { client := &cps.Mock{} enrollment := newEnrollment(WithEmptySans) + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", }, ).Return(&cps.CreateEnrollmentResponse{ ID: 1, @@ -383,12 +388,13 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { PollForChangeStatusInterval = 1 * time.Millisecond client := &cps.Mock{} enrollment := newEnrollment(WithEmptySans) + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", }, ).Return(&cps.CreateEnrollmentResponse{ ID: 1, @@ -408,12 +414,13 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { SetID: "12345", }), ) + enrollmentUpdateReqBody := createEnrollmentReqBodyFromEnrollment(enrollmentUpdate) client.On("UpdateEnrollment", mock.Anything, cps.UpdateEnrollmentRequest{ EnrollmentID: 1, - Enrollment: enrollmentUpdate, + EnrollmentRequestBody: enrollmentUpdateReqBody, AllowCancelPendingChanges: ptr.To(true), }, ).Return(&cps.UpdateEnrollmentResponse{ @@ -502,12 +509,13 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { WithCN(commonName), WithSans(commonName, "san.test.akamai.com"), ) + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", }, ).Return(&cps.CreateEnrollmentResponse{ ID: 1, @@ -597,12 +605,13 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { WithCN(commonName), WithSans("san.test.akamai.com"), ) + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", }, ).Return(&cps.CreateEnrollmentResponse{ ID: 1, @@ -692,12 +701,13 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { t.Run("set challenges arrays to empty if no allowedInput found", func(t *testing.T) { client := &cps.Mock{} enrollment := getSimpleEnrollment() + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", }, ).Return(&cps.CreateEnrollmentResponse{ ID: 1, @@ -753,7 +763,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { client := &cps.Mock{} enrollment := newEnrollment( WithEmptySans, - WithUpdateFunc(func(e *cps.Enrollment) { + WithUpdateFunc(func(e *cps.GetEnrollmentResponse) { e.NetworkConfiguration = &cps.NetworkConfiguration{ DNSNameSettings: &cps.DNSNameSettings{ CloneDNSNames: false, @@ -764,12 +774,13 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { } }), ) + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", }, ).Return(&cps.CreateEnrollmentResponse{ ID: 1, @@ -851,7 +862,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { PollForChangeStatusInterval = 1 * time.Millisecond enrollment := newEnrollment( WithEmptySans, - WithUpdateFunc(func(e *cps.Enrollment) { + WithUpdateFunc(func(e *cps.GetEnrollmentResponse) { e.NetworkConfiguration = &cps.NetworkConfiguration{ DNSNameSettings: &cps.DNSNameSettings{ CloneDNSNames: false, @@ -862,12 +873,13 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { } }), ) + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", }, ).Return(&cps.CreateEnrollmentResponse{ ID: 1, @@ -953,13 +965,14 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { PollForChangeStatusInterval = 1 * time.Millisecond client := &cps.Mock{} enrollment := newEnrollment(WithEmptySans) + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", - AllowDuplicateCN: true, + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", + AllowDuplicateCN: true, }, ).Return(&cps.CreateEnrollmentResponse{ ID: 1, @@ -1043,7 +1056,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { PollForChangeStatusInterval = 1 * time.Millisecond enrollment := newEnrollment( WithEmptySans, - WithUpdateFunc(func(e *cps.Enrollment) { + WithUpdateFunc(func(e *cps.GetEnrollmentResponse) { e.NetworkConfiguration = &cps.NetworkConfiguration{ DNSNameSettings: &cps.DNSNameSettings{ CloneDNSNames: false, @@ -1054,12 +1067,13 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { } }), ) + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", }, ).Return(&cps.CreateEnrollmentResponse{ ID: 1, @@ -1115,7 +1129,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { PollForChangeStatusInterval = 1 * time.Millisecond enrollment := newEnrollment( WithEmptySans, - WithUpdateFunc(func(e *cps.Enrollment) { + WithUpdateFunc(func(e *cps.GetEnrollmentResponse) { e.NetworkConfiguration = &cps.NetworkConfiguration{ DNSNameSettings: &cps.DNSNameSettings{ CloneDNSNames: false, @@ -1126,12 +1140,13 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { } }), ) + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", }, ).Return(nil, fmt.Errorf("error creating enrollment")).Once() @@ -1155,7 +1170,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { PollForChangeStatusInterval = 1 * time.Millisecond enrollment := newEnrollment( WithEmptySans, - WithUpdateFunc(func(e *cps.Enrollment) { + WithUpdateFunc(func(e *cps.GetEnrollmentResponse) { e.NetworkConfiguration = &cps.NetworkConfiguration{ DNSNameSettings: &cps.DNSNameSettings{ CloneDNSNames: false, @@ -1166,12 +1181,13 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { } }), ) + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", }, ).Return(&cps.CreateEnrollmentResponse{ ID: 1, @@ -1259,7 +1275,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { PollForChangeStatusInterval = 1 * time.Millisecond enrollment := newEnrollment( WithEmptySans, - WithUpdateFunc(func(e *cps.Enrollment) { + WithUpdateFunc(func(e *cps.GetEnrollmentResponse) { e.NetworkConfiguration = &cps.NetworkConfiguration{ DNSNameSettings: &cps.DNSNameSettings{ CloneDNSNames: false, @@ -1270,12 +1286,13 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { } }), ) + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", }, ).Return(&cps.CreateEnrollmentResponse{ ID: 1, @@ -1331,7 +1348,7 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { PollForChangeStatusInterval = 1 * time.Millisecond enrollment := newEnrollment( WithEmptySans, - WithUpdateFunc(func(e *cps.Enrollment) { + WithUpdateFunc(func(e *cps.GetEnrollmentResponse) { e.NetworkConfiguration = &cps.NetworkConfiguration{ DNSNameSettings: &cps.DNSNameSettings{ CloneDNSNames: false, @@ -1342,12 +1359,13 @@ func TestResourceThirdPartyEnrollment(t *testing.T) { } }), ) + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", }, ).Return(&cps.CreateEnrollmentResponse{ ID: 1, @@ -1411,7 +1429,7 @@ func TestResourceThirdPartyEnrollmentImport(t *testing.T) { id := "1,ctr_1" enrollment := newEnrollment( WithEmptySans, - WithUpdateFunc(func(e *cps.Enrollment) { + WithUpdateFunc(func(e *cps.GetEnrollmentResponse) { e.NetworkConfiguration = &cps.NetworkConfiguration{ DNSNameSettings: &cps.DNSNameSettings{ CloneDNSNames: false, @@ -1422,12 +1440,13 @@ func TestResourceThirdPartyEnrollmentImport(t *testing.T) { } }), ) + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", }, ).Return(&cps.CreateEnrollmentResponse{ ID: 1, @@ -1502,7 +1521,7 @@ func TestResourceThirdPartyEnrollmentImport(t *testing.T) { client := &cps.Mock{} id := "1,ctr_1" - enrollment := cps.Enrollment{ + enrollment := cps.GetEnrollmentResponse{ ValidationType: "dv", } @@ -1531,12 +1550,13 @@ func TestSuppressingSignatureAlgorithm(t *testing.T) { PollForChangeStatusInterval = 1 * time.Millisecond client := &cps.Mock{} enrollment := getSimpleEnrollment() + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: enrollment, - ContractID: "1", + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", }, ).Return(&cps.CreateEnrollmentResponse{ ID: 1, @@ -1565,7 +1585,7 @@ func TestSuppressingSignatureAlgorithm(t *testing.T) { Return(&enrollmentGet, nil).Times(3) enrollmentUpdate := newEnrollment(WithBase(&enrollment), - WithUpdateFunc(func(e *cps.Enrollment) { + WithUpdateFunc(func(e *cps.GetEnrollmentResponse) { e.AdminContact.FirstName = "R5" e.AdminContact.LastName = "D5" e.CSR.SANS = []string{"san2.test.akamai.com", "san.test.akamai.com"} @@ -1575,11 +1595,12 @@ func TestSuppressingSignatureAlgorithm(t *testing.T) { e.SignatureAlgorithm = "" }), ) + enrollmentUpdateReqBody := createEnrollmentReqBodyFromEnrollment(enrollmentUpdate) allowCancel := true client.On("UpdateEnrollment", mock.Anything, cps.UpdateEnrollmentRequest{ - Enrollment: enrollmentUpdate, + EnrollmentRequestBody: enrollmentUpdateReqBody, EnrollmentID: 1, AllowCancelPendingChanges: &allowCancel, }, @@ -1637,8 +1658,8 @@ func TestSuppressingSignatureAlgorithm(t *testing.T) { }) } -func getSimpleEnrollment() cps.Enrollment { - return cps.Enrollment{ +func getSimpleEnrollment() cps.GetEnrollmentResponse { + return cps.GetEnrollmentResponse{ AdminContact: &cps.Contact{ AddressLineOne: "150 Broadway", City: "Cambridge", @@ -1709,12 +1730,12 @@ func getSimpleEnrollment() cps.Enrollment { } type enrolOpt interface { - apply(*cps.Enrollment) + apply(response *cps.GetEnrollmentResponse) } type withPendingChangeID int -func (w withPendingChangeID) apply(e *cps.Enrollment) { +func (w withPendingChangeID) apply(e *cps.GetEnrollmentResponse) { e.Location = "/cps/v2/enrollments/1" e.PendingChanges = []cps.PendingChange{ { @@ -1729,37 +1750,37 @@ func WithPendingChangeID(id int) enrolOpt { type withCN string -func (w withCN) apply(e *cps.Enrollment) { +func (w withCN) apply(e *cps.GetEnrollmentResponse) { e.CSR.CN = string(w) } func WithCN(cn string) enrolOpt { return withCN(cn) } -type withFunc func(*cps.Enrollment) +type withFunc func(response *cps.GetEnrollmentResponse) -func (w withFunc) apply(e *cps.Enrollment) { +func (w withFunc) apply(e *cps.GetEnrollmentResponse) { w(e) } -func WithUpdateFunc(f func(*cps.Enrollment)) enrolOpt { +func WithUpdateFunc(f func(response *cps.GetEnrollmentResponse)) enrolOpt { return withFunc(f) } type withMTLS cps.ClientMutualAuthentication -func (w withMTLS) apply(e *cps.Enrollment) { +func (w withMTLS) apply(e *cps.GetEnrollmentResponse) { e.NetworkConfiguration.ClientMutualAuthentication = (*cps.ClientMutualAuthentication)(&w) } func WithMTLS(mtls cps.ClientMutualAuthentication) enrolOpt { return withMTLS(mtls) } -type withBase cps.Enrollment +type withBase cps.GetEnrollmentResponse -func (w withBase) apply(e *cps.Enrollment) { - *e = (cps.Enrollment)(w) +func (w withBase) apply(e *cps.GetEnrollmentResponse) { + *e = (cps.GetEnrollmentResponse)(w) } -func WithBase(e *cps.Enrollment) enrolOpt { +func WithBase(e *cps.GetEnrollmentResponse) enrolOpt { var newEn cps.Enrollment err := copier.CopyWithOption(&newEn, e, copier.Option{DeepCopy: true, IgnoreEmpty: true}) if err != nil { @@ -1770,7 +1791,7 @@ func WithBase(e *cps.Enrollment) enrolOpt { type withSans []string -func (w withSans) apply(e *cps.Enrollment) { +func (w withSans) apply(e *cps.GetEnrollmentResponse) { e.CSR.SANS = w e.NetworkConfiguration.DNSNameSettings.DNSNames = w } @@ -1783,7 +1804,7 @@ func WithSans(sans ...string) enrolOpt { var WithEmptySans = WithSans() -func newEnrollment(opts ...enrolOpt) cps.Enrollment { +func newEnrollment(opts ...enrolOpt) cps.GetEnrollmentResponse { enrollment := getSimpleEnrollment() for _, o := range opts { o.apply(&enrollment) diff --git a/pkg/providers/cps/resource_akamai_cps_upload_certificate_test.go b/pkg/providers/cps/resource_akamai_cps_upload_certificate_test.go index e05343611..c9d83b45a 100644 --- a/pkg/providers/cps/resource_akamai_cps_upload_certificate_test.go +++ b/pkg/providers/cps/resource_akamai_cps_upload_certificate_test.go @@ -19,8 +19,8 @@ var someStatusPostReviewWarning = "live-check-action" func TestResourceCPSUploadCertificate(t *testing.T) { tests := map[string]struct { - init func(*testing.T, *cps.Mock, *cps.Enrollment, int, int) - enrollment *cps.Enrollment + init func(*testing.T, *cps.Mock, *cps.GetEnrollmentResponse, int, int) + enrollment *cps.GetEnrollmentResponse enrollmentID int changeID int configPathForCreate string @@ -30,7 +30,7 @@ func TestResourceCPSUploadCertificate(t *testing.T) { error *regexp.Regexp }{ "create with ch-mgmt false, update to true": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentID, changeID int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentID, changeID int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockCreateWithACKPostWarnings(m, enrollmentID, changeID, enrollment) mockReadAndCheckUnacknowledgedWarningsForUpdate(m, enrollmentID, changeID, enrollment, certRSAForTests, trustChainRSAForTests, RSA, waitAckChangeManagement) @@ -47,7 +47,7 @@ func TestResourceCPSUploadCertificate(t *testing.T) { error: nil, }, "create with ch-mgmt true, update to false": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentID, changeID int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentID, changeID int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockCreateWithACKPostWarnings(m, enrollmentID, changeID, enrollment) mockReadAndCheckUnacknowledgedWarningsForUpdate(m, enrollmentID, changeID, enrollment, certRSAForTests, trustChainRSAForTests, RSA, waitAckChangeManagement) @@ -95,8 +95,8 @@ func TestResourceCPSUploadCertificate(t *testing.T) { func TestResourceCPSUploadCertificateWithThirdPartyEnrollmentDependency(t *testing.T) { tests := map[string]struct { - init func(*testing.T, *cps.Mock, *cps.Enrollment, int, int) - enrollment cps.Enrollment + init func(*testing.T, *cps.Mock, *cps.GetEnrollmentResponse, int, int) + enrollment cps.GetEnrollmentResponse enrollmentID int changeID int configPath string @@ -104,13 +104,14 @@ func TestResourceCPSUploadCertificateWithThirdPartyEnrollmentDependency(t *testi error *regexp.Regexp }{ "create third_party_enrollment, create cps_upload_certificate with enrollment_id which is third_party_enrollment's resource dependency": { - init: func(t *testing.T, client *cps.Mock, enrollment *cps.Enrollment, enrollmentID, changeID int) { + init: func(t *testing.T, client *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentID, changeID int) { // Create third party enrollment + enrollmentReqBody := createEnrollmentReqBodyFromEnrollment(*enrollment) client.On("CreateEnrollment", mock.Anything, cps.CreateEnrollmentRequest{ - Enrollment: *enrollment, - ContractID: "1", + EnrollmentRequestBody: enrollmentReqBody, + ContractID: "1", }, ).Return(&cps.CreateEnrollmentResponse{ ID: enrollmentID, @@ -191,9 +192,9 @@ func TestResourceCPSUploadCertificateWithThirdPartyEnrollmentDependency(t *testi func TestResourceCPSUploadCertificateLifecycle(t *testing.T) { tests := map[string]struct { - init func(*testing.T, *cps.Mock, *cps.Enrollment, *cps.Enrollment, int, int, int) - enrollment *cps.Enrollment - enrollmentUpdated *cps.Enrollment + init func(*testing.T, *cps.Mock, *cps.GetEnrollmentResponse, *cps.GetEnrollmentResponse, int, int, int) + enrollment *cps.GetEnrollmentResponse + enrollmentUpdated *cps.GetEnrollmentResponse enrollmentID int changeID int changeIDUpdated int @@ -208,7 +209,7 @@ func TestResourceCPSUploadCertificateLifecycle(t *testing.T) { errorForSecondUpdate *regexp.Regexp }{ "create -> failed update after cert renewal due to missing post-ver-warnings -> update with accept all": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentUpdated *cps.Enrollment, enrollmentID, changeID, changeIDUpdated int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentUpdated *cps.GetEnrollmentResponse, enrollmentID, changeID, changeIDUpdated int) { // checkUnacknowledgedWarnings mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) // create @@ -308,8 +309,8 @@ func TestResourceCPSUploadCertificateLifecycle(t *testing.T) { func TestCreateCPSUploadCertificate(t *testing.T) { tests := map[string]struct { - init func(*testing.T, *cps.Mock, *cps.Enrollment, int, int) - enrollment *cps.Enrollment + init func(*testing.T, *cps.Mock, *cps.GetEnrollmentResponse, int, int) + enrollment *cps.GetEnrollmentResponse enrollmentID int changeID int configPath string @@ -317,7 +318,7 @@ func TestCreateCPSUploadCertificate(t *testing.T) { error *regexp.Regexp }{ "successful create - RSA cert": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentID, changeID int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentID, changeID int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockCreateWithACKPostWarnings(m, enrollmentID, changeID, enrollment) mockReadAndCheckUnacknowledgedWarnings(m, enrollmentID, changeID, enrollment, certRSAForTests, trustChainRSAForTests, RSA, waitAckChangeManagement) @@ -330,7 +331,7 @@ func TestCreateCPSUploadCertificate(t *testing.T) { error: nil, }, "successful create - ECDSA cert, without trust chain": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentID, changeID int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentID, changeID int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockGetEnrollment(m, enrollmentID, 1, enrollment) mockUploadThirdPartyCertificateAndTrustChain(m, ECDSA, certECDSAForTests, "", enrollmentID, changeID) @@ -348,7 +349,7 @@ func TestCreateCPSUploadCertificate(t *testing.T) { error: nil, }, "successful create - both cert and trust chains": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentID, changeID int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentID, changeID int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockGetEnrollment(m, enrollmentID, 1, enrollment) mockUploadBothThirdPartyCertificateAndTrustChain(m, @@ -381,7 +382,7 @@ func TestCreateCPSUploadCertificate(t *testing.T) { error: nil, }, "successful create - with timeout": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentID, changeID int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentID, changeID int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockCreateWithACKPostWarnings(m, enrollmentID, changeID, enrollment) mockReadAndCheckUnacknowledgedWarnings(m, enrollmentID, changeID, enrollment, certRSAForTests, trustChainRSAForTests, RSA, waitAckChangeManagement) @@ -394,7 +395,7 @@ func TestCreateCPSUploadCertificate(t *testing.T) { error: nil, }, "create: auto_approve_warnings match": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentID, changeID int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentID, changeID int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockCreateWithACKPostWarnings(m, enrollmentID, changeID, enrollment) mockReadAndCheckUnacknowledgedWarnings(m, enrollmentID, changeID, enrollment, certRSAForTests, trustChainRSAForTests, RSA, waitAckChangeManagement) @@ -407,7 +408,7 @@ func TestCreateCPSUploadCertificate(t *testing.T) { error: nil, }, "create: auto_approve_warnings missing warnings error": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentID, changeID int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentID, changeID int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockGetEnrollment(m, enrollmentID, 1, enrollment) mockUploadThirdPartyCertificateAndTrustChain(m, RSA, certRSAForTests, trustChainRSAForTests, enrollmentID, changeID) @@ -421,7 +422,7 @@ func TestCreateCPSUploadCertificate(t *testing.T) { error: regexp.MustCompile(`Error: could not process post verification warnings: not every warning has been acknowledged: warnings cannot be approved: "CERTIFICATE_HAS_NULL_ISSUER"`), }, "create: auto_approve_warnings not provided and empty warning list": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentID, changeID int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentID, changeID int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockCreateWithEmptyWarningList(m, enrollmentID, changeID, enrollment) mockReadAndCheckUnacknowledgedWarnings(m, enrollmentID, changeID, enrollment, certRSAForTests, trustChainRSAForTests, RSA, complete) @@ -434,14 +435,14 @@ func TestCreateCPSUploadCertificate(t *testing.T) { error: nil, }, "required attribute not provided": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, _, _ int) {}, + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, _, _ int) {}, enrollment: nil, configPath: "testdata/TestResCPSUploadCertificate/certificates/no_certificates.tf", checkFunc: nil, error: regexp.MustCompile("Error: Missing required argument"), }, "create: auto_approve_warnings not provided and not empty warning list": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentID, changeID int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentID, changeID int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockGetEnrollment(m, enrollmentID, 1, enrollment) mockUploadThirdPartyCertificateAndTrustChain(m, RSA, certRSAForTests, trustChainRSAForTests, enrollmentID, changeID) @@ -456,7 +457,7 @@ func TestCreateCPSUploadCertificate(t *testing.T) { error: regexp.MustCompile(`Error: could not process post verification warnings: not every warning has been acknowledged: warnings cannot be approved: "CERTIFICATE_KMI_DATA_MISSING"`), }, "create: auto_approve_warnings empty list and warnings": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentID, changeID int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentID, changeID int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockCreateWithEmptyWarningList(m, enrollmentID, changeID, enrollment) mockReadAndCheckUnacknowledgedWarnings(m, enrollmentID, changeID, enrollment, certRSAForTests, trustChainRSAForTests, RSA, complete) @@ -469,7 +470,7 @@ func TestCreateCPSUploadCertificate(t *testing.T) { error: nil, }, "create: change management wrong type": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentID, changeID int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentID, changeID int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockGetEnrollment(m, enrollmentID, 1, enrollment) mockUploadThirdPartyCertificateAndTrustChain(m, RSA, certRSAForTests, trustChainRSAForTests, enrollmentID, changeID) @@ -487,7 +488,7 @@ func TestCreateCPSUploadCertificate(t *testing.T) { error: nil, }, "create: change management set to false or not specified": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentID, changeID int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentID, changeID int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockGetEnrollment(m, enrollmentID, 1, enrollment) mockUploadThirdPartyCertificateAndTrustChain(m, RSA, certRSAForTests, trustChainRSAForTests, enrollmentID, changeID) @@ -503,7 +504,7 @@ func TestCreateCPSUploadCertificate(t *testing.T) { error: nil, }, "create: it takes some time to acknowledge warnings": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentID, changeID int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentID, changeID int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockGetEnrollment(m, enrollmentID, 1, enrollment) mockUploadThirdPartyCertificateAndTrustChain(m, RSA, certRSAForTests, "", enrollmentID, changeID) @@ -533,7 +534,7 @@ func TestCreateCPSUploadCertificate(t *testing.T) { error: nil, }, "create: trust chain without certificate": { - init: func(_ *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentID, changeID int) { + init: func(_ *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentID, changeID int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, complete) }, enrollment: createEnrollment(2, 22, true, true), @@ -544,7 +545,7 @@ func TestCreateCPSUploadCertificate(t *testing.T) { error: regexp.MustCompile("provided ECDSA trust chain without ECDSA certificate. Please remove it or add a certificate"), }, "create: get enrollment error": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentID, changeID int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentID, changeID int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) m.On("GetEnrollment", mock.Anything, cps.GetEnrollmentRequest{ EnrollmentID: enrollmentID, @@ -558,7 +559,7 @@ func TestCreateCPSUploadCertificate(t *testing.T) { error: regexp.MustCompile("could not get an enrollment"), }, "create: upload third party cert error": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentID, changeID int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentID, changeID int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockGetEnrollment(m, enrollmentID, 1, enrollment) m.On("UploadThirdPartyCertAndTrustChain", mock.Anything, cps.UploadThirdPartyCertAndTrustChainRequest{ @@ -583,7 +584,7 @@ func TestCreateCPSUploadCertificate(t *testing.T) { error: regexp.MustCompile("could not upload a certificate"), }, "create: get change post verification warnings error": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentID, changeID int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentID, changeID int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockGetEnrollment(m, enrollmentID, 1, enrollment) mockUploadThirdPartyCertificateAndTrustChain(m, RSA, certRSAForTests, trustChainRSAForTests, enrollmentID, changeID) @@ -601,7 +602,7 @@ func TestCreateCPSUploadCertificate(t *testing.T) { error: regexp.MustCompile("could not get change post verification warnings"), }, "create: acknowledge post verification warnings error": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentID, changeID int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentID, changeID int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockGetEnrollment(m, enrollmentID, 1, enrollment) mockUploadThirdPartyCertificateAndTrustChain(m, RSA, certRSAForTests, trustChainRSAForTests, enrollmentID, changeID) @@ -621,7 +622,7 @@ func TestCreateCPSUploadCertificate(t *testing.T) { error: regexp.MustCompile("could not acknowledge post verification warnings"), }, "create: get change status error": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentID, changeID int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentID, changeID int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockCreateWithACKPostWarnings(m, enrollmentID, changeID, enrollment) m.On("GetChangeStatus", mock.Anything, cps.GetChangeStatusRequest{ @@ -637,7 +638,7 @@ func TestCreateCPSUploadCertificate(t *testing.T) { error: regexp.MustCompile("could not get change status"), }, "create: acknowledge change management error": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentID, changeID int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentID, changeID int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockCreateWithACKPostWarnings(m, enrollmentID, changeID, enrollment) mockGetChangeStatus(m, enrollmentID, changeID, 1, waitAckChangeManagement) @@ -655,7 +656,7 @@ func TestCreateCPSUploadCertificate(t *testing.T) { error: regexp.MustCompile("could not acknowledge change management"), }, "create: no pending changes error": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentID, changeID int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentID, changeID int) { mockGetEnrollment(m, enrollmentID, 4, enrollment) }, enrollment: createEnrollment(2, 22, true, false), @@ -691,8 +692,8 @@ func TestCreateCPSUploadCertificate(t *testing.T) { func TestReadCPSUploadCertificate(t *testing.T) { tests := map[string]struct { - init func(*testing.T, *cps.Mock, *cps.Enrollment, int, int) - enrollment *cps.Enrollment + init func(*testing.T, *cps.Mock, *cps.GetEnrollmentResponse, int, int) + enrollment *cps.GetEnrollmentResponse enrollmentID int changeID int configPath string @@ -700,7 +701,7 @@ func TestReadCPSUploadCertificate(t *testing.T) { error *regexp.Regexp }{ "read: get change history": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentID, changeID int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentID, changeID int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockCreateWithACKPostWarnings(m, enrollmentID, changeID, enrollment) mockGetChangeStatus(m, enrollmentID, changeID, 1, waitAckChangeManagement) @@ -721,7 +722,7 @@ func TestReadCPSUploadCertificate(t *testing.T) { error: nil, }, "read: get change history with wait-upload-third-party-status": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentID, changeID int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentID, changeID int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockCreateWithACKPostWarnings(m, enrollmentID, changeID, enrollment) mockGetChangeStatus(m, enrollmentID, changeID, 1, waitAckChangeManagement) @@ -743,7 +744,7 @@ func TestReadCPSUploadCertificate(t *testing.T) { error: nil, }, "read: get change history with correct change": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentID, changeID int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentID, changeID int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockCreateWithACKPostWarnings(m, enrollmentID, changeID, enrollment) mockGetChangeStatus(m, enrollmentID, changeID, 1, waitAckChangeManagement) @@ -762,7 +763,7 @@ func TestReadCPSUploadCertificate(t *testing.T) { checkFunc: checkAttrs(createMockData("", "", certRSAForTests, trustChainRSAForTests, true, true, false, false, nil)), }, "read: get change history error": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentID, changeID int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentID, changeID int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockCreateWithACKPostWarnings(m, enrollmentID, changeID, enrollment) mockGetChangeStatus(m, enrollmentID, changeID, 1, waitAckChangeManagement) @@ -806,9 +807,9 @@ func TestReadCPSUploadCertificate(t *testing.T) { func TestUpdateCPSUploadCertificate(t *testing.T) { tests := map[string]struct { - init func(*testing.T, *cps.Mock, *cps.Enrollment, *cps.Enrollment, int, int, int) - enrollment *cps.Enrollment - enrollmentUpdated *cps.Enrollment + init func(*testing.T, *cps.Mock, *cps.GetEnrollmentResponse, *cps.GetEnrollmentResponse, int, int, int) + enrollment *cps.GetEnrollmentResponse + enrollmentUpdated *cps.GetEnrollmentResponse enrollmentID int changeID int changeIDUpdated int @@ -820,7 +821,7 @@ func TestUpdateCPSUploadCertificate(t *testing.T) { errorForUpdate *regexp.Regexp }{ "update: ignore change to acknowledge post verification warnings flag": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentUpdated *cps.Enrollment, enrollmentID, changeID, changeIDUpdated int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentUpdated *cps.GetEnrollmentResponse, enrollmentID, changeID, changeIDUpdated int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockGetEnrollment(m, enrollmentID, 1, enrollment) mockUploadThirdPartyCertificateAndTrustChain(m, RSA, certRSAForTests, trustChainRSAForTests, enrollmentID, changeID) @@ -844,7 +845,7 @@ func TestUpdateCPSUploadCertificate(t *testing.T) { errorForUpdate: nil, }, "update: ignore change to auto_approve_warnings list": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentUpdated *cps.Enrollment, enrollmentID, changeID, changeIDUpdated int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentUpdated *cps.GetEnrollmentResponse, enrollmentID, changeID, changeIDUpdated int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockGetEnrollment(m, enrollmentID, 1, enrollment) mockUploadThirdPartyCertificateAndTrustChain(m, RSA, certRSAForTests, trustChainRSAForTests, enrollmentID, changeID) @@ -868,7 +869,7 @@ func TestUpdateCPSUploadCertificate(t *testing.T) { errorForUpdate: nil, }, "update: ignore ack change management set to false - warn": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentUpdated *cps.Enrollment, enrollmentID, changeID, changeIDUpdated int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentUpdated *cps.GetEnrollmentResponse, enrollmentID, changeID, changeIDUpdated int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockCreateWithACKPostWarnings(m, enrollmentID, changeID, enrollment) mockGetChangeStatus(m, enrollmentID, changeID, 1, waitAckChangeManagement) @@ -890,7 +891,7 @@ func TestUpdateCPSUploadCertificate(t *testing.T) { errorForUpdate: nil, }, "update: change in cert - upsert without trust chain": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentUpdated *cps.Enrollment, enrollmentID, changeID, changeIDUpdated int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentUpdated *cps.GetEnrollmentResponse, enrollmentID, changeID, changeIDUpdated int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockCreateWithACKPostWarnings(m, enrollmentID, changeID, enrollment) mockGetChangeStatus(m, enrollmentID, changeID, 1, waitAckChangeManagement) @@ -919,7 +920,7 @@ func TestUpdateCPSUploadCertificate(t *testing.T) { errorForUpdate: nil, }, "update: change in cert - upsert with both certs and trust chains": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentUpdated *cps.Enrollment, enrollmentID, changeID, changeIDUpdated int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentUpdated *cps.GetEnrollmentResponse, enrollmentID, changeID, changeIDUpdated int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockCreateWithACKPostWarnings(m, enrollmentID, changeID, enrollment) mockGetChangeStatus(m, enrollmentID, changeID, 1, waitAckChangeManagement) @@ -953,7 +954,7 @@ func TestUpdateCPSUploadCertificate(t *testing.T) { errorForUpdate: nil, }, "update: renewal with old certificate - api error": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentUpdated *cps.Enrollment, enrollmentID, changeID, changeIDUpdated int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentUpdated *cps.GetEnrollmentResponse, enrollmentID, changeID, changeIDUpdated int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockCreateWithACKPostWarnings(m, enrollmentID, changeID, enrollment) mockGetChangeStatus(m, enrollmentID, changeID, 1, waitAckChangeManagement) @@ -993,7 +994,7 @@ func TestUpdateCPSUploadCertificate(t *testing.T) { errorForUpdate: regexp.MustCompile("provided certificate is wrong"), }, "update: change in already deployed certificate; no pending changes - error": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentUpdated *cps.Enrollment, enrollmentID, changeID, changeIDUpdated int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentUpdated *cps.GetEnrollmentResponse, enrollmentID, changeID, changeIDUpdated int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockCreateWithACKPostWarnings(m, enrollmentID, changeID, enrollment) mockGetChangeStatus(m, enrollmentID, changeID, 1, waitAckChangeManagement) @@ -1012,7 +1013,7 @@ func TestUpdateCPSUploadCertificate(t *testing.T) { errorForUpdate: regexp.MustCompile("Error: cannot make changes to certificate that is already on staging and/or production network, need to create new enrollment"), }, "update: change in certificate with pending changes and wrong status - error": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentUpdated *cps.Enrollment, enrollmentID, changeID, changeIDUpdated int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentUpdated *cps.GetEnrollmentResponse, enrollmentID, changeID, changeIDUpdated int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockCreateWithACKPostWarnings(m, enrollmentID, changeID, enrollment) mockGetChangeStatus(m, enrollmentID, changeID, 1, waitAckChangeManagement) @@ -1031,7 +1032,7 @@ func TestUpdateCPSUploadCertificate(t *testing.T) { errorForUpdate: regexp.MustCompile("Error: cannot make changes to the certificate with current status: wait-ack-change-management"), }, "update: get enrollment error": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentUpdated *cps.Enrollment, enrollmentID, changeID, changeIDUpdated int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentUpdated *cps.GetEnrollmentResponse, enrollmentID, changeID, changeIDUpdated int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockCreateWithACKPostWarnings(m, enrollmentID, changeID, enrollment) mockGetChangeStatus(m, enrollmentID, changeID, 1, waitAckChangeManagement) @@ -1051,7 +1052,7 @@ func TestUpdateCPSUploadCertificate(t *testing.T) { errorForUpdate: regexp.MustCompile("could not get an enrollment"), }, "update: get change status error": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentUpdated *cps.Enrollment, enrollmentID, changeID, changeIDUpdated int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentUpdated *cps.GetEnrollmentResponse, enrollmentID, changeID, changeIDUpdated int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockCreateWithACKPostWarnings(m, enrollmentID, changeID, enrollment) mockReadAndCheckUnacknowledgedWarningsForUpdate(m, enrollmentID, changeID, enrollment, certRSAForTests, trustChainRSAForTests, RSA, complete) @@ -1071,7 +1072,7 @@ func TestUpdateCPSUploadCertificate(t *testing.T) { errorForUpdate: regexp.MustCompile("could not get change status"), }, "update: acknowledge change management error": { - init: func(t *testing.T, m *cps.Mock, enrollment *cps.Enrollment, enrollmentUpdated *cps.Enrollment, enrollmentID, changeID, changeIDUpdated int) { + init: func(t *testing.T, m *cps.Mock, enrollment *cps.GetEnrollmentResponse, enrollmentUpdated *cps.GetEnrollmentResponse, enrollmentID, changeID, changeIDUpdated int) { mockCheckUnacknowledgedWarnings(m, enrollmentID, changeID, 3, enrollment, waitUploadThirdParty) mockCreateWithACKPostWarnings(m, enrollmentID, changeID, enrollment) mockReadAndCheckUnacknowledgedWarningsForUpdate(m, enrollmentID, changeID, enrollment, certRSAForTests, trustChainRSAForTests, RSA, waitAckChangeManagement) @@ -1132,7 +1133,7 @@ func TestResourceUploadCertificateImport(t *testing.T) { }{ "import": { init: func(client *cps.Mock) { - enrollment := cps.Enrollment{ + enrollment := cps.GetEnrollmentResponse{ ValidationType: "third-party", } @@ -1152,7 +1153,7 @@ func TestResourceUploadCertificateImport(t *testing.T) { }, "import error when validation type is not third_party": { init: func(client *cps.Mock) { - enrollment := cps.Enrollment{ + enrollment := cps.GetEnrollmentResponse{ ValidationType: "dv", } @@ -1162,7 +1163,7 @@ func TestResourceUploadCertificateImport(t *testing.T) { }, "import error when no certificate yet uploaded": { init: func(client *cps.Mock) { - enrollment := cps.Enrollment{ + enrollment := cps.GetEnrollmentResponse{ ValidationType: "third-party", } @@ -1220,7 +1221,7 @@ var ( fourWarnings = "Certificate Added to the new Trust Chain: TEST\nThere is a problem deploying the 'RSA' certificate. Please contact your Akamai support team to resolve the issue.\nCertificate data is blank or missing.\nCertificate has a null issuer" // createEnrollment returns third-party enrollment with provided values - createEnrollment = func(enrollmentID, changeID int, changeManagement, pendingChangesPresent bool) *cps.Enrollment { + createEnrollment = func(enrollmentID, changeID int, changeManagement, pendingChangesPresent bool) *cps.GetEnrollmentResponse { pendingChanges := []cps.PendingChange{ { Location: fmt.Sprintf("/cps/v2/enrollments/%d/changes/%d", enrollmentID, changeID), @@ -1230,7 +1231,7 @@ var ( if !pendingChangesPresent { pendingChanges = []cps.PendingChange{} } - return &cps.Enrollment{ + return &cps.GetEnrollmentResponse{ AdminContact: &cps.Contact{ AddressLineOne: "150 Broadway", City: "Cambridge", @@ -1320,7 +1321,7 @@ var ( } // mockCreateWithEmptyWarningList mocks getting empty warnings list from API - mockCreateWithEmptyWarningList = func(client *cps.Mock, enrollmentID, changeID int, enrollment *cps.Enrollment) { + mockCreateWithEmptyWarningList = func(client *cps.Mock, enrollmentID, changeID int, enrollment *cps.GetEnrollmentResponse) { mockGetEnrollment(client, enrollmentID, 1, enrollment) enrollment.PendingChanges = []cps.PendingChange{ { @@ -1336,7 +1337,7 @@ var ( } // mockUpdate mocks default approach when updating the resource - mockUpdate = func(client *cps.Mock, enrollmentID, changeID int, enrollment *cps.Enrollment) { + mockUpdate = func(client *cps.Mock, enrollmentID, changeID int, enrollment *cps.GetEnrollmentResponse) { mockGetEnrollment(client, enrollmentID, 1, enrollment) enrollment.PendingChanges = []cps.PendingChange{ { @@ -1350,7 +1351,7 @@ var ( } // mockCreateWithACKPostWarnings mocks acknowledging post verification warnings along with creation of the resource - mockCreateWithACKPostWarnings = func(client *cps.Mock, enrollmentID, changeID int, enrollment *cps.Enrollment) { + mockCreateWithACKPostWarnings = func(client *cps.Mock, enrollmentID, changeID int, enrollment *cps.GetEnrollmentResponse) { mockGetEnrollment(client, enrollmentID, 1, enrollment) enrollment.PendingChanges = []cps.PendingChange{ { @@ -1366,7 +1367,7 @@ var ( } // mockReadAndCheckUnacknowledgedWarnings mocks Read and CustomDiff functions - mockReadAndCheckUnacknowledgedWarnings = func(client *cps.Mock, enrollmentID, changeID int, enrollment *cps.Enrollment, certificate, trustChain, keyAlgorithm, status string) { + mockReadAndCheckUnacknowledgedWarnings = func(client *cps.Mock, enrollmentID, changeID int, enrollment *cps.GetEnrollmentResponse, certificate, trustChain, keyAlgorithm, status string) { mockReadGetChangeHistory(client, enrollment, certificate, trustChain, keyAlgorithm, enrollmentID, 1) mockCheckUnacknowledgedWarnings(client, enrollmentID, changeID, 1, enrollment, status) mockReadGetChangeHistory(client, enrollment, certificate, trustChain, keyAlgorithm, enrollmentID, 1) @@ -1374,7 +1375,7 @@ var ( } // mockReadAndCheckUnacknowledgedWarningsForUpdate mocks Read and CustomDiff functions during Update - mockReadAndCheckUnacknowledgedWarningsForUpdate = func(client *cps.Mock, enrollmentID, changeID int, enrollment *cps.Enrollment, certificate, trustChain, keyAlgorithm, status string) { + mockReadAndCheckUnacknowledgedWarningsForUpdate = func(client *cps.Mock, enrollmentID, changeID int, enrollment *cps.GetEnrollmentResponse, certificate, trustChain, keyAlgorithm, status string) { mockReadGetChangeHistory(client, enrollment, certificate, trustChain, keyAlgorithm, enrollmentID, 1) mockCheckUnacknowledgedWarnings(client, enrollmentID, changeID, 1, enrollment, status) mockReadGetChangeHistory(client, enrollment, certificate, trustChain, keyAlgorithm, enrollmentID, 1) @@ -1384,13 +1385,13 @@ var ( } // mockReadGetChangeHistory mocks GetChangeHistory call with provided values - mockReadGetChangeHistory = func(client *cps.Mock, enrollment *cps.Enrollment, certificate, trustChain, keyAlgorithm string, enrollmentID, timesToRun int) { + mockReadGetChangeHistory = func(client *cps.Mock, enrollment *cps.GetEnrollmentResponse, certificate, trustChain, keyAlgorithm string, enrollmentID, timesToRun int) { mockGetEnrollment(client, enrollmentID, timesToRun, enrollment) mockGetChangeHistory(client, enrollmentID, timesToRun, enrollment, keyAlgorithm, certificate, trustChain) } // mockGetChangeHistory mocks GetChangeHistory call with provided data - mockGetChangeHistory = func(client *cps.Mock, enrollmentID, timesToRun int, enrollment *cps.Enrollment, keyAlgorithm, certificate, trustChain string) { + mockGetChangeHistory = func(client *cps.Mock, enrollmentID, timesToRun int, enrollment *cps.GetEnrollmentResponse, keyAlgorithm, certificate, trustChain string) { client.On("GetChangeHistory", mock.Anything, cps.GetChangeHistoryRequest{ EnrollmentID: enrollmentID, }).Return(&cps.GetChangeHistoryResponse{ @@ -1436,7 +1437,7 @@ var ( } // mockGetChangeHistoryBothCerts mocks GetChangeHistory call with provided data for both certs - mockGetChangeHistoryBothCerts = func(client *cps.Mock, enrollmentID, timesToRun int, enrollment *cps.Enrollment, keyAlgorithm, certificate, trustChain, keyAlgorithm2, certificate2, trustChain2 string) { + mockGetChangeHistoryBothCerts = func(client *cps.Mock, enrollmentID, timesToRun int, enrollment *cps.GetEnrollmentResponse, keyAlgorithm, certificate, trustChain, keyAlgorithm2, certificate2, trustChain2 string) { client.On("GetChangeHistory", mock.Anything, cps.GetChangeHistoryRequest{ EnrollmentID: enrollmentID, }).Return(&cps.GetChangeHistoryResponse{ @@ -1546,7 +1547,7 @@ var ( } // mockGetEnrollment mocks GetEnrollment call with provided values - mockGetEnrollment = func(client *cps.Mock, enrollmentID, timesToRun int, enrollment *cps.Enrollment) { + mockGetEnrollment = func(client *cps.Mock, enrollmentID, timesToRun int, enrollment *cps.GetEnrollmentResponse) { client.On("GetEnrollment", mock.Anything, cps.GetEnrollmentRequest{ EnrollmentID: enrollmentID, }).Return(enrollment, nil).Times(timesToRun) @@ -1652,7 +1653,7 @@ var ( } // mockCheckUnacknowledgedWarnings mocks CheckUnacknowledgedWarnings function with provided values - mockCheckUnacknowledgedWarnings = func(client *cps.Mock, enrollmentID, changeID, timesToRun int, enrollment *cps.Enrollment, status string) { + mockCheckUnacknowledgedWarnings = func(client *cps.Mock, enrollmentID, changeID, timesToRun int, enrollment *cps.GetEnrollmentResponse, status string) { mockGetEnrollment(client, enrollmentID, timesToRun, enrollment) mockGetChangeStatus(client, enrollmentID, changeID, timesToRun, status) } From 2624c6cea4a90cd4d5ccdf18372f62d77166613d Mon Sep 17 00:00:00 2001 From: "Zagrajczuk, Wojciech" Date: Tue, 12 Dec 2023 09:28:06 +0100 Subject: [PATCH 15/52] DXE-3207 Fix build post release --- .../botman/data_akamai_botman_custom_code_test.go | 8 ++++---- .../resource_akamai_botman_custom_code_test.go | 14 +++++++------- .../botman/testdata/TestDataCustomCode/basic.tf | 2 +- .../testdata/TestResourceCustomCode/create.tf | 2 +- .../testdata/TestResourceCustomCode/update.tf | 2 +- ...mai_cloudlets_application_load_balancer_test.go | 2 +- .../lifecycle_origin_desc/alb_create.tf | 2 +- .../lifecycle_origin_desc/alb_update.tf | 2 +- .../cps/data_akamai_cps_enrollment_test.go | 10 +++++----- .../suppress_contract_prefix/create.tf | 2 +- .../suppress_contract_prefix/update.tf | 2 +- .../data_akamai_property_hostnames_test.go | 4 ++-- .../data_akamai_property_rules_builder_test.go | 2 +- .../data_akamai_property_rules_template_test.go | 2 +- .../rules_v2023_10_30.tf | 2 +- .../property_hostnames_with_version.tf | 2 +- 16 files changed, 30 insertions(+), 30 deletions(-) diff --git a/pkg/providers/botman/data_akamai_botman_custom_code_test.go b/pkg/providers/botman/data_akamai_botman_custom_code_test.go index 7b2235750..05a45acb1 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_code_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_code_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -23,11 +23,11 @@ func TestDataCustomCode(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestDataCustomCode/basic.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestDataCustomCode/basic.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.akamai_botman_custom_code.test", "json", compactJSON(expectedJSON))), }, diff --git a/pkg/providers/botman/resource_akamai_botman_custom_code_test.go b/pkg/providers/botman/resource_akamai_botman_custom_code_test.go index 282741c38..9d62ca7d1 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_code_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_code_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/test" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -14,7 +14,7 @@ func TestResourceCustomCode(t *testing.T) { mockedBotmanClient := &botman.Mock{} createResponse := map[string]interface{}{"testKey": "testValue3"} - createRequest := test.FixtureBytes("testdata/JsonPayload/create.json") + createRequest := testutils.LoadFixtureBytes(t, "testdata/JsonPayload/create.json") mockedBotmanClient.On("UpdateCustomCode", mock.Anything, botman.UpdateCustomCodeRequest{ @@ -34,7 +34,7 @@ func TestResourceCustomCode(t *testing.T) { expectedCreateJSON := `{"testKey":"testValue3"}` updateResponse := map[string]interface{}{"testKey": "updated_testValue3"} - updateRequest := test.FixtureBytes("testdata/JsonPayload/update.json") + updateRequest := testutils.LoadFixtureBytes(t, "testdata/JsonPayload/update.json") mockedBotmanClient.On("UpdateCustomCode", mock.Anything, botman.UpdateCustomCodeRequest{ @@ -56,17 +56,17 @@ func TestResourceCustomCode(t *testing.T) { useClient(mockedBotmanClient, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { - Config: test.Fixture("testdata/TestResourceCustomCode/create.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceCustomCode/create.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_custom_code.test", "id", "43253"), resource.TestCheckResourceAttr("akamai_botman_custom_code.test", "custom_code", expectedCreateJSON)), }, { - Config: test.Fixture("testdata/TestResourceCustomCode/update.tf"), + Config: testutils.LoadFixtureString(t, "testdata/TestResourceCustomCode/update.tf"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("akamai_botman_custom_code.test", "id", "43253"), resource.TestCheckResourceAttr("akamai_botman_custom_code.test", "custom_code", expectedUpdateJSON)), diff --git a/pkg/providers/botman/testdata/TestDataCustomCode/basic.tf b/pkg/providers/botman/testdata/TestDataCustomCode/basic.tf index 227479672..7d27cb6b3 100644 --- a/pkg/providers/botman/testdata/TestDataCustomCode/basic.tf +++ b/pkg/providers/botman/testdata/TestDataCustomCode/basic.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceCustomCode/create.tf b/pkg/providers/botman/testdata/TestResourceCustomCode/create.tf index e5ab2cad8..8fee5dc60 100644 --- a/pkg/providers/botman/testdata/TestResourceCustomCode/create.tf +++ b/pkg/providers/botman/testdata/TestResourceCustomCode/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/botman/testdata/TestResourceCustomCode/update.tf b/pkg/providers/botman/testdata/TestResourceCustomCode/update.tf index 54b7b84e2..a12aa922a 100644 --- a/pkg/providers/botman/testdata/TestResourceCustomCode/update.tf +++ b/pkg/providers/botman/testdata/TestResourceCustomCode/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_test.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_test.go index 0ed49085a..1d64ac526 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_test.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_test.go @@ -580,7 +580,7 @@ func TestResourceApplicationLoadBalancer(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/alb_create.tf", testDir)), diff --git a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_origin_desc/alb_create.tf b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_origin_desc/alb_create.tf index c65378531..fa7dc6bb0 100644 --- a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_origin_desc/alb_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_origin_desc/alb_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_application_load_balancer" "alb" { diff --git a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_origin_desc/alb_update.tf b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_origin_desc/alb_update.tf index 4298e4627..687345ba1 100644 --- a/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_origin_desc/alb_update.tf +++ b/pkg/providers/cloudlets/testdata/TestResLoadBalancerConfig/lifecycle_origin_desc/alb_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_application_load_balancer" "alb" { diff --git a/pkg/providers/cps/data_akamai_cps_enrollment_test.go b/pkg/providers/cps/data_akamai_cps_enrollment_test.go index 9401cf882..304d62ed5 100644 --- a/pkg/providers/cps/data_akamai_cps_enrollment_test.go +++ b/pkg/providers/cps/data_akamai_cps_enrollment_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" - "github.com/akamai/cli-terraform/pkg/tools" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -73,7 +73,7 @@ var ( PostalCode: "12345", Region: "MA", }, - OrgID: tools.IntPtr(123), + OrgID: ptr.To(123), RA: "lets-encrypt", SignatureAlgorithm: "SHA-256", TechContact: &cps.Contact{ @@ -145,7 +145,7 @@ var ( PostalCode: "55555", Region: "MA", }, - OrgID: tools.IntPtr(123), + OrgID: ptr.To(123), RA: "lets-encrypt", SignatureAlgorithm: "SHA-256", TechContact: &cps.Contact{ @@ -226,7 +226,7 @@ var ( PostalCode: "55555", Region: "MA", }, - OrgID: tools.IntPtr(123), + OrgID: ptr.To(123), RA: "lets-encrypt", SignatureAlgorithm: "SHA-256", TechContact: &cps.Contact{ @@ -307,7 +307,7 @@ var ( PostalCode: "55555", Region: "MA", }, - OrgID: tools.IntPtr(123), + OrgID: ptr.To(123), RA: "lets-encrypt", SignatureAlgorithm: "SHA-256", TechContact: &cps.Contact{ diff --git a/pkg/providers/imaging/testdata/TestResPolicySet/suppress_contract_prefix/create.tf b/pkg/providers/imaging/testdata/TestResPolicySet/suppress_contract_prefix/create.tf index 1c37870ca..392c3ba38 100644 --- a/pkg/providers/imaging/testdata/TestResPolicySet/suppress_contract_prefix/create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicySet/suppress_contract_prefix/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_set" "test_image_set" { diff --git a/pkg/providers/imaging/testdata/TestResPolicySet/suppress_contract_prefix/update.tf b/pkg/providers/imaging/testdata/TestResPolicySet/suppress_contract_prefix/update.tf index c9eef123b..c46d0ecaa 100644 --- a/pkg/providers/imaging/testdata/TestResPolicySet/suppress_contract_prefix/update.tf +++ b/pkg/providers/imaging/testdata/TestResPolicySet/suppress_contract_prefix/update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_set" "test_image_set" { diff --git a/pkg/providers/property/data_akamai_property_hostnames_test.go b/pkg/providers/property/data_akamai_property_hostnames_test.go index 15b614f00..0de1ae4ea 100644 --- a/pkg/providers/property/data_akamai_property_hostnames_test.go +++ b/pkg/providers/property/data_akamai_property_hostnames_test.go @@ -237,7 +237,7 @@ func TestDataPropertyHostnames(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDataPropertyHostnames/property_hostnames_with_version.tf"), Check: buildAggregatedHostnamesTest(hostnameItems, "prp_test5", "grp_test", "ctr_test", "prp_test", 5), @@ -260,7 +260,7 @@ func TestDataPropertyHostnames(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDataPropertyHostnames/property_hostnames_with_version.tf"), ExpectError: regexp.MustCompile(`error fetching property version`), diff --git a/pkg/providers/property/data_akamai_property_rules_builder_test.go b/pkg/providers/property/data_akamai_property_rules_builder_test.go index de880ae42..64736e501 100644 --- a/pkg/providers/property/data_akamai_property_rules_builder_test.go +++ b/pkg/providers/property/data_akamai_property_rules_builder_test.go @@ -132,7 +132,7 @@ func TestDataPropertyRulesBuilder(t *testing.T) { t.Run("valid rule with 3 children - v2023-10-30", func(t *testing.T) { useClient(nil, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRulesBuilder/rules_v2023_10_30.tf"), Check: resource.ComposeAggregateTestCheckFunc( diff --git a/pkg/providers/property/data_akamai_property_rules_template_test.go b/pkg/providers/property/data_akamai_property_rules_template_test.go index 51c5c2dd4..85dda2727 100644 --- a/pkg/providers/property/data_akamai_property_rules_template_test.go +++ b/pkg/providers/property/data_akamai_property_rules_template_test.go @@ -85,7 +85,7 @@ func TestDataAkamaiPropertyRulesRead(t *testing.T) { client := papi.Mock{} useClient(&client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSRulesTemplate/template_not_valid_json_includes.tf"), diff --git a/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2023_10_30.tf b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2023_10_30.tf index 9209354ab..7a5757c28 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2023_10_30.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2023_10_30.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_builder" "default" { diff --git a/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_with_version.tf b/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_with_version.tf index 560f09a7f..9b3c3167a 100644 --- a/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_with_version.tf +++ b/pkg/providers/property/testdata/TestDataPropertyHostnames/property_hostnames_with_version.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_hostnames" "akaprophosts" { From 76beab496d2631769060801ed172ce1660e2b79d Mon Sep 17 00:00:00 2001 From: rbhatved Date: Tue, 12 Dec 2023 20:40:58 +0530 Subject: [PATCH 16/52] DXE-3094 [TFP] Add validation/err to akamai_edge_hostname --- .../property/resource_akamai_edge_hostname.go | 54 ++++--- .../resource_akamai_edge_hostname_test.go | 149 ++++++++++++++---- .../new_akamaized_update_product_id.tf | 16 ++ 3 files changed, 164 insertions(+), 55 deletions(-) create mode 100644 pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_update_product_id.tf diff --git a/pkg/providers/property/resource_akamai_edge_hostname.go b/pkg/providers/property/resource_akamai_edge_hostname.go index ef58180ca..8d53ff304 100644 --- a/pkg/providers/property/resource_akamai_edge_hostname.go +++ b/pkg/providers/property/resource_akamai_edge_hostname.go @@ -159,10 +159,9 @@ func resourceSecureEdgeHostNameCreate(ctx context.Context, d *schema.ResourceDat // ip_behavior is required value in schema. newHostname.IPVersionBehavior = strings.ToUpper(d.Get("ip_behavior").(string)) - var ehnID string for _, h := range edgeHostnames.EdgeHostnames.Items { if h.DomainPrefix == newHostname.DomainPrefix && h.DomainSuffix == newHostname.DomainSuffix { - ehnID = h.ID + return diag.FromErr(fmt.Errorf("edgehostname %s already exist", edgeHostname)) } } certEnrollmentID, err := tf.GetIntValue("certificate", d) @@ -189,22 +188,16 @@ func resourceSecureEdgeHostNameCreate(ctx context.Context, d *schema.ResourceDat newHostname.UseCases = useCases } - if ehnID == "" { - logger.Debugf("Creating new edge hostname: %#v", newHostname) - hostname, err := client.CreateEdgeHostname(ctx, papi.CreateEdgeHostnameRequest{ - EdgeHostname: newHostname, - ContractID: contractID, - GroupID: groupID, - }) - if err != nil { - return diag.FromErr(err) - } - d.SetId(hostname.EdgeHostnameID) - ehnID = hostname.EdgeHostnameID - } else { - d.SetId(ehnID) + logger.Debugf("Creating new edge hostname: %#v", newHostname) + hostname, err := client.CreateEdgeHostname(ctx, papi.CreateEdgeHostnameRequest{ + EdgeHostname: newHostname, + ContractID: contractID, + GroupID: groupID, + }) + if err != nil { + return diag.FromErr(err) } - logger.Debugf("Resulting EHN Id: %s ", ehnID) + d.SetId(hostname.EdgeHostnameID) return resourceSecureEdgeHostNameRead(ctx, d, meta) } @@ -293,20 +286,33 @@ func resourceSecureEdgeHostNameUpdate(ctx context.Context, d *schema.ResourceDat logger.Debug("Only timeouts were updated, skipping") return nil } + var diagnostics []diag.Diagnostic + handleError := func(err error) diag.Diagnostics { + return append(diag.FromErr(err), diagnostics...) + } + + if d.HasChange("product_id") || d.HasChange("certificate") { + warningDiagnostic := diag.Diagnostic{ + Severity: diag.Warning, + Summary: "Attempted update of non-updatable field. Modifying only local state", + Detail: "The field 'product_id' and 'certificate' is not updatable and should not be modified.", + } + diagnostics = append(diagnostics, warningDiagnostic) + } if d.HasChange("ip_behavior") { edgeHostname, err := tf.GetStringValue("edge_hostname", d) if err != nil { - return diag.FromErr(err) + return handleError(err) } dnsZone, _ := parseEdgeHostname(edgeHostname) ipBehavior, err := tf.GetStringValue("ip_behavior", d) if err != nil { - return diag.FromErr(err) + return handleError(err) } emails, err := tf.GetListValue("status_update_email", d) if err != nil && !errors.Is(err, tf.ErrNotFound) { - return diag.FromErr(err) + return handleError(err) } logger.Debugf("Proceeding to update /ipVersionBehavior for %s", edgeHostname) @@ -339,17 +345,17 @@ func resourceSecureEdgeHostNameUpdate(ctx context.Context, d *schema.ResourceDat resp, err := hapiClient.UpdateEdgeHostname(ctx, req) if err != nil { if err2 := tf.RestoreOldValues(d, []string{"ip_behavior"}); err2 != nil { - return diag.Errorf(`%s failed. No changes were written to server: + return handleError(fmt.Errorf(`%s failed. No changes were written to server: %s Failed to restore previous local schema values. The schema will remain in tainted state: -%s`, hapi.ErrUpdateEdgeHostname, err.Error(), err2.Error()) +%s`, hapi.ErrUpdateEdgeHostname, err.Error(), err2.Error())) } - return diag.FromErr(err) + return handleError(err) } if err = waitForChange(ctx, hapiClient, resp.ChangeID); err != nil { - return diag.FromErr(err) + return handleError(err) } } diff --git a/pkg/providers/property/resource_akamai_edge_hostname_test.go b/pkg/providers/property/resource_akamai_edge_hostname_test.go index 624e80d0b..a01ba2ba9 100644 --- a/pkg/providers/property/resource_akamai_edge_hostname_test.go +++ b/pkg/providers/property/resource_akamai_edge_hostname_test.go @@ -420,17 +420,12 @@ func TestResourceEdgeHostname(t *testing.T) { IPVersionBehavior: "IPV6_COMPLIANCE", }, }}, - }, nil).Times(3) + }, nil) }, steps: []resource.TestStep{ { - Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/%s", testDir, "new_akamaized_net.tf")), - Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttr("akamai_edge_hostname.edgehostname", "id", "eh_123"), - resource.TestCheckResourceAttr("akamai_edge_hostname.edgehostname", "contract_id", "ctr_2"), - resource.TestCheckResourceAttr("akamai_edge_hostname.edgehostname", "group_id", "grp_2"), - resource.TestCheckResourceAttr("akamai_edge_hostname.edgehostname", "edge_hostname", "test.akamaized.net"), - ), + Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/%s", testDir, "new_akamaized_net.tf")), + ExpectError: regexp.MustCompile("edgehostname test.akamaized.net already exist"), }, }, }, @@ -448,22 +443,39 @@ func TestResourceEdgeHostname(t *testing.T) { EdgeHostnames: papi.EdgeHostnameItems{Items: []papi.EdgeHostnameGetItem{ { ID: "eh_123", - Domain: "test.akamaized.net", + Domain: "test1.akamaized.net", ProductID: "prd_2", - DomainPrefix: "test", + DomainPrefix: "test1", DomainSuffix: "akamaized.net", IPVersionBehavior: "IPV4", }, { ID: "eh_2", - Domain: "test.akamaized.net", + Domain: "test2.akamaized.net", ProductID: "prd_2", - DomainPrefix: "test", + DomainPrefix: "test2", DomainSuffix: "akamaized.net", IPVersionBehavior: "IPV4", }, }}, - }, nil).Times(3) + }, nil).Once() + + mp.On("CreateEdgeHostname", mock.Anything, papi.CreateEdgeHostnameRequest{ + ContractID: "ctr_2", + GroupID: "grp_2", + EdgeHostname: papi.EdgeHostnameCreate{ + + ProductID: "prd_2", + DomainPrefix: "test", + DomainSuffix: "akamaized.net", + SecureNetwork: "SHARED_CERT", + IPVersionBehavior: "IPV4", + CertEnrollmentID: 0, + SlotNumber: 0, + }, + }).Return(&papi.CreateEdgeHostnameResponse{ + EdgeHostnameID: "eh_123", + }, nil) // refresh mp.On("GetEdgeHostnames", mock.Anything, papi.GetEdgeHostnamesRequest{ @@ -490,7 +502,7 @@ func TestResourceEdgeHostname(t *testing.T) { IPVersionBehavior: "IPV4", }, }}, - }, nil).Once() + }, nil).Times(3) // 2nd step // update @@ -569,6 +581,49 @@ func TestResourceEdgeHostname(t *testing.T) { // 1st step // 1. call from create method // 2. and 3. call from read method + mp.On("GetEdgeHostnames", mock.Anything, papi.GetEdgeHostnamesRequest{ + ContractID: "ctr_2", + GroupID: "grp_2", + }).Return(&papi.GetEdgeHostnamesResponse{ + ContractID: "ctr_2", + GroupID: "grp_2", + EdgeHostnames: papi.EdgeHostnameItems{Items: []papi.EdgeHostnameGetItem{ + { + ID: "eh_123", + Domain: "test1.akamaized.net", + ProductID: "prd_2", + DomainPrefix: "test1", + DomainSuffix: "akamaized.net", + IPVersionBehavior: "IPV4", + }, + { + ID: "eh_2", + Domain: "test2.akamaized.net", + ProductID: "prd_2", + DomainPrefix: "test2", + DomainSuffix: "akamaized.net", + IPVersionBehavior: "IPV6_COMPLIANCE", + }, + }}, + }, nil).Once() + + mp.On("CreateEdgeHostname", mock.Anything, papi.CreateEdgeHostnameRequest{ + ContractID: "ctr_2", + GroupID: "grp_2", + EdgeHostname: papi.EdgeHostnameCreate{ + + ProductID: "prd_2", + DomainPrefix: "test", + DomainSuffix: "akamaized.net", + SecureNetwork: "SHARED_CERT", + IPVersionBehavior: "IPV4", + CertEnrollmentID: 0, + SlotNumber: 0, + }, + }).Return(&papi.CreateEdgeHostnameResponse{ + EdgeHostnameID: "eh_123", + }, nil) + mp.On("GetEdgeHostnames", mock.Anything, papi.GetEdgeHostnamesRequest{ ContractID: "ctr_2", GroupID: "grp_2", @@ -593,7 +648,7 @@ func TestResourceEdgeHostname(t *testing.T) { IPVersionBehavior: "IPV6_COMPLIANCE", }, }}, - }, nil).Times(3) + }, nil).Twice() // refresh mp.On("GetEdgeHostnames", mock.Anything, papi.GetEdgeHostnamesRequest{ @@ -613,9 +668,9 @@ func TestResourceEdgeHostname(t *testing.T) { }, { ID: "eh_2", - Domain: "test.akamaized.net", + Domain: "test1.akamaized.net", ProductID: "prd_2", - DomainPrefix: "test", + DomainPrefix: "test1", DomainSuffix: "akamaized.net", IPVersionBehavior: "IPV6_COMPLIANCE", }, @@ -710,22 +765,38 @@ func TestResourceEdgeHostname(t *testing.T) { EdgeHostnames: papi.EdgeHostnameItems{Items: []papi.EdgeHostnameGetItem{ { ID: "eh_123", - Domain: "test.akamaized.net", + Domain: "test1.akamaized.net", ProductID: "prd_2", - DomainPrefix: "test", + DomainPrefix: "test1", DomainSuffix: "akamaized.net", IPVersionBehavior: "IPV4", }, { ID: "eh_2", - Domain: "test.akamaized.net", + Domain: "test2.akamaized.net", ProductID: "prd_2", - DomainPrefix: "test", + DomainPrefix: "test2", DomainSuffix: "akamaized.net", IPVersionBehavior: "IPV4", }, }}, - }, nil).Times(3) + }, nil).Once() + + mp.On("CreateEdgeHostname", mock.Anything, papi.CreateEdgeHostnameRequest{ + ContractID: "ctr_2", + GroupID: "grp_2", + EdgeHostname: papi.EdgeHostnameCreate{ + ProductID: "prd_2", + DomainPrefix: "test", + DomainSuffix: "akamaized.net", + SecureNetwork: "SHARED_CERT", + IPVersionBehavior: "IPV4", + CertEnrollmentID: 0, + SlotNumber: 0, + }, + }).Return(&papi.CreateEdgeHostnameResponse{ + EdgeHostnameID: "eh_123", + }, nil) // refresh mp.On("GetEdgeHostnames", mock.Anything, papi.GetEdgeHostnamesRequest{ @@ -752,7 +823,7 @@ func TestResourceEdgeHostname(t *testing.T) { IPVersionBehavior: "IPV4", }, }}, - }, nil).Once() + }, nil).Times(3) // 2nd step - update mh.On("UpdateEdgeHostname", mock.Anything, hapi.UpdateEdgeHostnameRequest{ @@ -927,23 +998,39 @@ func TestResourceEdgeHostname(t *testing.T) { EdgeHostnames: papi.EdgeHostnameItems{Items: []papi.EdgeHostnameGetItem{ { ID: "eh_123", - Domain: "test.akamaized.net", + Domain: "test1.akamaized.net", ProductID: "prd_2", - DomainPrefix: "test", + DomainPrefix: "test1", DomainSuffix: "akamaized.net", IPVersionBehavior: "IPV4", }, { ID: "eh_2", - Domain: "test.akamaized.net", + Domain: "test2.akamaized.net", ProductID: "prd_2", - DomainPrefix: "test", + DomainPrefix: "test2", DomainSuffix: "akamaized.net", IPVersionBehavior: "IPV4", }, }}, - }, nil).Times(3) + }, nil).Once() + mp.On("CreateEdgeHostname", mock.Anything, papi.CreateEdgeHostnameRequest{ + ContractID: "ctr_2", + GroupID: "grp_2", + EdgeHostname: papi.EdgeHostnameCreate{ + + ProductID: "prd_2", + DomainPrefix: "test", + DomainSuffix: "akamaized.net", + SecureNetwork: "SHARED_CERT", + IPVersionBehavior: "IPV4", + CertEnrollmentID: 0, + SlotNumber: 0, + }, + }).Return(&papi.CreateEdgeHostnameResponse{ + EdgeHostnameID: "eh_123", + }, nil) // refresh mp.On("GetEdgeHostnames", mock.Anything, papi.GetEdgeHostnamesRequest{ ContractID: "ctr_2", @@ -962,14 +1049,14 @@ func TestResourceEdgeHostname(t *testing.T) { }, { ID: "eh_2", - Domain: "test.akamaized.net", + Domain: "test2.akamaized.net", ProductID: "prd_2", - DomainPrefix: "test", + DomainPrefix: "test2", DomainSuffix: "akamaized.net", IPVersionBehavior: "IPV4", }, }}, - }, nil).Once() + }, nil).Times(3) // 2nd step // update diff --git a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_update_product_id.tf b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_update_product_id.tf new file mode 100644 index 000000000..808585ee8 --- /dev/null +++ b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_update_product_id.tf @@ -0,0 +1,16 @@ +provider "akamai" { + edgerc = "../../test/edgerc" +} + +resource "akamai_edge_hostname" "edgehostname" { + contract_id = "ctr_2" + group_id = "grp_2" + product_id = "prd_3" + edge_hostname = "test.akamaized.net" + ip_behavior = "IPV4" + status_update_email = ["hello@akamai.com"] +} + +output "edge_hostname" { + value = akamai_edge_hostname.edgehostname.edge_hostname +} \ No newline at end of file From 2cd8b87553c2451988b38944e5418a8fc1504593 Mon Sep 17 00:00:00 2001 From: rbhatved Date: Tue, 12 Dec 2023 20:49:09 +0530 Subject: [PATCH 17/52] DXE-3094 removed unused file --- .../new_akamaized_update_product_id.tf | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_update_product_id.tf diff --git a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_update_product_id.tf b/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_update_product_id.tf deleted file mode 100644 index 808585ee8..000000000 --- a/pkg/providers/property/testdata/TestResourceEdgeHostname/new_akamaized_update_product_id.tf +++ /dev/null @@ -1,16 +0,0 @@ -provider "akamai" { - edgerc = "../../test/edgerc" -} - -resource "akamai_edge_hostname" "edgehostname" { - contract_id = "ctr_2" - group_id = "grp_2" - product_id = "prd_3" - edge_hostname = "test.akamaized.net" - ip_behavior = "IPV4" - status_update_email = ["hello@akamai.com"] -} - -output "edge_hostname" { - value = akamai_edge_hostname.edgehostname.edge_hostname -} \ No newline at end of file From 5bb6a11e1164ff35abfb76bd224a06d9d6eaaa25 Mon Sep 17 00:00:00 2001 From: rbhatved Date: Thu, 14 Dec 2023 19:55:22 +0530 Subject: [PATCH 18/52] DXE-3094 Addressed review comments --- CHANGELOG.md | 3 +++ .../property/resource_akamai_edge_hostname.go | 27 +++++++------------ .../resource_akamai_edge_hostname_test.go | 10 +------ 3 files changed, 13 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c6dfe648..502fb00ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ #### BREAKING CHANGES: +* PAPI + * Added validation to raise an error if the creation of the `akamai_edge_hostname` resource is attempted with an existing edge hostname. + * Added validation to raise an error during the update of `akamai_edge_hostname` resource for the fields 'product_id' and 'certificate'. diff --git a/pkg/providers/property/resource_akamai_edge_hostname.go b/pkg/providers/property/resource_akamai_edge_hostname.go index 8d53ff304..9fb905aed 100644 --- a/pkg/providers/property/resource_akamai_edge_hostname.go +++ b/pkg/providers/property/resource_akamai_edge_hostname.go @@ -161,7 +161,7 @@ func resourceSecureEdgeHostNameCreate(ctx context.Context, d *schema.ResourceDat newHostname.IPVersionBehavior = strings.ToUpper(d.Get("ip_behavior").(string)) for _, h := range edgeHostnames.EdgeHostnames.Items { if h.DomainPrefix == newHostname.DomainPrefix && h.DomainSuffix == newHostname.DomainSuffix { - return diag.FromErr(fmt.Errorf("edgehostname %s already exist", edgeHostname)) + return diag.Errorf("edgehostname '%s' already exists", edgeHostname) } } certEnrollmentID, err := tf.GetIntValue("certificate", d) @@ -286,33 +286,24 @@ func resourceSecureEdgeHostNameUpdate(ctx context.Context, d *schema.ResourceDat logger.Debug("Only timeouts were updated, skipping") return nil } - var diagnostics []diag.Diagnostic - handleError := func(err error) diag.Diagnostics { - return append(diag.FromErr(err), diagnostics...) - } if d.HasChange("product_id") || d.HasChange("certificate") { - warningDiagnostic := diag.Diagnostic{ - Severity: diag.Warning, - Summary: "Attempted update of non-updatable field. Modifying only local state", - Detail: "The field 'product_id' and 'certificate' is not updatable and should not be modified.", - } - diagnostics = append(diagnostics, warningDiagnostic) + return diag.Errorf("Error: Update failed for non-updatable fields 'product_id' and 'certificate'.") } if d.HasChange("ip_behavior") { edgeHostname, err := tf.GetStringValue("edge_hostname", d) if err != nil { - return handleError(err) + return diag.FromErr(err) } dnsZone, _ := parseEdgeHostname(edgeHostname) ipBehavior, err := tf.GetStringValue("ip_behavior", d) if err != nil { - return handleError(err) + return diag.FromErr(err) } emails, err := tf.GetListValue("status_update_email", d) if err != nil && !errors.Is(err, tf.ErrNotFound) { - return handleError(err) + return diag.FromErr(err) } logger.Debugf("Proceeding to update /ipVersionBehavior for %s", edgeHostname) @@ -345,17 +336,17 @@ func resourceSecureEdgeHostNameUpdate(ctx context.Context, d *schema.ResourceDat resp, err := hapiClient.UpdateEdgeHostname(ctx, req) if err != nil { if err2 := tf.RestoreOldValues(d, []string{"ip_behavior"}); err2 != nil { - return handleError(fmt.Errorf(`%s failed. No changes were written to server: + return diag.Errorf(`%s failed. No changes were written to server: %s Failed to restore previous local schema values. The schema will remain in tainted state: -%s`, hapi.ErrUpdateEdgeHostname, err.Error(), err2.Error())) +%s`, hapi.ErrUpdateEdgeHostname, err.Error(), err2.Error()) } - return handleError(err) + return diag.FromErr(err) } if err = waitForChange(ctx, hapiClient, resp.ChangeID); err != nil { - return handleError(err) + return diag.FromErr(err) } } diff --git a/pkg/providers/property/resource_akamai_edge_hostname_test.go b/pkg/providers/property/resource_akamai_edge_hostname_test.go index a01ba2ba9..92dae8b17 100644 --- a/pkg/providers/property/resource_akamai_edge_hostname_test.go +++ b/pkg/providers/property/resource_akamai_edge_hostname_test.go @@ -425,7 +425,7 @@ func TestResourceEdgeHostname(t *testing.T) { steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/%s", testDir, "new_akamaized_net.tf")), - ExpectError: regexp.MustCompile("edgehostname test.akamaized.net already exist"), + ExpectError: regexp.MustCompile("edgehostname 'test.akamaized.net' already exists"), }, }, }, @@ -470,8 +470,6 @@ func TestResourceEdgeHostname(t *testing.T) { DomainSuffix: "akamaized.net", SecureNetwork: "SHARED_CERT", IPVersionBehavior: "IPV4", - CertEnrollmentID: 0, - SlotNumber: 0, }, }).Return(&papi.CreateEdgeHostnameResponse{ EdgeHostnameID: "eh_123", @@ -617,8 +615,6 @@ func TestResourceEdgeHostname(t *testing.T) { DomainSuffix: "akamaized.net", SecureNetwork: "SHARED_CERT", IPVersionBehavior: "IPV4", - CertEnrollmentID: 0, - SlotNumber: 0, }, }).Return(&papi.CreateEdgeHostnameResponse{ EdgeHostnameID: "eh_123", @@ -791,8 +787,6 @@ func TestResourceEdgeHostname(t *testing.T) { DomainSuffix: "akamaized.net", SecureNetwork: "SHARED_CERT", IPVersionBehavior: "IPV4", - CertEnrollmentID: 0, - SlotNumber: 0, }, }).Return(&papi.CreateEdgeHostnameResponse{ EdgeHostnameID: "eh_123", @@ -1025,8 +1019,6 @@ func TestResourceEdgeHostname(t *testing.T) { DomainSuffix: "akamaized.net", SecureNetwork: "SHARED_CERT", IPVersionBehavior: "IPV4", - CertEnrollmentID: 0, - SlotNumber: 0, }, }).Return(&papi.CreateEdgeHostnameResponse{ EdgeHostnameID: "eh_123", From f3a87a77e1ca6a4f5b0fefe3154b80b3a0563cf1 Mon Sep 17 00:00:00 2001 From: rbhatved Date: Thu, 14 Dec 2023 21:23:25 +0530 Subject: [PATCH 19/52] DXE-3194 Correction in the Change log description --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 502fb00ac..82dbc1e1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ * PAPI * Added validation to raise an error if the creation of the `akamai_edge_hostname` resource is attempted with an existing edge hostname. - * Added validation to raise an error during the update of `akamai_edge_hostname` resource for the fields 'product_id' and 'certificate'. + * Added validation to raise an error during the update of `akamai_edge_hostname` resource for the immutable fields: 'product_id' and 'certificate'. From 8ef5b8ada7471da54597f6ec126459f61b4bc9e5 Mon Sep 17 00:00:00 2001 From: rbhatved Date: Mon, 18 Dec 2023 18:49:07 +0530 Subject: [PATCH 20/52] DXE-3094 Custom Diff Validation for NonUpdatableFields --- .../property/resource_akamai_edge_hostname.go | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pkg/providers/property/resource_akamai_edge_hostname.go b/pkg/providers/property/resource_akamai_edge_hostname.go index 9fb905aed..d7a4e3e98 100644 --- a/pkg/providers/property/resource_akamai_edge_hostname.go +++ b/pkg/providers/property/resource_akamai_edge_hostname.go @@ -18,11 +18,15 @@ import ( "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func resourceSecureEdgeHostName() *schema.Resource { return &schema.Resource{ + CustomizeDiff: customdiff.All( + validateNonUpdatableFields, + ), CreateContext: resourceSecureEdgeHostNameCreate, ReadContext: resourceSecureEdgeHostNameRead, UpdateContext: resourceSecureEdgeHostNameUpdate, @@ -287,10 +291,6 @@ func resourceSecureEdgeHostNameUpdate(ctx context.Context, d *schema.ResourceDat return nil } - if d.HasChange("product_id") || d.HasChange("certificate") { - return diag.Errorf("Error: Update failed for non-updatable fields 'product_id' and 'certificate'.") - } - if d.HasChange("ip_behavior") { edgeHostname, err := tf.GetStringValue("edge_hostname", d) if err != nil { @@ -531,3 +531,10 @@ func parseEdgeHostname(hostname string) (string, string) { } return "edgesuite.net", "" } + +func validateNonUpdatableFields(_ context.Context, diff *schema.ResourceDiff, _ interface{}) error { + if diff.Id() != "" && (diff.HasChange("product_id") || diff.HasChange("certificate")) { + return fmt.Errorf("error: Changes to non-updatable fields 'product_id' and 'certificate' are not permitted") + } + return nil +} From 278b27828177b87cdd2b85459bcc3288e25261a6 Mon Sep 17 00:00:00 2001 From: rbhatved Date: Wed, 20 Dec 2023 17:41:52 +0530 Subject: [PATCH 21/52] DXE-3094 Fixed Custom Diff Validation for NonUpdatableFields --- .../property/resource_akamai_edge_hostname.go | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pkg/providers/property/resource_akamai_edge_hostname.go b/pkg/providers/property/resource_akamai_edge_hostname.go index d7a4e3e98..53bb6014e 100644 --- a/pkg/providers/property/resource_akamai_edge_hostname.go +++ b/pkg/providers/property/resource_akamai_edge_hostname.go @@ -25,7 +25,7 @@ import ( func resourceSecureEdgeHostName() *schema.Resource { return &schema.Resource{ CustomizeDiff: customdiff.All( - validateNonUpdatableFields, + validateImmutableFields, ), CreateContext: resourceSecureEdgeHostNameCreate, ReadContext: resourceSecureEdgeHostNameRead, @@ -532,9 +532,17 @@ func parseEdgeHostname(hostname string) (string, string) { return "edgesuite.net", "" } -func validateNonUpdatableFields(_ context.Context, diff *schema.ResourceDiff, _ interface{}) error { - if diff.Id() != "" && (diff.HasChange("product_id") || diff.HasChange("certificate")) { - return fmt.Errorf("error: Changes to non-updatable fields 'product_id' and 'certificate' are not permitted") +func validateImmutableFields(_ context.Context, diff *schema.ResourceDiff, _ interface{}) error { + if diff.Id() != "" { + old, new := diff.GetChange("product_id") + oldValue, oldOk := old.(string) + newValue, newOk := new.(string) + + if diff.HasChange("certificate") || + (!oldOk || !newOk || (oldValue != "" || newValue != "") && + str.AddPrefix(oldValue, "prd_") != str.AddPrefix(newValue, "prd_")) { + return fmt.Errorf("error: Changes to non-updatable fields 'product_id' and 'certificate' are not permitted") + } } return nil } From 6ad825066fbb64b5a3b0df33f75027df65fbae08 Mon Sep 17 00:00:00 2001 From: rbhatved Date: Wed, 20 Dec 2023 18:44:25 +0530 Subject: [PATCH 22/52] DXE-3094 Custom Diff Validation for NonUpdatableFields --- .../property/resource_akamai_edge_hostname.go | 10 ++-- .../resource_akamai_edge_hostname_test.go | 51 +++++++++++++++++-- 2 files changed, 51 insertions(+), 10 deletions(-) diff --git a/pkg/providers/property/resource_akamai_edge_hostname.go b/pkg/providers/property/resource_akamai_edge_hostname.go index 53bb6014e..1b77b15c3 100644 --- a/pkg/providers/property/resource_akamai_edge_hostname.go +++ b/pkg/providers/property/resource_akamai_edge_hostname.go @@ -534,13 +534,11 @@ func parseEdgeHostname(hostname string) (string, string) { func validateImmutableFields(_ context.Context, diff *schema.ResourceDiff, _ interface{}) error { if diff.Id() != "" { - old, new := diff.GetChange("product_id") - oldValue, oldOk := old.(string) - newValue, newOk := new.(string) + oldValue, newValue := diff.GetChange("product_id") + o := oldValue.(string) + n := newValue.(string) - if diff.HasChange("certificate") || - (!oldOk || !newOk || (oldValue != "" || newValue != "") && - str.AddPrefix(oldValue, "prd_") != str.AddPrefix(newValue, "prd_")) { + if diff.HasChange("certificate") || str.AddPrefix(o, "prd_") != str.AddPrefix(n, "prd_") { return fmt.Errorf("error: Changes to non-updatable fields 'product_id' and 'certificate' are not permitted") } } diff --git a/pkg/providers/property/resource_akamai_edge_hostname_test.go b/pkg/providers/property/resource_akamai_edge_hostname_test.go index 92dae8b17..9b52b5d5e 100644 --- a/pkg/providers/property/resource_akamai_edge_hostname_test.go +++ b/pkg/providers/property/resource_akamai_edge_hostname_test.go @@ -1161,9 +1161,9 @@ func TestResourceEdgeHostnames_WithImport(t *testing.T) { EdgeHostnames: papi.EdgeHostnameItems{Items: []papi.EdgeHostnameGetItem{ { ID: "eh_1", - Domain: "test.akamaized.net", + Domain: "test2.akamaized.net", ProductID: "prd_2", - DomainPrefix: "test", + DomainPrefix: "test2", DomainSuffix: "akamaized.net", IPVersionBehavior: "IPV4", }, @@ -1180,6 +1180,47 @@ func TestResourceEdgeHostnames_WithImport(t *testing.T) { } expectGetEdgeHostnames := func(m *papi.Mock, ContractID, GroupID string) *mock.Call { + return m.On("GetEdgeHostnames", mock.Anything, papi.GetEdgeHostnamesRequest{ + ContractID: ContractID, + GroupID: GroupID, + }).Return(&papi.GetEdgeHostnamesResponse{ + ContractID: "ctr_1", + GroupID: "grp_2", + EdgeHostnames: papi.EdgeHostnameItems{Items: []papi.EdgeHostnameGetItem{ + { + ID: "eh_1", + Domain: "test1.akamaized.net", + DomainPrefix: "test1", + DomainSuffix: "akamaized.net", + IPVersionBehavior: "IPV4", + }, + { + ID: "eh_2", + Domain: "test3.edgesuite.net", + DomainPrefix: "test3", + DomainSuffix: "edgesuite.net", + IPVersionBehavior: "IPV4", + }, + }}, + }, nil) + } + createEdgeHostnames := func(mp *papi.Mock) *mock.Call { + return mp.On("CreateEdgeHostname", mock.Anything, papi.CreateEdgeHostnameRequest{ + ContractID: "ctr_1", + GroupID: "grp_2", + EdgeHostname: papi.EdgeHostnameCreate{ + ProductID: "prd_2", + DomainPrefix: "test", + DomainSuffix: "akamaized.net", + SecureNetwork: "SHARED_CERT", + IPVersionBehavior: "IPV4", + }, + }).Return(&papi.CreateEdgeHostnameResponse{ + EdgeHostnameID: "eh_1", + }, nil) + } + + expectGetEdgeHostnamesAfterCreate := func(m *papi.Mock, ContractID, GroupID string) *mock.Call { return m.On("GetEdgeHostnames", mock.Anything, papi.GetEdgeHostnamesRequest{ ContractID: ContractID, GroupID: GroupID, @@ -1209,8 +1250,10 @@ func TestResourceEdgeHostnames_WithImport(t *testing.T) { client := &papi.Mock{} id := "eh_1,1,2" - expectGetEdgeHostname(client, "eh_1", "ctr_1", "grp_2") - expectGetEdgeHostnames(client, "ctr_1", "grp_2") + expectGetEdgeHostnames(client, "ctr_1", "grp_2").Once() + createEdgeHostnames(client).Once() + expectGetEdgeHostnamesAfterCreate(client, "ctr_1", "grp_2") + expectGetEdgeHostname(client, "eh_1", "ctr_1", "grp_2").Once() useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), From cc1890a8f4856ca4d4d05c75612b00d69dc9db15 Mon Sep 17 00:00:00 2001 From: rbhatved Date: Thu, 21 Dec 2023 15:41:01 +0530 Subject: [PATCH 23/52] DXE-3094 Addressed review comments --- .../resource_akamai_edge_hostname_test.go | 23 +++---------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/pkg/providers/property/resource_akamai_edge_hostname_test.go b/pkg/providers/property/resource_akamai_edge_hostname_test.go index 9b52b5d5e..366f20a9c 100644 --- a/pkg/providers/property/resource_akamai_edge_hostname_test.go +++ b/pkg/providers/property/resource_akamai_edge_hostname_test.go @@ -438,26 +438,9 @@ func TestResourceEdgeHostname(t *testing.T) { ContractID: "ctr_2", GroupID: "grp_2", }).Return(&papi.GetEdgeHostnamesResponse{ - ContractID: "ctr_2", - GroupID: "grp_2", - EdgeHostnames: papi.EdgeHostnameItems{Items: []papi.EdgeHostnameGetItem{ - { - ID: "eh_123", - Domain: "test1.akamaized.net", - ProductID: "prd_2", - DomainPrefix: "test1", - DomainSuffix: "akamaized.net", - IPVersionBehavior: "IPV4", - }, - { - ID: "eh_2", - Domain: "test2.akamaized.net", - ProductID: "prd_2", - DomainPrefix: "test2", - DomainSuffix: "akamaized.net", - IPVersionBehavior: "IPV4", - }, - }}, + ContractID: "ctr_2", + GroupID: "grp_2", + EdgeHostnames: papi.EdgeHostnameItems{Items: []papi.EdgeHostnameGetItem{}}, }, nil).Once() mp.On("CreateEdgeHostname", mock.Anything, papi.CreateEdgeHostnameRequest{ From 5b7d088aef6bf57a58a013d5fbb487e2d6cfe7f6 Mon Sep 17 00:00:00 2001 From: Dawid Dzhafarov Date: Tue, 27 Feb 2024 09:47:17 +0000 Subject: [PATCH 24/52] DXE-3612 Fix sp-breaking-changes branch --- GNUmakefile | 2 +- ...resource_akamai_appsec_activations_test.go | 8 +- ...esource_akamai_appsec_match_target_test.go | 8 +- pkg/providers/cloudlets/cloudlets.go | 3 +- .../cloudlets/data_akamai_cloudlets_policy.go | 7 +- ...akamai_cloudlets_policy_activation_test.go | 11 +-- ...ata_akamai_cloudlets_shared_policy_test.go | 10 +- .../cloudlets/policy_version_test.go | 10 +- pkg/providers/cloudlets/provider.go | 39 +++----- .../resource_akamai_cloudlets_policy.go | 5 +- ...akamai_cloudlets_policy_activation_test.go | 2 +- .../resource_akamai_cloudlets_policy_test.go | 98 +++++++++---------- .../resource_akamai_cloudlets_policy_v3.go | 6 +- .../activation.tf | 2 +- .../no_network.tf | 2 +- .../no_property_id.tf | 2 +- .../no_policy_id.tf | 2 +- .../no_version.tf | 2 +- .../with_version.tf | 2 +- .../policy_activation_update_version2.tf | 2 +- .../policy_activation_version1.tf | 2 +- .../policy_activation_version1_prod.tf | 2 +- .../policy_activation_version1_production.tf | 2 +- .../policy_activation_version_invalid.tf | 2 +- .../shared_policy_activation_version1.tf | 2 +- .../policy_create.tf | 2 +- .../import_no_version/policy_create.tf | 2 +- .../lifecycle_with_drift/policy_create.tf | 2 +- .../create_no_match_rules/policy_create.tf | 2 +- .../policy_create.tf | 2 +- .../lifecycle/policy_create.tf | 2 +- .../lifecycle/policy_update.tf | 2 +- .../lifecycle_no_version/policy_create.tf | 2 +- .../lifecycle_no_version/policy_update.tf | 2 +- .../lifecycle_policy_update/policy_create.tf | 2 +- .../lifecycle_policy_update/policy_update.tf | 2 +- .../policy_create.tf | 2 +- .../policy_update.tf | 2 +- .../lifecycle_version_update/policy_create.tf | 2 +- .../lifecycle_version_update/policy_update.tf | 2 +- .../lifecycle_with_drift/policy_create.tf | 2 +- .../TestResPolicyV3/timeouts/policy_create.tf | 2 +- .../dns/resource_akamai_dns_zone_test.go | 6 +- .../TestResDnsZone/create_without_group.tf | 2 +- .../edgeworkers_activation_note_update.tf | 2 +- ...rs_activation_note_update_no_activation.tf | 2 +- pkg/providers/gtm/data_akamai_gtm_asmap.go | 2 +- .../gtm/data_akamai_gtm_asmap_test.go | 2 +- pkg/providers/gtm/data_akamai_gtm_cidrmap.go | 2 +- .../gtm/data_akamai_gtm_cidrmap_test.go | 2 +- .../gtm/data_akamai_gtm_datacenter.go | 2 +- .../gtm/data_akamai_gtm_datacenters.go | 2 +- .../gtm/data_akamai_gtm_default_datacenter.go | 8 +- pkg/providers/gtm/data_akamai_gtm_domain.go | 2 +- .../gtm/data_akamai_gtm_domain_test.go | 2 +- pkg/providers/gtm/data_akamai_gtm_domains.go | 2 +- .../gtm/data_akamai_gtm_domains_test.go | 2 +- pkg/providers/gtm/data_akamai_gtm_resource.go | 2 +- .../gtm/data_akamai_gtm_resource_test.go | 2 +- .../gtm/data_akamai_gtm_resources.go | 2 +- .../gtm/data_akamai_gtm_resources_test.go | 2 +- pkg/providers/gtm/gtm.go | 3 +- pkg/providers/gtm/provider.go | 74 ++++---------- pkg/providers/gtm/provider_test.go | 12 +-- .../gtm/resource_akamai_gtm_asmap.go | 20 ++-- .../gtm/resource_akamai_gtm_cidrmap.go | 16 +-- .../gtm/resource_akamai_gtm_datacenter.go | 16 +-- .../gtm/resource_akamai_gtm_domain.go | 16 +-- .../gtm/resource_akamai_gtm_geomap.go | 16 +-- .../gtm/resource_akamai_gtm_property.go | 22 ++--- .../gtm/resource_akamai_gtm_property_test.go | 2 +- .../gtm/resource_akamai_gtm_resource.go | 18 ++-- .../TestDataGTMResource/missing_domain.tf | 2 +- .../missing_resource_name.tf | 2 +- .../gtm/testdata/TestDataGTMResource/valid.tf | 2 +- .../TestDataGTMResources/missing_domain.tf | 2 +- .../testdata/TestDataGTMResources/valid.tf | 2 +- .../TestDataGtmAsmap/missing_domain.tf | 2 +- .../TestDataGtmAsmap/missing_map_name.tf | 2 +- .../gtm/testdata/TestDataGtmAsmap/valid.tf | 2 +- .../TestDataGtmCidrmap/missing_domain.tf | 2 +- .../TestDataGtmCidrmap/missing_map_name.tf | 2 +- .../gtm/testdata/TestDataGtmCidrmap/valid.tf | 2 +- .../TestDataGtmDomain/missing_domain_name.tf | 2 +- .../gtm/testdata/TestDataGtmDomain/valid.tf | 2 +- .../gtm/testdata/TestDataGtmDomains/valid.tf | 2 +- .../imaging/imagewriter/convert-image.gen.go | 4 +- ...source_akamai_imaging_policy_image_test.go | 18 ++-- .../policy_create.tf | 2 +- .../policy_update.tf | 2 +- ...rce_akamai_networklist_activations_test.go | 4 +- ...data_akamai_property_rules_builder_test.go | 2 +- pkg/providers/property/provider.go | 39 +++----- pkg/providers/property/provider_test.go | 96 ------------------ .../property/resource_akamai_property.go | 4 +- .../resource_akamai_property_bootstrap.go | 70 +++++++------ ...resource_akamai_property_bootstrap_test.go | 16 +-- .../property/resource_akamai_property_test.go | 4 +- .../rules_v2024_01_09.tf | 2 +- .../Importable/importable-with-bootstrap.tf | 2 +- .../01_with_notes_and_comments.tf | 2 +- .../versionNotes/02_update_notes_no_diff.tf | 2 +- .../versionNotes/03_update_notes_and_rules.tf | 2 +- .../04_05_remove_notes_update_comments.tf | 2 +- .../Lifecycle/with-propertyID/step0.tf | 2 +- .../Lifecycle/with-propertyID/step1.tf | 2 +- ...perty_with_validation_warning_for_rules.tf | 2 +- .../TestResPropertyBootstrap/create.tf | 2 +- .../create_without_prefixes.tf | 2 +- .../update_contract.tf | 2 +- .../TestResPropertyBootstrap/update_group.tf | 2 +- .../update_product.tf | 2 +- 112 files changed, 345 insertions(+), 502 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index fe152216c..1513a7683 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -56,7 +56,7 @@ tidy: .PHONY: test test: - go test $(TEST) -v $(TESTARGS) -timeout 30m 2>&1 + go test $(TEST) -v $(TESTARGS) -timeout 40m 2>&1 .PHONY: testacc testacc: diff --git a/pkg/providers/appsec/resource_akamai_appsec_activations_test.go b/pkg/providers/appsec/resource_akamai_appsec_activations_test.go index cb4d0f791..73ca3853b 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_activations_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_activations_test.go @@ -392,8 +392,8 @@ func TestAkamaiActivations_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResActivations/match_by_id.tf"), @@ -508,8 +508,8 @@ func TestAkamaiActivations_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResActivations/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_match_target_test.go b/pkg/providers/appsec/resource_akamai_appsec_match_target_test.go index 9965a21ab..566a1c5b1 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_match_target_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_match_target_test.go @@ -140,8 +140,8 @@ func TestAkamaiMatchTarget_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResMatchTarget/match_by_id.tf"), @@ -210,8 +210,8 @@ func TestAkamaiMatchTarget_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResMatchTarget/match_by_id.tf"), diff --git a/pkg/providers/cloudlets/cloudlets.go b/pkg/providers/cloudlets/cloudlets.go index fc4f7783f..b609daa06 100644 --- a/pkg/providers/cloudlets/cloudlets.go +++ b/pkg/providers/cloudlets/cloudlets.go @@ -3,6 +3,5 @@ package cloudlets import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" func init() { - registry.RegisterSDKSubprovider(NewPluginSubprovider()) - registry.RegisterFrameworkSubprovider(NewFrameworkSubprovider()) + registry.RegisterSubprovider(NewSubprovider()) } diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_policy.go b/pkg/providers/cloudlets/data_akamai_cloudlets_policy.go index 8f16c0901..c231cd8fa 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_policy.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_policy.go @@ -5,13 +5,12 @@ import ( "encoding/json" "fmt" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" ) func dataSourceCloudletsPolicy() *schema.Resource { @@ -302,7 +301,7 @@ func dataSourceCloudletsPolicyRead(ctx context.Context, d *schema.ResourceData, return diag.FromErr(err) } } else { - version = tools.Int64Ptr(int64(v)) + version = ptr.To(int64(v)) } if version != nil { diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_policy_activation_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_policy_activation_test.go index 23fe32a84..94c98f957 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_policy_activation_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_policy_activation_test.go @@ -3,15 +3,14 @@ package cloudlets import ( "fmt" "net/http" - "time" - "regexp" "testing" + "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets/v3" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -144,7 +143,7 @@ func TestNonSharedPolicyActivationDataSource(t *testing.T) { useClient(clientV2, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, fmt.Sprintf("testdata/TestDataCloudletsPolicyActivation/%s", test.config)), Check: test.check, @@ -411,7 +410,7 @@ func TestSharedPolicyActivationDataSource(t *testing.T) { useClientV2AndV3(clientV2, clientV3, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, fmt.Sprintf("testdata/TestDataCloudletsPolicyActivation/%s", test.config)), Check: test.check, @@ -455,7 +454,7 @@ func mockGetPolicyV3(m *v3.Mock, data testDataForSharedPolicyActivation, times i }).Return(&v3.Policy{ CloudletType: data.cloudletType, CurrentActivations: data.activations, - Description: tools.StringPtr(data.description), + Description: ptr.To(data.description), GroupID: data.groupID, ID: data.policyID, Name: data.name, diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_shared_policy_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_shared_policy_test.go index 2135e8945..6d7ee7128 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_shared_policy_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_shared_policy_test.go @@ -9,8 +9,8 @@ import ( "time" v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets/v3" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) @@ -44,7 +44,7 @@ func TestSharedPolicyDataSource(t *testing.T) { id: "akamai_cloudlets_shared_policy", policyID: 1, version: 2, - versionDescription: tools.StringPtr("version 2 description"), + versionDescription: ptr.To("version 2 description"), groupID: 12, name: "TestName", cloudletType: v3.CloudletTypeAP, @@ -263,7 +263,7 @@ func TestSharedPolicyDataSource(t *testing.T) { useClientV3(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, fmt.Sprintf("testdata/TestDataCloudletsSharedPolicy/%s", test.config)), Check: checkAttrsForSharedPolicy(test.data), @@ -347,7 +347,7 @@ func mockGetPolicy(m *v3.Mock, data testDataForSharedPolicy, times int) { }).Return(&v3.Policy{ CloudletType: data.cloudletType, CurrentActivations: data.activations, - Description: tools.StringPtr(data.description), + Description: ptr.To(data.description), GroupID: data.groupID, ID: data.policyID, Name: data.name, @@ -373,7 +373,7 @@ func createPolicyVersions(policyID int64, numberOfVersions, pageNumber int) *v3. var policyVersions v3.ListPolicyVersions for i := numberOfVersions; i > 0; i-- { policyVersions.PolicyVersions = append(policyVersions.PolicyVersions, v3.ListPolicyVersionsItem{ - Description: tools.StringPtr(fmt.Sprintf("Description%d", i)), + Description: ptr.To(fmt.Sprintf("Description%d", i)), ID: int64(i), Immutable: true, PolicyID: policyID, diff --git a/pkg/providers/cloudlets/policy_version_test.go b/pkg/providers/cloudlets/policy_version_test.go index 69044691b..01a6cdd01 100644 --- a/pkg/providers/cloudlets/policy_version_test.go +++ b/pkg/providers/cloudlets/policy_version_test.go @@ -7,7 +7,7 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets/v3" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "github.com/tj/assert" @@ -43,7 +43,7 @@ func TestFindingLatestPolicyVersion(t *testing.T) { Offset: 1000, }).Return([]cloudlets.PolicyVersion{}, nil).Once() }, - expected: tools.Int64Ptr(0), + expected: ptr.To(int64(0)), }, "first policy version on 1st page found": { init: func(m *cloudlets.Mock) { @@ -55,7 +55,7 @@ func TestFindingLatestPolicyVersion(t *testing.T) { Offset: 0, }).Return(policyVersionsPage, nil).Once() }, - expected: tools.Int64Ptr(500), + expected: ptr.To(int64(500)), }, "no policy versions found": { init: func(m *cloudlets.Mock) { @@ -132,7 +132,7 @@ func TestFindingLatestPolicyVersionV3(t *testing.T) { Page: 1, }).Return(&v3.ListPolicyVersions{PolicyVersions: []v3.ListPolicyVersionsItem{}}, nil).Once() }, - expected: tools.Int64Ptr(0), + expected: ptr.To(int64(0)), }, "first policy version on 1st page found": { init: func(m *v3.Mock) { @@ -144,7 +144,7 @@ func TestFindingLatestPolicyVersionV3(t *testing.T) { Page: 0, }).Return(&v3.ListPolicyVersions{PolicyVersions: policyVersionsPage}, nil).Once() }, - expected: tools.Int64Ptr(500), + expected: ptr.To(int64(500)), }, "no policy versions found": { init: func(m *v3.Mock) { diff --git a/pkg/providers/cloudlets/provider.go b/pkg/providers/cloudlets/provider.go index 97799597c..695909537 100644 --- a/pkg/providers/cloudlets/provider.go +++ b/pkg/providers/cloudlets/provider.go @@ -13,11 +13,12 @@ import ( ) type ( - // PluginSubprovider gathers property resources and data sources written using terraform-plugin-sdk - PluginSubprovider struct{} + // Subprovider gathers cloudlets resources and data sources + Subprovider struct{} +) - // FrameworkSubprovider gathers property resources and data sources written using terraform-plugin-framework - FrameworkSubprovider struct{} +var ( + _ subprovider.Subprovider = &Subprovider{} ) var ( @@ -25,17 +26,9 @@ var ( v3Client v3.Cloudlets ) -var _ subprovider.Plugin = &PluginSubprovider{} -var _ subprovider.Framework = &FrameworkSubprovider{} - -// NewPluginSubprovider returns a core SDKv2 based sub provider -func NewPluginSubprovider() *PluginSubprovider { - return &PluginSubprovider{} -} - -// NewFrameworkSubprovider returns a core Framework based sub provider -func NewFrameworkSubprovider() *FrameworkSubprovider { - return &FrameworkSubprovider{} +// NewSubprovider returns a new cloudlets subprovider +func NewSubprovider() *Subprovider { + return &Subprovider{} } // Client returns the cloudlets interface @@ -54,8 +47,8 @@ func ClientV3(meta meta.Meta) v3.Cloudlets { return v3.Client(meta.Session()) } -// Resources returns terraform resources for cloudlets -func (p *PluginSubprovider) Resources() map[string]*schema.Resource { +// SDKResources returns the cloudlets resources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKResources() map[string]*schema.Resource { return map[string]*schema.Resource{ "akamai_cloudlets_application_load_balancer": resourceCloudletsApplicationLoadBalancer(), "akamai_cloudlets_application_load_balancer_activation": resourceCloudletsApplicationLoadBalancerActivation(), @@ -64,8 +57,8 @@ func (p *PluginSubprovider) Resources() map[string]*schema.Resource { } } -// DataSources returns terraform data sources for cloudlets -func (p *PluginSubprovider) DataSources() map[string]*schema.Resource { +// SDKDataSources returns the cloudlets data sources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKDataSources() map[string]*schema.Resource { return map[string]*schema.Resource{ "akamai_cloudlets_api_prioritization_match_rule": dataSourceCloudletsAPIPrioritizationMatchRule(), "akamai_cloudlets_application_load_balancer": dataSourceCloudletsApplicationLoadBalancer(), @@ -80,13 +73,13 @@ func (p *PluginSubprovider) DataSources() map[string]*schema.Resource { } } -// Resources returns terraform resources for cloudlets -func (p *FrameworkSubprovider) Resources() []func() resource.Resource { +// FrameworkResources returns the cloudlets resources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkResources() []func() resource.Resource { return []func() resource.Resource{} } -// DataSources returns terraform data sources for cloudlets -func (p *FrameworkSubprovider) DataSources() []func() datasource.DataSource { +// FrameworkDataSources returns the cloudlets data sources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkDataSources() []func() datasource.DataSource { return []func() datasource.DataSource{ NewPolicyActivationDataSource, NewSharedPolicyDataSource, diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy.go index 3c6941b07..697ef7ffb 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy.go @@ -13,13 +13,12 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets/v3" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" - + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" @@ -551,7 +550,7 @@ func checkForV2Policy(ctx context.Context, meta meta.Meta, policyName string) (p for { policies, err := v2Client.ListPolicies(ctx, cloudlets.ListPoliciesRequest{ Offset: offset, - PageSize: tools.IntPtr(size), + PageSize: ptr.To(size), }) if err == nil { if policyID := findPolicyV2ByName(policies, policyName); policyID != 0 { diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_test.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_test.go index 796e9ff9b..6af5b3edb 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_test.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_test.go @@ -1755,7 +1755,7 @@ func TestResourceV3CloudletsPolicyActivation(t *testing.T) { test.init(v2Client, v3client) useClientV2AndV3(v2Client, v3client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: test.steps, }) diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go index ecb2b0496..13210bcab 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go @@ -86,7 +86,7 @@ func TestResourcePolicyV2(t *testing.T) { client.On("ListPolicyVersions", mock.Anything, cloudlets.ListPolicyVersionsRequest{ PolicyID: policyId, Offset: 0, - PageSize: tools.IntPtr(1000), + PageSize: ptr.To(1000), }).Return(versions, nil).Times(times) } @@ -196,7 +196,7 @@ func TestResourcePolicyV2(t *testing.T) { } expectImportPolicy = func(_ *testing.T, client *cloudlets.Mock, policyID int64, policyName string) { - client.On("ListPolicies", mock.Anything, cloudlets.ListPoliciesRequest{PageSize: tools.IntPtr(1000), Offset: 0}).Return([]cloudlets.Policy{ + client.On("ListPolicies", mock.Anything, cloudlets.ListPoliciesRequest{PageSize: ptr.To(1000), Offset: 0}).Return([]cloudlets.Policy{ { PolicyID: policyID, Name: policyName, }, @@ -360,7 +360,7 @@ func TestResourcePolicyV2(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -781,7 +781,7 @@ func TestResourcePolicyV2(t *testing.T) { expectRemovePolicy(t, client, 2, 1, 0) useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -1169,7 +1169,7 @@ func TestResourcePolicyV2(t *testing.T) { client.On("GetPolicy", mock.Anything, cloudlets.GetPolicyRequest{PolicyID: policy.PolicyID}).Return(nil, fmt.Errorf("GetPolicyError")) client.On("ListPolicyVersions", mock.Anything, cloudlets.ListPolicyVersionsRequest{PolicyID: policy.PolicyID, Offset: 0, - PageSize: tools.IntPtr(1000), + PageSize: ptr.To(1000), }).Return([]cloudlets.PolicyVersion{{ PolicyID: 2, Version: 1, @@ -1316,12 +1316,12 @@ func TestResourcePolicyV2(t *testing.T) { // custom import mocks // mock that 1000 policies are returned, desired not found client.On("ListPolicies", mock.Anything, cloudlets.ListPoliciesRequest{ - PageSize: tools.IntPtr(1000), + PageSize: ptr.To(1000), Offset: 0, }).Return(make([]cloudlets.Policy, 1000), nil).Once() // mock that desired policy is on the next page client.On("ListPolicies", mock.Anything, cloudlets.ListPoliciesRequest{ - PageSize: tools.IntPtr(1000), + PageSize: ptr.To(1000), Offset: 1, }).Return([]cloudlets.Policy{ { @@ -1359,7 +1359,7 @@ func TestResourcePolicyV2(t *testing.T) { policy, version := expectCreatePolicy(t, clientV2, 2, "test_policy", nil, "test policy description") policyVersions := []cloudlets.PolicyVersion{*version} expectReadPolicy(t, clientV2, policy, policyVersions, 2) - clientV2.On("ListPolicies", mock.Anything, cloudlets.ListPoliciesRequest{PageSize: tools.IntPtr(1000), Offset: 0}). + clientV2.On("ListPolicies", mock.Anything, cloudlets.ListPoliciesRequest{PageSize: ptr.To(1000), Offset: 0}). Return([]cloudlets.Policy{}, nil).Once() clientV3.On("ListPolicies", mock.Anything, v3.ListPoliciesRequest{ Page: 0, @@ -1371,7 +1371,7 @@ func TestResourcePolicyV2(t *testing.T) { useClientV2AndV3(clientV2, clientV3, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -1475,7 +1475,7 @@ func TestResourcePolicyV3(t *testing.T) { version := &v3.PolicyVersion{ PolicyID: policyID, PolicyVersion: 1, - Description: tools.StringPtr(description), + Description: ptr.To(description), MatchRules: matchRules, MatchRulesWarnings: []v3.MatchRulesWarning{ { @@ -1499,7 +1499,7 @@ func TestResourcePolicyV3(t *testing.T) { PolicyID: policyID, CreatePolicyVersion: v3.CreatePolicyVersion{ MatchRules: matchRules, - Description: tools.StringPtr(description), + Description: ptr.To(description), }, }).Return(version, nil).Once() } else { @@ -1507,7 +1507,7 @@ func TestResourcePolicyV3(t *testing.T) { PolicyID: policyID, CreatePolicyVersion: v3.CreatePolicyVersion{ MatchRules: make(v3.MatchRules, 0), - Description: tools.StringPtr(description), + Description: ptr.To(description), }, }).Return(version, nil).Once() } @@ -1579,7 +1579,7 @@ func TestResourcePolicyV3(t *testing.T) { client.On("CreatePolicyVersion", mock.Anything, v3.CreatePolicyVersionRequest{ CreatePolicyVersion: v3.CreatePolicyVersion{ - Description: tools.StringPtr("test policy description"), + Description: ptr.To("test policy description"), MatchRules: newMatchRules, }, PolicyID: policyID, @@ -1599,7 +1599,7 @@ func TestResourcePolicyV3(t *testing.T) { versionUpdate.MatchRules = newMatchRules client.On("UpdatePolicyVersion", mock.Anything, v3.UpdatePolicyVersionRequest{ UpdatePolicyVersion: v3.UpdatePolicyVersion{ - Description: tools.StringPtr("test policy description"), + Description: ptr.To("test policy description"), MatchRules: newMatchRules, }, PolicyID: policyID, @@ -1626,7 +1626,7 @@ func TestResourcePolicyV3(t *testing.T) { }, } clientV2.On("ListPolicies", mock.Anything, cloudlets.ListPoliciesRequest{ - PageSize: tools.IntPtr(1000), + PageSize: ptr.To(1000), Offset: 0, }).Return(listPoliciesV2Resp, nil).Once() clientV3.On("ListPolicies", mock.Anything, v3.ListPoliciesRequest{ @@ -1720,7 +1720,7 @@ func TestResourcePolicyV3(t *testing.T) { useClientV3(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -1782,7 +1782,7 @@ func TestResourcePolicyV3(t *testing.T) { version = &v3.PolicyVersion{ PolicyID: 2, PolicyVersion: 2, - Description: tools.StringPtr("new description after drift"), + Description: ptr.To("new description after drift"), MatchRules: matchRules, MatchRulesWarnings: []v3.MatchRulesWarning{ { @@ -1798,7 +1798,7 @@ func TestResourcePolicyV3(t *testing.T) { useClientV3(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -1908,7 +1908,7 @@ func TestResourcePolicyV3(t *testing.T) { useClientV3(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -2009,7 +2009,7 @@ func TestResourcePolicyV3(t *testing.T) { useClientV3(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -2066,7 +2066,7 @@ func TestResourcePolicyV3(t *testing.T) { useClientV3(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -2131,7 +2131,7 @@ func TestResourcePolicyV3(t *testing.T) { useClientV3(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -2196,7 +2196,7 @@ func TestResourcePolicyV3(t *testing.T) { useClientV3(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -2269,7 +2269,7 @@ func TestResourcePolicyV3(t *testing.T) { useClientV3(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -2328,7 +2328,7 @@ func TestResourcePolicyV3(t *testing.T) { useClientV3(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -2363,7 +2363,7 @@ func TestResourcePolicyV3(t *testing.T) { expectRemovePolicy(t, client, 2) useClientV3(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -2388,13 +2388,13 @@ func TestResourcePolicyV3(t *testing.T) { expectReadPolicy(t, client, policy, version, 3) version = &v3.PolicyVersion{ - Description: tools.StringPtr("test policy description"), + Description: ptr.To("test policy description"), PolicyID: 2, PolicyVersion: 1, } client.On("CreatePolicyVersion", mock.Anything, v3.CreatePolicyVersionRequest{ CreatePolicyVersion: v3.CreatePolicyVersion{ - Description: tools.StringPtr("test policy description"), + Description: ptr.To("test policy description"), MatchRules: make(v3.MatchRules, 0), }, PolicyID: 2, @@ -2403,7 +2403,7 @@ func TestResourcePolicyV3(t *testing.T) { expectRemovePolicy(t, client, 2) useClientV3(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -2438,7 +2438,7 @@ func TestResourcePolicyV3(t *testing.T) { expectRemovePolicy(t, client, 2) useClientV3(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -2476,7 +2476,7 @@ func TestResourcePolicyV3(t *testing.T) { expectRemovePolicy(t, client, 2) useClientV3(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -2506,7 +2506,7 @@ func TestResourcePolicyV3(t *testing.T) { useClientV3(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -2564,7 +2564,7 @@ func TestResourcePolicyV3(t *testing.T) { }).Return(policy, nil) client.On("CreatePolicyVersion", mock.Anything, v3.CreatePolicyVersionRequest{ CreatePolicyVersion: v3.CreatePolicyVersion{ - Description: tools.StringPtr("test policy description"), + Description: ptr.To("test policy description"), MatchRules: matchRules, }, PolicyID: 2, @@ -2605,7 +2605,7 @@ func TestResourcePolicyV3(t *testing.T) { testCases[i].Expectations(client) useClientV3(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -2631,7 +2631,7 @@ func TestResourcePolicyV3(t *testing.T) { expectRemovePolicy(t, client, 2) useClientV3(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -2660,7 +2660,7 @@ func TestResourcePolicyV3(t *testing.T) { expectRemovePolicy(t, client, 2) useClientV3(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -2715,7 +2715,7 @@ func TestResourcePolicyV3(t *testing.T) { useClientV3(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -2770,7 +2770,7 @@ func TestResourcePolicyV3(t *testing.T) { }).Return(version, nil).Once() client.On("UpdatePolicyVersion", mock.Anything, v3.UpdatePolicyVersionRequest{ UpdatePolicyVersion: v3.UpdatePolicyVersion{ - Description: tools.StringPtr("test policy description"), + Description: ptr.To("test policy description"), MatchRules: matchRules[:1], }, PolicyID: policy.ID, @@ -2809,7 +2809,7 @@ func TestResourcePolicyV3(t *testing.T) { testCases[i].Expectations(client) useClientV3(client, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), @@ -2837,7 +2837,7 @@ func TestResourcePolicyV3(t *testing.T) { useClientV2AndV3(clientV2, clientV3, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/create_no_match_rules/policy_create.tf", testDir)), @@ -2873,7 +2873,7 @@ func TestResourcePolicyV3(t *testing.T) { useClientV2AndV3(clientV2, clientV3, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/create_no_match_rules_no_description/policy_create.tf", testDir)), @@ -2905,7 +2905,7 @@ func TestResourcePolicyV3(t *testing.T) { policy, version := expectCreatePolicy(t, clientV3, 2, 123, nil, "test policy description") expectReadPolicy(t, clientV3, policy, version, 2) clientV2.On("ListPolicies", mock.Anything, cloudlets.ListPoliciesRequest{ - PageSize: tools.IntPtr(1000), + PageSize: ptr.To(1000), Offset: 0, }).Return([]cloudlets.Policy{}, nil).Once() clientV3.On("ListPolicies", mock.Anything, v3.ListPoliciesRequest{ @@ -2917,7 +2917,7 @@ func TestResourcePolicyV3(t *testing.T) { useClientV2AndV3(clientV2, clientV3, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/create_no_match_rules/policy_create.tf", testDir)), @@ -2950,7 +2950,7 @@ func TestResourcePolicyV3(t *testing.T) { policy, version := expectCreatePolicy(t, clientV3, 2, 123, nil, "test policy description") expectReadPolicy(t, clientV3, policy, version, 3) clientV2.On("ListPolicies", mock.Anything, cloudlets.ListPoliciesRequest{ - PageSize: tools.IntPtr(1000), + PageSize: ptr.To(1000), Offset: 0, }).Return(nil, fmt.Errorf("v2 api error")).Once() clientV3.On("ListPolicies", mock.Anything, v3.ListPoliciesRequest{ @@ -2966,7 +2966,7 @@ func TestResourcePolicyV3(t *testing.T) { useClientV2AndV3(clientV2, clientV3, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/create_no_match_rules/policy_create.tf", testDir)), @@ -2998,7 +2998,7 @@ func TestResourcePolicyV3(t *testing.T) { policy, version := expectCreatePolicy(t, clientV3, 2, 123, nil, "test policy description") expectReadPolicy(t, clientV3, policy, version, 2) clientV2.On("ListPolicies", mock.Anything, cloudlets.ListPoliciesRequest{ - PageSize: tools.IntPtr(1000), + PageSize: ptr.To(1000), Offset: 0, }).Return(nil, fmt.Errorf("v2 api error")).Once() clientV3.On("ListPolicies", mock.Anything, v3.ListPoliciesRequest{ @@ -3008,7 +3008,7 @@ func TestResourcePolicyV3(t *testing.T) { useClientV2AndV3(clientV2, clientV3, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/create_no_match_rules/policy_create.tf", testDir)), @@ -3048,7 +3048,7 @@ func TestResourcePolicyV3(t *testing.T) { }, } clientV2.On("ListPolicies", mock.Anything, cloudlets.ListPoliciesRequest{ - PageSize: tools.IntPtr(1000), + PageSize: ptr.To(1000), Offset: 0, }).Return(listPoliciesV2Resp, nil).Once() // mock that 1000 policies are returned, desired one not found @@ -3084,7 +3084,7 @@ func TestResourcePolicyV3(t *testing.T) { useClientV2AndV3(clientV2, clientV3, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/create_no_match_rules/policy_create.tf", testDir)), diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_v3.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_v3.go index 4c2eb72b1..1e1b271ba 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_v3.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_v3.go @@ -8,9 +8,9 @@ import ( "time" v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets/v3" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -44,7 +44,7 @@ func (strategy v3PolicyStrategy) updatePolicyVersion(ctx context.Context, d *sch createPolicyReq := v3.CreatePolicyVersionRequest{ CreatePolicyVersion: v3.CreatePolicyVersion{ MatchRules: matchRules, - Description: tools.StringPtr(description), + Description: ptr.To(description), }, PolicyID: policyID, } @@ -62,7 +62,7 @@ func (strategy v3PolicyStrategy) updatePolicyVersion(ctx context.Context, d *sch updatePolicyVersionReq := v3.UpdatePolicyVersionRequest{ UpdatePolicyVersion: v3.UpdatePolicyVersion{ MatchRules: matchRules, - Description: tools.StringPtr(description), + Description: ptr.To(description), }, PolicyID: policyID, PolicyVersion: version, diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicyActivation/activation.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicyActivation/activation.tf index 78486d474..cab06b239 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicyActivation/activation.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicyActivation/activation.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_policy_activation" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicyActivation/no_network.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicyActivation/no_network.tf index 7a17c83b2..abf9dacd7 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicyActivation/no_network.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicyActivation/no_network.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_policy_activation" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicyActivation/no_property_id.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicyActivation/no_property_id.tf index ddf7a7211..5f24fed41 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicyActivation/no_property_id.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPolicyActivation/no_property_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_policy_activation" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsSharedPolicy/no_policy_id.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsSharedPolicy/no_policy_id.tf index fc7481d54..149a80fc0 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsSharedPolicy/no_policy_id.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsSharedPolicy/no_policy_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_shared_policy" "test" {} \ No newline at end of file diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsSharedPolicy/no_version.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsSharedPolicy/no_version.tf index 1ddb4c757..044edaa0b 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsSharedPolicy/no_version.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsSharedPolicy/no_version.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_shared_policy" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsSharedPolicy/with_version.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsSharedPolicy/with_version.tf index 62c4009c2..7d387fc01 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsSharedPolicy/with_version.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsSharedPolicy/with_version.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_shared_policy" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyV3Activation/policy_activation_update_version2.tf b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyV3Activation/policy_activation_update_version2.tf index 3bb836c5d..0fd3a7ba3 100644 --- a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyV3Activation/policy_activation_update_version2.tf +++ b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyV3Activation/policy_activation_update_version2.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy_activation" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyV3Activation/policy_activation_version1.tf b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyV3Activation/policy_activation_version1.tf index 9e1dbff76..c897d9994 100644 --- a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyV3Activation/policy_activation_version1.tf +++ b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyV3Activation/policy_activation_version1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy_activation" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyV3Activation/policy_activation_version1_prod.tf b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyV3Activation/policy_activation_version1_prod.tf index 85df6c194..349915fec 100644 --- a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyV3Activation/policy_activation_version1_prod.tf +++ b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyV3Activation/policy_activation_version1_prod.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy_activation" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyV3Activation/policy_activation_version1_production.tf b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyV3Activation/policy_activation_version1_production.tf index 472145dd0..8c1c64d32 100644 --- a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyV3Activation/policy_activation_version1_production.tf +++ b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyV3Activation/policy_activation_version1_production.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy_activation" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyV3Activation/policy_activation_version_invalid.tf b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyV3Activation/policy_activation_version_invalid.tf index 1aae5270e..969fcfa36 100644 --- a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyV3Activation/policy_activation_version_invalid.tf +++ b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyV3Activation/policy_activation_version_invalid.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy_activation" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyV3Activation/shared_policy_activation_version1.tf b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyV3Activation/shared_policy_activation_version1.tf index 9e1dbff76..c897d9994 100644 --- a/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyV3Activation/shared_policy_activation_version1.tf +++ b/pkg/providers/cloudlets/testdata/TestResCloudletsPolicyV3Activation/shared_policy_activation_version1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy_activation" "test" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/create_no_match_rules_no_description/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/create_no_match_rules_no_description/policy_create.tf index 3fc76ee11..5cbe8db7a 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/create_no_match_rules_no_description/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/create_no_match_rules_no_description/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/import_no_version/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/import_no_version/policy_create.tf index 3fc76ee11..5cbe8db7a 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/import_no_version/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/import_no_version/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_with_drift/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_with_drift/policy_create.tf index 9f9118414..fd220592b 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_with_drift/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicy/lifecycle_with_drift/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicyV3/create_no_match_rules/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicyV3/create_no_match_rules/policy_create.tf index 137618a94..fcbad6f6f 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicyV3/create_no_match_rules/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicyV3/create_no_match_rules/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicyV3/create_no_match_rules_no_description/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicyV3/create_no_match_rules_no_description/policy_create.tf index 571570215..2f1fb18e1 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicyV3/create_no_match_rules_no_description/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicyV3/create_no_match_rules_no_description/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle/policy_create.tf index 7838b5f20..193b5fde8 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle/policy_update.tf b/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle/policy_update.tf index e2f6a961d..429e96530 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle/policy_update.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_no_version/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_no_version/policy_create.tf index 571570215..2f1fb18e1 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_no_version/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_no_version/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_no_version/policy_update.tf b/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_no_version/policy_update.tf index 137618a94..fcbad6f6f 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_no_version/policy_update.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_no_version/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_policy_update/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_policy_update/policy_create.tf index 7838b5f20..193b5fde8 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_policy_update/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_policy_update/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_policy_update/policy_update.tf b/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_policy_update/policy_update.tf index dc150314d..cdf6009c1 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_policy_update/policy_update.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_policy_update/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_remove_match_rules/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_remove_match_rules/policy_create.tf index 7838b5f20..193b5fde8 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_remove_match_rules/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_remove_match_rules/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_remove_match_rules/policy_update.tf b/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_remove_match_rules/policy_update.tf index 137618a94..fcbad6f6f 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_remove_match_rules/policy_update.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_remove_match_rules/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_version_update/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_version_update/policy_create.tf index 6d675688a..aaaa39485 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_version_update/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_version_update/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_version_update/policy_update.tf b/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_version_update/policy_update.tf index 2639749b6..6319526f3 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_version_update/policy_update.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_version_update/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_with_drift/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_with_drift/policy_create.tf index 7838b5f20..193b5fde8 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_with_drift/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicyV3/lifecycle_with_drift/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/cloudlets/testdata/TestResPolicyV3/timeouts/policy_create.tf b/pkg/providers/cloudlets/testdata/TestResPolicyV3/timeouts/policy_create.tf index fa544efb5..7dec872f9 100644 --- a/pkg/providers/cloudlets/testdata/TestResPolicyV3/timeouts/policy_create.tf +++ b/pkg/providers/cloudlets/testdata/TestResPolicyV3/timeouts/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_cloudlets_policy" "policy" { diff --git a/pkg/providers/dns/resource_akamai_dns_zone_test.go b/pkg/providers/dns/resource_akamai_dns_zone_test.go index caa7a7d51..f251c775d 100644 --- a/pkg/providers/dns/resource_akamai_dns_zone_test.go +++ b/pkg/providers/dns/resource_akamai_dns_zone_test.go @@ -41,7 +41,7 @@ func TestResDnsZone(t *testing.T) { }() useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDnsZone/create_without_group.tf"), @@ -120,7 +120,7 @@ func TestResDnsZone(t *testing.T) { }() useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDnsZone/create_without_group.tf"), @@ -177,7 +177,7 @@ func TestResDnsZone(t *testing.T) { }() useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResDnsZone/create_without_group.tf"), diff --git a/pkg/providers/dns/testdata/TestResDnsZone/create_without_group.tf b/pkg/providers/dns/testdata/TestResDnsZone/create_without_group.tf index b66d9fadb..190e54a1a 100644 --- a/pkg/providers/dns/testdata/TestResDnsZone/create_without_group.tf +++ b/pkg/providers/dns/testdata/TestResDnsZone/create_without_group.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_dns_zone" "test_without_group" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_note_update.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_note_update.tf index d178f8099..c98afc848 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_note_update.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_note_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgeworkers_activation" "test" { diff --git a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_note_update_no_activation.tf b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_note_update_no_activation.tf index b1432867c..e9a7d5077 100644 --- a/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_note_update_no_activation.tf +++ b/pkg/providers/edgeworkers/testdata/TestResourceEdgeWorkersActivation/edgeworkers_activation_note_update_no_activation.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_edgeworkers_activation" "test" { diff --git a/pkg/providers/gtm/data_akamai_gtm_asmap.go b/pkg/providers/gtm/data_akamai_gtm_asmap.go index 33bf03090..a4adc71f2 100644 --- a/pkg/providers/gtm/data_akamai_gtm_asmap.go +++ b/pkg/providers/gtm/data_akamai_gtm_asmap.go @@ -144,7 +144,7 @@ func (d *asmapDataSource) Read(ctx context.Context, req datasource.ReadRequest, return } - client := frameworkInst.Client(d.meta) + client := Client(d.meta) asMap, err := client.GetAsMap(ctx, data.Name.ValueString(), data.Domain.ValueString()) if err != nil { resp.Diagnostics.AddError("fetching GTM ASmap failed: ", err.Error()) diff --git a/pkg/providers/gtm/data_akamai_gtm_asmap_test.go b/pkg/providers/gtm/data_akamai_gtm_asmap_test.go index f72f774de..db98fd810 100644 --- a/pkg/providers/gtm/data_akamai_gtm_asmap_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_asmap_test.go @@ -119,7 +119,7 @@ func TestDataGTMASmap(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: testAccProvidersProtoV5, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, fmt.Sprintf("testdata/TestDataGtmAsmap/%s", test.givenTF)), Check: resource.ComposeAggregateTestCheckFunc(checkFuncs...), diff --git a/pkg/providers/gtm/data_akamai_gtm_cidrmap.go b/pkg/providers/gtm/data_akamai_gtm_cidrmap.go index d636ee8a4..6008f39cd 100644 --- a/pkg/providers/gtm/data_akamai_gtm_cidrmap.go +++ b/pkg/providers/gtm/data_akamai_gtm_cidrmap.go @@ -138,7 +138,7 @@ func (d *cidrmapDataSource) Read(ctx context.Context, req datasource.ReadRequest return } - client := frameworkInst.Client(d.meta) + client := Client(d.meta) cidrMap, err := client.GetCidrMap(ctx, data.Name.ValueString(), data.Domain.ValueString()) if err != nil { resp.Diagnostics.AddError("fetching GTM CIDRmap failed: ", err.Error()) diff --git a/pkg/providers/gtm/data_akamai_gtm_cidrmap_test.go b/pkg/providers/gtm/data_akamai_gtm_cidrmap_test.go index 41071c117..cca3f44bf 100644 --- a/pkg/providers/gtm/data_akamai_gtm_cidrmap_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_cidrmap_test.go @@ -116,7 +116,7 @@ func TestDataGTMCidrmap(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: testAccProvidersProtoV5, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, fmt.Sprintf("testdata/TestDataGtmCidrmap/%s", test.givenTF)), Check: resource.ComposeAggregateTestCheckFunc(checkFuncs...), diff --git a/pkg/providers/gtm/data_akamai_gtm_datacenter.go b/pkg/providers/gtm/data_akamai_gtm_datacenter.go index 06842fc00..c5b2d3c17 100644 --- a/pkg/providers/gtm/data_akamai_gtm_datacenter.go +++ b/pkg/providers/gtm/data_akamai_gtm_datacenter.go @@ -145,7 +145,7 @@ func dataGTMDatacenterRead(ctx context.Context, d *schema.ResourceData, m interf meta := meta.Must(m) logger := meta.Log("Akamai GTM", "dataGTMDatacenterRead") ctx = session.ContextWithOptions(ctx, session.WithContextLog(logger)) - client := inst.Client(meta) + client := Client(meta) logger.Debug("Fetching a datacenter") diff --git a/pkg/providers/gtm/data_akamai_gtm_datacenters.go b/pkg/providers/gtm/data_akamai_gtm_datacenters.go index f86b1ded5..0a2f37e18 100644 --- a/pkg/providers/gtm/data_akamai_gtm_datacenters.go +++ b/pkg/providers/gtm/data_akamai_gtm_datacenters.go @@ -152,7 +152,7 @@ func dataGTMDatacentersRead(ctx context.Context, d *schema.ResourceData, m inter meta := meta.Must(m) logger := meta.Log("Akamai GTM", "dataGTMDatacentersRead") ctx = session.ContextWithOptions(ctx, session.WithContextLog(logger)) - client := inst.Client(meta) + client := Client(meta) logger.Debug("Fetching datacenters") diff --git a/pkg/providers/gtm/data_akamai_gtm_default_datacenter.go b/pkg/providers/gtm/data_akamai_gtm_default_datacenter.go index 49f124009..56a173f09 100644 --- a/pkg/providers/gtm/data_akamai_gtm_default_datacenter.go +++ b/pkg/providers/gtm/data_akamai_gtm_default_datacenter.go @@ -75,14 +75,14 @@ func dataSourceGTMDefaultDatacenterRead(ctx context.Context, d *schema.ResourceD "dcid": dcid, }).Debug("Start Default Datacenter Retrieval") - var defaultDC = inst.Client(meta).NewDatacenter(ctx) + var defaultDC = Client(meta).NewDatacenter(ctx) switch dcid { case gtm.MapDefaultDC: - defaultDC, err = inst.Client(meta).CreateMapsDefaultDatacenter(ctx, domain) + defaultDC, err = Client(meta).CreateMapsDefaultDatacenter(ctx, domain) case gtm.Ipv4DefaultDC: - defaultDC, err = inst.Client(meta).CreateIPv4DefaultDatacenter(ctx, domain) + defaultDC, err = Client(meta).CreateIPv4DefaultDatacenter(ctx, domain) case gtm.Ipv6DefaultDC: - defaultDC, err = inst.Client(meta).CreateIPv6DefaultDatacenter(ctx, domain) + defaultDC, err = Client(meta).CreateIPv6DefaultDatacenter(ctx, domain) default: return append(diags, diag.Diagnostic{ Severity: diag.Error, diff --git a/pkg/providers/gtm/data_akamai_gtm_domain.go b/pkg/providers/gtm/data_akamai_gtm_domain.go index f1aa74c41..fd100eac6 100644 --- a/pkg/providers/gtm/data_akamai_gtm_domain.go +++ b/pkg/providers/gtm/data_akamai_gtm_domain.go @@ -1165,7 +1165,7 @@ func (d *domainDataSource) Read(ctx context.Context, request datasource.ReadRequ return } - client := inst.Client(d.meta) + client := Client(d.meta) domain, err := client.GetDomain(ctx, data.Name.ValueString()) if err != nil { response.Diagnostics.AddError("fetching domain failed", err.Error()) diff --git a/pkg/providers/gtm/data_akamai_gtm_domain_test.go b/pkg/providers/gtm/data_akamai_gtm_domain_test.go index 3b6fd6799..e994fbf4e 100644 --- a/pkg/providers/gtm/data_akamai_gtm_domain_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_domain_test.go @@ -251,7 +251,7 @@ func TestDataGtmDomain(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: testAccProvidersProtoV5, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, fmt.Sprintf("testdata/TestDataGtmDomain/%s", test.givenTF)), Check: resource.ComposeAggregateTestCheckFunc(checkFuncs...), diff --git a/pkg/providers/gtm/data_akamai_gtm_domains.go b/pkg/providers/gtm/data_akamai_gtm_domains.go index cb6db8666..a5415c45d 100644 --- a/pkg/providers/gtm/data_akamai_gtm_domains.go +++ b/pkg/providers/gtm/data_akamai_gtm_domains.go @@ -163,7 +163,7 @@ func (d *domainsDataSource) Read(ctx context.Context, request datasource.ReadReq return } - client := inst.Client(d.meta) + client := Client(d.meta) domains, err := client.ListDomains(ctx) if err != nil { response.Diagnostics.AddError("fetching domains failed", err.Error()) diff --git a/pkg/providers/gtm/data_akamai_gtm_domains_test.go b/pkg/providers/gtm/data_akamai_gtm_domains_test.go index fafe4b942..e614d38b0 100644 --- a/pkg/providers/gtm/data_akamai_gtm_domains_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_domains_test.go @@ -113,7 +113,7 @@ func TestDataGTMDomains(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: testAccProvidersProtoV5, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, fmt.Sprintf("testdata/TestDataGtmDomains/%s", test.givenTF)), Check: resource.ComposeAggregateTestCheckFunc(checkFuncs...), diff --git a/pkg/providers/gtm/data_akamai_gtm_resource.go b/pkg/providers/gtm/data_akamai_gtm_resource.go index e8e3447d3..3fc6c7746 100644 --- a/pkg/providers/gtm/data_akamai_gtm_resource.go +++ b/pkg/providers/gtm/data_akamai_gtm_resource.go @@ -194,7 +194,7 @@ func (d *resourceDataSource) Read(ctx context.Context, request datasource.ReadRe return } - client := frameworkInst.Client(d.meta) + client := Client(d.meta) resource, err := client.GetResource(ctx, data.ResourceName.ValueString(), data.Domain.ValueString()) if err != nil { response.Diagnostics.AddError("fetching GTM resource failed:", err.Error()) diff --git a/pkg/providers/gtm/data_akamai_gtm_resource_test.go b/pkg/providers/gtm/data_akamai_gtm_resource_test.go index a8a585362..90648f2fb 100644 --- a/pkg/providers/gtm/data_akamai_gtm_resource_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_resource_test.go @@ -95,7 +95,7 @@ func TestDataGTMResource(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: testAccProvidersProtoV5, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, fmt.Sprintf("testdata/TestDataGTMResource/%s", test.givenTF)), Check: resource.ComposeAggregateTestCheckFunc(checkFuncs...), diff --git a/pkg/providers/gtm/data_akamai_gtm_resources.go b/pkg/providers/gtm/data_akamai_gtm_resources.go index 776d1d3d6..4393340df 100644 --- a/pkg/providers/gtm/data_akamai_gtm_resources.go +++ b/pkg/providers/gtm/data_akamai_gtm_resources.go @@ -146,7 +146,7 @@ func (d *resourcesDataSource) Read(ctx context.Context, request datasource.ReadR return } - client := frameworkInst.Client(d.meta) + client := Client(d.meta) resources, err := client.ListResources(ctx, data.Domain.ValueString()) if err != nil { response.Diagnostics.AddError("fetching GTM resources failed:", err.Error()) diff --git a/pkg/providers/gtm/data_akamai_gtm_resources_test.go b/pkg/providers/gtm/data_akamai_gtm_resources_test.go index f08a7bb98..495bd4676 100644 --- a/pkg/providers/gtm/data_akamai_gtm_resources_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_resources_test.go @@ -119,7 +119,7 @@ func TestDataGTMResources(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ IsUnitTest: true, - ProtoV5ProviderFactories: testAccProvidersProtoV5, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, fmt.Sprintf("testdata/TestDataGTMResources/%s", test.givenTF)), Check: resource.ComposeAggregateTestCheckFunc(checkFuncs...), diff --git a/pkg/providers/gtm/gtm.go b/pkg/providers/gtm/gtm.go index 0c584eaaa..857ee875e 100644 --- a/pkg/providers/gtm/gtm.go +++ b/pkg/providers/gtm/gtm.go @@ -3,6 +3,5 @@ package gtm import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" func init() { - registry.RegisterPluginSubprovider(NewSubprovider()) - registry.RegisterFrameworkSubprovider(NewFrameworkSubprovider()) + registry.RegisterSubprovider(NewSubprovider()) } diff --git a/pkg/providers/gtm/provider.go b/pkg/providers/gtm/provider.go index 2489d5bbc..bc0111919 100644 --- a/pkg/providers/gtm/provider.go +++ b/pkg/providers/gtm/provider.go @@ -2,8 +2,6 @@ package gtm import ( - "sync" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" @@ -13,69 +11,35 @@ import ( ) type ( - // PluginSubprovider gathers gtm resources and data sources - PluginSubprovider struct { - client gtm.GTM - } - - // FrameworkSubprovider gathers property resources and data sources written using terraform-plugin-framework - FrameworkSubprovider struct { - client gtm.GTM - } + // Subprovider gathers gtm resources and data sources + Subprovider struct{} ) -var _ subprovider.Framework = &FrameworkSubprovider{} -var _ subprovider.Plugin = &PluginSubprovider{} - var ( - oncePlugin, onceFramework sync.Once - - inst *PluginSubprovider - - frameworkInst *FrameworkSubprovider + _ subprovider.Subprovider = &Subprovider{} + client gtm.GTM ) -// NewSubprovider returns a new GTM subprovider -func NewSubprovider() *PluginSubprovider { - oncePlugin.Do(func() { - inst = &PluginSubprovider{} - }) - - return inst -} - -// NewFrameworkSubprovider returns a core Framework based sub provider -func NewFrameworkSubprovider() *FrameworkSubprovider { - onceFramework.Do(func() { - frameworkInst = &FrameworkSubprovider{} - }) - - return frameworkInst -} - -// Client returns the GTM interface -func (p *PluginSubprovider) Client(meta meta.Meta) gtm.GTM { - if p.client != nil { - return p.client - } - return gtm.Client(meta.Session()) +// NewSubprovider returns a new gtm subprovider +func NewSubprovider() *Subprovider { + return &Subprovider{} } -// Client returns the GTM interface -func (f *FrameworkSubprovider) Client(meta meta.Meta) gtm.GTM { - if f.client != nil { - return f.client +// Client returns the gtm interface +func Client(meta meta.Meta) gtm.GTM { + if client != nil { + return client } return gtm.Client(meta.Session()) } -// Resources returns the GTM resources implemented using terraform-plugin-framework -func (f *FrameworkSubprovider) Resources() []func() resource.Resource { +// FrameworkResources returns the gtm resources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkResources() []func() resource.Resource { return []func() resource.Resource{} } -// DataSources returns the GTM data sources implemented using terraform-plugin-framework -func (f *FrameworkSubprovider) DataSources() []func() datasource.DataSource { +// FrameworkDataSources returns the gtm data sources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkDataSources() []func() datasource.DataSource { return []func() datasource.DataSource{ NewGTMAsmapDataSource, NewGTMCidrmapDataSource, @@ -86,8 +50,8 @@ func (f *FrameworkSubprovider) DataSources() []func() datasource.DataSource { } } -// Resources returns terraform resources for gtm -func (p *PluginSubprovider) Resources() map[string]*schema.Resource { +// SDKResources returns the gtm resources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKResources() map[string]*schema.Resource { return map[string]*schema.Resource{ "akamai_gtm_domain": resourceGTMv1Domain(), "akamai_gtm_property": resourceGTMv1Property(), @@ -99,8 +63,8 @@ func (p *PluginSubprovider) Resources() map[string]*schema.Resource { } } -// DataSources returns terraform data sources for gtm -func (p *PluginSubprovider) DataSources() map[string]*schema.Resource { +// SDKDataSources returns the gtm data sources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKDataSources() map[string]*schema.Resource { return map[string]*schema.Resource{ "akamai_gtm_datacenter": dataSourceGTMDatacenter(), "akamai_gtm_datacenters": dataSourceGTMDatacenters(), diff --git a/pkg/providers/gtm/provider_test.go b/pkg/providers/gtm/provider_test.go index 408e8aca8..79267aeb9 100644 --- a/pkg/providers/gtm/provider_test.go +++ b/pkg/providers/gtm/provider_test.go @@ -16,15 +16,13 @@ func TestMain(m *testing.M) { var clientLock sync.Mutex // useClient swaps out the client on the global instance for the duration of the given func -func useClient(client gtm.GTM, f func()) { +func useClient(gtmClient gtm.GTM, f func()) { clientLock.Lock() - orig := inst.client - origFrameworkClient := frameworkInst.client - inst.client = client - frameworkInst.client = client + orig := client + client = gtmClient + defer func() { - inst.client = orig - frameworkInst.client = origFrameworkClient + client = orig clientLock.Unlock() }() diff --git a/pkg/providers/gtm/resource_akamai_gtm_asmap.go b/pkg/providers/gtm/resource_akamai_gtm_asmap.go index 270289024..e3b45b2ff 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_asmap.go +++ b/pkg/providers/gtm/resource_akamai_gtm_asmap.go @@ -102,7 +102,7 @@ func validateDefaultDC(ctx context.Context, meta meta.Meta, ddcField []interface if !ok || dcID == 0 { return fmt.Errorf("default Datacenter ID invalid") } - dc, err := inst.Client(meta).GetDatacenter(ctx, dcID, domain) + dc, err := Client(meta).GetDatacenter(ctx, dcID, domain) if dc == nil { if err != nil { apiError, ok := err.(*gtm.Error) @@ -114,7 +114,7 @@ func validateDefaultDC(ctx context.Context, meta meta.Meta, ddcField []interface if ddc["datacenter_id"].(int) != gtm.MapDefaultDC { return fmt.Errorf(fmt.Sprintf("Default Datacenter %d does not exist", ddc["datacenter_id"].(int))) } - _, err := inst.Client(meta).CreateMapsDefaultDatacenter(ctx, domain) // create if not already. + _, err := Client(meta).CreateMapsDefaultDatacenter(ctx, domain) // create if not already. if err != nil { return fmt.Errorf("MapCreate failed on Default Datacenter check: %s", err.Error()) } @@ -164,7 +164,7 @@ func resourceGTMv1ASmapCreate(ctx context.Context, d *schema.ResourceData, m int newAS := populateNewASmapObject(ctx, meta, d, m) logger.Debugf("Proposed New asMap: [%v]", newAS) - cStatus, err := inst.Client(meta).CreateAsMap(ctx, newAS, domain) + cStatus, err := Client(meta).CreateAsMap(ctx, newAS, domain) if err != nil { return append(diags, diag.Diagnostic{ Severity: diag.Error, @@ -226,7 +226,7 @@ func resourceGTMv1ASmapRead(ctx context.Context, d *schema.ResourceData, m inter if err != nil { return diag.FromErr(err) } - as, err := inst.Client(meta).GetAsMap(ctx, asMap, domain) + as, err := Client(meta).GetAsMap(ctx, asMap, domain) if err != nil { logger.Errorf("asMap Read error: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -259,7 +259,7 @@ func resourceGTMv1ASmapUpdate(ctx context.Context, d *schema.ResourceData, m int return diag.FromErr(err) } // Get existingASmap - existAs, err := inst.Client(meta).GetAsMap(ctx, asMap, domain) + existAs, err := Client(meta).GetAsMap(ctx, asMap, domain) if err != nil { logger.Errorf("asMap Update read error: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -271,7 +271,7 @@ func resourceGTMv1ASmapUpdate(ctx context.Context, d *schema.ResourceData, m int logger.Debugf("asMap BEFORE: %v", existAs) populateASmapObject(d, existAs, m) logger.Debugf("asMap PROPOSED: %v", existAs) - uStat, err := inst.Client(meta).UpdateAsMap(ctx, existAs, domain) + uStat, err := Client(meta).UpdateAsMap(ctx, existAs, domain) if err != nil { logger.Errorf("asMap pdate: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -329,7 +329,7 @@ func resourceGTMv1ASmapImport(ctx context.Context, d *schema.ResourceData, m int if err != nil { return []*schema.ResourceData{d}, err } - as, err := inst.Client(meta).GetAsMap(ctx, asMap, domain) + as, err := Client(meta).GetAsMap(ctx, asMap, domain) if err != nil { return nil, err } @@ -364,7 +364,7 @@ func resourceGTMv1ASmapDelete(ctx context.Context, d *schema.ResourceData, m int logger.Errorf("[ERROR] ASmap Delete: %s", err.Error()) return diag.FromErr(err) } - existAs, err := inst.Client(meta).GetAsMap(ctx, asMap, domain) + existAs, err := Client(meta).GetAsMap(ctx, asMap, domain) if err != nil { logger.Errorf("ASmap Delete: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -374,7 +374,7 @@ func resourceGTMv1ASmapDelete(ctx context.Context, d *schema.ResourceData, m int }) } logger.Debugf("Deleting ASmap: %v", existAs) - uStat, err := inst.Client(meta).DeleteAsMap(ctx, existAs, domain) + uStat, err := Client(meta).DeleteAsMap(ctx, existAs, domain) if err != nil { logger.Errorf("ASmap Delete: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -422,7 +422,7 @@ func resourceGTMv1ASmapDelete(ctx context.Context, d *schema.ResourceData, m int func populateNewASmapObject(ctx context.Context, meta meta.Meta, d *schema.ResourceData, m interface{}) *gtm.AsMap { asMapName, _ := tf.GetStringValue("name", d) - asObj := inst.Client(meta).NewAsMap(ctx, asMapName) + asObj := Client(meta).NewAsMap(ctx, asMapName) asObj.DefaultDatacenter = >m.DatacenterBase{} asObj.Assignments = make([]*gtm.AsAssignment, 1) asObj.Links = make([]*gtm.Link, 1) diff --git a/pkg/providers/gtm/resource_akamai_gtm_cidrmap.go b/pkg/providers/gtm/resource_akamai_gtm_cidrmap.go index e513080b6..d26121360 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_cidrmap.go +++ b/pkg/providers/gtm/resource_akamai_gtm_cidrmap.go @@ -118,7 +118,7 @@ func resourceGTMv1CidrMapCreate(ctx context.Context, d *schema.ResourceData, m i newCidr := populateNewCidrMapObject(ctx, meta, d, m) logger.Debugf("Proposed New CidrMap: [%v]", newCidr) - cStatus, err := inst.Client(meta).CreateCidrMap(ctx, newCidr, domain) + cStatus, err := Client(meta).CreateCidrMap(ctx, newCidr, domain) if err != nil { logger.Errorf("cidrMap Create failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -182,7 +182,7 @@ func resourceGTMv1CidrMapRead(ctx context.Context, d *schema.ResourceData, m int logger.Errorf("Invalid cidrMap ID: %s", d.Id()) return diag.FromErr(err) } - cidr, err := inst.Client(meta).GetCidrMap(ctx, cidrMap, domain) + cidr, err := Client(meta).GetCidrMap(ctx, cidrMap, domain) if err != nil { logger.Errorf("cidrMap Read error: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -215,7 +215,7 @@ func resourceGTMv1CidrMapUpdate(ctx context.Context, d *schema.ResourceData, m i return diag.FromErr(err) } // Get existingCidrMap - existCidr, err := inst.Client(meta).GetCidrMap(ctx, cidrMap, domain) + existCidr, err := Client(meta).GetCidrMap(ctx, cidrMap, domain) if err != nil { logger.Errorf("cidrMap Update read failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -227,7 +227,7 @@ func resourceGTMv1CidrMapUpdate(ctx context.Context, d *schema.ResourceData, m i logger.Debugf("Updating cidrMap BEFORE: %v", existCidr) populateCidrMapObject(d, existCidr, m) logger.Debugf("Updating cidrMap PROPOSED: %v", existCidr) - uStat, err := inst.Client(meta).UpdateCidrMap(ctx, existCidr, domain) + uStat, err := Client(meta).UpdateCidrMap(ctx, existCidr, domain) if err != nil { logger.Errorf("cidrMap Update failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -285,7 +285,7 @@ func resourceGTMv1CidrMapImport(d *schema.ResourceData, m interface{}) ([]*schem if err != nil { return []*schema.ResourceData{d}, err } - cidr, err := inst.Client(meta).GetCidrMap(ctx, cidrMap, domain) + cidr, err := Client(meta).GetCidrMap(ctx, cidrMap, domain) if err != nil { return nil, err } @@ -320,7 +320,7 @@ func resourceGTMv1CidrMapDelete(ctx context.Context, d *schema.ResourceData, m i logger.Errorf("Invalid cidrMap ID: %s", d.Id()) return diag.FromErr(err) } - existCidr, err := inst.Client(meta).GetCidrMap(ctx, cidrMap, domain) + existCidr, err := Client(meta).GetCidrMap(ctx, cidrMap, domain) if err != nil { logger.Errorf("CidrMapDelete cidrMap doesn't exist: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -330,7 +330,7 @@ func resourceGTMv1CidrMapDelete(ctx context.Context, d *schema.ResourceData, m i }) } logger.Debugf("Deleting cidrMap: %v", existCidr) - uStat, err := inst.Client(meta).DeleteCidrMap(ctx, existCidr, domain) + uStat, err := Client(meta).DeleteCidrMap(ctx, existCidr, domain) if err != nil { logger.Errorf("cidrMap Delete failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -382,7 +382,7 @@ func populateNewCidrMapObject(ctx context.Context, meta meta.Meta, d *schema.Res logger.Errorf("cidrMap name not found in ResourceData: %s", err.Error()) } - cidrObj := inst.Client(meta).NewCidrMap(ctx, cidrMapName) + cidrObj := Client(meta).NewCidrMap(ctx, cidrMapName) cidrObj.DefaultDatacenter = >m.DatacenterBase{} cidrObj.Assignments = make([]*gtm.CidrAssignment, 0) cidrObj.Links = make([]*gtm.Link, 1) diff --git a/pkg/providers/gtm/resource_akamai_gtm_datacenter.go b/pkg/providers/gtm/resource_akamai_gtm_datacenter.go index 94148e790..c9c2a04c7 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_datacenter.go +++ b/pkg/providers/gtm/resource_akamai_gtm_datacenter.go @@ -188,7 +188,7 @@ func resourceGTMv1DatacenterCreate(ctx context.Context, d *schema.ResourceData, return diag.FromErr(err) } logger.Debugf("Proposed New Datacenter: [%v]", newDC) - cStatus, err := inst.Client(meta).CreateDatacenter(ctx, newDC, domain) + cStatus, err := Client(meta).CreateDatacenter(ctx, newDC, domain) if err != nil { logger.Errorf("Datacenter Create failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -259,7 +259,7 @@ func resourceGTMv1DatacenterRead(ctx context.Context, d *schema.ResourceData, m Detail: err.Error(), }) } - dc, err := inst.Client(meta).GetDatacenter(ctx, dcID, domain) + dc, err := Client(meta).GetDatacenter(ctx, dcID, domain) if err != nil { logger.Errorf("Datacenter Read failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -296,7 +296,7 @@ func resourceGTMv1DatacenterUpdate(ctx context.Context, d *schema.ResourceData, }) } // Get existing datacenter - existDC, err := inst.Client(meta).GetDatacenter(ctx, dcID, domain) + existDC, err := Client(meta).GetDatacenter(ctx, dcID, domain) if err != nil { logger.Errorf("Datacenter Update failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -310,7 +310,7 @@ func resourceGTMv1DatacenterUpdate(ctx context.Context, d *schema.ResourceData, return diag.FromErr(err) } logger.Debugf("Updating Datacenter PROPOSED: %v", existDC) - uStat, err := inst.Client(meta).UpdateDatacenter(ctx, existDC, domain) + uStat, err := Client(meta).UpdateDatacenter(ctx, existDC, domain) if err != nil { logger.Errorf("Datacenter Update failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -363,7 +363,7 @@ func resourceGTMv1DatacenterImport(d *schema.ResourceData, m interface{}) ([]*sc if err != nil { return nil, fmt.Errorf("Invalid Datacenter resource ID") } - dc, err := inst.Client(meta).GetDatacenter(ctx, dcID, domain) + dc, err := Client(meta).GetDatacenter(ctx, dcID, domain) if err != nil { logger.Errorf("Datacenter Import error: %s", err.Error()) return nil, err @@ -402,7 +402,7 @@ func resourceGTMv1DatacenterDelete(ctx context.Context, d *schema.ResourceData, }) } // Get existing datacenter - existDC, err := inst.Client(meta).GetDatacenter(ctx, dcID, domain) + existDC, err := Client(meta).GetDatacenter(ctx, dcID, domain) if err != nil { logger.Errorf("DatacenterDelete failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -412,7 +412,7 @@ func resourceGTMv1DatacenterDelete(ctx context.Context, d *schema.ResourceData, }) } logger.Debugf("Deleting Datacenter: %v", existDC) - uStat, err := inst.Client(meta).DeleteDatacenter(ctx, existDC, domain) + uStat, err := Client(meta).DeleteDatacenter(ctx, existDC, domain) if err != nil { logger.Errorf("Datacenter Delete failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -461,7 +461,7 @@ func resourceGTMv1DatacenterDelete(ctx context.Context, d *schema.ResourceData, // Create and populate a new datacenter object from resource data func populateNewDatacenterObject(ctx context.Context, meta meta.Meta, d *schema.ResourceData, m interface{}) (*gtm.Datacenter, error) { - dcObj := inst.Client(meta).NewDatacenter(ctx) + dcObj := Client(meta).NewDatacenter(ctx) dcObj.DefaultLoadObject = gtm.NewLoadObject() err := populateDatacenterObject(d, dcObj, m) diff --git a/pkg/providers/gtm/resource_akamai_gtm_domain.go b/pkg/providers/gtm/resource_akamai_gtm_domain.go index 44d5e00d4..5ae935a09 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_domain.go +++ b/pkg/providers/gtm/resource_akamai_gtm_domain.go @@ -237,7 +237,7 @@ func resourceGTMv1DomainCreate(ctx context.Context, d *schema.ResourceData, m in Detail: err.Error(), }) } - cStatus, err := inst.Client(meta).CreateDomain(ctx, newDom, queryArgs) + cStatus, err := Client(meta).CreateDomain(ctx, newDom, queryArgs) if err != nil { // Errored. Lets see if special hack if !HashiAcc { @@ -321,7 +321,7 @@ func resourceGTMv1DomainRead(ctx context.Context, d *schema.ResourceData, m inte logger.Debugf("Reading Domain: %s", d.Id()) var diags diag.Diagnostics // retrieve the domain - dom, err := inst.Client(meta).GetDomain(ctx, d.Id()) + dom, err := Client(meta).GetDomain(ctx, d.Id()) if err != nil { logger.Errorf("Domain Read error: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -348,7 +348,7 @@ func resourceGTMv1DomainUpdate(ctx context.Context, d *schema.ResourceData, m in logger.Debugf("Updating Domain: %s", d.Id()) var diags diag.Diagnostics // Get existing domain - existDom, err := inst.Client(meta).GetDomain(ctx, d.Id()) + existDom, err := Client(meta).GetDomain(ctx, d.Id()) if err != nil { logger.Errorf("Domain Update failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -373,7 +373,7 @@ func resourceGTMv1DomainUpdate(ctx context.Context, d *schema.ResourceData, m in Detail: err.Error(), }) } - uStat, err := inst.Client(meta).UpdateDomain(ctx, existDom, args) + uStat, err := Client(meta).UpdateDomain(ctx, existDom, args) if err != nil { logger.Errorf("Domain Update failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -432,7 +432,7 @@ func resourceGTMv1DomainDelete(ctx context.Context, d *schema.ResourceData, m in logger.Debugf("Deleting GTM Domain: %s", d.Id()) var diags diag.Diagnostics // Get existing domain - existDom, err := inst.Client(meta).GetDomain(ctx, d.Id()) + existDom, err := Client(meta).GetDomain(ctx, d.Id()) if err != nil { logger.Errorf("Domain Delete failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -441,7 +441,7 @@ func resourceGTMv1DomainDelete(ctx context.Context, d *schema.ResourceData, m in Detail: err.Error(), }) } - uStat, err := inst.Client(meta).DeleteDomain(ctx, existDom) + uStat, err := Client(meta).DeleteDomain(ctx, existDom) if err != nil { // Errored. Lets see if special hack if !HashiAcc { @@ -535,7 +535,7 @@ func validateDomainType(v interface{}, _ cty.Path) diag.Diagnostics { func populateNewDomainObject(ctx context.Context, meta meta.Meta, d *schema.ResourceData, m interface{}) (*gtm.Domain, error) { name, _ := tf.GetStringValue("name", d) - domObj := inst.Client(meta).NewDomain(ctx, name, d.Get("type").(string)) + domObj := Client(meta).NewDomain(ctx, name, d.Get("type").(string)) err := populateDomainObject(d, domObj, m) return domObj, err @@ -780,7 +780,7 @@ func waitForCompletion(ctx context.Context, domain string, m interface{}) (bool, logger.Debugf("WAIT: Sleep Interval [%v]", sleepInterval/time.Second) logger.Debugf("WAIT: Sleep Timeout [%v]", sleepTimeout/time.Second) for { - propStat, err := inst.Client(meta).GetDomainStatus(ctx, domain) + propStat, err := Client(meta).GetDomainStatus(ctx, domain) if err != nil { return false, err } diff --git a/pkg/providers/gtm/resource_akamai_gtm_geomap.go b/pkg/providers/gtm/resource_akamai_gtm_geomap.go index bb3ee10ac..229656b4f 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_geomap.go +++ b/pkg/providers/gtm/resource_akamai_gtm_geomap.go @@ -120,7 +120,7 @@ func resourceGTMv1GeomapCreate(ctx context.Context, d *schema.ResourceData, m in newGeo := populateNewGeoMapObject(ctx, meta, d, m) logger.Debugf("Proposed New geoMap: [%v]", newGeo) - cStatus, err := inst.Client(meta).CreateGeoMap(ctx, newGeo, domain) + cStatus, err := Client(meta).CreateGeoMap(ctx, newGeo, domain) if err != nil { logger.Errorf("geoMap Create failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -187,7 +187,7 @@ func resourceGTMv1GeomapRead(ctx context.Context, d *schema.ResourceData, m inte logger.Errorf("Invalid geoMap ID") return diag.FromErr(err) } - geo, err := inst.Client(meta).GetGeoMap(ctx, geoMap, domain) + geo, err := Client(meta).GetGeoMap(ctx, geoMap, domain) if err != nil { logger.Errorf("geoMap Read error: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -220,7 +220,7 @@ func resourceGTMv1GeomapUpdate(ctx context.Context, d *schema.ResourceData, m in return diag.FromErr(err) } // Get existingGeoMap - existGeo, err := inst.Client(meta).GetGeoMap(ctx, geoMap, domain) + existGeo, err := Client(meta).GetGeoMap(ctx, geoMap, domain) if err != nil { logger.Errorf("geoMap Update failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -232,7 +232,7 @@ func resourceGTMv1GeomapUpdate(ctx context.Context, d *schema.ResourceData, m in logger.Debugf("Updating geoMap BEFORE: %v", existGeo) populateGeoMapObject(d, existGeo, m) logger.Debugf("Updating geoMap PROPOSED: %v", existGeo) - uStat, err := inst.Client(meta).UpdateGeoMap(ctx, existGeo, domain) + uStat, err := Client(meta).UpdateGeoMap(ctx, existGeo, domain) if err != nil { logger.Errorf("geoMap Update failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -294,7 +294,7 @@ func resourceGTMv1GeomapImport(d *schema.ResourceData, m interface{}) ([]*schema if err != nil { return []*schema.ResourceData{d}, err } - geo, err := inst.Client(meta).GetGeoMap(ctx, geoMap, domain) + geo, err := Client(meta).GetGeoMap(ctx, geoMap, domain) if err != nil { return nil, err } @@ -330,7 +330,7 @@ func resourceGTMv1GeomapDelete(ctx context.Context, d *schema.ResourceData, m in logger.Errorf("Invalid geoMap ID: %s", d.Id()) return diag.FromErr(err) } - existGeo, err := inst.Client(meta).GetGeoMap(ctx, geoMap, domain) + existGeo, err := Client(meta).GetGeoMap(ctx, geoMap, domain) if err != nil { logger.Errorf("geoMap Delete failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -340,7 +340,7 @@ func resourceGTMv1GeomapDelete(ctx context.Context, d *schema.ResourceData, m in }) } logger.Debugf("Deleting geoMap: %v", existGeo) - uStat, err := inst.Client(meta).DeleteGeoMap(ctx, existGeo, domain) + uStat, err := Client(meta).DeleteGeoMap(ctx, existGeo, domain) if err != nil { logger.Errorf("geoMap Delete failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -390,7 +390,7 @@ func resourceGTMv1GeomapDelete(ctx context.Context, d *schema.ResourceData, m in func populateNewGeoMapObject(ctx context.Context, meta meta.Meta, d *schema.ResourceData, m interface{}) *gtm.GeoMap { name, _ := tf.GetStringValue("name", d) - geoObj := inst.Client(meta).NewGeoMap(ctx, name) + geoObj := Client(meta).NewGeoMap(ctx, name) geoObj.DefaultDatacenter = >m.DatacenterBase{} geoObj.Assignments = make([]*gtm.GeoAssignment, 1) geoObj.Links = make([]*gtm.Link, 1) diff --git a/pkg/providers/gtm/resource_akamai_gtm_property.go b/pkg/providers/gtm/resource_akamai_gtm_property.go index 424d0f3bd..1ea6d4f3d 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_property.go +++ b/pkg/providers/gtm/resource_akamai_gtm_property.go @@ -459,7 +459,7 @@ func resourceGTMv1PropertyCreate(ctx context.Context, d *schema.ResourceData, m return diag.FromErr(err) } logger.Debugf("Proposed New Property: [%v]", newProp) - cStatus, err := inst.Client(meta).CreateProperty(ctx, newProp, domain) + cStatus, err := Client(meta).CreateProperty(ctx, newProp, domain) if err != nil { logger.Errorf("Property Create failed: %s", err.Error()) return diag.Errorf("property Create failed: %s", err.Error()) @@ -515,7 +515,7 @@ func resourceGTMv1PropertyRead(ctx context.Context, d *schema.ResourceData, m in if err != nil { return diag.FromErr(err) } - prop, err := inst.Client(meta).GetProperty(ctx, property, domain) + prop, err := Client(meta).GetProperty(ctx, property, domain) if errors.Is(err, gtm.ErrNotFound) { d.SetId("") return nil @@ -546,7 +546,7 @@ func resourceGTMv1PropertyUpdate(ctx context.Context, d *schema.ResourceData, m return diag.FromErr(err) } // Get existing property - existProp, err := inst.Client(meta).GetProperty(ctx, property, domain) + existProp, err := Client(meta).GetProperty(ctx, property, domain) if err != nil { logger.Errorf("Property Update failed: %s", err.Error()) return diag.FromErr(err) @@ -557,7 +557,7 @@ func resourceGTMv1PropertyUpdate(ctx context.Context, d *schema.ResourceData, m return diag.FromErr(err) } logger.Debugf("Updating Property PROPOSED: %v", existProp) - uStat, err := inst.Client(meta).UpdateProperty(ctx, existProp, domain) + uStat, err := Client(meta).UpdateProperty(ctx, existProp, domain) if err != nil { logger.Errorf("Property Update failed: %s", err.Error()) return diag.Errorf("property Update failed: %s", err.Error()) @@ -606,7 +606,7 @@ func resourceGTMv1PropertyImport(d *schema.ResourceData, m interface{}) ([]*sche if err != nil { return []*schema.ResourceData{d}, err } - prop, err := inst.Client(meta).GetProperty(ctx, property, domain) + prop, err := Client(meta).GetProperty(ctx, property, domain) if err != nil { return nil, err } @@ -639,13 +639,13 @@ func resourceGTMv1PropertyDelete(ctx context.Context, d *schema.ResourceData, m if err != nil { return diag.FromErr(err) } - existProp, err := inst.Client(meta).GetProperty(ctx, property, domain) + existProp, err := Client(meta).GetProperty(ctx, property, domain) if err != nil { logger.Errorf("Property Delete failed: %s", err.Error()) return diag.Errorf("property Delete failed: %s", err.Error()) } logger.Debugf("Deleting Property: %v", existProp) - uStat, err := inst.Client(meta).DeleteProperty(ctx, existProp, domain) + uStat, err := Client(meta).DeleteProperty(ctx, existProp, domain) if err != nil { logger.Errorf("Property Delete failed: %s", err.Error()) return diag.Errorf("property Delete failed: %s", err.Error()) @@ -892,7 +892,7 @@ func populatePropertyObject(ctx context.Context, d *schema.ResourceData, prop *g func populateNewPropertyObject(ctx context.Context, meta meta.Meta, d *schema.ResourceData, m interface{}) (*gtm.Property, error) { name, _ := tf.GetStringValue("name", d) - propObj := inst.Client(meta).NewProperty(ctx, name) + propObj := Client(meta).NewProperty(ctx, name) propObj.TrafficTargets = make([]*gtm.TrafficTarget, 0) propObj.LivenessTests = make([]*gtm.LivenessTest, 0) err := populatePropertyObject(ctx, d, propObj, m) @@ -967,7 +967,7 @@ func populateTrafficTargetObject(ctx context.Context, d *schema.ResourceData, pr trafficObjList := make([]*gtm.TrafficTarget, len(traffTargList)) // create new object list for i, v := range traffTargList { ttMap := v.(map[string]interface{}) - trafficTarget := inst.Client(meta).NewTrafficTarget(ctx) // create new object + trafficTarget := Client(meta).NewTrafficTarget(ctx) // create new object trafficTarget.DatacenterId = ttMap["datacenter_id"].(int) trafficTarget.Enabled = ttMap["enabled"].(bool) trafficTarget.Weight = ttMap["weight"].(float64) @@ -1042,7 +1042,7 @@ func populateStaticRRSetObject(ctx context.Context, meta meta.Meta, d *schema.Re staticObjList := make([]*gtm.StaticRRSet, len(staticSetList)) // create new object list for i, v := range staticSetList { recMap := v.(map[string]interface{}) - record := inst.Client(meta).NewStaticRRSet(ctx) // create new object + record := Client(meta).NewStaticRRSet(ctx) // create new object record.TTL = recMap["ttl"].(int) record.Type = recMap["type"].(string) if recMap["rdata"] != nil { @@ -1108,7 +1108,7 @@ func populateLivenessTestObject(ctx context.Context, meta meta.Meta, d *schema.R liveTestObjList := make([]*gtm.LivenessTest, len(liveTestList)) // create new object list for i, l := range liveTestList { v := l.(map[string]interface{}) - lt := inst.Client(meta).NewLivenessTest(ctx, v["name"].(string), + lt := Client(meta).NewLivenessTest(ctx, v["name"].(string), v["test_object_protocol"].(string), v["test_interval"].(int), float32(v["test_timeout"].(float64))) // create new object diff --git a/pkg/providers/gtm/resource_akamai_gtm_property_test.go b/pkg/providers/gtm/resource_akamai_gtm_property_test.go index abbaa0fd2..f33ae3df4 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_property_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_property_test.go @@ -460,7 +460,7 @@ func TestResGtmProperty(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/create_basic.tf"), diff --git a/pkg/providers/gtm/resource_akamai_gtm_resource.go b/pkg/providers/gtm/resource_akamai_gtm_resource.go index 86bb01ff1..2344f7299 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_resource.go +++ b/pkg/providers/gtm/resource_akamai_gtm_resource.go @@ -142,7 +142,7 @@ func resourceGTMv1ResourceCreate(ctx context.Context, d *schema.ResourceData, m return diag.FromErr(err) } logger.Debugf("Proposed New Resource: [%v]", newRsrc) - cStatus, err := inst.Client(meta).CreateResource(ctx, newRsrc, domain) + cStatus, err := Client(meta).CreateResource(ctx, newRsrc, domain) if err != nil { logger.Errorf("Resource Create failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -209,7 +209,7 @@ func resourceGTMv1ResourceRead(ctx context.Context, d *schema.ResourceData, m in logger.Errorf("Invalid resource Resource ID") return diag.FromErr(err) } - rsrc, err := inst.Client(meta).GetResource(ctx, resource, domain) + rsrc, err := Client(meta).GetResource(ctx, resource, domain) if err != nil { logger.Errorf("Resource Read failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -242,7 +242,7 @@ func resourceGTMv1ResourceUpdate(ctx context.Context, d *schema.ResourceData, m return diag.FromErr(err) } // Get existing property - existRsrc, err := inst.Client(meta).GetResource(ctx, resource, domain) + existRsrc, err := Client(meta).GetResource(ctx, resource, domain) if err != nil { logger.Errorf("Resource Update failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -256,7 +256,7 @@ func resourceGTMv1ResourceUpdate(ctx context.Context, d *schema.ResourceData, m return diag.FromErr(err) } logger.Debugf("Updating Resource PROPOSED: %v", existRsrc) - uStat, err := inst.Client(meta).UpdateResource(ctx, existRsrc, domain) + uStat, err := Client(meta).UpdateResource(ctx, existRsrc, domain) if err != nil { logger.Errorf("Resource Update failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -317,7 +317,7 @@ func resourceGTMv1ResourceImport(d *schema.ResourceData, m interface{}) ([]*sche if err != nil { return []*schema.ResourceData{d}, err } - rsrc, err := inst.Client(meta).GetResource(ctx, resource, domain) + rsrc, err := Client(meta).GetResource(ctx, resource, domain) if err != nil { return nil, err } @@ -349,7 +349,7 @@ func resourceGTMv1ResourceDelete(ctx context.Context, d *schema.ResourceData, m logger.Errorf("Invalid resource ID") return diag.FromErr(err) } - existRsrc, err := inst.Client(meta).GetResource(ctx, resource, domain) + existRsrc, err := Client(meta).GetResource(ctx, resource, domain) if err != nil { logger.Errorf("Resource Delete Read failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -359,7 +359,7 @@ func resourceGTMv1ResourceDelete(ctx context.Context, d *schema.ResourceData, m }) } logger.Debugf("Deleting Resource: %v", existRsrc) - uStat, err := inst.Client(meta).DeleteResource(ctx, existRsrc, domain) + uStat, err := Client(meta).DeleteResource(ctx, existRsrc, domain) if err != nil { logger.Errorf("Resource Delete failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -409,7 +409,7 @@ func resourceGTMv1ResourceDelete(ctx context.Context, d *schema.ResourceData, m func populateNewResourceObject(ctx context.Context, meta meta.Meta, d *schema.ResourceData, m interface{}) (*gtm.Resource, error) { name, _ := tf.GetStringValue("name", d) - rsrcObj := inst.Client(meta).NewResource(ctx, name) + rsrcObj := Client(meta).NewResource(ctx, name) rsrcObj.ResourceInstances = make([]*gtm.ResourceInstance, 0) err := populateResourceObject(ctx, d, rsrcObj, m) @@ -565,7 +565,7 @@ func populateResourceInstancesObject(ctx context.Context, meta meta.Meta, d *sch rsrcInstanceObjList := make([]*gtm.ResourceInstance, len(rsrcInstances)) // create new object list for i, v := range rsrcInstances { riMap := v.(map[string]interface{}) - rsrcInstance := inst.Client(meta).NewResourceInstance(ctx, rsrc, riMap["datacenter_id"].(int)) // create new object + rsrcInstance := Client(meta).NewResourceInstance(ctx, rsrc, riMap["datacenter_id"].(int)) // create new object rsrcInstance.UseDefaultLoadObject = riMap["use_default_load_object"].(bool) if riMap["load_servers"] != nil { loadServers, ok := riMap["load_servers"].(*schema.Set) diff --git a/pkg/providers/gtm/testdata/TestDataGTMResource/missing_domain.tf b/pkg/providers/gtm/testdata/TestDataGTMResource/missing_domain.tf index 55b61b602..28aa8ed32 100644 --- a/pkg/providers/gtm/testdata/TestDataGTMResource/missing_domain.tf +++ b/pkg/providers/gtm/testdata/TestDataGTMResource/missing_domain.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_gtm_resource" "my_gtm_resource" { diff --git a/pkg/providers/gtm/testdata/TestDataGTMResource/missing_resource_name.tf b/pkg/providers/gtm/testdata/TestDataGTMResource/missing_resource_name.tf index 197c21037..35e71b646 100644 --- a/pkg/providers/gtm/testdata/TestDataGTMResource/missing_resource_name.tf +++ b/pkg/providers/gtm/testdata/TestDataGTMResource/missing_resource_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_gtm_resource" "my_gtm_resource" { diff --git a/pkg/providers/gtm/testdata/TestDataGTMResource/valid.tf b/pkg/providers/gtm/testdata/TestDataGTMResource/valid.tf index cefd8c2fd..58b008602 100644 --- a/pkg/providers/gtm/testdata/TestDataGTMResource/valid.tf +++ b/pkg/providers/gtm/testdata/TestDataGTMResource/valid.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_gtm_resource" "my_gtm_resource" { diff --git a/pkg/providers/gtm/testdata/TestDataGTMResources/missing_domain.tf b/pkg/providers/gtm/testdata/TestDataGTMResources/missing_domain.tf index 313d039e9..763d83f0e 100644 --- a/pkg/providers/gtm/testdata/TestDataGTMResources/missing_domain.tf +++ b/pkg/providers/gtm/testdata/TestDataGTMResources/missing_domain.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_gtm_resources" "my_gtm_resources" { diff --git a/pkg/providers/gtm/testdata/TestDataGTMResources/valid.tf b/pkg/providers/gtm/testdata/TestDataGTMResources/valid.tf index 83ec86bf6..8bc089758 100644 --- a/pkg/providers/gtm/testdata/TestDataGTMResources/valid.tf +++ b/pkg/providers/gtm/testdata/TestDataGTMResources/valid.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_gtm_resources" "my_gtm_resources" { diff --git a/pkg/providers/gtm/testdata/TestDataGtmAsmap/missing_domain.tf b/pkg/providers/gtm/testdata/TestDataGtmAsmap/missing_domain.tf index 7188f0c5b..c134bc3ce 100644 --- a/pkg/providers/gtm/testdata/TestDataGtmAsmap/missing_domain.tf +++ b/pkg/providers/gtm/testdata/TestDataGtmAsmap/missing_domain.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_gtm_asmap" "my_gtm_asmap" { diff --git a/pkg/providers/gtm/testdata/TestDataGtmAsmap/missing_map_name.tf b/pkg/providers/gtm/testdata/TestDataGtmAsmap/missing_map_name.tf index 2cfbc8e7f..7f9cbff99 100644 --- a/pkg/providers/gtm/testdata/TestDataGtmAsmap/missing_map_name.tf +++ b/pkg/providers/gtm/testdata/TestDataGtmAsmap/missing_map_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_gtm_asmap" "my_gtm_asmap" { diff --git a/pkg/providers/gtm/testdata/TestDataGtmAsmap/valid.tf b/pkg/providers/gtm/testdata/TestDataGtmAsmap/valid.tf index 46c6e1759..57ed9849a 100644 --- a/pkg/providers/gtm/testdata/TestDataGtmAsmap/valid.tf +++ b/pkg/providers/gtm/testdata/TestDataGtmAsmap/valid.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_gtm_asmap" "my_gtm_asmap" { diff --git a/pkg/providers/gtm/testdata/TestDataGtmCidrmap/missing_domain.tf b/pkg/providers/gtm/testdata/TestDataGtmCidrmap/missing_domain.tf index 7a043e40d..575d8e3ff 100644 --- a/pkg/providers/gtm/testdata/TestDataGtmCidrmap/missing_domain.tf +++ b/pkg/providers/gtm/testdata/TestDataGtmCidrmap/missing_domain.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_gtm_cidrmap" "gtm_cidrmap" { diff --git a/pkg/providers/gtm/testdata/TestDataGtmCidrmap/missing_map_name.tf b/pkg/providers/gtm/testdata/TestDataGtmCidrmap/missing_map_name.tf index 2302d533c..de069360a 100644 --- a/pkg/providers/gtm/testdata/TestDataGtmCidrmap/missing_map_name.tf +++ b/pkg/providers/gtm/testdata/TestDataGtmCidrmap/missing_map_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_gtm_cidrmap" "gtm_cidrmap" { diff --git a/pkg/providers/gtm/testdata/TestDataGtmCidrmap/valid.tf b/pkg/providers/gtm/testdata/TestDataGtmCidrmap/valid.tf index ba4d3860e..d0cd6899a 100644 --- a/pkg/providers/gtm/testdata/TestDataGtmCidrmap/valid.tf +++ b/pkg/providers/gtm/testdata/TestDataGtmCidrmap/valid.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_gtm_cidrmap" "gtm_cidrmap" { diff --git a/pkg/providers/gtm/testdata/TestDataGtmDomain/missing_domain_name.tf b/pkg/providers/gtm/testdata/TestDataGtmDomain/missing_domain_name.tf index 8cce06c15..8d8cbb400 100644 --- a/pkg/providers/gtm/testdata/TestDataGtmDomain/missing_domain_name.tf +++ b/pkg/providers/gtm/testdata/TestDataGtmDomain/missing_domain_name.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_gtm_domain" "domain" { diff --git a/pkg/providers/gtm/testdata/TestDataGtmDomain/valid.tf b/pkg/providers/gtm/testdata/TestDataGtmDomain/valid.tf index 4991303a6..5488288fb 100644 --- a/pkg/providers/gtm/testdata/TestDataGtmDomain/valid.tf +++ b/pkg/providers/gtm/testdata/TestDataGtmDomain/valid.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_gtm_domain" "domain" { diff --git a/pkg/providers/gtm/testdata/TestDataGtmDomains/valid.tf b/pkg/providers/gtm/testdata/TestDataGtmDomains/valid.tf index 6b0d7631b..664044fb0 100644 --- a/pkg/providers/gtm/testdata/TestDataGtmDomains/valid.tf +++ b/pkg/providers/gtm/testdata/TestDataGtmDomains/valid.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_gtm_domains" "domains" { diff --git a/pkg/providers/imaging/imagewriter/convert-image.gen.go b/pkg/providers/imaging/imagewriter/convert-image.gen.go index 1156a423a..b9b4cf46f 100644 --- a/pkg/providers/imaging/imagewriter/convert-image.gen.go +++ b/pkg/providers/imaging/imagewriter/convert-image.gen.go @@ -1818,9 +1818,9 @@ func boolReaderPtr(d *schema.ResourceData, key string) *bool { value, exist := extract(d, key) if exist { if value.(string) == "true" { - return tools.BoolPtr(true) + return ptr.To(true) } - return tools.BoolPtr(false) + return ptr.To(false) } return nil } diff --git a/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go b/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go index c3e0525d6..e9772a893 100644 --- a/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go @@ -640,21 +640,21 @@ func TestResourcePolicyImage(t *testing.T) { testDir := "testdata/TestResPolicyImage/regular_policy_update_serve_stale_duration" policyInputWithServeStale := imaging.PolicyInputImage{ - ServeStaleDuration: tools.IntPtr(3600), + ServeStaleDuration: ptr.To(3600), Breakpoints: &imaging.Breakpoints{ Widths: []int{320, 640, 1024, 2048, 5000}, }, Output: &imaging.OutputImage{ - AllowPristineOnDownsize: tools.BoolPtr(true), + AllowPristineOnDownsize: ptr.To(true), PerceptualQuality: &imaging.OutputImagePerceptualQualityVariableInline{ Value: imaging.OutputImagePerceptualQualityPtr(imaging.OutputImagePerceptualQualityMediumHigh), }, - PreferModernFormats: tools.BoolPtr(false), + PreferModernFormats: ptr.To(false), }, Transformations: []imaging.TransformationType{ &imaging.MaxColors{ Colors: &imaging.IntegerVariableInline{ - Value: tools.IntPtr(2), + Value: ptr.To(2), }, Transformation: imaging.MaxColorsTransformationMaxColors, }, @@ -670,22 +670,22 @@ func TestResourcePolicyImage(t *testing.T) { Widths: []int{320, 640, 1024, 2048, 5000}, }, Output: &imaging.OutputImage{ - AllowPristineOnDownsize: tools.BoolPtr(true), + AllowPristineOnDownsize: ptr.To(true), PerceptualQuality: &imaging.OutputImagePerceptualQualityVariableInline{ Value: imaging.OutputImagePerceptualQualityPtr(imaging.OutputImagePerceptualQualityMediumHigh), }, - PreferModernFormats: tools.BoolPtr(false), + PreferModernFormats: ptr.To(false), }, Transformations: []imaging.TransformationType{ &imaging.MaxColors{ Colors: &imaging.IntegerVariableInline{ - Value: tools.IntPtr(2), + Value: ptr.To(2), }, Transformation: imaging.MaxColorsTransformationMaxColors, }, }, Version: 1, - Video: tools.BoolPtr(false), + Video: ptr.To(false), } expectUpsertPolicy(client, "test_policy", "test_policy_set", "test_contract", imaging.PolicyNetworkStaging, &policyInputWithServeStale) @@ -696,7 +696,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_serve_stale_duration/policy_create.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_serve_stale_duration/policy_create.tf index 43f1f1f8e..bd894bed5 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_serve_stale_duration/policy_create.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_serve_stale_duration/policy_create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_serve_stale_duration/policy_update.tf b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_serve_stale_duration/policy_update.tf index 2b4f0ca53..df2ba311c 100644 --- a/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_serve_stale_duration/policy_update.tf +++ b/pkg/providers/imaging/testdata/TestResPolicyImage/regular_policy_update_serve_stale_duration/policy_update.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_imaging_policy_image" "policy" { diff --git a/pkg/providers/networklists/resource_akamai_networklist_activations_test.go b/pkg/providers/networklists/resource_akamai_networklist_activations_test.go index 548ed4750..b76536e9f 100644 --- a/pkg/providers/networklists/resource_akamai_networklist_activations_test.go +++ b/pkg/providers/networklists/resource_akamai_networklist_activations_test.go @@ -193,8 +193,8 @@ func TestAccAkamaiActivations_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResActivations/match_by_id.tf"), diff --git a/pkg/providers/property/data_akamai_property_rules_builder_test.go b/pkg/providers/property/data_akamai_property_rules_builder_test.go index 64736e501..144233eac 100644 --- a/pkg/providers/property/data_akamai_property_rules_builder_test.go +++ b/pkg/providers/property/data_akamai_property_rules_builder_test.go @@ -171,7 +171,7 @@ func TestDataPropertyRulesBuilder(t *testing.T) { t.Run("valid rule with 3 children - v2024-01-09", func(t *testing.T) { useClient(nil, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{{ Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRulesBuilder/rules_v2024_01_09.tf"), Check: resource.ComposeAggregateTestCheckFunc( diff --git a/pkg/providers/property/provider.go b/pkg/providers/property/provider.go index ba84ec909..a434ac66b 100644 --- a/pkg/providers/property/provider.go +++ b/pkg/providers/property/provider.go @@ -17,11 +17,12 @@ import ( ) type ( - // PluginSubprovider gathers property resources and data sources written using terraform-plugin-sdk - PluginSubprovider struct{} + // Subprovider gathers property resources and data sources + Subprovider struct{} +) - // FrameworkSubprovider gathers property resources and data sources written using terraform-plugin-framework - FrameworkSubprovider struct{} +var ( + _ subprovider.Subprovider = &Subprovider{} ) var ( @@ -29,17 +30,9 @@ var ( hapiClient hapi.HAPI ) -var _ subprovider.SDK = &PluginSubprovider{} -var _ subprovider.Framework = &FrameworkSubprovider{} - -// NewPluginSubprovider returns a core SDKv2 based sub provider -func NewPluginSubprovider() *PluginSubprovider { - return &PluginSubprovider{} -} - -// NewFrameworkSubprovider returns a core Framework based sub provider -func NewFrameworkSubprovider() *FrameworkSubprovider { - return &FrameworkSubprovider{} +// NewSubprovider returns a new property subprovider +func NewSubprovider() *Subprovider { + return &Subprovider{} } // Client returns the PAPI interface @@ -58,8 +51,8 @@ func HapiClient(meta meta.Meta) hapi.HAPI { return hapi.Client(meta.Session()) } -// Resources returns terraform resources for property -func (p *PluginSubprovider) Resources() map[string]*schema.Resource { +// SDKResources returns the property resources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKResources() map[string]*schema.Resource { return map[string]*schema.Resource{ "akamai_cp_code": resourceCPCode(), "akamai_edge_hostname": resourceSecureEdgeHostName(), @@ -70,8 +63,8 @@ func (p *PluginSubprovider) Resources() map[string]*schema.Resource { } } -// DataSources returns terraform data sources for property -func (p *PluginSubprovider) DataSources() map[string]*schema.Resource { +// SDKDataSources returns the property data sources implemented using terraform-plugin-sdk +func (p *Subprovider) SDKDataSources() map[string]*schema.Resource { return map[string]*schema.Resource{ "akamai_contract": dataSourcePropertyContract(), "akamai_contracts": dataSourceContracts(), @@ -95,15 +88,15 @@ func (p *PluginSubprovider) DataSources() map[string]*schema.Resource { } } -// Resources returns terraform resources for property -func (p *FrameworkSubprovider) Resources() []func() resource.Resource { +// FrameworkResources returns the property resources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkResources() []func() resource.Resource { return []func() resource.Resource{ NewBootstrapResource, } } -// DataSources returns terraform data sources for property -func (p *FrameworkSubprovider) DataSources() []func() datasource.DataSource { +// FrameworkDataSources returns the property data sources implemented using terraform-plugin-framework +func (p *Subprovider) FrameworkDataSources() []func() datasource.DataSource { return []func() datasource.DataSource{ NewIncludeDataSource, } diff --git a/pkg/providers/property/provider_test.go b/pkg/providers/property/provider_test.go index d8f3cb31a..d01fb901c 100644 --- a/pkg/providers/property/provider_test.go +++ b/pkg/providers/property/provider_test.go @@ -1,21 +1,14 @@ package property import ( - "context" "os" "sync" "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/hapi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/go-hclog" - "github.com/hashicorp/terraform-plugin-framework/datasource" - "github.com/hashicorp/terraform-plugin-framework/providerserver" - "github.com/hashicorp/terraform-plugin-framework/resource" - "github.com/hashicorp/terraform-plugin-go/tfprotov5" - "github.com/hashicorp/terraform-plugin-mux/tf5muxserver" ) func TestMain(m *testing.M) { @@ -71,92 +64,3 @@ type T struct{ *testing.T } func (t T) FailNow() { t.T.Fatalf("FAIL: %s", t.T.Name()) } - -type ( - TestSubprovider struct { - resources []func() resource.Resource - datasources []func() datasource.DataSource - client papi.PAPI - } - - clientSetter interface { - setClient(papi.PAPI) - } - - testSubproviderOption func(*TestSubprovider) -) - -func withMockClient(mock papi.PAPI) testSubproviderOption { - return func(ts *TestSubprovider) { - ts.client = mock - } -} - -func newTestSubprovider(opts ...testSubproviderOption) *TestSubprovider { - s := NewFrameworkSubprovider() - - ts := &TestSubprovider{ - resources: s.Resources(), - datasources: s.DataSources(), - } - - for _, opt := range opts { - opt(ts) - } - - return ts -} - -// Resources returns terraform resources for property -func (ts *TestSubprovider) Resources() []func() resource.Resource { - for i, fn := range ts.resources { - // decorate - fn := fn - ts.resources[i] = func() resource.Resource { - res := fn() - if v, ok := res.(clientSetter); ok { - v.setClient(ts.client) - } - return res - } - } - return ts.resources -} - -// DataSources returns terraform data sources for property -func (ts *TestSubprovider) DataSources() []func() datasource.DataSource { - for i, fn := range ts.datasources { - fn := fn - // decorate - ts.datasources[i] = func() datasource.DataSource { - ds := fn() - if v, ok := ds.(clientSetter); ok { - v.setClient(ts.client) - } - return ds - } - } - return ts.datasources -} - -func newProviderFactory(opts ...testSubproviderOption) map[string]func() (tfprotov5.ProviderServer, error) { - testAccProvider := akamai.NewFrameworkProvider(newTestSubprovider(opts...))() - - return map[string]func() (tfprotov5.ProviderServer, error){ - "akamai": func() (tfprotov5.ProviderServer, error) { - ctx := context.Background() - providers := []func() tfprotov5.ProviderServer{ - providerserver.NewProtocol5( - testAccProvider, - ), - } - - muxServer, err := tf5muxserver.NewMuxServer(ctx, providers...) - if err != nil { - return nil, err - } - - return muxServer.ProviderServer(), nil - }, - } -} diff --git a/pkg/providers/property/resource_akamai_property.go b/pkg/providers/property/resource_akamai_property.go index 3b203aa07..b8dc79f4a 100644 --- a/pkg/providers/property/resource_akamai_property.go +++ b/pkg/providers/property/resource_akamai_property.go @@ -800,8 +800,8 @@ func resourcePropertyDelete(ctx context.Context, d *schema.ResourceData, m inter return nil } propertyID = d.Id() - contractID := tools.AddPrefix(d.Get("contract_id").(string), "ctr_") - groupID := tools.AddPrefix(d.Get("group_id").(string), "grp_") + contractID := str.AddPrefix(d.Get("contract_id").(string), "ctr_") + groupID := str.AddPrefix(d.Get("group_id").(string), "grp_") if err := removeProperty(ctx, client, propertyID, groupID, contractID); err != nil { return diag.FromErr(err) diff --git a/pkg/providers/property/resource_akamai_property_bootstrap.go b/pkg/providers/property/resource_akamai_property_bootstrap.go index 940d9cb1f..29b894f0d 100644 --- a/pkg/providers/property/resource_akamai_property_bootstrap.go +++ b/pkg/providers/property/resource_akamai_property_bootstrap.go @@ -9,8 +9,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/framework/modifiers" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" @@ -29,7 +29,7 @@ var ( // BootstrapResource represents akamai_property_bootstrap resource type BootstrapResource struct { - client papi.PAPI + meta meta.Meta } // BootstrapResourceModel is a model for akamai_property_bootstrap resource @@ -41,10 +41,6 @@ type BootstrapResourceModel struct { ProductID types.String `tfsdk:"product_id"` } -func (r *BootstrapResource) setClient(client papi.PAPI) { - r.client = client -} - // NewBootstrapResource returns new property bootstrap resource func NewBootstrapResource() resource.Resource { return &BootstrapResource{} @@ -108,25 +104,21 @@ func (r *BootstrapResource) Schema(_ context.Context, _ resource.SchemaRequest, // Configure implements resource.ResourceWithConfigure. func (r *BootstrapResource) Configure(_ context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) { - // Prevent panic if the provider has not been configured. if req.ProviderData == nil { + // ProviderData is nil when Configure is run first time as part of ValidateDataSourceConfig in framework provider return } - if r.client != nil { - return - } - - m, ok := req.ProviderData.(meta.Meta) - if !ok { - resp.Diagnostics.AddError( - "Unexpected Resource Configure Type", - fmt.Sprintf("Expected *http.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), - ) - return - } + defer func() { + if r := recover(); r != nil { + resp.Diagnostics.AddError( + "Unexpected Resource Configure Type", + fmt.Sprintf("Expected meta.Meta, got: %T. Please report this issue to the provider developers.", req.ProviderData), + ) + } + }() - r.client = papi.Client(m.Session()) + r.meta = meta.Must(req.ProviderData) } // Create implements resource's Create method @@ -140,13 +132,14 @@ func (r *BootstrapResource) Create(ctx context.Context, req resource.CreateReque return } - contractID := tools.AddPrefix(data.ContractID.ValueString(), "ctr_") - groupID := tools.AddPrefix(data.GroupID.ValueString(), "grp_") - productID := tools.AddPrefix(data.ProductID.ValueString(), "prd_") + contractID := str.AddPrefix(data.ContractID.ValueString(), "ctr_") + groupID := str.AddPrefix(data.GroupID.ValueString(), "grp_") + productID := str.AddPrefix(data.ProductID.ValueString(), "prd_") - propertyID, err := createProperty(ctx, r.client, data.Name.ValueString(), groupID, contractID, productID, "") + client := Client(r.meta) + propertyID, err := createProperty(ctx, client, data.Name.ValueString(), groupID, contractID, productID, "") if err != nil { - err = interpretCreatePropertyErrorFramework(ctx, err, r.client, groupID, contractID, productID) + err = interpretCreatePropertyErrorFramework(ctx, err, client, groupID, contractID, productID) if err != nil { resp.Diagnostics.AddError(err.Error(), "") return @@ -193,10 +186,11 @@ func (r *BootstrapResource) Read(ctx context.Context, req resource.ReadRequest, } propertyID := data.ID.ValueString() - contractID := tools.AddPrefix(data.ContractID.ValueString(), "ctr_") - groupID := tools.AddPrefix(data.GroupID.ValueString(), "grp_") + contractID := str.AddPrefix(data.ContractID.ValueString(), "ctr_") + groupID := str.AddPrefix(data.GroupID.ValueString(), "grp_") - _, err := fetchLatestProperty(ctx, r.client, propertyID, groupID, contractID) + client := Client(r.meta) + _, err := fetchLatestProperty(ctx, client, propertyID, groupID, contractID) if errors.Is(err, papi.ErrNotFound) { tflog.Warn(ctx, fmt.Sprintf("property %q removed on server. Removing from local state", propertyID)) resp.State.RemoveResource(ctx) @@ -223,10 +217,11 @@ func (r *BootstrapResource) Delete(ctx context.Context, req resource.DeleteReque } propertyID := data.ID.ValueString() - contractID := tools.AddPrefix(data.ContractID.ValueString(), "ctr_") - groupID := tools.AddPrefix(data.GroupID.ValueString(), "grp_") + contractID := str.AddPrefix(data.ContractID.ValueString(), "ctr_") + groupID := str.AddPrefix(data.GroupID.ValueString(), "grp_") - if err := removeProperty(ctx, r.client, propertyID, groupID, contractID); err != nil { + client := Client(r.meta) + if err := removeProperty(ctx, client, propertyID, groupID, contractID); err != nil { resp.Diagnostics.AddError("removeProperty:", err.Error()) } } @@ -240,26 +235,27 @@ func (r *BootstrapResource) ImportState(ctx context.Context, req resource.Import switch len(parts) { case 3: - propertyID = tools.AddPrefix(parts[0], "prp_") - contractID = tools.AddPrefix(parts[1], "ctr_") - groupID = tools.AddPrefix(parts[2], "grp_") + propertyID = str.AddPrefix(parts[0], "prp_") + contractID = str.AddPrefix(parts[1], "ctr_") + groupID = str.AddPrefix(parts[2], "grp_") case 2: resp.Diagnostics.AddError("missing group id or contract id", "") return case 1: - propertyID = tools.AddPrefix(parts[0], "prp_") + propertyID = str.AddPrefix(parts[0], "prp_") default: resp.Diagnostics.AddError(fmt.Sprintf("invalid property identifier: %s", req.ID), "") return } - property, err := fetchLatestProperty(ctx, r.client, propertyID, groupID, contractID) + client := Client(r.meta) + property, err := fetchLatestProperty(ctx, client, propertyID, groupID, contractID) if err != nil { resp.Diagnostics.AddError(err.Error(), "") return } - res, err := fetchPropertyVersion(ctx, r.client, property.PropertyID, property.GroupID, property.ContractID, property.LatestVersion) + res, err := fetchPropertyVersion(ctx, client, property.PropertyID, property.GroupID, property.ContractID, property.LatestVersion) if err != nil { resp.Diagnostics.AddError(err.Error(), "") return diff --git a/pkg/providers/property/resource_akamai_property_bootstrap_test.go b/pkg/providers/property/resource_akamai_property_bootstrap_test.go index c7a5a7f70..49b26af70 100644 --- a/pkg/providers/property/resource_akamai_property_bootstrap_test.go +++ b/pkg/providers/property/resource_akamai_property_bootstrap_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) @@ -117,7 +117,7 @@ func TestBootstrapResourceCreate(t *testing.T) { useClient(m, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: newProviderFactory(withMockClient(m)), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { @@ -253,7 +253,7 @@ func TestBootstrapResourceUpdate(t *testing.T) { useClient(m, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: newProviderFactory(withMockClient(m)), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { @@ -378,7 +378,7 @@ func TestBootstrapResourceImport(t *testing.T) { useClient(m, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: newProviderFactory(withMockClient(m)), + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), IsUnitTest: true, Steps: []resource.TestStep{ { @@ -411,10 +411,10 @@ func checkPropertyBootstrapAttributes(data testDataForPropertyBootstrap) resourc resource.TestCheckResourceAttr("akamai_property_bootstrap.test", "name", data.name)) } return resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttr("akamai_property_bootstrap.test", "id", tools.AddPrefix(data.propertyID, "prp_")), - resource.TestCheckResourceAttr("akamai_property_bootstrap.test", "group_id", tools.AddPrefix(data.groupID, "grp_")), - resource.TestCheckResourceAttr("akamai_property_bootstrap.test", "contract_id", tools.AddPrefix(data.contractID, "ctr_")), - resource.TestCheckResourceAttr("akamai_property_bootstrap.test", "product_id", tools.AddPrefix(data.productID, "prd_")), + resource.TestCheckResourceAttr("akamai_property_bootstrap.test", "id", str.AddPrefix(data.propertyID, "prp_")), + resource.TestCheckResourceAttr("akamai_property_bootstrap.test", "group_id", str.AddPrefix(data.groupID, "grp_")), + resource.TestCheckResourceAttr("akamai_property_bootstrap.test", "contract_id", str.AddPrefix(data.contractID, "ctr_")), + resource.TestCheckResourceAttr("akamai_property_bootstrap.test", "product_id", str.AddPrefix(data.productID, "prd_")), resource.TestCheckResourceAttr("akamai_property_bootstrap.test", "name", data.name), ) } diff --git a/pkg/providers/property/resource_akamai_property_test.go b/pkg/providers/property/resource_akamai_property_test.go index acfa31879..561349b7a 100644 --- a/pkg/providers/property/resource_akamai_property_test.go +++ b/pkg/providers/property/resource_akamai_property_test.go @@ -1186,7 +1186,7 @@ func TestResProperty(t *testing.T) { ExpectRemoveProperty(client, "prp_1", "ctr_0", "grp_0") useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResProperty/property_with_validation_warning_for_rules.tf"), @@ -1864,7 +1864,7 @@ func TestPropertyResource_versionNotesLifecycle(t *testing.T) { useClient(client, nil, func() { resource.UnitTest(t, resource.TestCase{ - ProtoV5ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, path.Join(testdataDir, "01_with_notes_and_comments.tf")), diff --git a/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2024_01_09.tf b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2024_01_09.tf index 3a8ad94b0..0e024990b 100644 --- a/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2024_01_09.tf +++ b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2024_01_09.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_property_rules_builder" "default" { diff --git a/pkg/providers/property/testdata/TestResProperty/Importable/importable-with-bootstrap.tf b/pkg/providers/property/testdata/TestResProperty/Importable/importable-with-bootstrap.tf index ee398fb64..326bcad6f 100644 --- a/pkg/providers/property/testdata/TestResProperty/Importable/importable-with-bootstrap.tf +++ b/pkg/providers/property/testdata/TestResProperty/Importable/importable-with-bootstrap.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/versionNotes/01_with_notes_and_comments.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/versionNotes/01_with_notes_and_comments.tf index 1a17c58cb..21db8845b 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/versionNotes/01_with_notes_and_comments.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/versionNotes/01_with_notes_and_comments.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/versionNotes/02_update_notes_no_diff.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/versionNotes/02_update_notes_no_diff.tf index 867264674..a5ecc2b0a 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/versionNotes/02_update_notes_no_diff.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/versionNotes/02_update_notes_no_diff.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/versionNotes/03_update_notes_and_rules.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/versionNotes/03_update_notes_and_rules.tf index 77e97c3a8..b1facfe04 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/versionNotes/03_update_notes_and_rules.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/versionNotes/03_update_notes_and_rules.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/versionNotes/04_05_remove_notes_update_comments.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/versionNotes/04_05_remove_notes_update_comments.tf index e1ec2c71e..f599793d2 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/versionNotes/04_05_remove_notes_update_comments.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/versionNotes/04_05_remove_notes_update_comments.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/with-propertyID/step0.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/with-propertyID/step0.tf index e3b1007dc..04b57b61f 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/with-propertyID/step0.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/with-propertyID/step0.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/Lifecycle/with-propertyID/step1.tf b/pkg/providers/property/testdata/TestResProperty/Lifecycle/with-propertyID/step1.tf index a9462920e..8e3489304 100644 --- a/pkg/providers/property/testdata/TestResProperty/Lifecycle/with-propertyID/step1.tf +++ b/pkg/providers/property/testdata/TestResProperty/Lifecycle/with-propertyID/step1.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResProperty/property_with_validation_warning_for_rules.tf b/pkg/providers/property/testdata/TestResProperty/property_with_validation_warning_for_rules.tf index f27e25ee3..92a3bc333 100644 --- a/pkg/providers/property/testdata/TestResProperty/property_with_validation_warning_for_rules.tf +++ b/pkg/providers/property/testdata/TestResProperty/property_with_validation_warning_for_rules.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } resource "akamai_property" "test" { diff --git a/pkg/providers/property/testdata/TestResPropertyBootstrap/create.tf b/pkg/providers/property/testdata/TestResPropertyBootstrap/create.tf index c80e43c92..cb1e2e2a9 100644 --- a/pkg/providers/property/testdata/TestResPropertyBootstrap/create.tf +++ b/pkg/providers/property/testdata/TestResPropertyBootstrap/create.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } diff --git a/pkg/providers/property/testdata/TestResPropertyBootstrap/create_without_prefixes.tf b/pkg/providers/property/testdata/TestResPropertyBootstrap/create_without_prefixes.tf index 1de8697e1..682a8402a 100644 --- a/pkg/providers/property/testdata/TestResPropertyBootstrap/create_without_prefixes.tf +++ b/pkg/providers/property/testdata/TestResPropertyBootstrap/create_without_prefixes.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } diff --git a/pkg/providers/property/testdata/TestResPropertyBootstrap/update_contract.tf b/pkg/providers/property/testdata/TestResPropertyBootstrap/update_contract.tf index 138598d46..74af4aba0 100644 --- a/pkg/providers/property/testdata/TestResPropertyBootstrap/update_contract.tf +++ b/pkg/providers/property/testdata/TestResPropertyBootstrap/update_contract.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } diff --git a/pkg/providers/property/testdata/TestResPropertyBootstrap/update_group.tf b/pkg/providers/property/testdata/TestResPropertyBootstrap/update_group.tf index ecd73e94e..c91e854d1 100644 --- a/pkg/providers/property/testdata/TestResPropertyBootstrap/update_group.tf +++ b/pkg/providers/property/testdata/TestResPropertyBootstrap/update_group.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } diff --git a/pkg/providers/property/testdata/TestResPropertyBootstrap/update_product.tf b/pkg/providers/property/testdata/TestResPropertyBootstrap/update_product.tf index 0af7693cf..3a837f46d 100644 --- a/pkg/providers/property/testdata/TestResPropertyBootstrap/update_product.tf +++ b/pkg/providers/property/testdata/TestResPropertyBootstrap/update_product.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } From 3daf6a4680e9cc28c2c06472a010c0a2e1bc7477 Mon Sep 17 00:00:00 2001 From: Dawid Dzhafarov Date: Thu, 29 Feb 2024 09:59:08 +0000 Subject: [PATCH 25/52] DXE-3612 Fix unused imports in property data source --- .../no_match_rules.tf | 2 +- .../no_match_rules.tf | 2 +- .../no_match_rules.tf | 2 +- .../no_match_rules.tf | 2 +- .../no_match_rules.tf | 2 +- .../no_match_rules.tf | 2 +- .../no_match_rules.tf | 2 +- .../no_match_rules.tf | 2 +- .../resource_akamai_imaging_policy_image_test.go | 2 +- .../resource_akamai_imaging_policy_video_test.go | 2 +- .../property/data_akamai_property_test.go | 14 +++++++------- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/no_match_rules.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/no_match_rules.tf index ed58c218a..0f26bc2c1 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/no_match_rules.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAPIPrioritizationMatchRule/no_match_rules.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_api_prioritization_match_rule" "test" {} \ No newline at end of file diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/no_match_rules.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/no_match_rules.tf index 007910461..78a34b357 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/no_match_rules.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsAudienceSegmentationMatchRule/no_match_rules.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_audience_segmentation_match_rule" "test" {} \ No newline at end of file diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/no_match_rules.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/no_match_rules.tf index 7d96c1557..2a8e3993e 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/no_match_rules.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsEdgeRedirectorMatchRule/no_match_rules.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_edge_redirector_match_rule" "test" {} \ No newline at end of file diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/no_match_rules.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/no_match_rules.tf index a7b9b1f9c..6be75671b 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/no_match_rules.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsForwardRewriteMatchRule/no_match_rules.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_forward_rewrite_match_rule" "test" {} \ No newline at end of file diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/no_match_rules.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/no_match_rules.tf index 29977f246..e2098fb1d 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/no_match_rules.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsLoadBalancerMatchRule/no_match_rules.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_application_load_balancer_match_rule" "test" {} \ No newline at end of file diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/no_match_rules.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/no_match_rules.tf index e06765b6d..0c15740c3 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/no_match_rules.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsPhasedReleaseMatchRule/no_match_rules.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_phased_release_match_rule" "test" {} \ No newline at end of file diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/no_match_rules.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/no_match_rules.tf index 44d296a0e..2c6d59110 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/no_match_rules.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsRequestControlMatchRule/no_match_rules.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_request_control_match_rule" "test" {} \ No newline at end of file diff --git a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/no_match_rules.tf b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/no_match_rules.tf index 7faecc422..a50452408 100644 --- a/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/no_match_rules.tf +++ b/pkg/providers/cloudlets/testdata/TestDataCloudletsVisitorPrioritizationMatchRule/no_match_rules.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" } data "akamai_cloudlets_visitor_prioritization_match_rule" "test" {} \ No newline at end of file diff --git a/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go b/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go index e9772a893..0d8a4e776 100644 --- a/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go @@ -360,7 +360,7 @@ func TestResourcePolicyImage(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), diff --git a/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go b/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go index 742ac4745..0f3b6586c 100644 --- a/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go @@ -317,7 +317,7 @@ func TestResourcePolicyVideo(t *testing.T) { useClient(client, func() { resource.UnitTest(t, resource.TestCase{ - ProviderFactories: testAccProviders, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, fmt.Sprintf("%s/policy_create.tf", testDir)), diff --git a/pkg/providers/property/data_akamai_property_test.go b/pkg/providers/property/data_akamai_property_test.go index e1906f355..13c227c93 100644 --- a/pkg/providers/property/data_akamai_property_test.go +++ b/pkg/providers/property/data_akamai_property_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/stretchr/testify/mock" @@ -48,9 +48,9 @@ func TestDataProperty(t *testing.T) { ContractID: "ctr_1", GroupID: "grp_1", LatestVersion: 1, - ProductionVersion: tools.IntPtr(1), + ProductionVersion: ptr.To(1), PropertyID: "prp_123", - StagingVersion: tools.IntPtr(1), + StagingVersion: ptr.To(1), }, }}, }, nil) @@ -130,9 +130,9 @@ func TestDataProperty(t *testing.T) { ContractID: "ctr_1", GroupID: "grp_1", LatestVersion: 1, - ProductionVersion: tools.IntPtr(2), + ProductionVersion: ptr.To(2), PropertyID: "prp_123", - StagingVersion: tools.IntPtr(3), + StagingVersion: ptr.To(3), }, }}, }, nil) @@ -386,9 +386,9 @@ func TestDataProperty(t *testing.T) { ContractID: "ctr_1", GroupID: "grp_1", LatestVersion: 1, - ProductionVersion: tools.IntPtr(1), + ProductionVersion: ptr.To(1), PropertyID: "prp_123", - StagingVersion: tools.IntPtr(1), + StagingVersion: ptr.To(1), }, }}, }, nil) From 9bb628977868667b6cb143d5bda1e515d327f25c Mon Sep 17 00:00:00 2001 From: Filip Antkowiak Date: Mon, 4 Mar 2024 10:35:42 +0000 Subject: [PATCH 26/52] DXE-3348 Migrate code to go 1.21 version --- .goreleaser.yml | 2 +- CHANGELOG.md | 3 +++ build/internal/package/nexus-release.bash | 2 +- build/internal/releaser/Dockerfile | 6 +++--- go.mod | 4 ++-- go.sum | 19 +++++++++++++++++++ tools/go.mod | 9 +++------ tools/go.sum | 10 ++++------ 8 files changed, 36 insertions(+), 19 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index adea51ffa..bbfcdc403 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -3,7 +3,7 @@ before: hooks: # this is just an example and not a requirement for provider building/publishing - - go mod tidy -compat=1.18 + - go mod tidy -compat=1.21 builds: - env: # goreleaser does not work with CGO, it could also complicate diff --git a/CHANGELOG.md b/CHANGELOG.md index 82dbc1e1c..cb48024b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ #### BREAKING CHANGES: + + * PAPI * Added validation to raise an error if the creation of the `akamai_edge_hostname` resource is attempted with an existing edge hostname. * Added validation to raise an error during the update of `akamai_edge_hostname` resource for the immutable fields: 'product_id' and 'certificate'. @@ -41,6 +43,7 @@ * When performing the read operation, if `activate_on_production` is true, fetch the policy state from the production network; otherwise, obtain it from the staging environment. +* Migrated to go 1.21 diff --git a/build/internal/package/nexus-release.bash b/build/internal/package/nexus-release.bash index d83dd0731..b8e92ae13 100755 --- a/build/internal/package/nexus-release.bash +++ b/build/internal/package/nexus-release.bash @@ -85,7 +85,7 @@ checkout_edgegrid() { adjust_edgegrid() { go mod edit -replace github.com/akamai/AkamaiOPEN-edgegrid-golang/v7="./akamaiopen-edgegrid-golang" - go mod tidy -compat=1.18 + go mod tidy -compat=1.21 } build() { diff --git a/build/internal/releaser/Dockerfile b/build/internal/releaser/Dockerfile index cf2e5cd11..276aad059 100644 --- a/build/internal/releaser/Dockerfile +++ b/build/internal/releaser/Dockerfile @@ -20,8 +20,8 @@ RUN apt update && apt install -y curl git gcc ca-certificates openssh-client gnu && curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add - \ && apt update && apt install -y terraform \ && update-ca-certificates \ - && curl -o go1.18.linux-amd64.tar.gz https://dl.google.com/go/go1.18.linux-amd64.tar.gz \ - && rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.linux-amd64.tar.gz \ - && go install github.com/goreleaser/goreleaser@v1.18.2 \ + && curl -o go1.21.0.linux-amd64.tar.gz https://dl.google.com/go/go1.21.0.linux-amd64.tar.gz \ + && rm -rf /usr/local/go && tar -C /usr/local -xzf go1.21.0.linux-amd64.tar.gz \ + && go install github.com/goreleaser/goreleaser@v1.21.0 \ && mkdir -p /root/.terraform.d/plugins/registry.terraform.io/akamai/akamai/10.0.0/linux_amd64 /root/.ssh diff --git a/go.mod b/go.mod index 23b7dfed6..c6a16bb54 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,7 @@ module github.com/akamai/terraform-provider-akamai/v5 +go 1.21 + require ( github.com/akamai/AkamaiOPEN-edgegrid-golang/v7 v7.6.1 github.com/allegro/bigcache/v2 v2.2.5 @@ -88,5 +90,3 @@ require ( ) // replace github.com/akamai/AkamaiOPEN-edgegrid-golang/v7 => ../AkamaiOPEN-edgegrid-golang - -go 1.18 diff --git a/go.sum b/go.sum index aa102c134..1f3e13e60 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,9 @@ github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA= github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= +github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/akamai/AkamaiOPEN-edgegrid-golang/v7 v7.6.1 h1:KrYkNvCKBGPs/upjgJCojZnnmt5XdEPWS4L2zRQm7+o= @@ -32,15 +34,20 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/dlclark/regexp2 v1.10.0 h1:+/GIL799phkJqYW+3YbOd8LCcbHzT0Pbo8zl70MHsq0= github.com/dlclark/regexp2 v1.10.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= +github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= +github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= github.com/go-git/go-billy/v5 v5.4.1 h1:Uwp5tDRkPr+l/TnbHOQzp+tmJfLceOlbVucgpTz8ix4= +github.com/go-git/go-billy/v5 v5.4.1/go.mod h1:vjbugF6Fz7JIflbVpl1hJsGjSHNltrSw45YK/ukIvQg= github.com/go-git/go-git/v5 v5.6.1 h1:q4ZRqQl4pR/ZJHc1L5CFjGA1a10u76aV1iC+nh+bHsk= +github.com/go-git/go-git/v5 v5.6.1/go.mod h1:mvyoL6Unz0PiTQrGQfSfiLFhBH1c1e84ylC2MDs4ee8= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-ozzo/ozzo-validation/v4 v4.3.0 h1:byhDUpfEwjsVQb1vBunvIjh2BHQ9ead57VkAEY4V+Es= github.com/go-ozzo/ozzo-validation/v4 v4.3.0/go.mod h1:2NKgrcHl3z6cJs+3Oo940FPRiTzuqKbvfrL2RxCj6Ew= @@ -115,24 +122,31 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= +github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jedib0t/go-pretty/v6 v6.0.4 h1:7WaHUeKo5yc2vABlsh30p4VWxQoXaWktBY/nR/2qnPg= github.com/jedib0t/go-pretty/v6 v6.0.4/go.mod h1:MTr6FgcfNdnN5wPVBzJ6mhJeDyiF0yBvS2TMXEV/XSU= github.com/jhump/protoreflect v1.6.0 h1:h5jfMVslIg6l29nsMs0D8Wj17RDVdNYti0vDN/PZZoE= +github.com/jhump/protoreflect v1.6.0/go.mod h1:eaTn3RZAmMBcV0fifFvlm6VHNz3wSkYyXYWUh7ymB74= github.com/jinzhu/copier v0.3.2 h1:QdBOCbaouLDYaIPFfi1bKv5F5tPpeTwXe4sD0jqtz5w= github.com/jinzhu/copier v0.3.2/go.mod h1:24xnZezI2Yqac9J61UC6/dG/k76ttpq0DdJI3QmUvro= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= +github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -166,6 +180,7 @@ github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= +github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -177,7 +192,9 @@ github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZV github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/skeema/knownhosts v1.1.0 h1:Wvr9V0MxhjRbl3f9nMnKnFfiWTJmtECJ9Njkea3ysW0= +github.com/skeema/knownhosts v1.1.0/go.mod h1:sKFq3RD6/TKZkSWn8boUbDC7Qkgcv+8XXijpFO6roag= github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= github.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4SauJk4cUOwJs= @@ -211,6 +228,7 @@ github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= +github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/zclconf/go-cty v1.13.2 h1:4GvrUxe/QUDYuJKAav4EYqdM47/kZa672LwmXFmEKT0= github.com/zclconf/go-cty v1.13.2/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= @@ -281,6 +299,7 @@ gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/tools/go.mod b/tools/go.mod index 9efaca36b..66c3e4a2e 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -1,10 +1,7 @@ module github.com/akamai/terraform-provider-akamai/tools -go 1.18 +go 1.21 -require golang.org/x/tools v0.13.0 +require golang.org/x/tools v0.18.0 -require ( - golang.org/x/mod v0.13.0 // indirect - golang.org/x/sys v0.13.0 // indirect -) +require golang.org/x/mod v0.15.0 // indirect diff --git a/tools/go.sum b/tools/go.sum index d90944cfa..57ef75a2e 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -1,6 +1,4 @@ -golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= -golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= +golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= +golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= From 8a37122f922b5f9cfbe093edc7cdb8f1f350b9b2 Mon Sep 17 00:00:00 2001 From: Dawid Dzhafarov Date: Tue, 5 Mar 2024 07:50:32 +0000 Subject: [PATCH 27/52] DXE-3612 Adjust examples and references in regards to tfprotoV6 --- CHANGELOG.md | 3 ++- README.md | 4 ++-- examples/akamai_cp_code/cp-code-example.tf | 2 +- examples/akamai_dns_zone/add-records/dnsv2.tf | 2 +- .../akamai_dns_zone/add-zone-records/dnsv2.tf | 2 +- examples/akamai_dns_zone/add-zone/dnsv2.tf | 2 +- .../akamai_gtm_domain/full_domain/gtmv1_4.tf | 2 +- .../full_domain_import/gtmv1_4_import.tf | 2 +- .../activate-property/activate-property.tf | 2 +- .../create-property/create-property.tf | 2 +- .../existing-property/existing-property.tf | 2 +- .../akamai_property/property-json/property.tf | 2 +- .../akamai_property_rules.tf | 2 +- examples/appsec/config.tf | 2 +- .../environments-test/environments/dev/main.tf | 2 +- .../environments/preprod/main.tf | 2 +- .../environments-test/environments/prod/main.tf | 2 +- .../environments-test/modules/property/main.tf | 2 +- .../property/foreach-test/main.tf | 2 +- .../property/snippets-test/main.tf | 2 +- .../property/workspaces-test/main.tf | 2 +- examples/onboard-Ion/akamai.tf | 2 +- pkg/common/str/str.go | 17 +++++++---------- 23 files changed, 31 insertions(+), 33 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb48024b0..c8d108b2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,8 @@ - +* General + * Migrated to terraform protocol version 6, hence minimal required terraform version is 1.0 diff --git a/README.md b/README.md index 86750ea97..605fd7731 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Use the Akamai Provider to manage and provision your Akamai configurations in Te ## Requirements -- [Terraform](https://www.terraform.io/downloads.html) 0.12.x +- [Terraform](https://www.terraform.io/downloads.html) 1.0.x ## Installation @@ -19,7 +19,7 @@ To automatically install the Akamai Provider, run `terraform init` on a configur ## Documentation -You can find documentation for the Akamai Provider on the [Terraform Website](https://techdocs.akamai.com/terraform/docs/overview). +You can find documentation for the Akamai Provider on the [Akamai Techdocs Website](https://techdocs.akamai.com/terraform/docs/overview). ## Credits diff --git a/examples/akamai_cp_code/cp-code-example.tf b/examples/akamai_cp_code/cp-code-example.tf index ad36989e7..3ec679d5d 100644 --- a/examples/akamai_cp_code/cp-code-example.tf +++ b/examples/akamai_cp_code/cp-code-example.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.12" + required_version = ">= 1.0" required_providers { akamai = { source = "akamai/akamai" diff --git a/examples/akamai_dns_zone/add-records/dnsv2.tf b/examples/akamai_dns_zone/add-records/dnsv2.tf index fc99d4eb3..854718808 100644 --- a/examples/akamai_dns_zone/add-records/dnsv2.tf +++ b/examples/akamai_dns_zone/add-records/dnsv2.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.12" + required_version = ">= 1.0" required_providers { akamai = { source = "akamai/akamai" diff --git a/examples/akamai_dns_zone/add-zone-records/dnsv2.tf b/examples/akamai_dns_zone/add-zone-records/dnsv2.tf index 296ea3c55..957e70def 100644 --- a/examples/akamai_dns_zone/add-zone-records/dnsv2.tf +++ b/examples/akamai_dns_zone/add-zone-records/dnsv2.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.12" + required_version = ">= 1.0" required_providers { akamai = { source = "akamai/akamai" diff --git a/examples/akamai_dns_zone/add-zone/dnsv2.tf b/examples/akamai_dns_zone/add-zone/dnsv2.tf index 6f8e7266b..1c9e3edd2 100644 --- a/examples/akamai_dns_zone/add-zone/dnsv2.tf +++ b/examples/akamai_dns_zone/add-zone/dnsv2.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.12" + required_version = ">= 1.0" required_providers { akamai = { source = "akamai/akamai" diff --git a/examples/akamai_gtm_domain/full_domain/gtmv1_4.tf b/examples/akamai_gtm_domain/full_domain/gtmv1_4.tf index 09f2fc34d..9c4d00c3f 100644 --- a/examples/akamai_gtm_domain/full_domain/gtmv1_4.tf +++ b/examples/akamai_gtm_domain/full_domain/gtmv1_4.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.12" + required_version = ">= 1.0" required_providers { akamai = { source = "akamai/akamai" diff --git a/examples/akamai_gtm_domain/full_domain_import/gtmv1_4_import.tf b/examples/akamai_gtm_domain/full_domain_import/gtmv1_4_import.tf index 58c8d7628..fed8bfb7a 100644 --- a/examples/akamai_gtm_domain/full_domain_import/gtmv1_4_import.tf +++ b/examples/akamai_gtm_domain/full_domain_import/gtmv1_4_import.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.12" + required_version = ">= 1.0" required_providers { akamai = { source = "akamai/akamai" diff --git a/examples/akamai_property/activate-property/activate-property.tf b/examples/akamai_property/activate-property/activate-property.tf index 805405144..b91d64a17 100644 --- a/examples/akamai_property/activate-property/activate-property.tf +++ b/examples/akamai_property/activate-property/activate-property.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.12" + required_version = ">= 1.0" required_providers { akamai = { source = "akamai/akamai" diff --git a/examples/akamai_property/create-property/create-property.tf b/examples/akamai_property/create-property/create-property.tf index 4f04d9da6..f54f74104 100644 --- a/examples/akamai_property/create-property/create-property.tf +++ b/examples/akamai_property/create-property/create-property.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.12" + required_version = ">= 1.0" required_providers { akamai = { source = "akamai/akamai" diff --git a/examples/akamai_property/existing-property/existing-property.tf b/examples/akamai_property/existing-property/existing-property.tf index eaa961cf3..398f93369 100644 --- a/examples/akamai_property/existing-property/existing-property.tf +++ b/examples/akamai_property/existing-property/existing-property.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.12" + required_version = ">= 1.0" required_providers { akamai = { source = "akamai/akamai" diff --git a/examples/akamai_property/property-json/property.tf b/examples/akamai_property/property-json/property.tf index 4350c628c..9642f7d97 100644 --- a/examples/akamai_property/property-json/property.tf +++ b/examples/akamai_property/property-json/property.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.12" + required_version = ">= 1.0" required_providers { akamai = { source = "akamai/akamai" diff --git a/examples/akamai_property_rules/akamai_property_rules.tf b/examples/akamai_property_rules/akamai_property_rules.tf index 4742070e4..d4e600d1e 100644 --- a/examples/akamai_property_rules/akamai_property_rules.tf +++ b/examples/akamai_property_rules/akamai_property_rules.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.12" + required_version = ">= 1.0" required_providers { akamai = { source = "akamai/akamai" diff --git a/examples/appsec/config.tf b/examples/appsec/config.tf index d53655e2d..f83f23708 100644 --- a/examples/appsec/config.tf +++ b/examples/appsec/config.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.12" + required_version = ">= 1.0" required_providers { akamai = { source = "akamai/akamai" diff --git a/examples/community-examples/property/environments-test/environments/dev/main.tf b/examples/community-examples/property/environments-test/environments/dev/main.tf index da97bce27..85c6ff6fe 100644 --- a/examples/community-examples/property/environments-test/environments/dev/main.tf +++ b/examples/community-examples/property/environments-test/environments/dev/main.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.12" + required_version = ">= 1.0" } module "property" { diff --git a/examples/community-examples/property/environments-test/environments/preprod/main.tf b/examples/community-examples/property/environments-test/environments/preprod/main.tf index a25fae7aa..1d2d2c6c5 100644 --- a/examples/community-examples/property/environments-test/environments/preprod/main.tf +++ b/examples/community-examples/property/environments-test/environments/preprod/main.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.12" + required_version = ">= 1.0" } module "property" { diff --git a/examples/community-examples/property/environments-test/environments/prod/main.tf b/examples/community-examples/property/environments-test/environments/prod/main.tf index 284097072..edb6d8e95 100644 --- a/examples/community-examples/property/environments-test/environments/prod/main.tf +++ b/examples/community-examples/property/environments-test/environments/prod/main.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.12" + required_version = ">= 1.0" } module "property" { diff --git a/examples/community-examples/property/environments-test/modules/property/main.tf b/examples/community-examples/property/environments-test/modules/property/main.tf index eb8aee96a..e9f7d3563 100644 --- a/examples/community-examples/property/environments-test/modules/property/main.tf +++ b/examples/community-examples/property/environments-test/modules/property/main.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.12" + required_version = ">= 1.0" required_providers { akamai = { source = "akamai/akamai" diff --git a/examples/community-examples/property/foreach-test/main.tf b/examples/community-examples/property/foreach-test/main.tf index adfcd876b..c41a6cc6a 100644 --- a/examples/community-examples/property/foreach-test/main.tf +++ b/examples/community-examples/property/foreach-test/main.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.12" + required_version = ">= 1.0" required_providers { akamai = { source = "akamai/akamai" diff --git a/examples/community-examples/property/snippets-test/main.tf b/examples/community-examples/property/snippets-test/main.tf index 162504176..f25904df0 100644 --- a/examples/community-examples/property/snippets-test/main.tf +++ b/examples/community-examples/property/snippets-test/main.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.12" + required_version = ">= 1.0" required_providers { akamai = { source = "akamai/akamai" diff --git a/examples/community-examples/property/workspaces-test/main.tf b/examples/community-examples/property/workspaces-test/main.tf index 6ea3769a3..48410515e 100644 --- a/examples/community-examples/property/workspaces-test/main.tf +++ b/examples/community-examples/property/workspaces-test/main.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.12" + required_version = ">= 1.0" required_providers { akamai = { source = "akamai/akamai" diff --git a/examples/onboard-Ion/akamai.tf b/examples/onboard-Ion/akamai.tf index 33663ee0f..71c254aa8 100644 --- a/examples/onboard-Ion/akamai.tf +++ b/examples/onboard-Ion/akamai.tf @@ -9,7 +9,7 @@ terraform { version = ">= 2.2.0" } } - required_version = ">= 0.13" + required_version = ">= 1.0" } provider "akamai" { diff --git a/pkg/common/str/str.go b/pkg/common/str/str.go index a9c61fb28..58cca3cfa 100644 --- a/pkg/common/str/str.go +++ b/pkg/common/str/str.go @@ -9,25 +9,22 @@ import ( // From converts any type to string. func From(data interface{}) string { - var res string switch v := data.(type) { case float32, float64: - res = fmt.Sprintf("%g", v) + return fmt.Sprintf("%g", v) case int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64: - res = fmt.Sprintf("%d", v) + return fmt.Sprintf("%d", v) case json.Number: - res = v.String() + return v.String() case string: - res = v + return v case []byte: - res = string(v) + return string(v) case bool: - res = strconv.FormatBool(v) + return strconv.FormatBool(v) default: - res = fmt.Sprintf("%v", data) + return fmt.Sprintf("%v", data) } - - return res } // FirstNotEmpty returns first not empty string From 6b1cf2bd35638e4ddd3b90bd6d6e4c271d40a9f6 Mon Sep 17 00:00:00 2001 From: Dawid Dzhafarov Date: Wed, 6 Mar 2024 10:53:32 +0000 Subject: [PATCH 28/52] DXE-3405 Adjust struct names in GTM and DNS after edgegrid-golang changes --- .../dns/resource_akamai_dns_record_test.go | 2 +- pkg/providers/dns/resource_akamai_dns_zone.go | 68 ++++----- .../dns/resource_akamai_dns_zone_test.go | 16 +- pkg/providers/gtm/data_akamai_gtm_asmap.go | 56 +++---- .../gtm/data_akamai_gtm_asmap_test.go | 20 +-- pkg/providers/gtm/data_akamai_gtm_cidrmap.go | 48 +++--- .../gtm/data_akamai_gtm_cidrmap_test.go | 18 +-- .../gtm/data_akamai_gtm_datacenter_test.go | 2 +- .../gtm/data_akamai_gtm_datacenters.go | 2 +- .../gtm/data_akamai_gtm_datacenters_test.go | 2 +- .../gtm/data_akamai_gtm_default_datacenter.go | 16 +- ...data_akamai_gtm_default_datacenter_test.go | 2 +- pkg/providers/gtm/data_akamai_gtm_domain.go | 62 ++++---- .../gtm/data_akamai_gtm_domain_test.go | 30 ++-- pkg/providers/gtm/data_akamai_gtm_domains.go | 2 +- .../gtm/data_akamai_gtm_domains_test.go | 6 +- pkg/providers/gtm/data_akamai_gtm_resource.go | 2 +- .../gtm/data_akamai_gtm_resource_test.go | 2 +- .../gtm/data_akamai_gtm_resources_test.go | 4 +- pkg/providers/gtm/provider.go | 10 +- .../gtm/resource_akamai_gtm_asmap.go | 138 +++++++++--------- .../gtm/resource_akamai_gtm_asmap_test.go | 106 +++++++------- .../gtm/resource_akamai_gtm_cidrmap.go | 125 ++++++++-------- .../gtm/resource_akamai_gtm_cidrmap_test.go | 94 ++++++------ .../gtm/resource_akamai_gtm_datacenter.go | 6 +- .../resource_akamai_gtm_datacenter_test.go | 4 +- .../gtm/resource_akamai_gtm_domain.go | 12 +- .../gtm/resource_akamai_gtm_domain_test.go | 36 ++--- .../gtm/resource_akamai_gtm_geomap.go | 58 ++++---- .../gtm/resource_akamai_gtm_geomap_test.go | 16 +- .../gtm/resource_akamai_gtm_property.go | 62 ++++---- .../gtm/resource_akamai_gtm_property_test.go | 34 ++--- .../gtm/resource_akamai_gtm_resource.go | 4 +- .../gtm/resource_akamai_gtm_resource_test.go | 16 +- 34 files changed, 528 insertions(+), 553 deletions(-) diff --git a/pkg/providers/dns/resource_akamai_dns_record_test.go b/pkg/providers/dns/resource_akamai_dns_record_test.go index b53626b60..1ee587d54 100644 --- a/pkg/providers/dns/resource_akamai_dns_record_test.go +++ b/pkg/providers/dns/resource_akamai_dns_record_test.go @@ -26,7 +26,7 @@ func TestResDnsRecord(t *testing.T) { StatusCode: http.StatusNotFound, } - // This test peforms a full life-cycle (CRUD) test + // This test performs a full life-cycle (CRUD) test t.Run("lifecycle test", func(t *testing.T) { client := &dns.Mock{} diff --git a/pkg/providers/dns/resource_akamai_dns_zone.go b/pkg/providers/dns/resource_akamai_dns_zone.go index 9722c7df2..af1762f31 100644 --- a/pkg/providers/dns/resource_akamai_dns_zone.go +++ b/pkg/providers/dns/resource_akamai_dns_zone.go @@ -245,7 +245,7 @@ func resourceDNSv2ZoneCreate(ctx context.Context, d *schema.ResourceData, m inte Detail: e.Error(), }) } - d.SetId(fmt.Sprintf("%s#%s#%s", zone.VersionId, zone.Zone, hostname)) + d.SetId(fmt.Sprintf("%s#%s#%s", zone.VersionID, zone.Zone, hostname)) return resourceDNSv2ZoneRead(ctx, d, meta) } @@ -330,9 +330,9 @@ func resourceDNSv2ZoneRead(ctx context.Context, d *schema.ResourceData, m interf logger.Debugf("READ content: %v", zone) if strings.Contains(d.Id(), "#") { - d.SetId(fmt.Sprintf("%s#%s#%s", zone.VersionId, zone.Zone, hostname)) + d.SetId(fmt.Sprintf("%s#%s#%s", zone.VersionID, zone.Zone, hostname)) } else { - d.SetId(fmt.Sprintf("%s-%s-%s", zone.VersionId, zone.Zone, hostname)) + d.SetId(fmt.Sprintf("%s-%s-%s", zone.VersionID, zone.Zone, hostname)) } return nil } @@ -390,7 +390,7 @@ func resourceDNSv2ZoneUpdate(ctx context.Context, d *schema.ResourceData, m inte zoneCreate.Target = zone.Target zoneCreate.EndCustomerID = zone.EndCustomerID zoneCreate.ContractID = zone.ContractID - zoneCreate.TsigKey = zone.TsigKey + zoneCreate.TSIGKey = zone.TSIGKey if err := populateDNSv2ZoneObject(d, zoneCreate, logger); err != nil { return diag.FromErr(err) } @@ -407,9 +407,9 @@ func resourceDNSv2ZoneUpdate(ctx context.Context, d *schema.ResourceData, m inte // Give terraform the ID if strings.Contains(d.Id(), "#") { - d.SetId(fmt.Sprintf("%s#%s#%s", zone.VersionId, zone.Zone, hostname)) + d.SetId(fmt.Sprintf("%s#%s#%s", zone.VersionID, zone.Zone, hostname)) } else { - d.SetId(fmt.Sprintf("%s-%s-%s", zone.VersionId, zone.Zone, hostname)) + d.SetId(fmt.Sprintf("%s-%s-%s", zone.VersionID, zone.Zone, hostname)) } return resourceDNSv2ZoneRead(ctx, d, meta) } @@ -458,7 +458,7 @@ func resourceDNSv2ZoneImport(d *schema.ResourceData, m interface{}) ([]*schema.R } // Give terraform the ID - d.SetId(fmt.Sprintf("%s:%s:%s", zone.VersionId, zone.Zone, hostname)) + d.SetId(fmt.Sprintf("%s:%s:%s", zone.VersionID, zone.Zone, hostname)) return []*schema.ResourceData{d}, nil } @@ -516,11 +516,11 @@ func populateDNSv2ZoneState(d *schema.ResourceData, zoneresp *dns.ZoneResponse) return fmt.Errorf("%w: %s", tf.ErrValueSet, err.Error()) } tsigListNew := make([]interface{}, 0) - if zoneresp.TsigKey != nil { + if zoneresp.TSIGKey != nil { tsigNew := map[string]interface{}{ - "name": zoneresp.TsigKey.Name, - "algorithm": zoneresp.TsigKey.Algorithm, - "secret": zoneresp.TsigKey.Secret, + "name": zoneresp.TSIGKey.Name, + "algorithm": zoneresp.TSIGKey.Algorithm, + "secret": zoneresp.TSIGKey.Secret, } tsigListNew = append(tsigListNew, tsigNew) } @@ -533,7 +533,7 @@ func populateDNSv2ZoneState(d *schema.ResourceData, zoneresp *dns.ZoneResponse) if err := d.Set("alias_count", zoneresp.AliasCount); err != nil { return fmt.Errorf("%w: %s", tf.ErrValueSet, err.Error()) } - if err := d.Set("version_id", zoneresp.VersionId); err != nil { + if err := d.Set("version_id", zoneresp.VersionID); err != nil { return fmt.Errorf("%w: %s", tf.ErrValueSet, err.Error()) } return nil @@ -588,27 +588,27 @@ func populateDNSv2ZoneObject(d *schema.ResourceData, zone *dns.ZoneCreate, logge if err == nil || d.HasChange("end_customer_id") { zone.EndCustomerID = endCustomerID } - tsigKey, err := tf.GetListValue("tsig_key", d) + TSIGKey, err := tf.GetListValue("tsig_key", d) if err != nil && !errors.Is(err, tf.ErrNotFound) { if !errors.Is(err, tf.ErrNotFound) { return err } - zone.TsigKey = nil + zone.TSIGKey = nil return nil } - if len(tsigKey) == 0 { + if len(TSIGKey) == 0 { return nil } - tsigKeyMap, ok := tsigKey[0].(map[string]interface{}) + TSIGKeyMap, ok := TSIGKey[0].(map[string]interface{}) if !ok { return fmt.Errorf("'tsig_key' entry is of invalid type; should be 'map[string]interface{}'") } - zone.TsigKey = &dns.TSIGKey{ - Name: tsigKeyMap["name"].(string), - Algorithm: tsigKeyMap["algorithm"].(string), - Secret: tsigKeyMap["secret"].(string), + zone.TSIGKey = &dns.TSIGKey{ + Name: TSIGKeyMap["name"].(string), + Algorithm: TSIGKeyMap["algorithm"].(string), + Secret: TSIGKeyMap["secret"].(string), } - logger.Debugf("Generated TsigKey [%v]", zone.TsigKey) + logger.Debugf("Generated TSIGKey [%v]", zone.TSIGKey) return nil } @@ -670,12 +670,12 @@ func checkZoneSOAandNSRecords(ctx context.Context, meta meta.Meta, zone *dns.Zon var err error if zone.ActivationState != "NEW" { // See if SOA and NS recs exist already. Both or none. - resp, err = inst.Client(meta).GetRecordsets(ctx, zone.Zone, dns.RecordsetQueryArgs{Types: "SOA,NS"}) + resp, err = inst.Client(meta).GetRecordSets(ctx, zone.Zone, dns.RecordSetQueryArgs{Types: "SOA,NS"}) if err != nil { return err } } - if resp != nil && len(resp.Recordsets) >= 2 { + if resp != nil && len(resp.RecordSets) >= 2 { return nil } @@ -687,28 +687,28 @@ func checkZoneSOAandNSRecords(ctx context.Context, meta meta.Meta, zone *dns.Zon if len(nameservers) < 1 { return fmt.Errorf("No authoritative nameservers exist for zone %s contract ID", zone.Zone) } - rs := &dns.Recordsets{Recordsets: make([]dns.Recordset, 0)} - rs.Recordsets = append(rs.Recordsets, createSOARecord(zone.Zone, nameservers, logger)) - rs.Recordsets = append(rs.Recordsets, createNSRecord(zone.Zone, nameservers, logger)) + rs := &dns.RecordSets{RecordSets: make([]dns.RecordSet, 0)} + rs.RecordSets = append(rs.RecordSets, createSOARecord(zone.Zone, nameservers, logger)) + rs.RecordSets = append(rs.RecordSets, createNSRecord(zone.Zone, nameservers, logger)) - // create recordsets - err = inst.Client(meta).CreateRecordsets(ctx, rs, zone.Zone, true) + // create recordSets + err = inst.Client(meta).CreateRecordSets(ctx, rs, zone.Zone, true) return err } -func createSOARecord(zone string, nameservers []string, _ log.Interface) dns.Recordset { - rec := dns.Recordset{Name: zone, Type: "SOA"} +func createSOARecord(zone string, nameservers []string, _ log.Interface) dns.RecordSet { + rec := dns.RecordSet{Name: zone, Type: "SOA"} rec.TTL = 86400 - pemail := fmt.Sprintf("hostmaster.%s.", zone) - soaData := fmt.Sprintf("%s %s 1 14400 7200 604800 1200", nameservers[0], pemail) + peMail := fmt.Sprintf("hostmaster.%s.", zone) + soaData := fmt.Sprintf("%s %s 1 14400 7200 604800 1200", nameservers[0], peMail) rec.Rdata = []string{soaData} return rec } -func createNSRecord(zone string, nameservers []string, _ log.Interface) dns.Recordset { - rec := dns.Recordset{Name: zone, Type: "NS"} +func createNSRecord(zone string, nameservers []string, _ log.Interface) dns.RecordSet { + rec := dns.RecordSet{Name: zone, Type: "NS"} rec.TTL = 86400 rec.Rdata = nameservers diff --git a/pkg/providers/dns/resource_akamai_dns_zone_test.go b/pkg/providers/dns/resource_akamai_dns_zone_test.go index f251c775d..528bd1a49 100644 --- a/pkg/providers/dns/resource_akamai_dns_zone_test.go +++ b/pkg/providers/dns/resource_akamai_dns_zone_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/require" ) -func TestResDnsZone(t *testing.T) { +func TestResDNSZone(t *testing.T) { zone := &dns.ZoneResponse{ ContractID: "ctr1", Zone: "primaryexampleterraform.io", @@ -22,7 +22,7 @@ func TestResDnsZone(t *testing.T) { SignAndServe: false, ActivationState: "PENDING", } - recordsetsResp := &dns.RecordSetResponse{Recordsets: make([]dns.Recordset, 2, 2)} + recordSetsResp := &dns.RecordSetResponse{RecordSets: make([]dns.RecordSet, 2, 2)} t.Run("when group is not provided and there is no group for the user ", func(t *testing.T) { client := &dns.Mock{} @@ -103,11 +103,11 @@ func TestResDnsZone(t *testing.T) { mock.AnythingOfType("*dns.ZoneCreate"), ).Return(nil) - client.On("GetRecordsets", + client.On("GetRecordSets", mock.Anything, zone.Zone, - mock.AnythingOfType("[]dns.RecordsetQueryArgs"), - ).Return(recordsetsResp, nil) + mock.AnythingOfType("[]dns.RecordSetQueryArgs"), + ).Return(recordSetsResp, nil) dataSourceName := "akamai_dns_zone.test_without_group" @@ -228,11 +228,11 @@ func TestResDnsZone(t *testing.T) { mock.AnythingOfType("*dns.ZoneCreate"), ).Return(nil) - client.On("GetRecordsets", + client.On("GetRecordSets", mock.Anything, zone.Zone, - mock.AnythingOfType("[]dns.RecordsetQueryArgs"), - ).Return(recordsetsResp, nil) + mock.AnythingOfType("[]dns.RecordSetQueryArgs"), + ).Return(recordSetsResp, nil) dataSourceName := "akamai_dns_zone.primary_test_zone" diff --git a/pkg/providers/gtm/data_akamai_gtm_asmap.go b/pkg/providers/gtm/data_akamai_gtm_asmap.go index a4adc71f2..7d590756d 100644 --- a/pkg/providers/gtm/data_akamai_gtm_asmap.go +++ b/pkg/providers/gtm/data_akamai_gtm_asmap.go @@ -14,16 +14,16 @@ import ( ) var ( - _ datasource.DataSource = &asmapDataSource{} - _ datasource.DataSourceWithConfigure = &asmapDataSource{} + _ datasource.DataSource = &asMapDataSource{} + _ datasource.DataSourceWithConfigure = &asMapDataSource{} ) -// NewGTMAsmapDataSource returns a new GTM asmap data source -func NewGTMAsmapDataSource() datasource.DataSource { - return &asmapDataSource{} +// NewGTMASMapDataSource returns a new GTM ASMap data source +func NewGTMASMapDataSource() datasource.DataSource { + return &asMapDataSource{} } -type asmapDataSourceModel struct { +type asMapDataSourceModel struct { ID types.String `tfsdk:"id"` Domain types.String `tfsdk:"domain"` Name types.String `tfsdk:"map_name"` @@ -32,12 +32,12 @@ type asmapDataSourceModel struct { Links []link `tfsdk:"links"` } -type asmapDataSource struct { +type asMapDataSource struct { meta meta.Meta } // Configure configures data source at the beginning of the lifecycle. -func (d *asmapDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { +func (d *asMapDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { if req.ProviderData == nil { return } @@ -54,12 +54,12 @@ func (d *asmapDataSource) Configure(_ context.Context, req datasource.ConfigureR } // Metadata configures data source's meta information. -func (*asmapDataSource) Metadata(_ context.Context, _ datasource.MetadataRequest, resp *datasource.MetadataResponse) { +func (*asMapDataSource) Metadata(_ context.Context, _ datasource.MetadataRequest, resp *datasource.MetadataResponse) { resp.TypeName = "akamai_gtm_asmap" } var ( - asmapBlock = map[string]schema.Block{ + asMapBlock = map[string]schema.Block{ "assignments": schema.ListNestedBlock{ Description: "Contains information about the AS zone groupings of AS IDs.", NestedObject: schema.NestedBlockObject{ @@ -112,7 +112,7 @@ var ( ) // Schema is used to define data source's terraform schema. -func (d *asmapDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { +func (d *asMapDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { resp.Schema = schema.Schema{ MarkdownDescription: "GTM AS map data source.", Attributes: map[string]schema.Attribute{ @@ -130,24 +130,24 @@ func (d *asmapDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, Description: "A descriptive label for the AS map", }, }, - Blocks: asmapBlock, + Blocks: asMapBlock, } } // Read is called when the provider must read data source values in order to update state. -func (d *asmapDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { +func (d *asMapDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { tflog.Debug(ctx, "GTM AS map DataSource Read") - var data asmapDataSourceModel + var data asMapDataSourceModel if resp.Diagnostics.Append(req.Config.Get(ctx, &data)...); resp.Diagnostics.HasError() { return } client := Client(d.meta) - asMap, err := client.GetAsMap(ctx, data.Name.ValueString(), data.Domain.ValueString()) + asMap, err := client.GetASMap(ctx, data.Name.ValueString(), data.Domain.ValueString()) if err != nil { - resp.Diagnostics.AddError("fetching GTM ASmap failed: ", err.Error()) + resp.Diagnostics.AddError("fetching GTM ASMap failed: ", err.Error()) return } @@ -157,24 +157,24 @@ func (d *asmapDataSource) Read(ctx context.Context, req datasource.ReadRequest, } -func (m *asmapDataSourceModel) setAttributes(asmap *gtm.AsMap) { - m.Name = types.StringValue(asmap.Name) - m.setDefaultDatacenter(asmap.DefaultDatacenter) - m.setAssignments(asmap.Assignments) - m.setLinks(asmap.Links) +func (m *asMapDataSourceModel) setAttributes(asMap *gtm.ASMap) { + m.Name = types.StringValue(asMap.Name) + m.setDefaultDatacenter(asMap.DefaultDatacenter) + m.setAssignments(asMap.Assignments) + m.setLinks(asMap.Links) m.ID = types.StringValue("gtm_asmap") } -func (m *asmapDataSourceModel) setDefaultDatacenter(d *gtm.DatacenterBase) { +func (m *asMapDataSourceModel) setDefaultDatacenter(d *gtm.DatacenterBase) { m.DefaultDatacenter = &defaultDatacenter{ - DatacenterID: types.Int64Value(int64(d.DatacenterId)), + DatacenterID: types.Int64Value(int64(d.DatacenterID)), Nickname: types.StringValue(d.Nickname), } } -func (m *asmapDataSourceModel) setAssignments(assignments []*gtm.AsAssignment) { - toBasetypesInt64Slice := func(n []int64) []basetypes.Int64Value { +func (m *asMapDataSourceModel) setAssignments(assignments []*gtm.ASAssignment) { + toBaseTypesInt64Slice := func(n []int64) []basetypes.Int64Value { out := make([]basetypes.Int64Value, 0, len(n)) for _, number := range n { out = append(out, types.Int64Value(number)) @@ -184,15 +184,15 @@ func (m *asmapDataSourceModel) setAssignments(assignments []*gtm.AsAssignment) { for _, a := range assignments { assignmentObject := asMapAssignment{ - DatacenterID: types.Int64Value(int64(a.DatacenterId)), + DatacenterID: types.Int64Value(int64(a.DatacenterID)), Nickname: types.StringValue(a.Nickname), - ASNumbers: toBasetypesInt64Slice(a.AsNumbers), + ASNumbers: toBaseTypesInt64Slice(a.ASNumbers), } m.Assignments = append(m.Assignments, assignmentObject) } } -func (m *asmapDataSourceModel) setLinks(links []*gtm.Link) { +func (m *asMapDataSourceModel) setLinks(links []*gtm.Link) { for _, l := range links { linkObject := link{ Rel: types.StringValue(l.Rel), diff --git a/pkg/providers/gtm/data_akamai_gtm_asmap_test.go b/pkg/providers/gtm/data_akamai_gtm_asmap_test.go index db98fd810..60a77bf83 100644 --- a/pkg/providers/gtm/data_akamai_gtm_asmap_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_asmap_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/mock" ) -func TestDataGTMASmap(t *testing.T) { +func TestDataGTMASMap(t *testing.T) { tests := map[string]struct { givenTF string init func(*gtm.Mock) @@ -21,18 +21,18 @@ func TestDataGTMASmap(t *testing.T) { "happy path": { givenTF: "valid.tf", init: func(m *gtm.Mock) { - m.On("GetAsMap", mock.Anything, "map1", "test.domain.net").Return(>m.AsMap{ + m.On("GetASMap", mock.Anything, "map1", "test.domain.net").Return(>m.ASMap{ Name: "TestName", DefaultDatacenter: >m.DatacenterBase{ Nickname: "TestDefaultDatacenterNickname", - DatacenterId: 1, + DatacenterID: 1, }, - Assignments: []*gtm.AsAssignment{{ + Assignments: []*gtm.ASAssignment{{ DatacenterBase: gtm.DatacenterBase{ Nickname: "TestAssignmentNickname", - DatacenterId: 1, + DatacenterID: 1, }, - AsNumbers: []int64{ + ASNumbers: []int64{ 1, 2, 3, @@ -71,7 +71,7 @@ func TestDataGTMASmap(t *testing.T) { "error response from api": { givenTF: "valid.tf", init: func(m *gtm.Mock) { - m.On("GetAsMap", mock.Anything, "map1", "test.domain.net").Return( + m.On("GetASMap", mock.Anything, "map1", "test.domain.net").Return( nil, fmt.Errorf("test error")) }, expectError: regexp.MustCompile("test error"), @@ -79,13 +79,13 @@ func TestDataGTMASmap(t *testing.T) { "no assignments": { givenTF: "valid.tf", init: func(m *gtm.Mock) { - m.On("GetAsMap", mock.Anything, "map1", "test.domain.net").Return(>m.AsMap{ + m.On("GetASMap", mock.Anything, "map1", "test.domain.net").Return(>m.ASMap{ Name: "TestName", DefaultDatacenter: >m.DatacenterBase{ Nickname: "TestDefaultDatacenterNickname", - DatacenterId: 1, + DatacenterID: 1, }, - Assignments: []*gtm.AsAssignment{}, + Assignments: []*gtm.ASAssignment{}, Links: []*gtm.Link{{ Href: "href.test", Rel: "TestRel", diff --git a/pkg/providers/gtm/data_akamai_gtm_cidrmap.go b/pkg/providers/gtm/data_akamai_gtm_cidrmap.go index 6008f39cd..5e477e654 100644 --- a/pkg/providers/gtm/data_akamai_gtm_cidrmap.go +++ b/pkg/providers/gtm/data_akamai_gtm_cidrmap.go @@ -13,11 +13,11 @@ import ( "github.com/hashicorp/terraform-plugin-log/tflog" ) -type cidrmapDataSource struct { +type cidrMapDataSource struct { meta meta.Meta } -type cidrmapDataSourceModel struct { +type cidrMapDataSourceModel struct { ID types.String `tfsdk:"id"` Domain types.String `tfsdk:"domain"` Name types.String `tfsdk:"map_name"` @@ -27,18 +27,18 @@ type cidrmapDataSourceModel struct { } var ( - _ datasource.DataSource = &cidrmapDataSource{} - _ datasource.DataSourceWithConfigure = &cidrmapDataSource{} + _ datasource.DataSource = &cidrMapDataSource{} + _ datasource.DataSourceWithConfigure = &cidrMapDataSource{} ) -// NewGTMCidrmapDataSource returns a new GTM cidrmap data source -func NewGTMCidrmapDataSource() datasource.DataSource { return &cidrmapDataSource{} } +// NewGTMCIDRMapDataSource returns a new GTM CIDRMap data source +func NewGTMCIDRMapDataSource() datasource.DataSource { return &cidrMapDataSource{} } -func (d *cidrmapDataSource) Metadata(_ context.Context, _ datasource.MetadataRequest, response *datasource.MetadataResponse) { +func (d *cidrMapDataSource) Metadata(_ context.Context, _ datasource.MetadataRequest, response *datasource.MetadataResponse) { response.TypeName = "akamai_gtm_cidrmap" } -func (d *cidrmapDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { +func (d *cidrMapDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { if req.ProviderData == nil { return } @@ -54,7 +54,7 @@ func (d *cidrmapDataSource) Configure(_ context.Context, req datasource.Configur } var ( - cidrmapBlocks = map[string]schema.Block{ + cidrMapBlocks = map[string]schema.Block{ "assignments": schema.ListNestedBlock{ Description: "Contains information about the CIDR zone groupings of CIDR blocks.", NestedObject: schema.NestedBlockObject{ @@ -106,7 +106,7 @@ var ( } ) -func (d *cidrmapDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { +func (d *cidrMapDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { resp.Schema = schema.Schema{ MarkdownDescription: "GTM CIDR map data source.", Attributes: map[string]schema.Attribute{ @@ -124,14 +124,14 @@ func (d *cidrmapDataSource) Schema(_ context.Context, _ datasource.SchemaRequest Description: "A descriptive label for the CIDR map.", }, }, - Blocks: cidrmapBlocks, + Blocks: cidrMapBlocks, } } -func (d *cidrmapDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { +func (d *cidrMapDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { tflog.Debug(ctx, "GTM Cidrmap DataSource Read") - var data cidrmapDataSourceModel + var data cidrMapDataSourceModel resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) if resp.Diagnostics.HasError() { @@ -139,7 +139,7 @@ func (d *cidrmapDataSource) Read(ctx context.Context, req datasource.ReadRequest } client := Client(d.meta) - cidrMap, err := client.GetCidrMap(ctx, data.Name.ValueString(), data.Domain.ValueString()) + cidrMap, err := client.GetCIDRMap(ctx, data.Name.ValueString(), data.Domain.ValueString()) if err != nil { resp.Diagnostics.AddError("fetching GTM CIDRmap failed: ", err.Error()) return @@ -154,11 +154,11 @@ func (d *cidrmapDataSource) Read(ctx context.Context, req datasource.ReadRequest resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) } -func (m *cidrmapDataSourceModel) setAttributes(ctx context.Context, cidrmap *gtm.CidrMap) diag.Diagnostics { - m.Name = types.StringValue(cidrmap.Name) - m.setDefaultDatacenter(cidrmap.DefaultDatacenter) - m.setLinks(cidrmap.Links) - diags := m.setAssignments(ctx, cidrmap.Assignments) +func (m *cidrMapDataSourceModel) setAttributes(ctx context.Context, cidrMap *gtm.CIDRMap) diag.Diagnostics { + m.Name = types.StringValue(cidrMap.Name) + m.setDefaultDatacenter(cidrMap.DefaultDatacenter) + m.setLinks(cidrMap.Links) + diags := m.setAssignments(ctx, cidrMap.Assignments) if diags.HasError() { return diags } @@ -167,14 +167,14 @@ func (m *cidrmapDataSourceModel) setAttributes(ctx context.Context, cidrmap *gtm return nil } -func (m *cidrmapDataSourceModel) setDefaultDatacenter(b *gtm.DatacenterBase) { +func (m *cidrMapDataSourceModel) setDefaultDatacenter(b *gtm.DatacenterBase) { m.DefaultDatacenter = &defaultDatacenter{ - DatacenterID: types.Int64Value(int64(b.DatacenterId)), + DatacenterID: types.Int64Value(int64(b.DatacenterID)), Nickname: types.StringValue(b.Nickname), } } -func (m *cidrmapDataSourceModel) setLinks(links []*gtm.Link) { +func (m *cidrMapDataSourceModel) setLinks(links []*gtm.Link) { for _, l := range links { linkObj := link{ Rel: types.StringValue(l.Rel), @@ -185,14 +185,14 @@ func (m *cidrmapDataSourceModel) setLinks(links []*gtm.Link) { } } -func (m *cidrmapDataSourceModel) setAssignments(ctx context.Context, assignments []*gtm.CidrAssignment) diag.Diagnostics { +func (m *cidrMapDataSourceModel) setAssignments(ctx context.Context, assignments []*gtm.CIDRAssignment) diag.Diagnostics { for _, a := range assignments { blocks, diags := types.SetValueFrom(ctx, types.StringType, a.Blocks) if diags.HasError() { return diags } assignmentObj := cidrMapAssignment{ - DatacenterID: types.Int64Value(int64(a.DatacenterId)), + DatacenterID: types.Int64Value(int64(a.DatacenterID)), Nickname: types.StringValue(a.Nickname), Blocks: blocks, } diff --git a/pkg/providers/gtm/data_akamai_gtm_cidrmap_test.go b/pkg/providers/gtm/data_akamai_gtm_cidrmap_test.go index cca3f44bf..564ad823d 100644 --- a/pkg/providers/gtm/data_akamai_gtm_cidrmap_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_cidrmap_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/mock" ) -func TestDataGTMCidrmap(t *testing.T) { +func TestDataGTMCIDRmap(t *testing.T) { tests := map[string]struct { givenTF string init func(mock *gtm.Mock) @@ -21,16 +21,16 @@ func TestDataGTMCidrmap(t *testing.T) { "happy path": { givenTF: "valid.tf", init: func(m *gtm.Mock) { - m.On("GetCidrMap", mock.Anything, "mapTest", "test.cidrmap.domain.net").Return(>m.CidrMap{ + m.On("GetCIDRMap", mock.Anything, "mapTest", "test.cidrmap.domain.net").Return(>m.CIDRMap{ Name: "TestName", DefaultDatacenter: >m.DatacenterBase{ Nickname: "TestNickname", - DatacenterId: 1, + DatacenterID: 1, }, - Assignments: []*gtm.CidrAssignment{{ + Assignments: []*gtm.CIDRAssignment{{ DatacenterBase: gtm.DatacenterBase{ Nickname: "TestNicknameAssignments", - DatacenterId: 1, + DatacenterID: 1, }, Blocks: []string{ "test1", @@ -69,7 +69,7 @@ func TestDataGTMCidrmap(t *testing.T) { "error response from api": { givenTF: "valid.tf", init: func(m *gtm.Mock) { - m.On("GetCidrMap", mock.Anything, "mapTest", "test.cidrmap.domain.net").Return( + m.On("GetCIDRMap", mock.Anything, "mapTest", "test.cidrmap.domain.net").Return( nil, fmt.Errorf("error")) }, expectError: regexp.MustCompile("error"), @@ -77,13 +77,13 @@ func TestDataGTMCidrmap(t *testing.T) { "no assignments": { givenTF: "valid.tf", init: func(m *gtm.Mock) { - m.On("GetCidrMap", mock.Anything, "mapTest", "test.cidrmap.domain.net").Return(>m.CidrMap{ + m.On("GetCIDRMap", mock.Anything, "mapTest", "test.cidrmap.domain.net").Return(>m.CIDRMap{ Name: "TestName", DefaultDatacenter: >m.DatacenterBase{ Nickname: "TestNickname", - DatacenterId: 1, + DatacenterID: 1, }, - Assignments: []*gtm.CidrAssignment{}, + Assignments: []*gtm.CIDRAssignment{}, Links: []*gtm.Link{{ Rel: "TestRel", Href: "TestHref", diff --git a/pkg/providers/gtm/data_akamai_gtm_datacenter_test.go b/pkg/providers/gtm/data_akamai_gtm_datacenter_test.go index 33be71339..bcbfb53b4 100644 --- a/pkg/providers/gtm/data_akamai_gtm_datacenter_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_datacenter_test.go @@ -156,7 +156,7 @@ var ( Links: data.links, Longitude: data.longitude, Nickname: data.nickname, - DatacenterId: data.datacenterID, + DatacenterID: data.datacenterID, ScorePenalty: data.scorePenalty, ServermonitorPool: data.serverMonitorPool, StateOrProvince: data.stateOrProvince, diff --git a/pkg/providers/gtm/data_akamai_gtm_datacenters.go b/pkg/providers/gtm/data_akamai_gtm_datacenters.go index 0a2f37e18..4215a356d 100644 --- a/pkg/providers/gtm/data_akamai_gtm_datacenters.go +++ b/pkg/providers/gtm/data_akamai_gtm_datacenters.go @@ -169,7 +169,7 @@ func dataGTMDatacentersRead(ctx context.Context, d *schema.ResourceData, m inter datacentersAttrs := make([]interface{}, len(datacenters)) for i, dc := range datacenters { dcAttrs := getDatacenterAttributes(dc) - dcAttrs["datacenter_id"] = dc.DatacenterId + dcAttrs["datacenter_id"] = dc.DatacenterID datacentersAttrs[i] = dcAttrs } diff --git a/pkg/providers/gtm/data_akamai_gtm_datacenters_test.go b/pkg/providers/gtm/data_akamai_gtm_datacenters_test.go index 736a63a6b..672f81cab 100644 --- a/pkg/providers/gtm/data_akamai_gtm_datacenters_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_datacenters_test.go @@ -163,7 +163,7 @@ var ( Links: data.links, Longitude: data.longitude, Nickname: data.nickname, - DatacenterId: data.datacenterID, + DatacenterID: data.datacenterID, ScorePenalty: data.scorePenalty, ServermonitorPool: data.serverMonitorPool, StateOrProvince: data.stateOrProvince, diff --git a/pkg/providers/gtm/data_akamai_gtm_default_datacenter.go b/pkg/providers/gtm/data_akamai_gtm_default_datacenter.go index 56a173f09..1b4f27904 100644 --- a/pkg/providers/gtm/data_akamai_gtm_default_datacenter.go +++ b/pkg/providers/gtm/data_akamai_gtm_default_datacenter.go @@ -63,20 +63,20 @@ func dataSourceGTMDefaultDatacenterRead(ctx context.Context, d *schema.ResourceD } var diags diag.Diagnostics // get or create default dc - dcid, ok := d.Get("datacenter").(int) + dcID, ok := d.Get("datacenter").(int) if !ok { return append(diags, diag.Diagnostic{ Severity: diag.Error, - Summary: fmt.Sprintf("[Error] GTM dataSourceGTMDefaultDatacenterRead: invalid Default Datacenter %d in configuration", dcid), + Summary: fmt.Sprintf("[Error] GTM dataSourceGTMDefaultDatacenterRead: invalid Default Datacenter %d in configuration", dcID), }) } logger.WithFields(log.Fields{ "domain": domain, - "dcid": dcid, + "dcid": dcID, }).Debug("Start Default Datacenter Retrieval") var defaultDC = Client(meta).NewDatacenter(ctx) - switch dcid { + switch dcID { case gtm.MapDefaultDC: defaultDC, err = Client(meta).CreateMapsDefaultDatacenter(ctx, domain) case gtm.Ipv4DefaultDC: @@ -86,14 +86,14 @@ func dataSourceGTMDefaultDatacenterRead(ctx context.Context, d *schema.ResourceD default: return append(diags, diag.Diagnostic{ Severity: diag.Error, - Summary: fmt.Sprintf("[Error] GTM dataSourceGTMDefaultDatacenterRead: invalid Default Datacenter %d in configuration", dcid), + Summary: fmt.Sprintf("[Error] GTM dataSourceGTMDefaultDatacenterRead: invalid Default Datacenter %d in configuration", dcID), }) } if err != nil { return append(diags, diag.Diagnostic{ Severity: diag.Error, - Summary: fmt.Sprintf("[Error] GTM dataSourceGTMDefaultDatacenterRead: invalid Default Datacenter %d in configuration", dcid), + Summary: fmt.Sprintf("[Error] GTM dataSourceGTMDefaultDatacenterRead: invalid Default Datacenter %d in configuration", dcID), Detail: err.Error(), }) } @@ -104,14 +104,14 @@ func dataSourceGTMDefaultDatacenterRead(ctx context.Context, d *schema.ResourceD Detail: err.Error(), }) } - if err := d.Set("datacenter_id", defaultDC.DatacenterId); err != nil { + if err := d.Set("datacenter_id", defaultDC.DatacenterID); err != nil { return append(diags, diag.Diagnostic{ Severity: diag.Error, Summary: "GTM dataSourceGTMDefaultDatacenterRead: setting datacenter id failed.", Detail: err.Error(), }) } - defaultDatacenterID := fmt.Sprintf("%s:%s:%d", domain, "default_datcenter", defaultDC.DatacenterId) + defaultDatacenterID := fmt.Sprintf("%s:%s:%d", domain, "default_datcenter", defaultDC.DatacenterID) logger.Debugf("DataSourceGTMDefaultDatacenterRead: generated Default DC Resource Id: %s", defaultDatacenterID) d.SetId(defaultDatacenterID) diff --git a/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go b/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go index 0093bcfa3..cbf29e953 100644 --- a/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go @@ -14,7 +14,7 @@ func TestAccDataSourceGTMDefaultDatacenter_basic(t *testing.T) { client := >m.Mock{} dc := gtm.Datacenter{ - DatacenterId: 1000, + DatacenterID: 1000, } client.On("CreateMapsDefaultDatacenter", diff --git a/pkg/providers/gtm/data_akamai_gtm_domain.go b/pkg/providers/gtm/data_akamai_gtm_domain.go index fd100eac6..701165f01 100644 --- a/pkg/providers/gtm/data_akamai_gtm_domain.go +++ b/pkg/providers/gtm/data_akamai_gtm_domain.go @@ -1193,7 +1193,7 @@ func populateDomain(ctx context.Context, domain *gtm.Domain) (*domainDataSourceM if diags.HasError() { return nil, diags } - cidrMaps, diags := getCIDRMaps(ctx, domain.CidrMaps) + cidrMaps, diags := getCIDRMaps(ctx, domain.CIDRMaps) if diags.HasError() { return nil, diags } @@ -1203,14 +1203,14 @@ func populateDomain(ctx context.Context, domain *gtm.Domain) (*domainDataSourceM } return &domainDataSourceModel{ Name: types.StringValue(domain.Name), - CNameCoalescingEnabled: types.BoolValue(domain.CnameCoalescingEnabled), + CNameCoalescingEnabled: types.BoolValue(domain.CNameCoalescingEnabled), DefaultErrorPenalty: types.Int64Value(int64(domain.DefaultErrorPenalty)), DefaultHealthMax: types.Float64Value(domain.DefaultHealthMax), DefaultHealthMultiplier: types.Float64Value(domain.DefaultHealthMultiplier), DefaultHealthThreshold: types.Float64Value(domain.DefaultHealthThreshold), DefaultMaxUnreachablePenalty: types.Int64Value(int64(domain.DefaultMaxUnreachablePenalty)), - DefaultSSLClientCertificate: types.StringValue(domain.DefaultSslClientCertificate), - DefaultSSLClientPrivateKey: types.StringValue(domain.DefaultSslClientPrivateKey), + DefaultSSLClientCertificate: types.StringValue(domain.DefaultSSLClientCertificate), + DefaultSSLClientPrivateKey: types.StringValue(domain.DefaultSSLClientPrivateKey), DefaultTimeoutPenalty: types.Int64Value(int64(domain.DefaultTimeoutPenalty)), DefaultUnreachableThreshold: types.Float64Value(float64(domain.DefaultUnreachableThreshold)), EmailNotificationList: emailNotificationList, @@ -1238,7 +1238,7 @@ func populateDomain(ctx context.Context, domain *gtm.Domain) (*domainDataSourceM Datacenters: datacenters, GeographicMaps: geoMaps, CIDRMaps: cidrMaps, - ASMaps: getASMaps(domain.AsMaps), + ASMaps: getASMaps(domain.ASMaps), Links: getLinks(domain.Links), }, nil } @@ -1257,7 +1257,7 @@ func getLinks(links []*gtm.Link) []link { return result } -func getASMaps(maps []*gtm.AsMap) []asMap { +func getASMaps(maps []*gtm.ASMap) []asMap { var result []asMap for _, am := range maps { asMapInstance := asMap{ @@ -1271,7 +1271,7 @@ func getASMaps(maps []*gtm.AsMap) []asMap { if am.DefaultDatacenter != nil { defaultDataCenter := defaultDatacenter{ Nickname: types.StringValue(am.DefaultDatacenter.Nickname), - DatacenterID: types.Int64Value(int64(am.DefaultDatacenter.DatacenterId)), + DatacenterID: types.Int64Value(int64(am.DefaultDatacenter.DatacenterID)), } asMapInstance.DefaultDatacenter = defaultDataCenter } @@ -1286,7 +1286,7 @@ func getASMaps(maps []*gtm.AsMap) []asMap { return result } -func getCIDRMaps(ctx context.Context, maps []*gtm.CidrMap) ([]cidrMap, diag.Diagnostics) { +func getCIDRMaps(ctx context.Context, maps []*gtm.CIDRMap) ([]cidrMap, diag.Diagnostics) { var result []cidrMap for _, cm := range maps { cidrMapInstance := cidrMap{ @@ -1300,7 +1300,7 @@ func getCIDRMaps(ctx context.Context, maps []*gtm.CidrMap) ([]cidrMap, diag.Diag if cm.DefaultDatacenter != nil { defaultDataCenter := defaultDatacenter{ Nickname: types.StringValue(cm.DefaultDatacenter.Nickname), - DatacenterID: types.Int64Value(int64(cm.DefaultDatacenter.DatacenterId)), + DatacenterID: types.Int64Value(int64(cm.DefaultDatacenter.DatacenterID)), } cidrMapInstance.DefaultDatacenter = defaultDataCenter } @@ -1334,7 +1334,7 @@ func getGeographicMaps(ctx context.Context, maps []*gtm.GeoMap) ([]geographicMap if gm.DefaultDatacenter != nil { defaultDataCenter := defaultDatacenter{ Nickname: types.StringValue(gm.DefaultDatacenter.Nickname), - DatacenterID: types.Int64Value(int64(gm.DefaultDatacenter.DatacenterId)), + DatacenterID: types.Int64Value(int64(gm.DefaultDatacenter.DatacenterID)), } geoMapInstance.DefaultDatacenter = defaultDataCenter } @@ -1358,7 +1358,7 @@ func getDatacenters(ctx context.Context, datacenters []*gtm.Datacenter) ([]datac var result []datacenter for _, dc := range datacenters { dataCenterInstance := datacenter{ - DatacenterID: types.Int64Value(int64(dc.DatacenterId)), + DatacenterID: types.Int64Value(int64(dc.DatacenterID)), Nickname: types.StringValue(dc.Nickname), ScorePenalty: types.Int64Value(int64(dc.ScorePenalty)), City: types.StringValue(dc.City), @@ -1396,7 +1396,7 @@ func getProperties(ctx context.Context, properties []*gtm.Property) ([]property, for _, prop := range properties { propertyInstance := property{ BackupCNAME: types.StringValue(prop.BackupCName), - BackupIP: types.StringValue(prop.BackupIp), + BackupIP: types.StringValue(prop.BackupIP), BalanceByDownloadScore: types.BoolValue(prop.BalanceByDownloadScore), CName: types.StringValue(prop.CName), Comments: types.StringValue(prop.Comments), @@ -1422,7 +1422,7 @@ func getProperties(ctx context.Context, properties []*gtm.Property) ([]property, Type: types.StringValue(prop.Type), UnreachableThreshold: types.Float64Value(prop.UnreachableThreshold), UseComputedTargets: types.BoolValue(prop.UseComputedTargets), - IPv6: types.BoolValue(prop.Ipv6), + IPv6: types.BoolValue(prop.IPv6), WeightedHashBitsForIPv4: types.Int64Value(int64(prop.WeightedHashBitsForIPv4)), WeightedHashBitsForIPv6: types.Int64Value(int64(prop.WeightedHashBitsForIPv6)), } @@ -1471,7 +1471,7 @@ func getStatus(st *gtm.ResponseStatus) *status { } statusInstance := status{ Message: types.StringValue(st.Message), - ChangeID: types.StringValue(st.ChangeId), + ChangeID: types.StringValue(st.ChangeID), PropagationStatus: types.StringValue(st.PropagationStatus), PropagationStatusDate: types.StringValue(st.PropagationStatusDate), PassingValidation: types.BoolValue(st.PassingValidation), @@ -1512,7 +1512,7 @@ func getResources(resources []*gtm.Resource) []domainResource { resInstances[i] = resourceInstance{ LoadObject: types.StringValue(ri.LoadObject.LoadObject), LoadObjectPort: types.Int64Value(int64(ri.LoadObject.LoadObjectPort)), - DataCenterID: types.Int64Value(int64(ri.DatacenterId)), + DataCenterID: types.Int64Value(int64(ri.DatacenterID)), UseDefaultLoadObject: types.BoolValue(ri.UseDefaultLoadObject), } if ri.LoadObject.LoadServers != nil { @@ -1541,9 +1541,9 @@ func populateLivenessTest(lt *gtm.LivenessTest) livenessTest { Disabled: types.BoolValue(lt.Disabled), DisableNonstandardPortWarning: types.BoolValue(lt.DisableNonstandardPortWarning), ErrorPenalty: types.Float64Value(lt.ErrorPenalty), - HTTPError3xx: types.BoolValue(lt.HttpError3xx), - HTTPError4xx: types.BoolValue(lt.HttpError4xx), - HTTPError5xx: types.BoolValue(lt.HttpError5xx), + HTTPError3xx: types.BoolValue(lt.HTTPError3xx), + HTTPError4xx: types.BoolValue(lt.HTTPError4xx), + HTTPError5xx: types.BoolValue(lt.HTTPError5xx), Name: types.StringValue(lt.Name), PeerCertificateVerification: types.BoolValue(lt.PeerCertificateVerification), RequestString: types.StringValue(lt.RequestString), @@ -1558,13 +1558,13 @@ func populateLivenessTest(lt *gtm.LivenessTest) livenessTest { TestObjectPassword: types.StringValue(lt.TestObjectPassword), TestTimeout: types.Float64Value(float64(lt.TestTimeout)), TimeoutPenalty: types.Float64Value(lt.TimeoutPenalty), - SSLClientCertificate: types.StringValue(lt.SslClientCertificate), - SSLClientPrivateKey: types.StringValue(lt.SslClientPrivateKey), - HTTPHeaders: populateHTTPHeaders(lt.HttpHeaders), + SSLClientCertificate: types.StringValue(lt.SSLClientCertificate), + SSLClientPrivateKey: types.StringValue(lt.SSLClientPrivateKey), + HTTPHeaders: populateHTTPHeaders(lt.HTTPHeaders), } } -func populateHTTPHeaders(headers []*gtm.HttpHeader) []httpHeader { +func populateHTTPHeaders(headers []*gtm.HTTPHeader) []httpHeader { result := make([]httpHeader, len(headers)) for i, h := range headers { result[i] = httpHeader{ @@ -1604,7 +1604,7 @@ func populateTrafficTarget(ctx context.Context, t *gtm.TrafficTarget) (trafficTa return trafficTarget{}, diags } return trafficTarget{ - DatacenterID: types.Int64Value(int64(t.DatacenterId)), + DatacenterID: types.Int64Value(int64(t.DatacenterID)), Enabled: types.BoolValue(t.Enabled), Weight: types.Float64Value(t.Weight), HandoutCNAME: types.StringValue(t.HandoutCName), @@ -1640,12 +1640,12 @@ func populateGeographicMapAssignment(ctx context.Context, asg *gtm.GeoAssignment } result.Nickname = types.StringValue(asg.DatacenterBase.Nickname) - result.DatacenterID = types.Int64Value(int64(asg.DatacenterBase.DatacenterId)) + result.DatacenterID = types.Int64Value(int64(asg.DatacenterBase.DatacenterID)) return result, nil } -func populateCIDRMapAssignment(ctx context.Context, asg *gtm.CidrAssignment) (cidrMapAssignment, diag.Diagnostics) { +func populateCIDRMapAssignment(ctx context.Context, asg *gtm.CIDRAssignment) (cidrMapAssignment, diag.Diagnostics) { result := cidrMapAssignment{} if asg.Blocks != nil { @@ -1657,24 +1657,24 @@ func populateCIDRMapAssignment(ctx context.Context, asg *gtm.CidrAssignment) (ci } result.Nickname = types.StringValue(asg.DatacenterBase.Nickname) - result.DatacenterID = types.Int64Value(int64(asg.DatacenterBase.DatacenterId)) + result.DatacenterID = types.Int64Value(int64(asg.DatacenterBase.DatacenterID)) return result, nil } -func populateASMapAssignment(asg *gtm.AsAssignment) asMapAssignment { +func populateASMapAssignment(asg *gtm.ASAssignment) asMapAssignment { result := asMapAssignment{} - if asg.AsNumbers != nil { - asNumbers := make([]types.Int64, len(asg.AsNumbers)) - for i, c := range asg.AsNumbers { + if asg.ASNumbers != nil { + asNumbers := make([]types.Int64, len(asg.ASNumbers)) + for i, c := range asg.ASNumbers { asNumbers[i] = types.Int64Value(c) } result.ASNumbers = asNumbers } result.Nickname = types.StringValue(asg.DatacenterBase.Nickname) - result.DatacenterID = types.Int64Value(int64(asg.DatacenterBase.DatacenterId)) + result.DatacenterID = types.Int64Value(int64(asg.DatacenterBase.DatacenterID)) return result } diff --git a/pkg/providers/gtm/data_akamai_gtm_domain_test.go b/pkg/providers/gtm/data_akamai_gtm_domain_test.go index e994fbf4e..8c941a19a 100644 --- a/pkg/providers/gtm/data_akamai_gtm_domain_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_domain_test.go @@ -24,7 +24,7 @@ func TestDataGtmDomain(t *testing.T) { init: func(m *gtm.Mock) { m.On("GetDomain", mock.Anything, "test.cli.devexp-terraform.akadns.net").Return(>m.Domain{ Name: "test.cli.devexp-terraform.akadns.net", - CnameCoalescingEnabled: false, + CNameCoalescingEnabled: false, DefaultErrorPenalty: 75, DefaultHealthMax: 0, DefaultHealthMultiplier: 0, @@ -37,7 +37,7 @@ func TestDataGtmDomain(t *testing.T) { LastModified: "2023-01-25T10:21:45.000+00:00", MaxTTL: 172800, Status: >m.ResponseStatus{ - ChangeId: "ca7e5b1d-1303-42d3-b6c0-8cb62ae849d4", + ChangeID: "ca7e5b1d-1303-42d3-b6c0-8cb62ae849d4", Message: "ERROR: zone is child of existing GTM domain devexp-terraform.akadns.net, which is not allowed", PassingValidation: false, PropagationStatus: "DENIED", @@ -51,17 +51,17 @@ func TestDataGtmDomain(t *testing.T) { UpperBound: 100, }, }, - AsMaps: []*gtm.AsMap{{ + ASMaps: []*gtm.ASMap{{ DefaultDatacenter: >m.DatacenterBase{ - DatacenterId: 3133, + DatacenterID: 3133, Nickname: "Default (all others)", }, - Assignments: []*gtm.AsAssignment{{ + Assignments: []*gtm.ASAssignment{{ DatacenterBase: gtm.DatacenterBase{ Nickname: "New Zone 1", - DatacenterId: 3133, + DatacenterID: 3133, }, - AsNumbers: []int64{ + ASNumbers: []int64{ 12222, 17334, 16702, @@ -74,15 +74,15 @@ func TestDataGtmDomain(t *testing.T) { }}, }, }, - CidrMaps: []*gtm.CidrMap{{ + CIDRMaps: []*gtm.CIDRMap{{ DefaultDatacenter: >m.DatacenterBase{ - DatacenterId: 3133, + DatacenterID: 3133, Nickname: "All Other CIDR Blocks", }, - Assignments: []*gtm.CidrAssignment{{ + Assignments: []*gtm.CIDRAssignment{{ DatacenterBase: gtm.DatacenterBase{ Nickname: "New Zone 1", - DatacenterId: 3133, + DatacenterID: 3133, }, Blocks: []string{ "1.2.3.4/22", @@ -97,13 +97,13 @@ func TestDataGtmDomain(t *testing.T) { }, GeographicMaps: []*gtm.GeoMap{{ DefaultDatacenter: >m.DatacenterBase{ - DatacenterId: 3131, + DatacenterID: 3131, Nickname: "terraform_datacenter_test", }, Assignments: []*gtm.GeoAssignment{{ DatacenterBase: gtm.DatacenterBase{ Nickname: "terraform_datacenter_test_1", - DatacenterId: 3133, + DatacenterID: 3133, }, Countries: []string{ "GB", @@ -137,11 +137,11 @@ func TestDataGtmDomain(t *testing.T) { LivenessTests: []*gtm.LivenessTest{{ AnswersRequired: false, DisableNonstandardPortWarning: false, - HttpError3xx: true, + HTTPError3xx: true, TestObjectProtocol: "HTTP", }}, TrafficTargets: []*gtm.TrafficTarget{{ - DatacenterId: 3131, + DatacenterID: 3131, Enabled: true, Servers: []string{ "1.2.3.4", diff --git a/pkg/providers/gtm/data_akamai_gtm_domains.go b/pkg/providers/gtm/data_akamai_gtm_domains.go index a5415c45d..d4cbcd308 100644 --- a/pkg/providers/gtm/data_akamai_gtm_domains.go +++ b/pkg/providers/gtm/data_akamai_gtm_domains.go @@ -182,7 +182,7 @@ func getDomains(domainList []*gtm.DomainItem) []domain { Name: types.StringValue(dom.Name), LastModified: types.StringValue(dom.LastModified), Status: types.StringValue(dom.Status), - AcgID: types.StringValue(dom.AcgId), + AcgID: types.StringValue(dom.AcgID), LastModifiedBy: types.StringValue(dom.LastModifiedBy), ChangeID: types.StringValue(dom.ChangeID), ActivationState: types.StringValue(dom.ActivationState), diff --git a/pkg/providers/gtm/data_akamai_gtm_domains_test.go b/pkg/providers/gtm/data_akamai_gtm_domains_test.go index e614d38b0..2c9d6721b 100644 --- a/pkg/providers/gtm/data_akamai_gtm_domains_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_domains_test.go @@ -32,7 +32,7 @@ func TestDataGTMDomains(t *testing.T) { ModificationComments: "Add AS Map New Map 1", SignAndServe: false, Status: "2023-02-01 09:47 GMT: Current configuration has been propagated to all GTM nameservers", - AcgId: "TestACGID-1", + AcgID: "TestACGID-1", Links: []*gtm.Link{{ Rel: "self", Href: "https://test-domain.net/config-gtm/v1/domains/test1.terraformtesting.net", @@ -48,7 +48,7 @@ func TestDataGTMDomains(t *testing.T) { ModificationComments: "terraform test gtm domain", SignAndServe: false, Status: "2023-12-21 08:37 GMT: Current configuration has been propagated to all GTM nameservers", - AcgId: "TestACGID-1", + AcgID: "TestACGID-1", Links: []*gtm.Link{{ Rel: "self", Href: "https://test-domain.net/config-gtm/v1/domains/test2.terraformtesting.net", @@ -64,7 +64,7 @@ func TestDataGTMDomains(t *testing.T) { ModificationComments: "terraform test gtm domain", SignAndServe: false, Status: "2023-12-22 08:46 GMT: Current configuration has been propagated to all GTM nameservers", - AcgId: "TestACGID-1", + AcgID: "TestACGID-1", Links: []*gtm.Link{{ Rel: "self", Href: "https://test-domain.net/config-gtm/v1/domains/test3.terraformtesting.net", diff --git a/pkg/providers/gtm/data_akamai_gtm_resource.go b/pkg/providers/gtm/data_akamai_gtm_resource.go index 3fc6c7746..f1a75a2fa 100644 --- a/pkg/providers/gtm/data_akamai_gtm_resource.go +++ b/pkg/providers/gtm/data_akamai_gtm_resource.go @@ -240,7 +240,7 @@ func (m *resourceDataSourceModel) setResourceInstances(resourceInstances []*gtm. for _, res := range resourceInstances { resourceInstanceObject := resourceInstance{ - DataCenterID: types.Int64Value(int64(res.DatacenterId)), + DataCenterID: types.Int64Value(int64(res.DatacenterID)), UseDefaultLoadObject: types.BoolValue(res.UseDefaultLoadObject), LoadObject: types.StringValue(res.LoadObject.LoadObject), LoadObjectPort: types.Int64Value(int64(res.LoadObject.LoadObjectPort)), diff --git a/pkg/providers/gtm/data_akamai_gtm_resource_test.go b/pkg/providers/gtm/data_akamai_gtm_resource_test.go index 90648f2fb..70f21bc0d 100644 --- a/pkg/providers/gtm/data_akamai_gtm_resource_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_resource_test.go @@ -39,7 +39,7 @@ func TestDataGTMResource(t *testing.T) { }, }, ResourceInstances: []*gtm.ResourceInstance{{ - DatacenterId: 3131, + DatacenterID: 3131, UseDefaultLoadObject: false, LoadObject: gtm.LoadObject{ LoadObject: "/test2", diff --git a/pkg/providers/gtm/data_akamai_gtm_resources_test.go b/pkg/providers/gtm/data_akamai_gtm_resources_test.go index 495bd4676..34279bf6c 100644 --- a/pkg/providers/gtm/data_akamai_gtm_resources_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_resources_test.go @@ -40,7 +40,7 @@ func TestDataGTMResources(t *testing.T) { }, }, ResourceInstances: []*gtm.ResourceInstance{{ - DatacenterId: 3131, + DatacenterID: 3131, UseDefaultLoadObject: false, LoadObject: gtm.LoadObject{ LoadObject: "/test1", @@ -67,7 +67,7 @@ func TestDataGTMResources(t *testing.T) { }, }, ResourceInstances: []*gtm.ResourceInstance{{ - DatacenterId: 3132, + DatacenterID: 3132, UseDefaultLoadObject: false, LoadObject: gtm.LoadObject{ LoadObject: "/test2", diff --git a/pkg/providers/gtm/provider.go b/pkg/providers/gtm/provider.go index bc0111919..fc8e0fa4d 100644 --- a/pkg/providers/gtm/provider.go +++ b/pkg/providers/gtm/provider.go @@ -41,8 +41,8 @@ func (p *Subprovider) FrameworkResources() []func() resource.Resource { // FrameworkDataSources returns the gtm data sources implemented using terraform-plugin-framework func (p *Subprovider) FrameworkDataSources() []func() datasource.DataSource { return []func() datasource.DataSource{ - NewGTMAsmapDataSource, - NewGTMCidrmapDataSource, + NewGTMASMapDataSource, + NewGTMCIDRMapDataSource, NewGTMDomainDataSource, NewGTMDomainsDataSource, NewGTMResourceDataSource, @@ -57,9 +57,9 @@ func (p *Subprovider) SDKResources() map[string]*schema.Resource { "akamai_gtm_property": resourceGTMv1Property(), "akamai_gtm_datacenter": resourceGTMv1Datacenter(), "akamai_gtm_resource": resourceGTMv1Resource(), - "akamai_gtm_asmap": resourceGTMv1ASmap(), - "akamai_gtm_geomap": resourceGTMv1Geomap(), - "akamai_gtm_cidrmap": resourceGTMv1Cidrmap(), + "akamai_gtm_asmap": resourceGTMv1ASMap(), + "akamai_gtm_geomap": resourceGTMv1GeoMap(), + "akamai_gtm_cidrmap": resourceGTMv1CIDRMap(), } } diff --git a/pkg/providers/gtm/resource_akamai_gtm_asmap.go b/pkg/providers/gtm/resource_akamai_gtm_asmap.go index e3b45b2ff..8ff7045e9 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_asmap.go +++ b/pkg/providers/gtm/resource_akamai_gtm_asmap.go @@ -15,14 +15,14 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func resourceGTMv1ASmap() *schema.Resource { +func resourceGTMv1ASMap() *schema.Resource { return &schema.Resource{ - CreateContext: resourceGTMv1ASmapCreate, - ReadContext: resourceGTMv1ASmapRead, - UpdateContext: resourceGTMv1ASmapUpdate, - DeleteContext: resourceGTMv1ASmapDelete, + CreateContext: resourceGTMv1ASMapCreate, + ReadContext: resourceGTMv1ASMapRead, + UpdateContext: resourceGTMv1ASMapUpdate, + DeleteContext: resourceGTMv1ASMapDelete, Importer: &schema.ResourceImporter{ - StateContext: resourceGTMv1ASmapImport, + StateContext: resourceGTMv1ASMapImport, }, Schema: map[string]*schema.Schema{ "domain": { @@ -123,8 +123,7 @@ func validateDefaultDC(ctx context.Context, meta meta.Meta, ddcField []interface return nil } -// Create a new GTM ASmap -func resourceGTMv1ASmapCreate(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { +func resourceGTMv1ASMapCreate(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { meta := meta.Must(m) logger := meta.Log("Akamai GTM", "resourceGTMv1ASmapCreate") // create a context with logging for api calls @@ -162,9 +161,9 @@ func resourceGTMv1ASmapCreate(ctx context.Context, d *schema.ResourceData, m int }) } - newAS := populateNewASmapObject(ctx, meta, d, m) + newAS := populateNewASMapObject(ctx, meta, d, m) logger.Debugf("Proposed New asMap: [%v]", newAS) - cStatus, err := Client(meta).CreateAsMap(ctx, newAS, domain) + cStatus, err := Client(meta).CreateASMap(ctx, newAS, domain) if err != nil { return append(diags, diag.Diagnostic{ Severity: diag.Error, @@ -205,14 +204,13 @@ func resourceGTMv1ASmapCreate(ctx context.Context, d *schema.ResourceData, m int asMapID := fmt.Sprintf("%s:%s", domain, cStatus.Resource.Name) logger.Debugf("Generated asMap Id: %s", asMapID) d.SetId(asMapID) - return resourceGTMv1ASmapRead(ctx, d, m) + return resourceGTMv1ASMapRead(ctx, d, m) } -// read asMap. updates state with entire API result configuration. -func resourceGTMv1ASmapRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { +func resourceGTMv1ASMapRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { meta := meta.Must(m) - logger := meta.Log("Akamai GTM", "resourceGTMv1ASmapRead") + logger := meta.Log("Akamai GTM", "resourceGTMv1ASMapRead") // create a context with logging for api calls ctx = session.ContextWithOptions( ctx, @@ -226,7 +224,7 @@ func resourceGTMv1ASmapRead(ctx context.Context, d *schema.ResourceData, m inter if err != nil { return diag.FromErr(err) } - as, err := Client(meta).GetAsMap(ctx, asMap, domain) + as, err := Client(meta).GetASMap(ctx, asMap, domain) if err != nil { logger.Errorf("asMap Read error: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -235,15 +233,14 @@ func resourceGTMv1ASmapRead(ctx context.Context, d *schema.ResourceData, m inter Detail: err.Error(), }) } - populateTerraformASmapState(d, as, m) + populateTerraformASMapState(d, as, m) logger.Debugf("READ %v", as) return nil } -// Update GTM ASmap -func resourceGTMv1ASmapUpdate(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { +func resourceGTMv1ASMapUpdate(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { meta := meta.Must(m) - logger := meta.Log("Akamai GTM", "resourceGTMv1ASmapUpdate") + logger := meta.Log("Akamai GTM", "resourceGTMv1ASMapUpdate") // create a context with logging for api calls ctx = session.ContextWithOptions( ctx, @@ -259,7 +256,7 @@ func resourceGTMv1ASmapUpdate(ctx context.Context, d *schema.ResourceData, m int return diag.FromErr(err) } // Get existingASmap - existAs, err := Client(meta).GetAsMap(ctx, asMap, domain) + existAs, err := Client(meta).GetASMap(ctx, asMap, domain) if err != nil { logger.Errorf("asMap Update read error: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -269,9 +266,9 @@ func resourceGTMv1ASmapUpdate(ctx context.Context, d *schema.ResourceData, m int }) } logger.Debugf("asMap BEFORE: %v", existAs) - populateASmapObject(d, existAs, m) + populateASMapObject(d, existAs, m) logger.Debugf("asMap PROPOSED: %v", existAs) - uStat, err := Client(meta).UpdateAsMap(ctx, existAs, domain) + uStat, err := Client(meta).UpdateASMap(ctx, existAs, domain) if err != nil { logger.Errorf("asMap pdate: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -310,13 +307,12 @@ func resourceGTMv1ASmapUpdate(ctx context.Context, d *schema.ResourceData, m int } } - return resourceGTMv1ASmapRead(ctx, d, m) + return resourceGTMv1ASMapRead(ctx, d, m) } -// Import GTM ASmap. -func resourceGTMv1ASmapImport(ctx context.Context, d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { +func resourceGTMv1ASMapImport(ctx context.Context, d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { meta := meta.Must(m) - logger := meta.Log("Akamai GTM", "resourceGTMv1ASmapImport") + logger := meta.Log("Akamai GTM", "resourceGTMv1ASMapImport") // create a context with logging for api calls ctx = session.ContextWithOptions( ctx, @@ -329,7 +325,7 @@ func resourceGTMv1ASmapImport(ctx context.Context, d *schema.ResourceData, m int if err != nil { return []*schema.ResourceData{d}, err } - as, err := Client(meta).GetAsMap(ctx, asMap, domain) + as, err := Client(meta).GetASMap(ctx, asMap, domain) if err != nil { return nil, err } @@ -339,17 +335,16 @@ func resourceGTMv1ASmapImport(ctx context.Context, d *schema.ResourceData, m int if err := d.Set("wait_on_complete", true); err != nil { return nil, err } - populateTerraformASmapState(d, as, m) + populateTerraformASMapState(d, as, m) // use same Id as passed in logger.Infof("asMap [%s] [%s] Imported", d.Id(), d.Get("name")) return []*schema.ResourceData{d}, nil } -// Delete GTM ASmap. -func resourceGTMv1ASmapDelete(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { +func resourceGTMv1ASMapDelete(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { meta := meta.Must(m) - logger := meta.Log("Akamai GTM", "resourceGTMv1ASmapDelete") + logger := meta.Log("Akamai GTM", "resourceGTMv1ASMapDelete") // create a context with logging for api calls ctx = session.ContextWithOptions( ctx, @@ -361,12 +356,12 @@ func resourceGTMv1ASmapDelete(ctx context.Context, d *schema.ResourceData, m int // Get existing asMap domain, asMap, err := parseResourceStringID(d.Id()) if err != nil { - logger.Errorf("[ERROR] ASmap Delete: %s", err.Error()) + logger.Errorf("[ERROR] ASMap Delete: %s", err.Error()) return diag.FromErr(err) } - existAs, err := Client(meta).GetAsMap(ctx, asMap, domain) + existAs, err := Client(meta).GetASMap(ctx, asMap, domain) if err != nil { - logger.Errorf("ASmap Delete: %s", err.Error()) + logger.Errorf("ASMap Delete: %s", err.Error()) return append(diags, diag.Diagnostic{ Severity: diag.Error, Summary: "asMap doesn't exist", @@ -374,9 +369,9 @@ func resourceGTMv1ASmapDelete(ctx context.Context, d *schema.ResourceData, m int }) } logger.Debugf("Deleting ASmap: %v", existAs) - uStat, err := Client(meta).DeleteAsMap(ctx, existAs, domain) + uStat, err := Client(meta).DeleteASMap(ctx, existAs, domain) if err != nil { - logger.Errorf("ASmap Delete: %s", err.Error()) + logger.Errorf("ASMap Delete: %s", err.Error()) return append(diags, diag.Diagnostic{ Severity: diag.Error, Summary: "asMap Delete failed", @@ -413,63 +408,60 @@ func resourceGTMv1ASmapDelete(ctx context.Context, d *schema.ResourceData, m int } } - // if successful .... d.SetId("") return nil } // Create and populate a new asMap object from asMap data -func populateNewASmapObject(ctx context.Context, meta meta.Meta, d *schema.ResourceData, m interface{}) *gtm.AsMap { +func populateNewASMapObject(ctx context.Context, meta meta.Meta, d *schema.ResourceData, m interface{}) *gtm.ASMap { asMapName, _ := tf.GetStringValue("name", d) - asObj := Client(meta).NewAsMap(ctx, asMapName) + asObj := Client(meta).NewASMap(ctx, asMapName) asObj.DefaultDatacenter = >m.DatacenterBase{} - asObj.Assignments = make([]*gtm.AsAssignment, 1) + asObj.Assignments = make([]*gtm.ASAssignment, 1) asObj.Links = make([]*gtm.Link, 1) - populateASmapObject(d, asObj, m) + populateASMapObject(d, asObj, m) return asObj } // Populate existing asMap object from asMap data -func populateASmapObject(d *schema.ResourceData, as *gtm.AsMap, m interface{}) { - +func populateASMapObject(d *schema.ResourceData, as *gtm.ASMap, m interface{}) { if v, err := tf.GetStringValue("name", d); err == nil { as.Name = v } - populateAsAssignmentsObject(d, as, m) - populateAsDefaultDCObject(d, as, m) - + populateASAssignmentsObject(d, as, m) + populateASDefaultDCObject(d, as, m) } -// Populate Terraform state from provided ASmap object -func populateTerraformASmapState(d *schema.ResourceData, as *gtm.AsMap, m interface{}) { +// Populate Terraform state from provided ASMap object +func populateTerraformASMapState(d *schema.ResourceData, as *gtm.ASMap, m interface{}) { meta := meta.Must(m) - logger := meta.Log("Akamai GTM", "populateTerraformASmapState") + logger := meta.Log("Akamai GTM", "populateTerraformASMapState") // walk through all state elements if err := d.Set("name", as.Name); err != nil { - logger.Errorf("populateTerraformASmapState failed: %s", err.Error()) + logger.Errorf("populateTerraformASMapState failed: %s", err.Error()) } - populateTerraformAsAssignmentsState(d, as, m) - populateTerraformAsDefaultDCState(d, as, m) + populateTerraformASAssignmentsState(d, as, m) + populateTerraformASDefaultDCState(d, as, m) } -// create and populate GTM ASmap Assignments object -func populateAsAssignmentsObject(d *schema.ResourceData, as *gtm.AsMap, m interface{}) { +// create and populate GTM ASMap Assignments object +func populateASAssignmentsObject(d *schema.ResourceData, as *gtm.ASMap, m interface{}) { meta := meta.Must(m) - logger := meta.Log("Akamai GTM", "populateAsAssignmentsObject") + logger := meta.Log("Akamai GTM", "populateASAssignmentsObject") // pull apart List if asAssignmentsList, err := tf.GetListValue("assignment", d); err != nil { logger.Errorf("Assignment not set: %s", err.Error()) } else { - asAssignmentsObjList := make([]*gtm.AsAssignment, len(asAssignmentsList)) // create new object list + asAssignmentsObjList := make([]*gtm.ASAssignment, len(asAssignmentsList)) // create new object list for i, v := range asAssignmentsList { asMap := v.(map[string]interface{}) - asAssignment := gtm.AsAssignment{} - asAssignment.DatacenterId = asMap["datacenter_id"].(int) + asAssignment := gtm.ASAssignment{} + asAssignment.DatacenterID = asMap["datacenter_id"].(int) asAssignment.Nickname = asMap["nickname"].(string) if asMap["as_numbers"] != nil { asNumbers, ok := asMap["as_numbers"].(*schema.Set) @@ -480,7 +472,7 @@ func populateAsAssignmentsObject(d *schema.ResourceData, as *gtm.AsMap, m interf for i, sl := range asNumbers.List() { ls[i] = int64(sl.(int)) } - asAssignment.AsNumbers = ls + asAssignment.ASNumbers = ls } asAssignmentsObjList[i] = &asAssignment } @@ -489,29 +481,29 @@ func populateAsAssignmentsObject(d *schema.ResourceData, as *gtm.AsMap, m interf } // create and populate Terraform asMap assignments schema -func populateTerraformAsAssignmentsState(d *schema.ResourceData, asm *gtm.AsMap, m interface{}) { +func populateTerraformASAssignmentsState(d *schema.ResourceData, asm *gtm.ASMap, m interface{}) { meta := meta.Must(m) - logger := meta.Log("Akamai GTM", "populateTerraformAsAssignmentsState") + logger := meta.Log("Akamai GTM", "populateTerraformASAssignmentsState") var asStateList []map[string]interface{} for _, as := range asm.Assignments { asNew := map[string]interface{}{ - "datacenter_id": as.DatacenterId, + "datacenter_id": as.DatacenterID, "nickname": as.Nickname, - "as_numbers": as.AsNumbers, + "as_numbers": as.ASNumbers, } asStateList = append(asStateList, asNew) } if err := d.Set("assignment", asStateList); err != nil { - logger.Errorf("populateTerraformAsAssignmentsState failed: %s", err.Error()) + logger.Errorf("populateTerraformASAssignmentsState failed: %s", err.Error()) } } -// create and populate GTM ASmap DefaultDatacenter object -func populateAsDefaultDCObject(d *schema.ResourceData, as *gtm.AsMap, m interface{}) { +// create and populate GTM ASMap DefaultDatacenter object +func populateASDefaultDCObject(d *schema.ResourceData, as *gtm.ASMap, m interface{}) { meta := meta.Must(m) - logger := meta.Log("Akamai GTMv1", "resourceGTMv1ASmapDelete") + logger := meta.Log("Akamai GTMv1", "resourceGTMv1ASMapDelete") // pull apart List if asDefaultDCList, err := tf.GetInterfaceArrayValue("default_datacenter", d); err != nil { @@ -521,12 +513,12 @@ func populateAsDefaultDCObject(d *schema.ResourceData, as *gtm.AsMap, m interfac asDefaultDCObj := gtm.DatacenterBase{} // create new object asMap := asDefaultDCList[0].(map[string]interface{}) if asMap["datacenter_id"] != nil && asMap["datacenter_id"].(int) != 0 { - asDefaultDCObj.DatacenterId = asMap["datacenter_id"].(int) + asDefaultDCObj.DatacenterID = asMap["datacenter_id"].(int) asDefaultDCObj.Nickname = asMap["nickname"].(string) } else { logger.Infof("No Default Datacenter specified") var nilInt int - asDefaultDCObj.DatacenterId = nilInt + asDefaultDCObj.DatacenterID = nilInt asDefaultDCObj.Nickname = "" } as.DefaultDatacenter = &asDefaultDCObj @@ -535,18 +527,18 @@ func populateAsDefaultDCObject(d *schema.ResourceData, as *gtm.AsMap, m interfac } // create and populate Terraform asMap default_datacenter schema -func populateTerraformAsDefaultDCState(d *schema.ResourceData, as *gtm.AsMap, m interface{}) { +func populateTerraformASDefaultDCState(d *schema.ResourceData, as *gtm.ASMap, m interface{}) { meta := meta.Must(m) - logger := meta.Log("Akamai GTM", "populateTerraformAsDefaultDCState") + logger := meta.Log("Akamai GTM", "populateTerraformASDefaultDCState") ddcListNew := make([]interface{}, 1) ddcNew := map[string]interface{}{ - "datacenter_id": as.DefaultDatacenter.DatacenterId, + "datacenter_id": as.DefaultDatacenter.DatacenterID, "nickname": as.DefaultDatacenter.Nickname, } ddcListNew[0] = ddcNew if err := d.Set("default_datacenter", ddcListNew); err != nil { - logger.Errorf("populateTerraformAsDefaultDCState failed: %s", err.Error()) + logger.Errorf("populateTerraformASDefaultDCState failed: %s", err.Error()) } } diff --git a/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go b/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go index ee3662e43..968c65598 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go @@ -12,16 +12,16 @@ import ( "github.com/stretchr/testify/mock" ) -func TestResGtmAsmap(t *testing.T) { +func TestResGTMASMap(t *testing.T) { dc := gtm.Datacenter{ - DatacenterId: asmap.DefaultDatacenter.DatacenterId, + DatacenterID: asmap.DefaultDatacenter.DatacenterID, Nickname: asmap.DefaultDatacenter.Nickname, } t.Run("create asmap", func(t *testing.T) { client := >m.Mock{} - getCall := client.On("GetAsMap", + getCall := client.On("GetASMap", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("string"), mock.AnythingOfType("string"), @@ -29,11 +29,11 @@ func TestResGtmAsmap(t *testing.T) { StatusCode: http.StatusNotFound, }) - resp := gtm.AsMapResponse{} + resp := gtm.ASMapResponse{} resp.Resource = &asmap resp.Status = &pendingResponseStatus - client.On("NewAsMap", + client.On("NewASMap", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("string"), ).Return(&asmap, nil) @@ -44,11 +44,11 @@ func TestResGtmAsmap(t *testing.T) { mock.AnythingOfType("string"), ).Return(&dc, nil) - client.On("CreateAsMap", + client.On("CreateASMap", mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("*gtm.AsMap"), + mock.AnythingOfType("*gtm.ASMap"), mock.AnythingOfType("string"), - ).Return(>m.AsMapResponse{ + ).Return(>m.ASMapResponse{ Resource: &asmap, Status: >m.ResponseStatus{}, }, nil).Run(func(args mock.Arguments) { @@ -60,15 +60,15 @@ func TestResGtmAsmap(t *testing.T) { mock.AnythingOfType("string"), ).Return(&completeResponseStatus, nil) - client.On("UpdateAsMap", + client.On("UpdateASMap", mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("*gtm.AsMap"), + mock.AnythingOfType("*gtm.ASMap"), mock.AnythingOfType("string"), ).Return(&completeResponseStatus, nil) - client.On("DeleteAsMap", + client.On("DeleteASMap", mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("*gtm.AsMap"), + mock.AnythingOfType("*gtm.ASMap"), mock.AnythingOfType("string"), ).Return(&completeResponseStatus, nil) @@ -100,9 +100,9 @@ func TestResGtmAsmap(t *testing.T) { t.Run("create asmap failed", func(t *testing.T) { client := >m.Mock{} - client.On("CreateAsMap", + client.On("CreateASMap", mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("*gtm.AsMap"), + mock.AnythingOfType("*gtm.ASMap"), gtmTestDomain, ).Return(nil, >m.Error{ StatusCode: http.StatusBadRequest, @@ -114,7 +114,7 @@ func TestResGtmAsmap(t *testing.T) { mock.AnythingOfType("string"), ).Return(&dc, nil) - client.On("NewAsMap", + client.On("NewASMap", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("string"), ).Return(&asmap, nil) @@ -137,12 +137,12 @@ func TestResGtmAsmap(t *testing.T) { t.Run("create asmap denied", func(t *testing.T) { client := >m.Mock{} - dr := gtm.AsMapResponse{} + dr := gtm.ASMapResponse{} dr.Resource = &asmap dr.Status = &deniedResponseStatus - client.On("CreateAsMap", + client.On("CreateASMap", mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("*gtm.AsMap"), + mock.AnythingOfType("*gtm.ASMap"), gtmTestDomain, ).Return(&dr, nil) @@ -152,7 +152,7 @@ func TestResGtmAsmap(t *testing.T) { mock.AnythingOfType("string"), ).Return(&dc, nil) - client.On("NewAsMap", + client.On("NewASMap", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("string"), ).Return(&asmap, nil) @@ -175,11 +175,11 @@ func TestResGtmAsmap(t *testing.T) { t.Run("import asmap", func(t *testing.T) { client := >m.Mock{} - resp := gtm.AsMapResponse{} + resp := gtm.ASMapResponse{} resp.Resource = &asmap resp.Status = &pendingResponseStatus - client.On("NewAsMap", + client.On("NewASMap", mock.Anything, mock.AnythingOfType("string"), ).Return(&asmap, nil) @@ -190,11 +190,11 @@ func TestResGtmAsmap(t *testing.T) { mock.AnythingOfType("string"), ).Return(&dc, nil) - client.On("CreateAsMap", + client.On("CreateASMap", mock.Anything, - mock.AnythingOfType("*gtm.AsMap"), + mock.AnythingOfType("*gtm.ASMap"), mock.AnythingOfType("string"), - ).Return(>m.AsMapResponse{ + ).Return(>m.ASMapResponse{ Resource: &asmap, Status: >m.ResponseStatus{}, }, nil) @@ -204,15 +204,15 @@ func TestResGtmAsmap(t *testing.T) { mock.AnythingOfType("string"), ).Return(&completeResponseStatus, nil) - client.On("GetAsMap", + client.On("GetASMap", mock.Anything, mock.AnythingOfType("string"), mock.AnythingOfType("string"), ).Return(&asmap, nil) - client.On("DeleteAsMap", + client.On("DeleteASMap", mock.Anything, - mock.AnythingOfType("*gtm.AsMap"), + mock.AnythingOfType("*gtm.ASMap"), mock.AnythingOfType("string"), ).Return(&completeResponseStatus, nil) @@ -243,7 +243,7 @@ func TestResGtmAsmap(t *testing.T) { }) } -func TestGTMAsMapOrder(t *testing.T) { +func TestGTMASMapOrder(t *testing.T) { tests := map[string]struct { client *gtm.Mock pathForCreate string @@ -342,23 +342,23 @@ func TestGTMAsMapOrder(t *testing.T) { // getASMapMocks mocks creation and deletion of a resource func getASMapMocks() *gtm.Mock { dc := gtm.Datacenter{ - DatacenterId: asmap.DefaultDatacenter.DatacenterId, + DatacenterID: asmap.DefaultDatacenter.DatacenterID, Nickname: asmap.DefaultDatacenter.Nickname, } client := >m.Mock{} - mockGetAsMap := client.On("GetAsMap", + mockGetAsMap := client.On("GetASMap", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("string"), mock.AnythingOfType("string"), ).Return(nil, >m.Error{StatusCode: http.StatusNotFound}) - resp := gtm.AsMapResponse{} + resp := gtm.ASMapResponse{} resp.Resource = &asMapDiffOrder resp.Status = &pendingResponseStatus - client.On("NewAsMap", + client.On("NewASMap", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("string"), ).Return(&asmap, nil) @@ -369,11 +369,11 @@ func getASMapMocks() *gtm.Mock { mock.AnythingOfType("string"), ).Return(&dc, nil) - client.On("CreateAsMap", + client.On("CreateASMap", mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("*gtm.AsMap"), + mock.AnythingOfType("*gtm.ASMap"), mock.AnythingOfType("string"), - ).Return(>m.AsMapResponse{ + ).Return(>m.ASMapResponse{ Resource: &asmap, Status: >m.ResponseStatus{}, }, nil).Run(func(args mock.Arguments) { @@ -385,9 +385,9 @@ func getASMapMocks() *gtm.Mock { mock.AnythingOfType("string"), ).Return(&completeResponseStatus, nil) - client.On("DeleteAsMap", + client.On("DeleteASMap", mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("*gtm.AsMap"), + mock.AnythingOfType("*gtm.ASMap"), mock.AnythingOfType("string"), ).Return(&completeResponseStatus, nil) @@ -396,57 +396,57 @@ func getASMapMocks() *gtm.Mock { var ( // asMapDiffOrder represents AsMap structure with values used in tests of the order of assignments and as_numbers - asMapDiffOrder = gtm.AsMap{ + asMapDiffOrder = gtm.ASMap{ Name: "tfexample_as_1", DefaultDatacenter: >m.DatacenterBase{ - DatacenterId: 5400, + DatacenterID: 5400, Nickname: "default datacenter", }, - Assignments: []*gtm.AsAssignment{ + Assignments: []*gtm.ASAssignment{ { DatacenterBase: gtm.DatacenterBase{ - DatacenterId: 3131, + DatacenterID: 3131, Nickname: "tfexample_dc_1", }, - AsNumbers: []int64{12222, 16702, 17334}, + ASNumbers: []int64{12222, 16702, 17334}, }, { DatacenterBase: gtm.DatacenterBase{ - DatacenterId: 3132, + DatacenterID: 3132, Nickname: "tfexample_dc_2", }, - AsNumbers: []int64{12229, 16703, 17335}, + ASNumbers: []int64{12229, 16703, 17335}, }, { DatacenterBase: gtm.DatacenterBase{ - DatacenterId: 3133, + DatacenterID: 3133, Nickname: "tfexample_dc_3", }, - AsNumbers: []int64{1111, 2222, 3333, 4444, 5555}, + ASNumbers: []int64{1111, 2222, 3333, 4444, 5555}, }, }, } - asmap = gtm.AsMap{ + asmap = gtm.ASMap{ Name: "tfexample_as_1", DefaultDatacenter: >m.DatacenterBase{ - DatacenterId: 5400, + DatacenterID: 5400, Nickname: "default datacenter", }, - Assignments: []*gtm.AsAssignment{ + Assignments: []*gtm.ASAssignment{ { DatacenterBase: gtm.DatacenterBase{ - DatacenterId: 3131, + DatacenterID: 3131, Nickname: "tfexample_dc_1", }, - AsNumbers: []int64{12222, 16702, 17334}, + ASNumbers: []int64{12222, 16702, 17334}, }, { DatacenterBase: gtm.DatacenterBase{ - DatacenterId: 3132, + DatacenterID: 3132, Nickname: "tfexample_dc_2", }, - AsNumbers: []int64{12229, 16703, 17335}, + ASNumbers: []int64{12229, 16703, 17335}, }, }, } diff --git a/pkg/providers/gtm/resource_akamai_gtm_cidrmap.go b/pkg/providers/gtm/resource_akamai_gtm_cidrmap.go index d26121360..9d1b809cc 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_cidrmap.go +++ b/pkg/providers/gtm/resource_akamai_gtm_cidrmap.go @@ -14,14 +14,14 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func resourceGTMv1Cidrmap() *schema.Resource { +func resourceGTMv1CIDRMap() *schema.Resource { return &schema.Resource{ - CreateContext: resourceGTMv1CidrMapCreate, - ReadContext: resourceGTMv1CidrMapRead, - UpdateContext: resourceGTMv1CidrMapUpdate, - DeleteContext: resourceGTMv1CidrMapDelete, + CreateContext: resourceGTMv1CIDRMapCreate, + ReadContext: resourceGTMv1CIDRMapRead, + UpdateContext: resourceGTMv1CIDRMapUpdate, + DeleteContext: resourceGTMv1CIDRMapDelete, Importer: &schema.ResourceImporter{ - State: resourceGTMv1CidrMapImport, + State: resourceGTMv1CIDRMapImport, }, Schema: map[string]*schema.Schema{ "domain": { @@ -80,10 +80,9 @@ func resourceGTMv1Cidrmap() *schema.Resource { } } -// Create a new GTM CidrMap -func resourceGTMv1CidrMapCreate(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { +func resourceGTMv1CIDRMapCreate(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { meta := meta.Must(m) - logger := meta.Log("Akamai GTM", "resourceGTMCidrMapCreate") + logger := meta.Log("Akamai GTM", "resourceGTMCIDRMapCreate") // create a context with logging for api calls ctx = session.ContextWithOptions( ctx, @@ -116,9 +115,9 @@ func resourceGTMv1CidrMapCreate(ctx context.Context, d *schema.ResourceData, m i }) } - newCidr := populateNewCidrMapObject(ctx, meta, d, m) + newCidr := populateNewCIDRMapObject(ctx, meta, d, m) logger.Debugf("Proposed New CidrMap: [%v]", newCidr) - cStatus, err := Client(meta).CreateCidrMap(ctx, newCidr, domain) + cStatus, err := Client(meta).CreateCIDRMap(ctx, newCidr, domain) if err != nil { logger.Errorf("cidrMap Create failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -160,14 +159,13 @@ func resourceGTMv1CidrMapCreate(ctx context.Context, d *schema.ResourceData, m i cidrMapID := fmt.Sprintf("%s:%s", domain, cStatus.Resource.Name) logger.Debugf("Generated cidrMap resource Id: %s", cidrMapID) d.SetId(cidrMapID) - return resourceGTMv1CidrMapRead(ctx, d, m) + return resourceGTMv1CIDRMapRead(ctx, d, m) } -// read cidrMap. updates state with entire API result configuration. -func resourceGTMv1CidrMapRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { +func resourceGTMv1CIDRMapRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { meta := meta.Must(m) - logger := meta.Log("Akamai GTM", "resourceGTMCidrMapRead") + logger := meta.Log("Akamai GTM", "resourceGTMCIDRMapRead") // create a context with logging for api calls ctx = session.ContextWithOptions( ctx, @@ -182,7 +180,7 @@ func resourceGTMv1CidrMapRead(ctx context.Context, d *schema.ResourceData, m int logger.Errorf("Invalid cidrMap ID: %s", d.Id()) return diag.FromErr(err) } - cidr, err := Client(meta).GetCidrMap(ctx, cidrMap, domain) + cidr, err := Client(meta).GetCIDRMap(ctx, cidrMap, domain) if err != nil { logger.Errorf("cidrMap Read error: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -191,15 +189,14 @@ func resourceGTMv1CidrMapRead(ctx context.Context, d *schema.ResourceData, m int Detail: err.Error(), }) } - populateTerraformCidrMapState(d, cidr, m) + populateTerraformCIDRMapState(d, cidr, m) logger.Debugf("READ %v", cidr) return nil } -// Update GTM CidrMap -func resourceGTMv1CidrMapUpdate(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { +func resourceGTMv1CIDRMapUpdate(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { meta := meta.Must(m) - logger := meta.Log("Akamai GTM", "resourceGTMCidrMapUpdate") + logger := meta.Log("Akamai GTM", "resourceGTMCIDRMapUpdate") // create a context with logging for api calls ctx = session.ContextWithOptions( ctx, @@ -215,7 +212,7 @@ func resourceGTMv1CidrMapUpdate(ctx context.Context, d *schema.ResourceData, m i return diag.FromErr(err) } // Get existingCidrMap - existCidr, err := Client(meta).GetCidrMap(ctx, cidrMap, domain) + existCidr, err := Client(meta).GetCIDRMap(ctx, cidrMap, domain) if err != nil { logger.Errorf("cidrMap Update read failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -225,9 +222,9 @@ func resourceGTMv1CidrMapUpdate(ctx context.Context, d *schema.ResourceData, m i }) } logger.Debugf("Updating cidrMap BEFORE: %v", existCidr) - populateCidrMapObject(d, existCidr, m) + populateCIDRMapObject(d, existCidr, m) logger.Debugf("Updating cidrMap PROPOSED: %v", existCidr) - uStat, err := Client(meta).UpdateCidrMap(ctx, existCidr, domain) + uStat, err := Client(meta).UpdateCIDRMap(ctx, existCidr, domain) if err != nil { logger.Errorf("cidrMap Update failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -265,13 +262,12 @@ func resourceGTMv1CidrMapUpdate(ctx context.Context, d *schema.ResourceData, m i } } - return resourceGTMv1CidrMapRead(ctx, d, m) + return resourceGTMv1CIDRMapRead(ctx, d, m) } -// Import GTM CidrMap. -func resourceGTMv1CidrMapImport(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { +func resourceGTMv1CIDRMapImport(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { meta := meta.Must(m) - logger := meta.Log("Akamai GTM", "resourceGTMCidrMapImport") + logger := meta.Log("Akamai GTM", "resourceGTMCIDRMapImport") // create a context with logging for api calls ctx := context.Background() ctx = session.ContextWithOptions( @@ -285,7 +281,7 @@ func resourceGTMv1CidrMapImport(d *schema.ResourceData, m interface{}) ([]*schem if err != nil { return []*schema.ResourceData{d}, err } - cidr, err := Client(meta).GetCidrMap(ctx, cidrMap, domain) + cidr, err := Client(meta).GetCIDRMap(ctx, cidrMap, domain) if err != nil { return nil, err } @@ -295,17 +291,16 @@ func resourceGTMv1CidrMapImport(d *schema.ResourceData, m interface{}) ([]*schem if err := d.Set("wait_on_complete", true); err != nil { logger.Errorf("resourceGTMCidrMapImport failed: %s", err.Error()) } - populateTerraformCidrMapState(d, cidr, m) + populateTerraformCIDRMapState(d, cidr, m) // use same Id as passed in logger.Infof("cidrMap [%s] [%s] Imported", d.Id(), d.Get("name")) return []*schema.ResourceData{d}, nil } -// Delete GTM CidrMap. -func resourceGTMv1CidrMapDelete(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { +func resourceGTMv1CIDRMapDelete(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { meta := meta.Must(m) - logger := meta.Log("Akamai GTM", "resourceGTMCidrMapDelete") + logger := meta.Log("Akamai GTM", "resourceGTMCIDRMapDelete") // create a context with logging for api calls ctx = session.ContextWithOptions( ctx, @@ -320,7 +315,7 @@ func resourceGTMv1CidrMapDelete(ctx context.Context, d *schema.ResourceData, m i logger.Errorf("Invalid cidrMap ID: %s", d.Id()) return diag.FromErr(err) } - existCidr, err := Client(meta).GetCidrMap(ctx, cidrMap, domain) + existCidr, err := Client(meta).GetCIDRMap(ctx, cidrMap, domain) if err != nil { logger.Errorf("CidrMapDelete cidrMap doesn't exist: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -330,7 +325,7 @@ func resourceGTMv1CidrMapDelete(ctx context.Context, d *schema.ResourceData, m i }) } logger.Debugf("Deleting cidrMap: %v", existCidr) - uStat, err := Client(meta).DeleteCidrMap(ctx, existCidr, domain) + uStat, err := Client(meta).DeleteCIDRMap(ctx, existCidr, domain) if err != nil { logger.Errorf("cidrMap Delete failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -374,37 +369,34 @@ func resourceGTMv1CidrMapDelete(ctx context.Context, d *schema.ResourceData, m i } // Create and populate a new cidrMap object from cidrMap data -func populateNewCidrMapObject(ctx context.Context, meta meta.Meta, d *schema.ResourceData, m interface{}) *gtm.CidrMap { - logger := meta.Log("Akamai GTM", "populateNewCidrMapObject") +func populateNewCIDRMapObject(ctx context.Context, meta meta.Meta, d *schema.ResourceData, m interface{}) *gtm.CIDRMap { + logger := meta.Log("Akamai GTM", "populateNewCIDRMapObject") cidrMapName, err := tf.GetStringValue("name", d) if err != nil { logger.Errorf("cidrMap name not found in ResourceData: %s", err.Error()) } - cidrObj := Client(meta).NewCidrMap(ctx, cidrMapName) + cidrObj := Client(meta).NewCIDRMap(ctx, cidrMapName) cidrObj.DefaultDatacenter = >m.DatacenterBase{} - cidrObj.Assignments = make([]*gtm.CidrAssignment, 0) + cidrObj.Assignments = make([]*gtm.CIDRAssignment, 0) cidrObj.Links = make([]*gtm.Link, 1) - populateCidrMapObject(d, cidrObj, m) + populateCIDRMapObject(d, cidrObj, m) return cidrObj - } // Populate existing cidrMap object from cidrMap data -func populateCidrMapObject(d *schema.ResourceData, cidr *gtm.CidrMap, m interface{}) { - +func populateCIDRMapObject(d *schema.ResourceData, cidr *gtm.CIDRMap, m interface{}) { if v, err := tf.GetStringValue("name", d); err == nil { cidr.Name = v } - populateCidrAssignmentsObject(d, cidr, m) - populateCidrDefaultDCObject(d, cidr, m) - + populateCIDRAssignmentsObject(d, cidr, m) + populateCIDRDefaultDCObject(d, cidr, m) } -// Populate Terraform state from provided CidrMap object -func populateTerraformCidrMapState(d *schema.ResourceData, cidr *gtm.CidrMap, m interface{}) { +// Populate Terraform state from provided CIDRMap object +func populateTerraformCIDRMapState(d *schema.ResourceData, cidr *gtm.CIDRMap, m interface{}) { meta := meta.Must(m) logger := meta.Log("Akamai GTM", "populateTerraformCidrMapState") @@ -412,24 +404,23 @@ func populateTerraformCidrMapState(d *schema.ResourceData, cidr *gtm.CidrMap, m if err := d.Set("name", cidr.Name); err != nil { logger.Errorf("populateTerraformCidrMapState failed: %s", err.Error()) } - populateTerraformCidrAssignmentsState(d, cidr, m) - populateTerraformCidrDefaultDCState(d, cidr, m) - + populateTerraformCIDRAssignmentsState(d, cidr, m) + populateTerraformCIDRDefaultDCState(d, cidr, m) } // create and populate GTM CidrMap Assignments object -func populateCidrAssignmentsObject(d *schema.ResourceData, cidr *gtm.CidrMap, m interface{}) { +func populateCIDRAssignmentsObject(d *schema.ResourceData, cidr *gtm.CIDRMap, m interface{}) { meta := meta.Must(m) logger := meta.Log("Akamai GTM", "populateCidrAssignmentsObject") // pull apart List if cassgns := d.Get("assignment"); cassgns != nil { cidrAssignmentsList := cassgns.([]interface{}) - cidrAssignmentsObjList := make([]*gtm.CidrAssignment, len(cidrAssignmentsList)) // create new object list + cidrAssignmentsObjList := make([]*gtm.CIDRAssignment, len(cidrAssignmentsList)) // create new object list for i, v := range cidrAssignmentsList { cidrMap := v.(map[string]interface{}) - cidrAssignment := gtm.CidrAssignment{} - cidrAssignment.DatacenterId = cidrMap["datacenter_id"].(int) + cidrAssignment := gtm.CIDRAssignment{} + cidrAssignment.DatacenterID = cidrMap["datacenter_id"].(int) cidrAssignment.Nickname = cidrMap["nickname"].(string) if cidrMap["blocks"] != nil { blocks, ok := cidrMap["blocks"].(*schema.Set) @@ -449,14 +440,14 @@ func populateCidrAssignmentsObject(d *schema.ResourceData, cidr *gtm.CidrMap, m } // create and populate Terraform cidrMap assignments schema -func populateTerraformCidrAssignmentsState(d *schema.ResourceData, cidr *gtm.CidrMap, m interface{}) { +func populateTerraformCIDRAssignmentsState(d *schema.ResourceData, cidr *gtm.CIDRMap, m interface{}) { meta := meta.Must(m) logger := meta.Log("Akamai GTM", "populateTerraformCidrAssignmentsState") - objectInventory := make(map[int]*gtm.CidrAssignment, len(cidr.Assignments)) + objectInventory := make(map[int]*gtm.CIDRAssignment, len(cidr.Assignments)) if len(cidr.Assignments) > 0 { for _, aObj := range cidr.Assignments { - objectInventory[aObj.DatacenterId] = aObj + objectInventory[aObj.DatacenterID] = aObj } } aStateList, err := tf.GetInterfaceArrayValue("assignment", d) @@ -471,7 +462,7 @@ func populateTerraformCidrAssignmentsState(d *schema.ResourceData, cidr *gtm.Cid logger.Warnf("Cidr Assignment %d NOT FOUND in returned GTM Object", a["datacenter_id"]) continue } - a["datacenter_id"] = aObject.DatacenterId + a["datacenter_id"] = aObject.DatacenterID a["nickname"] = aObject.Nickname a["blocks"] = reconcileTerraformLists(a["blocks"].(*schema.Set).List(), convertStringToInterfaceList(aObject.Blocks, m), m) // remove object @@ -482,7 +473,7 @@ func populateTerraformCidrAssignmentsState(d *schema.ResourceData, cidr *gtm.Cid // Objects not in the state yet. Add. Unfortunately, they not align with instance indices in the config for _, maObj := range objectInventory { aNew := map[string]interface{}{ - "datacenter_id": maObj.DatacenterId, + "datacenter_id": maObj.DatacenterID, "nickname": maObj.Nickname, "blocks": maObj.Blocks, } @@ -494,10 +485,10 @@ func populateTerraformCidrAssignmentsState(d *schema.ResourceData, cidr *gtm.Cid } } -// create and populate GTM CidrMap DefaultDatacenter object -func populateCidrDefaultDCObject(d *schema.ResourceData, cidr *gtm.CidrMap, m interface{}) { +// create and populate GTM CIDRMap DefaultDatacenter object +func populateCIDRDefaultDCObject(d *schema.ResourceData, cidr *gtm.CIDRMap, m interface{}) { meta := meta.Must(m) - logger := meta.Log("Akamai GTM", "populateCidrDefaultDCObject") + logger := meta.Log("Akamai GTM", "populateCIDRDefaultDCObject") // pull apart List if cidrDefaultDCList, err := tf.GetInterfaceArrayValue("default_datacenter", d); err != nil { @@ -507,12 +498,12 @@ func populateCidrDefaultDCObject(d *schema.ResourceData, cidr *gtm.CidrMap, m in cidrDefaultDCObj := gtm.DatacenterBase{} // create new object cidrddMap := cidrDefaultDCList[0].(map[string]interface{}) if cidrddMap["datacenter_id"] != nil && cidrddMap["datacenter_id"].(int) != 0 { - cidrDefaultDCObj.DatacenterId = cidrddMap["datacenter_id"].(int) + cidrDefaultDCObj.DatacenterID = cidrddMap["datacenter_id"].(int) cidrDefaultDCObj.Nickname = cidrddMap["nickname"].(string) } else { logger.Infof("No Default Datacenter specified") var nilInt int - cidrDefaultDCObj.DatacenterId = nilInt + cidrDefaultDCObj.DatacenterID = nilInt cidrDefaultDCObj.Nickname = "" } cidr.DefaultDatacenter = &cidrDefaultDCObj @@ -521,13 +512,13 @@ func populateCidrDefaultDCObject(d *schema.ResourceData, cidr *gtm.CidrMap, m in } // create and populate Terraform cidrMap default_datacenter schema -func populateTerraformCidrDefaultDCState(d *schema.ResourceData, cidr *gtm.CidrMap, m interface{}) { +func populateTerraformCIDRDefaultDCState(d *schema.ResourceData, cidr *gtm.CIDRMap, m interface{}) { meta := meta.Must(m) - logger := meta.Log("Akamai GTM", "populateTerraformCidrDefaultDCState") + logger := meta.Log("Akamai GTM", "populateTerraformCIDRDefaultDCState") ddcListNew := make([]interface{}, 1) ddcNew := map[string]interface{}{ - "datacenter_id": cidr.DefaultDatacenter.DatacenterId, + "datacenter_id": cidr.DefaultDatacenter.DatacenterID, "nickname": cidr.DefaultDatacenter.Nickname, } ddcListNew[0] = ddcNew diff --git a/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go b/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go index f3884229b..45a8ad359 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go @@ -11,13 +11,13 @@ import ( "github.com/stretchr/testify/mock" ) -func TestResGtmCidrmap(t *testing.T) { +func TestResGTMCIDRMap(t *testing.T) { dc := gtm.Datacenter{} - t.Run("create cidrmap", func(t *testing.T) { + t.Run("create CIDRMap", func(t *testing.T) { client := >m.Mock{} - getCall := client.On("GetCidrMap", + getCall := client.On("GetCIDRMap", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("string"), mock.AnythingOfType("string"), @@ -25,18 +25,18 @@ func TestResGtmCidrmap(t *testing.T) { StatusCode: http.StatusNotFound, }) - resp := gtm.CidrMapResponse{} + resp := gtm.CIDRMapResponse{} resp.Resource = &cidr resp.Status = &pendingResponseStatus - client.On("CreateCidrMap", + client.On("CreateCIDRMap", mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("*gtm.CidrMap"), + mock.AnythingOfType("*gtm.CIDRMap"), mock.AnythingOfType("string"), ).Return(&resp, nil).Run(func(args mock.Arguments) { getCall.ReturnArguments = mock.Arguments{resp.Resource, nil} }) - client.On("NewCidrMap", + client.On("NewCIDRMap", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("string"), ).Return(&cidr, nil) @@ -52,15 +52,15 @@ func TestResGtmCidrmap(t *testing.T) { mock.AnythingOfType("string"), ).Return(&completeResponseStatus, nil) - client.On("UpdateCidrMap", + client.On("UpdateCIDRMap", mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("*gtm.CidrMap"), + mock.AnythingOfType("*gtm.CIDRMap"), mock.AnythingOfType("string"), ).Return(&completeResponseStatus, nil) - client.On("DeleteCidrMap", + client.On("DeleteCIDRMap", mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("*gtm.CidrMap"), + mock.AnythingOfType("*gtm.CIDRMap"), mock.AnythingOfType("string"), ).Return(&completeResponseStatus, nil) @@ -92,15 +92,15 @@ func TestResGtmCidrmap(t *testing.T) { t.Run("create cidrmap failed", func(t *testing.T) { client := >m.Mock{} - client.On("CreateCidrMap", + client.On("CreateCIDRMap", mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("*gtm.CidrMap"), + mock.AnythingOfType("*gtm.CIDRMap"), gtmTestDomain, ).Return(nil, >m.Error{ StatusCode: http.StatusBadRequest, }) - client.On("NewCidrMap", + client.On("NewCIDRMap", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("string"), ).Return(&cidr, nil) @@ -129,16 +129,16 @@ func TestResGtmCidrmap(t *testing.T) { t.Run("create cidrmap denied", func(t *testing.T) { client := >m.Mock{} - dr := gtm.CidrMapResponse{} + dr := gtm.CIDRMapResponse{} dr.Resource = &cidr dr.Status = &deniedResponseStatus - client.On("CreateCidrMap", + client.On("CreateCIDRMap", mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("*gtm.CidrMap"), + mock.AnythingOfType("*gtm.CIDRMap"), gtmTestDomain, ).Return(&dr, nil) - client.On("NewCidrMap", + client.On("NewCIDRMap", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("string"), ).Return(&cidr, nil) @@ -165,7 +165,7 @@ func TestResGtmCidrmap(t *testing.T) { }) } -func TestGTMCidrMapOrder(t *testing.T) { +func TestGTMCIDRMapOrder(t *testing.T) { tests := map[string]struct { client *gtm.Mock pathForCreate string @@ -174,63 +174,63 @@ func TestGTMCidrMapOrder(t *testing.T) { planOnly bool }{ "reordered blocks - no diff": { - client: getCidrMapMocks(), + client: getCIDRMapMocks(), pathForCreate: "testdata/TestResGtmCidrmap/order/create.tf", pathForUpdate: "testdata/TestResGtmCidrmap/order/blocks/reorder.tf", nonEmptyPlan: false, planOnly: true, }, "reordered assignments - no diff": { - client: getCidrMapMocks(), + client: getCIDRMapMocks(), pathForCreate: "testdata/TestResGtmCidrmap/order/create.tf", pathForUpdate: "testdata/TestResGtmCidrmap/order/assignments/reorder.tf", nonEmptyPlan: false, planOnly: true, }, "reordered assignments and blocks - no diff": { - client: getCidrMapMocks(), + client: getCIDRMapMocks(), pathForCreate: "testdata/TestResGtmCidrmap/order/create.tf", pathForUpdate: "testdata/TestResGtmCidrmap/order/reorder_assignments_and_blocks.tf", nonEmptyPlan: false, planOnly: true, }, "change to `name` attribute with different order of assignments and blocks - diff only for `name`": { - client: getCidrMapMocks(), + client: getCIDRMapMocks(), pathForCreate: "testdata/TestResGtmCidrmap/order/create.tf", pathForUpdate: "testdata/TestResGtmCidrmap/order/update_name.tf", nonEmptyPlan: true, // change to false to see diff planOnly: true, }, "change to `domain` attribute with different order of assignments and blocks - diff only for `domain`": { - client: getCidrMapMocks(), + client: getCIDRMapMocks(), pathForCreate: "testdata/TestResGtmCidrmap/order/create.tf", pathForUpdate: "testdata/TestResGtmCidrmap/order/update_domain.tf", nonEmptyPlan: true, // change to false to see diff planOnly: true, }, "change to `wait_on_complete` attribute with different order of assignments and blocks - diff only for `wait_on_complete`": { - client: getCidrMapMocks(), + client: getCIDRMapMocks(), pathForCreate: "testdata/TestResGtmCidrmap/order/create.tf", pathForUpdate: "testdata/TestResGtmCidrmap/order/update_wait_on_complete.tf", nonEmptyPlan: true, // change to false to see diff planOnly: true, }, "reordered and updated blocks - diff only for updated block": { - client: getCidrMapMocks(), + client: getCIDRMapMocks(), pathForCreate: "testdata/TestResGtmCidrmap/order/create.tf", pathForUpdate: "testdata/TestResGtmCidrmap/order/blocks/reorder_and_update.tf", nonEmptyPlan: true, // change to false to see diff planOnly: true, }, "reordered assignments and updated block - messy diff": { - client: getCidrMapMocks(), + client: getCIDRMapMocks(), pathForCreate: "testdata/TestResGtmCidrmap/order/create.tf", pathForUpdate: "testdata/TestResGtmCidrmap/order/assignments/reorder_and_update_block.tf", nonEmptyPlan: true, // change to false to see diff planOnly: true, }, "reordered assignments and updated nickname - messy diff": { - client: getCidrMapMocks(), + client: getCIDRMapMocks(), pathForCreate: "testdata/TestResGtmCidrmap/order/create.tf", pathForUpdate: "testdata/TestResGtmCidrmap/order/assignments/reorder_and_update_nickname.tf", nonEmptyPlan: true, // change to false to see diff @@ -261,11 +261,11 @@ func TestGTMCidrMapOrder(t *testing.T) { } } -// getCidrMapMocks mocks creation and deletion of a resource -func getCidrMapMocks() *gtm.Mock { +// getCIDRMapMocks mocks creation and deletion of a resource +func getCIDRMapMocks() *gtm.Mock { client := >m.Mock{} - mockGetCIDRMap := client.On("GetCidrMap", + mockGetCIDRMap := client.On("GetCIDRMap", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("string"), mock.AnythingOfType("string"), @@ -273,18 +273,18 @@ func getCidrMapMocks() *gtm.Mock { StatusCode: http.StatusNotFound, }) - resp := gtm.CidrMapResponse{} + resp := gtm.CIDRMapResponse{} resp.Resource = &cidrMapDiffOrder resp.Status = &pendingResponseStatus - client.On("CreateCidrMap", + client.On("CreateCIDRMap", mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("*gtm.CidrMap"), + mock.AnythingOfType("*gtm.CIDRMap"), mock.AnythingOfType("string"), ).Return(&resp, nil).Run(func(args mock.Arguments) { mockGetCIDRMap.ReturnArguments = mock.Arguments{resp.Resource, nil} }) - client.On("NewCidrMap", + client.On("NewCIDRMap", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("string"), ).Return(&cidr, nil) @@ -300,9 +300,9 @@ func getCidrMapMocks() *gtm.Mock { mock.AnythingOfType("string"), ).Return(&completeResponseStatus, nil) - client.On("DeleteCidrMap", + client.On("DeleteCIDRMap", mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("*gtm.CidrMap"), + mock.AnythingOfType("*gtm.CIDRMap"), mock.AnythingOfType("string"), ).Return(&completeResponseStatus, nil) @@ -311,30 +311,30 @@ func getCidrMapMocks() *gtm.Mock { var ( // cidrMapDiffOrder is a gtm.CidrMap structure used in tests of order of assignments and block in gtm_cidrmap resource - cidrMapDiffOrder = gtm.CidrMap{ + cidrMapDiffOrder = gtm.CIDRMap{ Name: "tfexample_cidrmap_1", DefaultDatacenter: >m.DatacenterBase{ - DatacenterId: 5400, + DatacenterID: 5400, Nickname: "default datacenter", }, - Assignments: []*gtm.CidrAssignment{ + Assignments: []*gtm.CIDRAssignment{ { DatacenterBase: gtm.DatacenterBase{ - DatacenterId: 3131, + DatacenterID: 3131, Nickname: "tfexample_dc_1", }, Blocks: []string{"1.2.3.4/24", "1.2.3.5/24"}, }, { DatacenterBase: gtm.DatacenterBase{ - DatacenterId: 3132, + DatacenterID: 3132, Nickname: "tfexample_dc_2", }, Blocks: []string{"1.2.3.6/24", "1.2.3.7/24", "1.2.3.8/24"}, }, { DatacenterBase: gtm.DatacenterBase{ - DatacenterId: 3133, + DatacenterID: 3133, Nickname: "tfexample_dc_3", }, Blocks: []string{"1.2.3.9/24", "1.2.3.10/24"}, @@ -342,16 +342,16 @@ var ( }, } - cidr = gtm.CidrMap{ + cidr = gtm.CIDRMap{ Name: "tfexample_cidrmap_1", DefaultDatacenter: >m.DatacenterBase{ - DatacenterId: 5400, + DatacenterID: 5400, Nickname: "default datacenter", }, - Assignments: []*gtm.CidrAssignment{ + Assignments: []*gtm.CIDRAssignment{ { DatacenterBase: gtm.DatacenterBase{ - DatacenterId: 3131, + DatacenterID: 3131, Nickname: "tfexample_dc_1", }, Blocks: []string{"1.2.3.9/24"}, diff --git a/pkg/providers/gtm/resource_akamai_gtm_datacenter.go b/pkg/providers/gtm/resource_akamai_gtm_datacenter.go index c9c2a04c7..91818f449 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_datacenter.go +++ b/pkg/providers/gtm/resource_akamai_gtm_datacenter.go @@ -229,7 +229,7 @@ func resourceGTMv1DatacenterCreate(ctx context.Context, d *schema.ResourceData, } // Give terraform the ID. Format domain::dcid - datacenterID := fmt.Sprintf("%s:%d", domain, cStatus.Resource.DatacenterId) + datacenterID := fmt.Sprintf("%s:%d", domain, cStatus.Resource.DatacenterID) logger.Debugf("Generated DC resource ID: %s", datacenterID) d.SetId(datacenterID) return resourceGTMv1DatacenterRead(ctx, d, m) @@ -598,7 +598,7 @@ func populateDatacenterObject(d *schema.ResourceData, dc *gtm.Datacenter, m inte } vint, err = tf.GetIntValue("datacenter_id", d) if err == nil { - dc.DatacenterId = vint + dc.DatacenterID = vint } vint, err = tf.GetIntValue("score_penalty", d) if err == nil { @@ -651,7 +651,7 @@ func populateTerraformDCState(d *schema.ResourceData, dc *gtm.Datacenter, m inte // walk through all state elements for stateKey, stateValue := range map[string]interface{}{ "nickname": dc.Nickname, - "datacenter_id": dc.DatacenterId, + "datacenter_id": dc.DatacenterID, "city": dc.City, "clone_of": dc.CloneOf, "cloud_server_host_header_override": dc.CloudServerHostHeaderOverride, diff --git a/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go b/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go index a682575c5..7c13a2e20 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go @@ -16,7 +16,7 @@ var dc = gtm.Datacenter{ CloudServerTargeting: false, Continent: "EU", Country: "IS", - DatacenterId: 3132, + DatacenterID: 3132, DefaultLoadObject: >m.LoadObject{ LoadObject: "/test", LoadObjectPort: 80, @@ -35,7 +35,7 @@ var dc = gtm.Datacenter{ Virtual: true, } -func TestResGtmDatacenter(t *testing.T) { +func TestResGTMDatacenter(t *testing.T) { t.Run("create datacenter", func(t *testing.T) { client := >m.Mock{} diff --git a/pkg/providers/gtm/resource_akamai_gtm_domain.go b/pkg/providers/gtm/resource_akamai_gtm_domain.go index 5ae935a09..2f1b1e74b 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_domain.go +++ b/pkg/providers/gtm/resource_akamai_gtm_domain.go @@ -639,7 +639,7 @@ func populateDomainObject(d *schema.ResourceData, dom *gtm.Domain, m interface{} } vstr, err = tf.GetStringValue("default_ssl_client_private_key", d) if err == nil || d.HasChange("default_ssl_client_private_key") { - dom.DefaultSslClientPrivateKey = vstr + dom.DefaultSSLClientPrivateKey = vstr } if err != nil && !errors.Is(err, tf.ErrNotFound) { logger.Errorf("populateResourceObject() default_ssl_client_private_key failed: %v", err.Error()) @@ -660,7 +660,7 @@ func populateDomainObject(d *schema.ResourceData, dom *gtm.Domain, m interface{} dom.MaxTestTimeout = vfloat } if cnameCoalescingEnabled, err := tf.GetBoolValue("cname_coalescing_enabled", d); err == nil { - dom.CnameCoalescingEnabled = cnameCoalescingEnabled + dom.CNameCoalescingEnabled = cnameCoalescingEnabled } vfloat, err = tf.GetFloat64Value("default_health_multiplier", d) if err == nil { @@ -704,7 +704,7 @@ func populateDomainObject(d *schema.ResourceData, dom *gtm.Domain, m interface{} } vstr, err = tf.GetStringValue("default_ssl_client_certificate", d) if err == nil || d.HasChange("default_ssl_client_certificate") { - dom.DefaultSslClientCertificate = vstr + dom.DefaultSSLClientCertificate = vstr } if err != nil && !errors.Is(err, tf.ErrNotFound) { logger.Errorf("populateResourceObject() default_ssl_client_certificate failed: %v", err.Error()) @@ -741,10 +741,10 @@ func populateTerraformState(d *schema.ResourceData, dom *gtm.Domain, m interface "map_update_interval": dom.MapUpdateInterval, "max_properties": dom.MaxProperties, "max_resources": dom.MaxResources, - "default_ssl_client_private_key": dom.DefaultSslClientPrivateKey, + "default_ssl_client_private_key": dom.DefaultSSLClientPrivateKey, "default_error_penalty": dom.DefaultErrorPenalty, "max_test_timeout": dom.MaxTestTimeout, - "cname_coalescing_enabled": dom.CnameCoalescingEnabled, + "cname_coalescing_enabled": dom.CNameCoalescingEnabled, "default_health_multiplier": dom.DefaultHealthMultiplier, "servermonitor_pool": dom.ServermonitorPool, "load_feedback": dom.LoadFeedback, @@ -754,7 +754,7 @@ func populateTerraformState(d *schema.ResourceData, dom *gtm.Domain, m interface "comment": dom.ModificationComments, "min_test_interval": dom.MinTestInterval, "ping_packet_size": dom.PingPacketSize, - "default_ssl_client_certificate": dom.DefaultSslClientCertificate, + "default_ssl_client_certificate": dom.DefaultSSLClientCertificate, "end_user_mapping_enabled": dom.EndUserMappingEnabled} { // walk through all state elements err := d.Set(stateKey, stateValue) diff --git a/pkg/providers/gtm/resource_akamai_gtm_domain_test.go b/pkg/providers/gtm/resource_akamai_gtm_domain_test.go index 2af8ee3bc..fbe380c04 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_domain_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_domain_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/mock" ) -func TestResGtmDomain(t *testing.T) { +func TestResGTMDomain(t *testing.T) { t.Run("create domain", func(t *testing.T) { client := >m.Mock{} @@ -371,7 +371,7 @@ var ( CloudServerTargeting: false, Continent: "EU", Country: "IS", - DatacenterId: 3132, + DatacenterID: 3132, DefaultLoadObject: >m.LoadObject{ LoadObject: "", LoadObjectPort: 0, @@ -423,7 +423,7 @@ var ( properties = []*gtm.Property{ { BackupCName: "", - BackupIp: "", + BackupIP: "", BalanceByDownloadScore: false, CName: "www.boo.wow", Comments: "", @@ -434,7 +434,7 @@ var ( HealthMax: 0, HealthMultiplier: 0, HealthThreshold: 0, - Ipv6: false, + IPv6: false, LastModified: "2019-04-25T14:53:12.000+00:00", Links: []*gtm.Link{ { @@ -445,14 +445,14 @@ var ( LivenessTests: []*gtm.LivenessTest{ { DisableNonstandardPortWarning: false, - HttpError3xx: true, - HttpError4xx: true, - HttpError5xx: true, + HTTPError3xx: true, + HTTPError4xx: true, + HTTPError5xx: true, Name: "health check", RequestString: "", ResponseString: "", - SslClientCertificate: "", - SslClientPrivateKey: "", + SSLClientCertificate: "", + SSLClientPrivateKey: "", TestInterval: 60, TestObject: "/status", TestObjectPassword: "", @@ -472,7 +472,7 @@ var ( StickinessBonusPercentage: 50, TrafficTargets: []*gtm.TrafficTarget{ { - DatacenterId: 3131, + DatacenterID: 3131, Enabled: true, HandoutCName: "", Name: "", @@ -491,7 +491,7 @@ var ( // testStatus is gtm.ResponseStatus structure used in tests testStatus = >m.ResponseStatus{ - ChangeId: "40e36abd-bfb2-4635-9fca-62175cf17007", + ChangeID: "40e36abd-bfb2-4635-9fca-62175cf17007", Links: &[]gtm.Link{ { Href: "https://akab-ymtebc45gco3ypzj-apz4yxpek55y7fyv.luna.akamaiapis.net/config-gtm/v1/domains/gtmdomtest.akadns.net/status/current", @@ -508,8 +508,8 @@ var ( domainWithOrderedEmails = gtm.Domain{ Datacenters: datacenters, DefaultErrorPenalty: 75, - DefaultSslClientCertificate: "", - DefaultSslClientPrivateKey: "", + DefaultSSLClientCertificate: "", + DefaultSSLClientPrivateKey: "", DefaultTimeoutPenalty: 25, EmailNotificationList: []string{"email1@nomail.com", "email2@nomail.com", "email3@nomail.com"}, LastModified: "2019-04-25T14:53:12.000+00:00", @@ -527,8 +527,8 @@ var ( testDomain = gtm.Domain{ Datacenters: datacenters, DefaultErrorPenalty: 75, - DefaultSslClientCertificate: "", - DefaultSslClientPrivateKey: "", + DefaultSSLClientCertificate: "", + DefaultSSLClientPrivateKey: "", DefaultTimeoutPenalty: 25, EmailNotificationList: make([]string, 0), LastModified: "2019-04-25T14:53:12.000+00:00", @@ -544,7 +544,7 @@ var ( } deniedResponseStatus = gtm.ResponseStatus{ - ChangeId: "40e36abd-bfb2-4635-9fca-62175cf17007", + ChangeID: "40e36abd-bfb2-4635-9fca-62175cf17007", Links: &[]gtm.Link{ { Href: "https://akab-ymtebc45gco3ypzj-apz4yxpek55y7fyv.luna.akamaiapis.net/config-gtm/v1/domains/gtmdomtest.akadns.net/status/current", @@ -558,7 +558,7 @@ var ( } pendingResponseStatus = gtm.ResponseStatus{ - ChangeId: "40e36abd-bfb2-4635-9fca-62175cf17007", + ChangeID: "40e36abd-bfb2-4635-9fca-62175cf17007", Links: &[]gtm.Link{ { Href: "https://akab-ymtebc45gco3ypzj-apz4yxpek55y7fyv.luna.akamaiapis.net/config-gtm/v1/domains/gtmdomtest.akadns.net/status/current", @@ -572,7 +572,7 @@ var ( } completeResponseStatus = gtm.ResponseStatus{ - ChangeId: "40e36abd-bfb2-4635-9fca-62175cf17007", + ChangeID: "40e36abd-bfb2-4635-9fca-62175cf17007", Links: &[]gtm.Link{ { Href: "https://akab-ymtebc45gco3ypzj-apz4yxpek55y7fyv.luna.akamaiapis.net/config-gtm/v1/domains/gtmdomtest.akadns.net/status/current", diff --git a/pkg/providers/gtm/resource_akamai_gtm_geomap.go b/pkg/providers/gtm/resource_akamai_gtm_geomap.go index 229656b4f..dcde18be4 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_geomap.go +++ b/pkg/providers/gtm/resource_akamai_gtm_geomap.go @@ -14,14 +14,14 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func resourceGTMv1Geomap() *schema.Resource { +func resourceGTMv1GeoMap() *schema.Resource { return &schema.Resource{ - CreateContext: resourceGTMv1GeomapCreate, - ReadContext: resourceGTMv1GeomapRead, - UpdateContext: resourceGTMv1GeomapUpdate, - DeleteContext: resourceGTMv1GeomapDelete, + CreateContext: resourceGTMv1GeoMapCreate, + ReadContext: resourceGTMv1GeoMapRead, + UpdateContext: resourceGTMv1GeoMapUpdate, + DeleteContext: resourceGTMv1GeoMapDelete, Importer: &schema.ResourceImporter{ - State: resourceGTMv1GeomapImport, + State: resourceGTMv1GeoMapImport, }, Schema: map[string]*schema.Schema{ "domain": { @@ -81,10 +81,9 @@ func resourceGTMv1Geomap() *schema.Resource { } } -// Create a new GTM GeoMap -func resourceGTMv1GeomapCreate(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { +func resourceGTMv1GeoMapCreate(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { meta := meta.Must(m) - logger := meta.Log("Akamai GTM", "resourceGTMv1GeomapCreate") + logger := meta.Log("Akamai GTM", "resourceGTMv1GeoMapCreate") // create a context with logging for api calls ctx = session.ContextWithOptions( ctx, @@ -165,14 +164,12 @@ func resourceGTMv1GeomapCreate(ctx context.Context, d *schema.ResourceData, m in geoMapID := fmt.Sprintf("%s:%s", domain, cStatus.Resource.Name) logger.Debugf("Generated geoMap resource ID: %s", geoMapID) d.SetId(geoMapID) - return resourceGTMv1GeomapRead(ctx, d, m) - + return resourceGTMv1GeoMapRead(ctx, d, m) } -// read geoMap. updates state with entire API result configuration. -func resourceGTMv1GeomapRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { +func resourceGTMv1GeoMapRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { meta := meta.Must(m) - logger := meta.Log("Akamai GTM", "resourceGTMv1GeomapRead") + logger := meta.Log("Akamai GTM", "resourceGTMv1GeoMapRead") // create a context with logging for api calls ctx = session.ContextWithOptions( ctx, @@ -201,10 +198,9 @@ func resourceGTMv1GeomapRead(ctx context.Context, d *schema.ResourceData, m inte return nil } -// Update GTM GeoMap -func resourceGTMv1GeomapUpdate(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { +func resourceGTMv1GeoMapUpdate(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { meta := meta.Must(m) - logger := meta.Log("Akamai GTM", "resourceGTMv1GeomapUpdate") + logger := meta.Log("Akamai GTM", "resourceGTMv1GeoMapUpdate") // create a context with logging for api calls ctx = session.ContextWithOptions( ctx, @@ -274,13 +270,12 @@ func resourceGTMv1GeomapUpdate(ctx context.Context, d *schema.ResourceData, m in } - return resourceGTMv1GeomapRead(ctx, d, m) + return resourceGTMv1GeoMapRead(ctx, d, m) } -// Import GTM GeoMap. -func resourceGTMv1GeomapImport(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { +func resourceGTMv1GeoMapImport(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { meta := meta.Must(m) - logger := meta.Log("Akamai GTM", "resourceGTMv1GeomapImport") + logger := meta.Log("Akamai GTM", "resourceGTMv1GeoMapImport") // create a context with logging for api calls ctx := context.Background() ctx = session.ContextWithOptions( @@ -312,10 +307,9 @@ func resourceGTMv1GeomapImport(d *schema.ResourceData, m interface{}) ([]*schema return []*schema.ResourceData{d}, nil } -// Delete GTM GeoMap. -func resourceGTMv1GeomapDelete(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { +func resourceGTMv1GeoMapDelete(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { meta := meta.Must(m) - logger := meta.Log("Akamai GTM", "resourceGTMv1GeomapDelete") + logger := meta.Log("Akamai GTM", "resourceGTMv1GeoMapDelete") // create a context with logging for api calls ctx = session.ContextWithOptions( ctx, @@ -381,7 +375,6 @@ func resourceGTMv1GeomapDelete(ctx context.Context, d *schema.ResourceData, m in } } - // if successful .... d.SetId("") return nil } @@ -401,7 +394,6 @@ func populateNewGeoMapObject(ctx context.Context, meta meta.Meta, d *schema.Reso // Populate existing geoMap object from geoMap data func populateGeoMapObject(d *schema.ResourceData, geo *gtm.GeoMap, m interface{}) { - if v, err := tf.GetStringValue("name", d); err == nil { geo.Name = v } @@ -438,7 +430,7 @@ func populateGeoAssignmentsObject(d *schema.ResourceData, geo *gtm.GeoMap, m int continue } geoAssignment := gtm.GeoAssignment{} - geoAssignment.DatacenterId = geoMap["datacenter_id"].(int) + geoAssignment.DatacenterID = geoMap["datacenter_id"].(int) geoAssignment.Nickname = geoMap["nickname"].(string) if geoMap["countries"] != nil { countries, ok := geoMap["countries"].(*schema.Set) @@ -465,7 +457,7 @@ func populateTerraformGeoAssignmentsState(d *schema.ResourceData, geo *gtm.GeoMa objectInventory := make(map[int]*gtm.GeoAssignment, len(geo.Assignments)) if len(geo.Assignments) > 0 { for _, aObj := range geo.Assignments { - objectInventory[aObj.DatacenterId] = aObj + objectInventory[aObj.DatacenterID] = aObj } } aStateList, _ := tf.GetInterfaceArrayValue("assignment", d) @@ -477,7 +469,7 @@ func populateTerraformGeoAssignmentsState(d *schema.ResourceData, geo *gtm.GeoMa logger.Warnf("Geo Assignment %d NOT FOUND in returned GTM Object", a["datacenter_id"]) continue } - a["datacenter_id"] = aObject.DatacenterId + a["datacenter_id"] = aObject.DatacenterID a["nickname"] = aObject.Nickname countries, ok := a["countries"].(*schema.Set) if !ok { @@ -492,7 +484,7 @@ func populateTerraformGeoAssignmentsState(d *schema.ResourceData, geo *gtm.GeoMa // Objects not in the state yet. Add. Unfortunately, they not align with instance indices in the config for _, maObj := range objectInventory { aNew := map[string]interface{}{ - "datacenter_id": maObj.DatacenterId, + "datacenter_id": maObj.DatacenterID, "nickname": maObj.Nickname, "countries": maObj.Countries, } @@ -515,12 +507,12 @@ func populateGeoDefaultDCObject(d *schema.ResourceData, geo *gtm.GeoMap, m inter geoDefaultDCObj := gtm.DatacenterBase{} // create new object geoMap := geoDefaultDCList[0].(map[string]interface{}) if geoMap["datacenter_id"] != nil && geoMap["datacenter_id"].(int) != 0 { - geoDefaultDCObj.DatacenterId = geoMap["datacenter_id"].(int) + geoDefaultDCObj.DatacenterID = geoMap["datacenter_id"].(int) geoDefaultDCObj.Nickname = geoMap["nickname"].(string) } else { logger.Infof("No Default Datacenter specified") var nilInt int - geoDefaultDCObj.DatacenterId = nilInt + geoDefaultDCObj.DatacenterID = nilInt geoDefaultDCObj.Nickname = "" } geo.DefaultDatacenter = &geoDefaultDCObj @@ -534,7 +526,7 @@ func populateTerraformGeoDefaultDCState(d *schema.ResourceData, geo *gtm.GeoMap, ddcListNew := make([]interface{}, 1) ddcNew := map[string]interface{}{ - "datacenter_id": geo.DefaultDatacenter.DatacenterId, + "datacenter_id": geo.DefaultDatacenter.DatacenterID, "nickname": geo.DefaultDatacenter.Nickname, } ddcListNew[0] = ddcNew diff --git a/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go b/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go index f04c14521..c398dc08d 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go @@ -11,9 +11,9 @@ import ( "github.com/stretchr/testify/mock" ) -func TestResGtmGeomap(t *testing.T) { +func TestResGTMGeoMap(t *testing.T) { dc := gtm.Datacenter{ - DatacenterId: geo.DefaultDatacenter.DatacenterId, + DatacenterID: geo.DefaultDatacenter.DatacenterID, Nickname: geo.DefaultDatacenter.Nickname, } @@ -312,27 +312,27 @@ var ( geoDiffOrder = gtm.GeoMap{ Name: "tfexample_geomap_1", DefaultDatacenter: >m.DatacenterBase{ - DatacenterId: 5400, + DatacenterID: 5400, Nickname: "default datacenter", }, Assignments: []*gtm.GeoAssignment{ { DatacenterBase: gtm.DatacenterBase{ - DatacenterId: 3131, + DatacenterID: 3131, Nickname: "tfexample_dc_1", }, Countries: []string{"GB", "PL", "US", "FR"}, }, { DatacenterBase: gtm.DatacenterBase{ - DatacenterId: 3132, + DatacenterID: 3132, Nickname: "tfexample_dc_2", }, Countries: []string{"GB", "AU"}, }, { DatacenterBase: gtm.DatacenterBase{ - DatacenterId: 3133, + DatacenterID: 3133, Nickname: "tfexample_dc_3", }, Countries: []string{"GB", "BG", "CN", "MC", "TR"}, @@ -343,13 +343,13 @@ var ( geo = gtm.GeoMap{ Name: "tfexample_geomap_1", DefaultDatacenter: >m.DatacenterBase{ - DatacenterId: 5400, + DatacenterID: 5400, Nickname: "default datacenter", }, Assignments: []*gtm.GeoAssignment{ { DatacenterBase: gtm.DatacenterBase{ - DatacenterId: 3131, + DatacenterID: 3131, Nickname: "tfexample_dc_1", }, Countries: []string{"GB"}, diff --git a/pkg/providers/gtm/resource_akamai_gtm_property.go b/pkg/providers/gtm/resource_akamai_gtm_property.go index 1ea6d4f3d..3bd690f79 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_property.go +++ b/pkg/providers/gtm/resource_akamai_gtm_property.go @@ -726,7 +726,7 @@ func populatePropertyObject(ctx context.Context, d *schema.ResourceData, prop *g } if ipv6, err := tf.GetBoolValue("ipv6", d); err == nil { - prop.Ipv6 = ipv6 + prop.IPv6 = ipv6 } if uct, err := tf.GetBoolValue("use_computed_targets", d); err == nil { prop.UseComputedTargets = uct @@ -734,7 +734,7 @@ func populatePropertyObject(ctx context.Context, d *schema.ResourceData, prop *g vstr, err = tf.GetStringValue("backup_ip", d) if err == nil || d.HasChange("backup_ip") { - prop.BackupIp = vstr + prop.BackupIP = vstr } if err != nil && !errors.Is(err, tf.ErrNotFound) { logger.Errorf("populateResourceObject() backup_ip failed: %v", err.Error()) @@ -909,13 +909,13 @@ func populateTerraformPropertyState(d *schema.ResourceData, prop *gtm.Property, for stateKey, stateValue := range map[string]interface{}{ "name": prop.Name, "type": prop.Type, - "ipv6": prop.Ipv6, + "ipv6": prop.IPv6, "score_aggregation_type": prop.ScoreAggregationType, "stickiness_bonus_percentage": prop.StickinessBonusPercentage, "stickiness_bonus_constant": prop.StickinessBonusConstant, "health_threshold": prop.HealthThreshold, "use_computed_targets": prop.UseComputedTargets, - "backup_ip": prop.BackupIp, + "backup_ip": prop.BackupIP, "balance_by_download_score": prop.BalanceByDownloadScore, "unreachable_threshold": prop.UnreachableThreshold, "min_live_fraction": prop.MinLiveFraction, @@ -968,7 +968,7 @@ func populateTrafficTargetObject(ctx context.Context, d *schema.ResourceData, pr for i, v := range traffTargList { ttMap := v.(map[string]interface{}) trafficTarget := Client(meta).NewTrafficTarget(ctx) // create new object - trafficTarget.DatacenterId = ttMap["datacenter_id"].(int) + trafficTarget.DatacenterID = ttMap["datacenter_id"].(int) trafficTarget.Enabled = ttMap["enabled"].(bool) trafficTarget.Weight = ttMap["weight"].(float64) if ttMap["servers"] != nil { @@ -995,7 +995,7 @@ func populateTerraformTrafficTargetState(d *schema.ResourceData, prop *gtm.Prope objectInventory := make(map[int]*gtm.TrafficTarget, len(prop.TrafficTargets)) if len(prop.TrafficTargets) > 0 { for _, aObj := range prop.TrafficTargets { - objectInventory[aObj.DatacenterId] = aObj + objectInventory[aObj.DatacenterID] = aObj } } ttStateList, _ := tf.GetInterfaceArrayValue("traffic_target", d) @@ -1007,7 +1007,7 @@ func populateTerraformTrafficTargetState(d *schema.ResourceData, prop *gtm.Prope logger.Warnf("Property TrafficTarget %d NOT FOUND in returned GTM Object", tt["datacenter_id"]) continue } - tt["datacenter_id"] = ttObject.DatacenterId + tt["datacenter_id"] = ttObject.DatacenterID tt["enabled"] = ttObject.Enabled tt["weight"] = ttObject.Weight tt["handout_cname"] = ttObject.HandoutCName @@ -1018,9 +1018,9 @@ func populateTerraformTrafficTargetState(d *schema.ResourceData, prop *gtm.Prope if len(objectInventory) > 0 { // Objects not in the state yet. Add. Unfortunately, they not align with instance indices in the config for _, mttObj := range objectInventory { - logger.Debugf("Property TrafficObject NEW State Object: %d", mttObj.DatacenterId) + logger.Debugf("Property TrafficObject NEW State Object: %d", mttObj.DatacenterID) ttNew := map[string]interface{}{ - "datacenter_id": mttObj.DatacenterId, + "datacenter_id": mttObj.DatacenterID, "enabled": mttObj.Enabled, "weight": mttObj.Weight, "handout_cname": mttObj.HandoutCName, @@ -1117,14 +1117,14 @@ func populateLivenessTestObject(ctx context.Context, meta meta.Meta, d *schema.R lt.TestObject = v["test_object"].(string) lt.RequestString = v["request_string"].(string) lt.ResponseString = v["response_string"].(string) - lt.HttpError3xx = v["http_error3xx"].(bool) - lt.HttpError4xx = v["http_error4xx"].(bool) - lt.HttpError5xx = v["http_error5xx"].(bool) + lt.HTTPError3xx = v["http_error3xx"].(bool) + lt.HTTPError4xx = v["http_error4xx"].(bool) + lt.HTTPError5xx = v["http_error5xx"].(bool) lt.Disabled = v["disabled"].(bool) lt.TestObjectPassword = v["test_object_password"].(string) lt.TestObjectPort = v["test_object_port"].(int) - lt.SslClientPrivateKey = v["ssl_client_private_key"].(string) - lt.SslClientCertificate = v["ssl_client_certificate"].(string) + lt.SSLClientPrivateKey = v["ssl_client_private_key"].(string) + lt.SSLClientCertificate = v["ssl_client_certificate"].(string) lt.DisableNonstandardPortWarning = v["disable_nonstandard_port_warning"].(bool) lt.TestObjectUsername = v["test_object_username"].(string) lt.TimeoutPenalty = v["timeout_penalty"].(float64) @@ -1133,15 +1133,15 @@ func populateLivenessTestObject(ctx context.Context, meta meta.Meta, d *schema.R lt.RecursionRequested = v["recursion_requested"].(bool) httpHeaderList := v["http_header"].([]interface{}) if httpHeaderList != nil { - headerObjList := make([]*gtm.HttpHeader, len(httpHeaderList)) // create new object list + headerObjList := make([]*gtm.HTTPHeader, len(httpHeaderList)) // create new object list for i, h := range httpHeaderList { recMap := h.(map[string]interface{}) - record := lt.NewHttpHeader() // create new object + record := lt.NewHTTPHeader() // create new object record.Name = recMap["name"].(string) record.Value = recMap["value"].(string) headerObjList[i] = record } - lt.HttpHeaders = headerObjList + lt.HTTPHeaders = headerObjList } liveTestObjList[i] = lt } @@ -1176,15 +1176,15 @@ func populateTerraformLivenessTestState(d *schema.ResourceData, prop *gtm.Proper lt["test_object"] = ltObject.TestObject lt["request_string"] = ltObject.RequestString lt["response_string"] = ltObject.ResponseString - lt["http_error3xx"] = ltObject.HttpError3xx - lt["http_error4xx"] = ltObject.HttpError4xx - lt["http_error5xx"] = ltObject.HttpError5xx + lt["http_error3xx"] = ltObject.HTTPError3xx + lt["http_error4xx"] = ltObject.HTTPError4xx + lt["http_error5xx"] = ltObject.HTTPError5xx lt["disabled"] = ltObject.Disabled lt["test_object_protocol"] = ltObject.TestObjectProtocol lt["test_object_password"] = ltObject.TestObjectPassword lt["test_object_port"] = ltObject.TestObjectPort - lt["ssl_client_private_key"] = ltObject.SslClientPrivateKey - lt["ssl_client_certificate"] = ltObject.SslClientCertificate + lt["ssl_client_private_key"] = ltObject.SSLClientPrivateKey + lt["ssl_client_certificate"] = ltObject.SSLClientCertificate lt["disable_nonstandard_port_warning"] = ltObject.DisableNonstandardPortWarning lt["test_object_username"] = ltObject.TestObjectUsername lt["test_timeout"] = ltObject.TestTimeout @@ -1192,8 +1192,8 @@ func populateTerraformLivenessTestState(d *schema.ResourceData, prop *gtm.Proper lt["answers_required"] = ltObject.AnswersRequired lt["resource_type"] = ltObject.ResourceType lt["recursion_requested"] = ltObject.RecursionRequested - httpHeaderListNew := make([]interface{}, len(ltObject.HttpHeaders)) - for i, r := range ltObject.HttpHeaders { + httpHeaderListNew := make([]interface{}, len(ltObject.HTTPHeaders)) + for i, r := range ltObject.HTTPHeaders { httpHeaderNew := map[string]interface{}{ "name": r.Name, "value": r.Value, @@ -1216,15 +1216,15 @@ func populateTerraformLivenessTestState(d *schema.ResourceData, prop *gtm.Proper "test_object": l.TestObject, "request_string": l.RequestString, "response_string": l.ResponseString, - "http_error3xx": l.HttpError3xx, - "http_error4xx": l.HttpError4xx, - "http_error5xx": l.HttpError5xx, + "http_error3xx": l.HTTPError3xx, + "http_error4xx": l.HTTPError4xx, + "http_error5xx": l.HTTPError5xx, "disabled": l.Disabled, "test_object_protocol": l.TestObjectProtocol, "test_object_password": l.TestObjectPassword, "test_object_port": l.TestObjectPort, - "ssl_client_private_key": l.SslClientPrivateKey, - "ssl_client_certificate": l.SslClientCertificate, + "ssl_client_private_key": l.SSLClientPrivateKey, + "ssl_client_certificate": l.SSLClientCertificate, "disable_nonstandard_port_warning": l.DisableNonstandardPortWarning, "test_object_username": l.TestObjectUsername, "test_timeout": l.TestTimeout, @@ -1233,8 +1233,8 @@ func populateTerraformLivenessTestState(d *schema.ResourceData, prop *gtm.Proper "resource_type": l.ResourceType, "recursion_requested": l.RecursionRequested, } - httpHeaderListNew := make([]interface{}, len(l.HttpHeaders)) - for i, r := range l.HttpHeaders { + httpHeaderListNew := make([]interface{}, len(l.HTTPHeaders)) + for i, r := range l.HTTPHeaders { httpHeaderNew := map[string]interface{}{ "name": r.Name, "value": r.Value, diff --git a/pkg/providers/gtm/resource_akamai_gtm_property_test.go b/pkg/providers/gtm/resource_akamai_gtm_property_test.go index f33ae3df4..4467001af 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_property_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_property_test.go @@ -14,7 +14,7 @@ import ( var ( prop = gtm.Property{ BackupCName: "", - BackupIp: "", + BackupIP: "", BalanceByDownloadScore: false, CName: "www.boo.wow", Comments: "", @@ -25,7 +25,7 @@ var ( HealthMax: 0, HealthMultiplier: 0, HealthThreshold: 0, - Ipv6: false, + IPv6: false, LastModified: "2019-04-25T14:53:12.000+00:00", Links: []*gtm.Link{ { @@ -36,14 +36,14 @@ var ( LivenessTests: []*gtm.LivenessTest{ { DisableNonstandardPortWarning: false, - HttpError3xx: true, - HttpError4xx: true, - HttpError5xx: true, + HTTPError3xx: true, + HTTPError4xx: true, + HTTPError5xx: true, Name: "health check", RequestString: "", ResponseString: "", - SslClientCertificate: "", - SslClientPrivateKey: "", + SSLClientCertificate: "", + SSLClientPrivateKey: "", TestInterval: 60, TestObject: "/status", TestObjectPassword: "", @@ -63,7 +63,7 @@ var ( StickinessBonusPercentage: 50, TrafficTargets: []*gtm.TrafficTarget{ { - DatacenterId: 3131, + DatacenterID: 3131, Enabled: true, HandoutCName: "", Servers: []string{ @@ -80,7 +80,7 @@ var ( prop2 = gtm.Property{ BackupCName: "", - BackupIp: "", + BackupIP: "", BalanceByDownloadScore: false, CName: "www.boo.wow", Comments: "", @@ -91,7 +91,7 @@ var ( HealthMax: 0, HealthMultiplier: 0, HealthThreshold: 0, - Ipv6: false, + IPv6: false, LastModified: "2019-04-25T14:53:12.000+00:00", Links: []*gtm.Link{ { @@ -102,14 +102,14 @@ var ( LivenessTests: []*gtm.LivenessTest{ { DisableNonstandardPortWarning: false, - HttpError3xx: true, - HttpError4xx: true, - HttpError5xx: true, + HTTPError3xx: true, + HTTPError4xx: true, + HTTPError5xx: true, Name: "health check", RequestString: "", ResponseString: "", - SslClientCertificate: "", - SslClientPrivateKey: "", + SSLClientCertificate: "", + SSLClientPrivateKey: "", TestInterval: 60, TestObject: "/status", TestObjectPassword: "", @@ -129,7 +129,7 @@ var ( StickinessBonusPercentage: 50, TrafficTargets: []*gtm.TrafficTarget{ { - DatacenterId: 3131, + DatacenterID: 3131, Enabled: true, HandoutCName: "", Servers: []string{ @@ -147,7 +147,7 @@ var ( propertyResourceName = "akamai_gtm_property.tfexample_prop_1" ) -func TestResGtmProperty(t *testing.T) { +func TestResGTMProperty(t *testing.T) { t.Run("create property", func(t *testing.T) { client := >m.Mock{} diff --git a/pkg/providers/gtm/resource_akamai_gtm_resource.go b/pkg/providers/gtm/resource_akamai_gtm_resource.go index 2344f7299..386528248 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_resource.go +++ b/pkg/providers/gtm/resource_akamai_gtm_resource.go @@ -594,7 +594,7 @@ func populateTerraformResourceInstancesState(d *schema.ResourceData, rsrc *gtm.R riObjectInventory := make(map[int]*gtm.ResourceInstance, len(rsrc.ResourceInstances)) if len(rsrc.ResourceInstances) > 0 { for _, riObj := range rsrc.ResourceInstances { - riObjectInventory[riObj.DatacenterId] = riObj + riObjectInventory[riObj.DatacenterID] = riObj } } riStateList, _ := tf.GetInterfaceArrayValue("resource_instance", d) @@ -626,7 +626,7 @@ func populateTerraformResourceInstancesState(d *schema.ResourceData, rsrc *gtm.R // Objects not in the state yet. Add. Unfortunately, they'll likely not align with instance indices in the config for _, mriObj := range riObjectInventory { riNew := make(map[string]interface{}) - riNew["datacenter_id"] = mriObj.DatacenterId + riNew["datacenter_id"] = mriObj.DatacenterID riNew["use_default_load_object"] = mriObj.UseDefaultLoadObject riNew["load_object"] = mriObj.LoadObject.LoadObject riNew["load_object_port"] = mriObj.LoadObjectPort diff --git a/pkg/providers/gtm/resource_akamai_gtm_resource_test.go b/pkg/providers/gtm/resource_akamai_gtm_resource_test.go index c8f1a5488..7801ab052 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_resource_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_resource_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/mock" ) -func TestResGtmResource(t *testing.T) { +func TestResGTMResource(t *testing.T) { t.Run("create resource", func(t *testing.T) { client := >m.Mock{} @@ -57,7 +57,7 @@ func TestResGtmResource(t *testing.T) { resInstCall.RunFn = func(args mock.Arguments) { resInstCall.ReturnArguments = mock.Arguments{ >m.ResourceInstance{ - DatacenterId: args.Int(2), + DatacenterID: args.Int(2), }, } } @@ -141,7 +141,7 @@ func TestResGtmResource(t *testing.T) { resInstCall.RunFn = func(args mock.Arguments) { resInstCall.ReturnArguments = mock.Arguments{ >m.ResourceInstance{ - DatacenterId: args.Int(2), + DatacenterID: args.Int(2), }, } } @@ -195,7 +195,7 @@ func TestResGtmResource(t *testing.T) { resInstCall.RunFn = func(args mock.Arguments) { resInstCall.ReturnArguments = mock.Arguments{ >m.ResourceInstance{ - DatacenterId: args.Int(2), + DatacenterID: args.Int(2), }, } } @@ -336,7 +336,7 @@ func getGTMResourceMocks() *gtm.Mock { resInstCall.RunFn = func(args mock.Arguments) { resInstCall.ReturnArguments = mock.Arguments{ >m.ResourceInstance{ - DatacenterId: args.Int(2), + DatacenterID: args.Int(2), }, } } @@ -358,7 +358,7 @@ var ( Type: "XML load object via HTTP", ResourceInstances: []*gtm.ResourceInstance{ { - DatacenterId: 3131, + DatacenterID: 3131, UseDefaultLoadObject: false, LoadObject: gtm.LoadObject{ LoadObject: "/test1", @@ -367,7 +367,7 @@ var ( }, }, { - DatacenterId: 3132, + DatacenterID: 3132, UseDefaultLoadObject: false, LoadObject: gtm.LoadObject{ LoadObject: "/test2", @@ -384,7 +384,7 @@ var ( Type: "XML load object via HTTP", ResourceInstances: []*gtm.ResourceInstance{ { - DatacenterId: 3131, + DatacenterID: 3131, UseDefaultLoadObject: false, LoadObject: gtm.LoadObject{ LoadObject: "/test1", From 1d2a58e020eddd1054f169686e352fd8303842aa Mon Sep 17 00:00:00 2001 From: Dawid Dzhafarov Date: Wed, 6 Mar 2024 11:55:40 +0000 Subject: [PATCH 29/52] DXE-3594 Refactor gtm_property_test.go --- .../gtm/resource_akamai_gtm_property.go | 6 +- .../gtm/resource_akamai_gtm_property_test.go | 1082 +++++++---------- 2 files changed, 462 insertions(+), 626 deletions(-) diff --git a/pkg/providers/gtm/resource_akamai_gtm_property.go b/pkg/providers/gtm/resource_akamai_gtm_property.go index 3bd690f79..a9f79885e 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_property.go +++ b/pkg/providers/gtm/resource_akamai_gtm_property.go @@ -491,9 +491,9 @@ func resourceGTMv1PropertyCreate(ctx context.Context, d *schema.ResourceData, m } // Give terraform the ID. Format domain::property - propertyID := fmt.Sprintf("%s:%s", domain, cStatus.Resource.Name) - logger.Debugf("Generated Property resource ID: %s", propertyID) - d.SetId(propertyID) + propertyResourceID := fmt.Sprintf("%s:%s", domain, cStatus.Resource.Name) + logger.Debugf("Generated Property resource ID: %s", propertyResourceID) + d.SetId(propertyResourceID) return resourceGTMv1PropertyRead(ctx, d, m) } diff --git a/pkg/providers/gtm/resource_akamai_gtm_property_test.go b/pkg/providers/gtm/resource_akamai_gtm_property_test.go index 4467001af..5de0a8ff4 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_property_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_property_test.go @@ -12,628 +12,239 @@ import ( ) var ( - prop = gtm.Property{ - BackupCName: "", - BackupIP: "", - BalanceByDownloadScore: false, - CName: "www.boo.wow", - Comments: "", - DynamicTTL: 300, - FailbackDelay: 0, - FailoverDelay: 0, - HandoutMode: "normal", - HealthMax: 0, - HealthMultiplier: 0, - HealthThreshold: 0, - IPv6: false, - LastModified: "2019-04-25T14:53:12.000+00:00", - Links: []*gtm.Link{ - { - Href: "https://akab-ymtebc45gco3ypzj-apz4yxpek55y7fyv.luna.akamaiapis.net/config-gtm/v1/domains/gtmdomtest.akadns.net/properties/test_property", - Rel: "self", - }, - }, - LivenessTests: []*gtm.LivenessTest{ - { - DisableNonstandardPortWarning: false, - HTTPError3xx: true, - HTTPError4xx: true, - HTTPError5xx: true, - Name: "health check", - RequestString: "", - ResponseString: "", - SSLClientCertificate: "", - SSLClientPrivateKey: "", - TestInterval: 60, - TestObject: "/status", - TestObjectPassword: "", - TestObjectPort: 80, - TestObjectProtocol: "HTTP", - TestObjectUsername: "", - TestTimeout: 25.0, + propertyResourceName = "akamai_gtm_property.tfexample_prop_1" + propertyName = "tfexample_prop_1" + updatedPropertyName = "tfexample_prop_1-updated" +) + +func TestResGTMProperty(t *testing.T) { + tests := map[string]struct { + property *gtm.Property + init func(*testing.T, *gtm.Mock) + steps []resource.TestStep + }{ + "create property": { + property: getBasicProperty(), + init: func(t *testing.T, m *gtm.Mock) { + mockNewProperty(m, propertyName) + mockNewTrafficTarget(m, 1) + mockNewStaticRRSet(m) + mockNewLivenessTest(m, "lt5", "HTTP", "/junk", 40, 1, 30) + mockNewLivenessTest(m, "lt2", "HTTP", "/junk", 30, 80, 20) + mockCreateProperty(m, getBasicProperty(), gtmTestDomain) + // read + mockGetProperty(m, getBasicProperty(), propertyName, gtmTestDomain, 4) + // update + mockNewTrafficTarget(m, 1) + mockNewStaticRRSet(m) + mockNewLivenessTest(m, "lt5", "HTTP", "/junk", 50, 1, 30) + mockNewLivenessTest(m, "lt2", "HTTP", "/junk", 30, 0, 20) + mockUpdateProperty(m, getUpdatedProperty(), gtmTestDomain) + // read + mockGetDomainStatus(m, gtmTestDomain, 2) + mockGetProperty(m, getUpdatedProperty(), propertyName, gtmTestDomain, 3) + // delete + mockDeleteProperty(m, getUpdatedProperty(), gtmTestDomain) }, - }, - LoadImbalancePercentage: 10.0, - MapName: "", - MaxUnreachablePenalty: 0, - Name: "tfexample_prop_1", - ScoreAggregationType: "mean", - StaticTTL: 600, - StickinessBonusConstant: 0, - StickinessBonusPercentage: 50, - TrafficTargets: []*gtm.TrafficTarget{ - { - DatacenterID: 3131, - Enabled: true, - HandoutCName: "", - Servers: []string{ - "1.2.3.4", - "1.2.3.5", + steps: []resource.TestStep{ + { + Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/create_basic.tf"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(propertyResourceName, "name", "tfexample_prop_1"), + resource.TestCheckResourceAttr(propertyResourceName, "type", "weighted-round-robin"), + resource.TestCheckResourceAttr(propertyResourceName, "weighted_hash_bits_for_ipv4", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "weighted_hash_bits_for_ipv6", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "id", "gtm_terra_testdomain.akadns.net:tfexample_prop_1"), + ), + }, + { + Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/update_basic.tf"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(propertyResourceName, "name", "tfexample_prop_1"), + resource.TestCheckResourceAttr(propertyResourceName, "type", "weighted-round-robin"), + resource.TestCheckResourceAttr(propertyResourceName, "weighted_hash_bits_for_ipv4", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "weighted_hash_bits_for_ipv6", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "id", "gtm_terra_testdomain.akadns.net:tfexample_prop_1"), + ), }, - Weight: 50.0, }, }, - Type: "weighted-round-robin", - UnreachableThreshold: 0, - UseComputedTargets: false, - } - - prop2 = gtm.Property{ - BackupCName: "", - BackupIP: "", - BalanceByDownloadScore: false, - CName: "www.boo.wow", - Comments: "", - DynamicTTL: 300, - FailbackDelay: 0, - FailoverDelay: 0, - HandoutMode: "normal", - HealthMax: 0, - HealthMultiplier: 0, - HealthThreshold: 0, - IPv6: false, - LastModified: "2019-04-25T14:53:12.000+00:00", - Links: []*gtm.Link{ - { - Href: "https://akab-ymtebc45gco3ypzj-apz4yxpek55y7fyv.luna.akamaiapis.net/config-gtm/v1/domains/gtmdomtest.akadns.net/properties/test_property", - Rel: "self", + "create property failed": { + property: getBasicProperty(), + init: func(t *testing.T, m *gtm.Mock) { + mockNewProperty(m, propertyName) + mockNewTrafficTarget(m, 1) + mockNewStaticRRSet(m) + mockNewLivenessTest(m, "lt5", "HTTP", "/junk", 40, 1, 30) + mockNewLivenessTest(m, "lt2", "HTTP", "/junk", 30, 80, 20) + // bad request status code returned + m.On("CreateProperty", + mock.Anything, + getBasicProperty(), + gtmTestDomain, + ).Return(nil, >m.Error{ + StatusCode: http.StatusBadRequest, + }) }, - }, - LivenessTests: []*gtm.LivenessTest{ - { - DisableNonstandardPortWarning: false, - HTTPError3xx: true, - HTTPError4xx: true, - HTTPError5xx: true, - Name: "health check", - RequestString: "", - ResponseString: "", - SSLClientCertificate: "", - SSLClientPrivateKey: "", - TestInterval: 60, - TestObject: "/status", - TestObjectPassword: "", - TestObjectPort: 80, - TestObjectProtocol: "HTTP", - TestObjectUsername: "", - TestTimeout: 25.0, + steps: []resource.TestStep{ + { + Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/create_basic.tf"), + ExpectError: regexp.MustCompile("property Create failed"), + }, }, }, - LoadImbalancePercentage: 10.0, - MapName: "", - MaxUnreachablePenalty: 0, - Name: "tfexample_prop_1-updated", - ScoreAggregationType: "mean", - StaticTTL: 600, - StickinessBonusConstant: 0, - StickinessBonusPercentage: 50, - TrafficTargets: []*gtm.TrafficTarget{ - { - DatacenterID: 3131, - Enabled: true, - HandoutCName: "", - Servers: []string{ - "1.2.3.4", - "1.2.3.5", + "create propery denied": { + property: nil, + init: func(t *testing.T, m *gtm.Mock) { + // create + mockNewProperty(m, propertyName) + mockNewTrafficTarget(m, 1) + mockNewStaticRRSet(m) + mockNewLivenessTest(m, "lt5", "HTTP", "/junk", 40, 1, 30) + mockNewLivenessTest(m, "lt2", "HTTP", "/junk", 30, 80, 20) + // denied response status returned + deniedResponse := gtm.PropertyResponse{ + Resource: getBasicProperty(), + Status: &deniedResponseStatus, + } + m.On("CreateProperty", + mock.Anything, + getBasicProperty(), + gtmTestDomain, + ).Return(&deniedResponse, nil).Once() + }, + steps: []resource.TestStep{ + { + Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/create_basic.tf"), + ExpectError: regexp.MustCompile("Request could not be completed. Invalid credentials."), }, - Weight: 50.0, }, }, - Type: "weighted-round-robin", - UnreachableThreshold: 0, - UseComputedTargets: false, - } - - propertyResourceName = "akamai_gtm_property.tfexample_prop_1" -) - -func TestResGTMProperty(t *testing.T) { - - t.Run("create property", func(t *testing.T) { - client := >m.Mock{} - - getCall := client.On("GetProperty", - mock.Anything, - mock.AnythingOfType("string"), - mock.AnythingOfType("string"), - ).Return(nil, >m.Error{ - StatusCode: http.StatusNotFound, - }) - - resp := gtm.PropertyResponse{} - resp.Resource = &prop - resp.Status = &pendingResponseStatus - client.On("CreateProperty", - mock.Anything, - mock.AnythingOfType("*gtm.Property"), - mock.AnythingOfType("string"), - ).Return(&resp, nil).Run(func(args mock.Arguments) { - getCall.ReturnArguments = mock.Arguments{args.Get(1).(*gtm.Property), nil} - }) - - client.On("NewProperty", - mock.Anything, - mock.AnythingOfType("string"), - mock.AnythingOfType("string"), - ).Return(>m.Property{ - Name: "tfexample_prop_1", - }) - - client.On("GetDomainStatus", - mock.Anything, - mock.AnythingOfType("string"), - ).Return(&completeResponseStatus, nil) - - client.On("NewTrafficTarget", - mock.Anything, - ).Return(>m.TrafficTarget{}) - - client.On("NewStaticRRSet", - mock.Anything, - ).Return(>m.StaticRRSet{}) - - liveCall := client.On("NewLivenessTest", - mock.Anything, - mock.AnythingOfType("string"), - mock.AnythingOfType("string"), - mock.AnythingOfType("int"), - mock.AnythingOfType("float32"), - ) - - liveCall.RunFn = func(args mock.Arguments) { - liveCall.ReturnArguments = mock.Arguments{ - >m.LivenessTest{ - Name: args.String(1), - TestObjectProtocol: args.String(2), - TestInterval: args.Int(3), - TestTimeout: args.Get(4).(float32), - }, - } - } - - client.On("UpdateProperty", - mock.Anything, - mock.AnythingOfType("*gtm.Property"), - mock.AnythingOfType("string"), - ).Return(&completeResponseStatus, nil).Run(func(args mock.Arguments) { - getCall.ReturnArguments = mock.Arguments{args.Get(1).(*gtm.Property), nil} - }) - - client.On("DeleteProperty", - mock.Anything, - mock.AnythingOfType("*gtm.Property"), - mock.AnythingOfType("string"), - ).Return(&completeResponseStatus, nil) - - useClient(client, func() { - resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), - Steps: []resource.TestStep{ - { - Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/create_basic.tf"), - Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr(propertyResourceName, "name", "tfexample_prop_1"), - resource.TestCheckResourceAttr(propertyResourceName, "type", "weighted-round-robin"), - ), - }, - { - Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/update_basic.tf"), - Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr(propertyResourceName, "name", "tfexample_prop_1"), - resource.TestCheckResourceAttr(propertyResourceName, "type", "weighted-round-robin"), - ), - }, - }, - }) - }) - - client.AssertExpectations(t) - }) - - t.Run("create property failed", func(t *testing.T) { - client := >m.Mock{} - - client.On("CreateProperty", - mock.Anything, - mock.AnythingOfType("*gtm.Property"), - gtmTestDomain, - ).Return(nil, >m.Error{ - StatusCode: http.StatusBadRequest, - }) - - client.On("NewProperty", - mock.Anything, - mock.AnythingOfType("string"), - mock.AnythingOfType("string"), - ).Return(>m.Property{ - Name: "tfexample_prop_1", - }) - - client.On("NewTrafficTarget", - mock.Anything, - ).Return(>m.TrafficTarget{}) - - client.On("NewStaticRRSet", - mock.Anything, - ).Return(>m.StaticRRSet{}) - - liveCall := client.On("NewLivenessTest", - mock.Anything, - mock.AnythingOfType("string"), - mock.AnythingOfType("string"), - mock.AnythingOfType("int"), - mock.AnythingOfType("float32"), - ) - - liveCall.RunFn = func(args mock.Arguments) { - liveCall.ReturnArguments = mock.Arguments{ - >m.LivenessTest{ - Name: args.String(1), - TestObjectProtocol: args.String(2), - TestInterval: args.Int(3), - TestTimeout: args.Get(4).(float32), + "create property and update name - force new": { + property: getBasicProperty(), + init: func(t *testing.T, m *gtm.Mock) { + // create 1st property + mockNewProperty(m, propertyName) + mockNewTrafficTarget(m, 1) + mockNewStaticRRSet(m) + mockNewLivenessTest(m, "lt5", "HTTP", "/junk", 40, 1, 30) + mockNewLivenessTest(m, "lt2", "HTTP", "/junk", 30, 80, 20) + mockCreateProperty(m, getBasicProperty(), gtmTestDomain) + // read + mockGetProperty(m, getBasicProperty(), propertyName, gtmTestDomain, 4) + // force new -> delete 1st property and recreate 2nd with updated name + mockDeleteProperty(m, getBasicProperty(), gtmTestDomain) + propertyWithUpdatedName := getBasicProperty() + propertyWithUpdatedName.Name = updatedPropertyName + mockNewProperty(m, updatedPropertyName) + mockNewTrafficTarget(m, 1) + mockNewStaticRRSet(m) + mockNewLivenessTest(m, "lt5", "HTTP", "/junk", 40, 1, 30) + mockNewLivenessTest(m, "lt2", "HTTP", "/junk", 30, 80, 20) + mockCreateProperty(m, propertyWithUpdatedName, gtmTestDomain) + // read + mockGetProperty(m, propertyWithUpdatedName, updatedPropertyName, gtmTestDomain, 3) + // delete + mockDeleteProperty(m, propertyWithUpdatedName, gtmTestDomain) + }, + steps: []resource.TestStep{ + { + Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/create_basic.tf"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(propertyResourceName, "name", "tfexample_prop_1"), + resource.TestCheckResourceAttr(propertyResourceName, "weighted_hash_bits_for_ipv4", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "weighted_hash_bits_for_ipv6", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "id", "gtm_terra_testdomain.akadns.net:tfexample_prop_1"), + ), }, - } - } - - useClient(client, func() { - resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), - Steps: []resource.TestStep{ - { - Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/create_basic.tf"), - ExpectError: regexp.MustCompile("property Create failed"), - }, + { + Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/update_name.tf"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(propertyResourceName, "name", "tfexample_prop_1-updated"), + resource.TestCheckResourceAttr(propertyResourceName, "weighted_hash_bits_for_ipv4", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "weighted_hash_bits_for_ipv6", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "id", "gtm_terra_testdomain.akadns.net:tfexample_prop_1-updated"), + ), }, - }) - }) - - client.AssertExpectations(t) - }) - - t.Run("create property denied", func(t *testing.T) { - client := >m.Mock{} - - dr := gtm.PropertyResponse{} - dr.Resource = &prop - dr.Status = &deniedResponseStatus - client.On("CreateProperty", - mock.Anything, - mock.AnythingOfType("*gtm.Property"), - gtmTestDomain, - ).Return(&dr, nil) - - client.On("NewProperty", - mock.Anything, - mock.AnythingOfType("string"), - mock.AnythingOfType("string"), - ).Return(>m.Property{ - Name: "tfexample_prop_1", - }) - - client.On("NewTrafficTarget", - mock.Anything, - ).Return(>m.TrafficTarget{}) - - client.On("NewStaticRRSet", - mock.Anything, - ).Return(>m.StaticRRSet{}) - - liveCall := client.On("NewLivenessTest", - mock.Anything, - mock.AnythingOfType("string"), - mock.AnythingOfType("string"), - mock.AnythingOfType("int"), - mock.AnythingOfType("float32"), - ) - - liveCall.RunFn = func(args mock.Arguments) { - liveCall.ReturnArguments = mock.Arguments{ - >m.LivenessTest{ - Name: args.String(1), - TestObjectProtocol: args.String(2), - TestInterval: args.Int(3), - TestTimeout: args.Get(4).(float32), + }, + }, + "test_object_protocol different than HTTP, HTTPS or FTP": { + property: getBasicProperty(), + init: func(t *testing.T, m *gtm.Mock) { + // create property with test_object_protocol in first liveness test different from HTTP, HTTPS, FTP + mockNewProperty(m, propertyName) + mockNewTrafficTarget(m, 1) + mockNewStaticRRSet(m) + mockNewLivenessTest(m, "lt5", "SNMP", "", 40, 1, 30) + mockNewLivenessTest(m, "lt2", "HTTP", "/junk", 30, 80, 20) + // alter mocked property + propertyWithLivenessTest := getBasicProperty() + propertyWithLivenessTest.LivenessTests[0].TestObject = "" + propertyWithLivenessTest.LivenessTests[0].TestObjectProtocol = "SNMP" + mockCreateProperty(m, propertyWithLivenessTest, gtmTestDomain) + // read + mockGetProperty(m, propertyWithLivenessTest, propertyName, gtmTestDomain, 3) + // delete + mockDeleteProperty(m, propertyWithLivenessTest, gtmTestDomain) + }, + steps: []resource.TestStep{ + { + Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/test_object/test_object_not_required.tf"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(propertyResourceName, "name", "tfexample_prop_1"), + resource.TestCheckResourceAttr(propertyResourceName, "type", "weighted-round-robin"), + resource.TestCheckResourceAttr(propertyResourceName, "weighted_hash_bits_for_ipv4", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "weighted_hash_bits_for_ipv6", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "id", "gtm_terra_testdomain.akadns.net:tfexample_prop_1"), + ), }, - } - } - - useClient(client, func() { - resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), - Steps: []resource.TestStep{ - { - Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/create_basic.tf"), - ExpectError: regexp.MustCompile("Request could not be completed. Invalid credentials."), - }, + }, + }, + "create property with test_object_protocol set to 'FTP' - test_object required error": { + property: getBasicProperty(), + steps: []resource.TestStep{ + { + Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/test_object/test_object_protocol_ftp.tf"), + ExpectError: regexp.MustCompile(`Error: attribute 'test_object' is required when 'test_object_protocol' is set to 'HTTP', 'HTTPS' or 'FTP'`), }, - }) - }) - - client.AssertExpectations(t) - }) - - t.Run("create property and update name - force new", func(t *testing.T) { - client := >m.Mock{} - - getCall := client.On("GetProperty", - mock.Anything, - mock.AnythingOfType("string"), - mock.AnythingOfType("string"), - ).Return(nil, >m.Error{ - StatusCode: http.StatusNotFound, - }) - - resp := gtm.PropertyResponse{} - resp.Resource = &prop - resp.Status = &pendingResponseStatus - client.On("CreateProperty", - mock.Anything, - mock.AnythingOfType("*gtm.Property"), - mock.AnythingOfType("string"), - ).Return(&resp, nil).Run(func(args mock.Arguments) { - getCall.ReturnArguments = mock.Arguments{args.Get(1).(*gtm.Property), nil} - }).Once() - - client.On("NewProperty", - mock.Anything, - mock.AnythingOfType("string"), - mock.AnythingOfType("string"), - ).Return(>m.Property{ - Name: "tfexample_prop_1", - }).Once() - - client.On("NewTrafficTarget", - mock.Anything, - ).Return(>m.TrafficTarget{}) - - client.On("NewStaticRRSet", - mock.Anything, - ).Return(>m.StaticRRSet{}) - - liveCall := client.On("NewLivenessTest", - mock.Anything, - mock.AnythingOfType("string"), - mock.AnythingOfType("string"), - mock.AnythingOfType("int"), - mock.AnythingOfType("float32"), - ) - - liveCall.RunFn = func(args mock.Arguments) { - liveCall.ReturnArguments = mock.Arguments{ - >m.LivenessTest{ - Name: args.String(1), - TestObjectProtocol: args.String(2), - TestInterval: args.Int(3), - TestTimeout: args.Get(4).(float32), + }, + }, + "create property with test_object_protocol set to 'HTTP' - test_object required error": { + property: getBasicProperty(), + steps: []resource.TestStep{ + { + Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/test_object/test_object_protocol_http.tf"), + ExpectError: regexp.MustCompile(`Error: attribute 'test_object' is required when 'test_object_protocol' is set to 'HTTP', 'HTTPS' or 'FTP'`), }, - } - } - - client.On("DeleteProperty", - mock.Anything, - mock.AnythingOfType("*gtm.Property"), - mock.AnythingOfType("string"), - ).Return(&completeResponseStatus, nil) - - // Create new property with updated name - client.On("NewProperty", - mock.Anything, - mock.AnythingOfType("string"), - mock.AnythingOfType("string"), - ).Return(>m.Property{ - Name: "tfexample_prop_1-updated", - }).Once() - - resp2 := gtm.PropertyResponse{ - Resource: &prop2, - Status: &pendingResponseStatus, - } - - client.On("CreateProperty", - mock.Anything, - mock.AnythingOfType("*gtm.Property"), - mock.AnythingOfType("string"), - ).Return(&resp2, nil).Run(func(args mock.Arguments) { - getCall.ReturnArguments = mock.Arguments{args.Get(1).(*gtm.Property), nil} - }).Once() - - useClient(client, func() { - resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), - Steps: []resource.TestStep{ - { - Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/create_basic.tf"), - Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr(propertyResourceName, "name", "tfexample_prop_1"), - ), - }, - { - Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/update_name.tf"), - Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr(propertyResourceName, "name", "tfexample_prop_1-updated"), - ), - }, + }, + }, + "create property with test_object_protocol set to 'HTTPS' - test_object required error": { + property: getBasicProperty(), + steps: []resource.TestStep{ + { + Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/test_object/test_object_protocol_https.tf"), + ExpectError: regexp.MustCompile(`Error: attribute 'test_object' is required when 'test_object_protocol' is set to 'HTTP', 'HTTPS' or 'FTP'`), }, - }) - }) - client.AssertExpectations(t) - }) - - t.Run("test_object_protocol different than HTTP, HTTPS or FTP", func(t *testing.T) { - client := >m.Mock{} - - getCall := client.On("GetProperty", - mock.Anything, - mock.AnythingOfType("string"), - mock.AnythingOfType("string"), - ).Return(nil, >m.Error{ - StatusCode: http.StatusNotFound, - }) - - resp := gtm.PropertyResponse{} - resp.Resource = &prop - resp.Status = &pendingResponseStatus - client.On("CreateProperty", - mock.Anything, - mock.AnythingOfType("*gtm.Property"), - mock.AnythingOfType("string"), - ).Return(&resp, nil).Run(func(args mock.Arguments) { - getCall.ReturnArguments = mock.Arguments{args.Get(1).(*gtm.Property), nil} - }) - - client.On("NewProperty", - mock.Anything, - mock.AnythingOfType("string"), - mock.AnythingOfType("string"), - ).Return(>m.Property{ - Name: "tfexample_prop_1", - }) - - client.On("GetDomainStatus", - mock.Anything, - mock.AnythingOfType("string"), - ).Return(&completeResponseStatus, nil) - - client.On("NewTrafficTarget", - mock.Anything, - ).Return(>m.TrafficTarget{}) - - client.On("NewStaticRRSet", - mock.Anything, - ).Return(>m.StaticRRSet{}) - - liveCall := client.On("NewLivenessTest", - mock.Anything, - mock.AnythingOfType("string"), - mock.AnythingOfType("string"), - mock.AnythingOfType("int"), - mock.AnythingOfType("float32"), - ) + }, + }, + } - liveCall.RunFn = func(args mock.Arguments) { - liveCall.ReturnArguments = mock.Arguments{ - >m.LivenessTest{ - Name: args.String(1), - TestObjectProtocol: args.String(2), - TestInterval: args.Int(3), - TestTimeout: args.Get(4).(float32), - }, + for name, test := range tests { + t.Run(name, func(t *testing.T) { + client := new(gtm.Mock) + if test.init != nil { + test.init(t, client) } - } - - client.On("UpdateProperty", - mock.Anything, - mock.AnythingOfType("*gtm.Property"), - mock.AnythingOfType("string"), - ).Return(&completeResponseStatus, nil).Run(func(args mock.Arguments) { - getCall.ReturnArguments = mock.Arguments{args.Get(1).(*gtm.Property), nil} - }) - - client.On("DeleteProperty", - mock.Anything, - mock.AnythingOfType("*gtm.Property"), - mock.AnythingOfType("string"), - ).Return(&completeResponseStatus, nil) - - useClient(client, func() { - resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), - Steps: []resource.TestStep{ - { - Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/test_object/test_object_not_required.tf"), - Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr(propertyResourceName, "name", "tfexample_prop_1"), - resource.TestCheckResourceAttr(propertyResourceName, "type", "weighted-round-robin"), - ), - }, - { - Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/update_basic.tf"), - Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr(propertyResourceName, "name", "tfexample_prop_1"), - resource.TestCheckResourceAttr(propertyResourceName, "type", "weighted-round-robin"), - ), - }, - }, - }) - }) - - client.AssertExpectations(t) - }) - - t.Run("create property with test_object_protocol set to 'FTP' - test_object required error", func(t *testing.T) { - client := >m.Mock{} - - useClient(client, func() { - resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), - Steps: []resource.TestStep{ - { - Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/test_object/test_object_protocol_ftp.tf"), - ExpectError: regexp.MustCompile(`Error: attribute 'test_object' is required when 'test_object_protocol' is set to 'HTTP', 'HTTPS' or 'FTP'`), - }, - }, - }) - }) - - client.AssertExpectations(t) - }) - - t.Run("create property with test_object_protocol set to 'HTTP' - test_object required error", func(t *testing.T) { - client := >m.Mock{} - - useClient(client, func() { - resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), - Steps: []resource.TestStep{ - { - Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/test_object/test_object_protocol_http.tf"), - ExpectError: regexp.MustCompile(`Error: attribute 'test_object' is required when 'test_object_protocol' is set to 'HTTP', 'HTTPS' or 'FTP'`), - }, - }, - }) - }) - - client.AssertExpectations(t) - }) - - t.Run("create property with test_object_protocol set to 'HTTPS' - test_object required error", func(t *testing.T) { - client := >m.Mock{} - - useClient(client, func() { - resource.UnitTest(t, resource.TestCase{ - ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), - Steps: []resource.TestStep{ - { - Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/test_object/test_object_protocol_https.tf"), - ExpectError: regexp.MustCompile(`Error: attribute 'test_object' is required when 'test_object_protocol' is set to 'HTTP', 'HTTPS' or 'FTP'`), - }, - }, + useClient(client, func() { + resource.UnitTest(t, resource.TestCase{ + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), + IsUnitTest: true, + Steps: test.steps, + }) }) + client.AssertExpectations(t) }) - - client.AssertExpectations(t) - }) + } } func TestResourceGTMTrafficTargetOrder(t *testing.T) { @@ -754,42 +365,267 @@ func TestResourceGTMTrafficTargetOrder(t *testing.T) { } } +// getUpdatedProperty gets the property with updated values taken from `update_basic.tf` +func getUpdatedProperty() *gtm.Property { + return >m.Property{ + BackupCName: "", + BackupIP: "", + BalanceByDownloadScore: false, + Comments: "", + DynamicTTL: 300, + FailbackDelay: 0, + FailoverDelay: 0, + HandoutMode: "normal", + HandoutLimit: 5, + HealthMax: 0, + HealthMultiplier: 0, + HealthThreshold: 0, + IPv6: false, + LivenessTests: []*gtm.LivenessTest{ + { + DisableNonstandardPortWarning: false, + Name: "lt5", + RequestString: "", + ResponseString: "", + SSLClientCertificate: "", + SSLClientPrivateKey: "", + TestInterval: 50, + TestObject: "/junk", + TestObjectPassword: "", + TestObjectPort: 1, + TestObjectProtocol: "HTTP", + TestObjectUsername: "", + TestTimeout: 30.0, + HTTPHeaders: []*gtm.HTTPHeader{ + { + Name: "test_name", + Value: "test_value", + }, + }, + }, + { + Name: "lt2", + TestInterval: 30, + TestObjectProtocol: "HTTP", + TestTimeout: 20, + TestObject: "/junk", + TestObjectPort: 80, + PeerCertificateVerification: true, + HTTPHeaders: []*gtm.HTTPHeader{}, + }, + }, + MapName: "", + MaxUnreachablePenalty: 0, + Name: "tfexample_prop_1", + ScoreAggregationType: "median", + StaticRRSets: []*gtm.StaticRRSet{ + { + Type: "MX", + TTL: 300, + Rdata: []string{"100 test_e"}, + }, + }, + StickinessBonusConstant: 0, + TrafficTargets: []*gtm.TrafficTarget{ + { + DatacenterID: 3132, + Enabled: true, + HandoutCName: "test", + Servers: []string{ + "1.2.3.5", + }, + Weight: 200.0, + }, + }, + Type: "weighted-round-robin", + UnreachableThreshold: 0, + UseComputedTargets: false, + } +} + +// getBasicProperty gets the property values taken from `create_basic.tf` +func getBasicProperty() *gtm.Property { + return >m.Property{ + BackupCName: "", + BackupIP: "", + BalanceByDownloadScore: false, + Comments: "", + DynamicTTL: 300, + FailbackDelay: 0, + FailoverDelay: 0, + HandoutMode: "normal", + HandoutLimit: 5, + HealthMax: 0, + HealthMultiplier: 0, + HealthThreshold: 0, + IPv6: false, + LivenessTests: []*gtm.LivenessTest{ + { + DisableNonstandardPortWarning: false, + Name: "lt5", + RequestString: "", + ResponseString: "", + SSLClientCertificate: "", + SSLClientPrivateKey: "", + TestInterval: 40, + TestObject: "/junk", + TestObjectPassword: "", + TestObjectPort: 1, + TestObjectProtocol: "HTTP", + TestObjectUsername: "", + TestTimeout: 30.0, + HTTPHeaders: []*gtm.HTTPHeader{ + { + Name: "test_name", + Value: "test_value", + }, + }, + }, + { + Name: "lt2", + TestInterval: 30, + TestObjectProtocol: "HTTP", + TestTimeout: 20, + TestObject: "/junk", + TestObjectPort: 80, + PeerCertificateVerification: true, + HTTPHeaders: []*gtm.HTTPHeader{}, + }, + }, + MapName: "", + MaxUnreachablePenalty: 0, + Name: "tfexample_prop_1", + ScoreAggregationType: "median", + StaticRRSets: []*gtm.StaticRRSet{ + { + Type: "MX", + TTL: 300, + Rdata: []string{"100 test_e"}, + }, + }, + StickinessBonusConstant: 0, + TrafficTargets: []*gtm.TrafficTarget{ + { + DatacenterID: 3131, + Enabled: true, + HandoutCName: "test", + Servers: []string{ + "1.2.3.9", + }, + Weight: 200.0, + }, + }, + Type: "weighted-round-robin", + UnreachableThreshold: 0, + UseComputedTargets: false, + } +} + +// getMocks is used for diff tests, where the contents of property not matter as much, as those tests aim to check the diffs func getMocks() *gtm.Mock { - client := >m.Mock{} + client := new(gtm.Mock) // read - getPropertyCall := client.On("GetProperty", mock.Anything, "tfexample_prop_1", "gtm_terra_testdomain.akadns.net"). + getPropertyCall := client.On("GetProperty", mock.Anything, "tfexample_prop_1", gtmTestDomain). Return(nil, >m.Error{StatusCode: http.StatusNotFound}) - // create - client.On("NewProperty", mock.Anything, "tfexample_prop_1").Return(>m.Property{ - Name: "tfexample_prop_1", - }).Once() - - client.On("NewTrafficTarget", mock.Anything).Return(>m.TrafficTarget{}).Times(1) - client.On("NewTrafficTarget", mock.Anything).Return(>m.TrafficTarget{}).Times(1) - client.On("NewTrafficTarget", mock.Anything).Return(>m.TrafficTarget{}).Times(1) - - client.On("NewLivenessTest", mock.Anything, "lt5", "HTTP", 40, float32(30.0)).Return(>m.LivenessTest{ - Name: "lt5", - TestObjectProtocol: "HTTP", - TestInterval: 40, - TestTimeout: 30.0, - }).Once() - + mockNewProperty(client, "tfexample_prop_1") + mockNewTrafficTarget(client, 3) + mockNewLivenessTest(client, "lt5", "HTTP", "/junk", 40, 80, 30.0) + // mock.AnythingOfType *gtm.Property is used is those mock calls as there are too many different test cases to mock + // each one and for those test it's not important, since we are only checking the diff client.On("CreateProperty", mock.Anything, mock.AnythingOfType("*gtm.Property"), mock.AnythingOfType("string")).Return(>m.PropertyResponse{ - Resource: &prop, + Resource: getBasicProperty(), Status: &pendingResponseStatus, }, nil).Run(func(args mock.Arguments) { getPropertyCall.ReturnArguments = mock.Arguments{args.Get(1).(*gtm.Property), nil} }) - // delete client.On("DeleteProperty", mock.Anything, mock.AnythingOfType("*gtm.Property"), - mock.AnythingOfType("string"), + "gtm_terra_testdomain.akadns.net", ).Return(&completeResponseStatus, nil) return client } + +func mockNewProperty(client *gtm.Mock, propertyName string) { + client.On("NewProperty", + mock.Anything, + propertyName, + ).Return(>m.Property{ + Name: propertyName, + }).Once() +} + +func mockNewTrafficTarget(client *gtm.Mock, times int) { + client.On("NewTrafficTarget", + mock.Anything, + ).Return(>m.TrafficTarget{}).Times(times) +} + +func mockNewStaticRRSet(client *gtm.Mock) { + client.On("NewStaticRRSet", + mock.Anything, + ).Return(>m.StaticRRSet{}).Once() +} + +func mockNewLivenessTest(client *gtm.Mock, name, protocol, object string, interval, port int, timeout float32) { + client.On("NewLivenessTest", + mock.Anything, + name, + protocol, + interval, + timeout, + ).Return(>m.LivenessTest{ + Name: name, + TestObjectProtocol: protocol, + TestInterval: interval, + TestTimeout: timeout, + TestObjectPort: port, + TestObject: object, + }).Once() +} + +func mockCreateProperty(client *gtm.Mock, property *gtm.Property, domain string) { + resp := gtm.PropertyResponse{} + resp.Resource = property + resp.Status = &pendingResponseStatus + client.On("CreateProperty", + mock.Anything, + property, + domain, + ).Return(&resp, nil).Once() +} + +func mockGetProperty(client *gtm.Mock, property *gtm.Property, propertyName, domain string, times int) { + client.On("GetProperty", + mock.Anything, + propertyName, + domain, + ).Return(property, nil).Times(times) +} + +func mockUpdateProperty(client *gtm.Mock, property *gtm.Property, domain string) { + client.On("UpdateProperty", + mock.Anything, + property, + domain, + ).Return(&completeResponseStatus, nil).Once() +} + +func mockGetDomainStatus(client *gtm.Mock, domain string, times int) { + client.On("GetDomainStatus", + mock.Anything, + domain, + ).Return(&completeResponseStatus, nil).Times(times) +} + +func mockDeleteProperty(client *gtm.Mock, property *gtm.Property, domain string) { + client.On("DeleteProperty", + mock.Anything, + property, + domain, + ).Return(&completeResponseStatus, nil).Once() +} From 31c0a61927166ba924a08d7dda67ce837d1a4bf4 Mon Sep 17 00:00:00 2001 From: Wojciech Zagrajczuk Date: Thu, 7 Mar 2024 07:26:50 +0000 Subject: [PATCH 30/52] DXE-3463 Fix handling empty custom_certificates and custom_certificate_authorities --- CHANGELOG.md | 3 +- ...data_akamai_property_rules_builder_test.go | 18 ++++++++++ .../ruleformats/rules_schema_reader.go | 35 +++++++++++++++++++ ...efault_v2024_01_09_with_empty_options.json | 34 ++++++++++++++++++ .../rules_v2024_01_09_with_empty_options.tf | 35 +++++++++++++++++++ 5 files changed, 124 insertions(+), 1 deletion(-) create mode 100755 pkg/providers/property/testdata/TestDSPropertyRulesBuilder/default_v2024_01_09_with_empty_options.json create mode 100644 pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2024_01_09_with_empty_options.tf diff --git a/CHANGELOG.md b/CHANGELOG.md index c8d108b2c..8e9184487 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -114,7 +114,8 @@ - +* PAPI + * Fixed case when `origin_certs_to_honor` field from `origin` behavior mandates presence of empty `custom_certificate_authorities` and/or `custom_certificates` options inside `origin` behavior for `akamai_property_rules_builder` datasource ([I#515](https://github.com/akamai/terraform-provider-akamai/issues/515)) diff --git a/pkg/providers/property/data_akamai_property_rules_builder_test.go b/pkg/providers/property/data_akamai_property_rules_builder_test.go index 144233eac..df9c449b8 100644 --- a/pkg/providers/property/data_akamai_property_rules_builder_test.go +++ b/pkg/providers/property/data_akamai_property_rules_builder_test.go @@ -207,6 +207,24 @@ func TestDataPropertyRulesBuilder(t *testing.T) { }) }) }) + t.Run("rule empty options - v2024-01-09", func(t *testing.T) { + useClient(nil, nil, func() { + resource.UnitTest(t, resource.TestCase{ + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), + Steps: []resource.TestStep{{ + Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRulesBuilder/rules_v2024_01_09_with_empty_options.tf"), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("data.akamai_property_rules_builder.default", + "rule_format", + "v2024-01-09"), + testCheckResourceAttrJSON("data.akamai_property_rules_builder.default", + "json", + testutils.LoadFixtureString(t, "testdata/TestDSPropertyRulesBuilder/default_v2024_01_09_with_empty_options.json")), + ), + }}, + }) + }) + }) t.Run("invalid rule with 3 children with different versions", func(t *testing.T) { useClient(nil, nil, func() { resource.UnitTest(t, resource.TestCase{ diff --git a/pkg/providers/property/ruleformats/rules_schema_reader.go b/pkg/providers/property/ruleformats/rules_schema_reader.go index 0cf09fa67..d65160e98 100644 --- a/pkg/providers/property/ruleformats/rules_schema_reader.go +++ b/pkg/providers/property/ruleformats/rules_schema_reader.go @@ -218,6 +218,7 @@ func (r *RulesSchemaReader) getRuleItems(key string) ([]RuleItem, error) { if errors.Is(err, ErrNotFound) { continue } + item = normalizeItem(item) listUnpacked = append(listUnpacked, item) } @@ -225,6 +226,40 @@ func (r *RulesSchemaReader) getRuleItems(key string) ([]RuleItem, error) { return listUnpacked, nil } +func normalizeItem(item RuleItem) RuleItem { + item = clearSemiEmptyList(item, "origin", "custom_certificates") + item = clearSemiEmptyList(item, "origin", "custom_certificate_authorities") + + return item +} + +// clearSemiEmptyList handles a case that user provided option without arguments which should be treated as empty list, not list with one all-empty arguments +// example: "a{}" normally is read as "a[{}]", while we want to make it "a[]" +func clearSemiEmptyList(item RuleItem, itemName, optionName string) RuleItem { + if item.Name == itemName { + if optionListRow, ok := item.Item[optionName]; ok { + if optionList, ok := optionListRow.([]interface{}); ok { + if len(optionList) == 1 { + optionRow := optionList[0] + if option, ok := optionRow.(map[string]interface{}); ok { + allNull := true + for _, val := range option { + if val != nil { + allNull = false + break + } + } + if allNull { + item.Item[optionName] = []interface{}{} + } + } + } + } + } + } + return item +} + func (r *RulesSchemaReader) findRuleItem(itemsMap map[string]any) (RuleItem, error) { var ruleItems RuleItems diff --git a/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/default_v2024_01_09_with_empty_options.json b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/default_v2024_01_09_with_empty_options.json new file mode 100755 index 000000000..9d076ce9f --- /dev/null +++ b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/default_v2024_01_09_with_empty_options.json @@ -0,0 +1,34 @@ +{ + "_ruleFormat_": "rules_v2024_01_09", + "rules": { + "behaviors": [ + { + "name": "origin", + "options": { + "cacheKeyHostname": "ORIGIN_HOSTNAME", + "compress": true, + "customCertificateAuthorities": [], + "customCertificates": [], + "enableTrueClientIp": true, + "forwardHostHeader": "REQUEST_HOST_HEADER", + "httpPort": 80, + "httpsPort": 443, + "originCertsToHonor": "COMBO", + "originSni": true, + "originType": "CUSTOMER", + "standardCertificateAuthorities": [], + "trueClientIpClientSetting": false, + "trueClientIpHeader": "True-Client-IP", + "useUniqueCacheKey": false, + "verificationMode": "CUSTOM" + } + } + ], + "comments": "test", + "name": "default", + "options": {}, + "uuid": "test", + "templateUuid": "test", + "templateLink": "test" + } +} \ No newline at end of file diff --git a/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2024_01_09_with_empty_options.tf b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2024_01_09_with_empty_options.tf new file mode 100644 index 000000000..f29815bb9 --- /dev/null +++ b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2024_01_09_with_empty_options.tf @@ -0,0 +1,35 @@ +provider "akamai" { + edgerc = "../../common/testutils/edgerc" +} + +data "akamai_property_rules_builder" "default" { + rules_v2024_01_09 { + name = "default" + is_secure = false + comments = "test" + uuid = "test" + template_uuid = "test" + template_link = "test" + + behavior { + origin { + cache_key_hostname = "ORIGIN_HOSTNAME" + compress = true + custom_certificate_authorities {} + custom_certificates {} + enable_true_client_ip = true + forward_host_header = "REQUEST_HOST_HEADER" + http_port = 80 + https_port = 443 + origin_certs_to_honor = "COMBO" + origin_sni = true + origin_type = "CUSTOMER" + standard_certificate_authorities = [] + true_client_ip_client_setting = false + true_client_ip_header = "True-Client-IP" + use_unique_cache_key = false + verification_mode = "CUSTOM" + } + } + } +} From 3121d5172e3c0f97bfc3e9bffe8ec3bf089250b7 Mon Sep 17 00:00:00 2001 From: Wojciech Zagrajczuk Date: Mon, 11 Mar 2024 09:05:25 +0000 Subject: [PATCH 31/52] DXE-3645 Fix vulnerabilities --- CHANGELOG.md | 2 +- go.mod | 20 ++++++------- go.sum | 82 +++++++++++++++++++++++++--------------------------- 3 files changed, 50 insertions(+), 54 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e9184487..5500cb7db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,7 +47,7 @@ * Migrated to go 1.21 - +* Bumped various dependencies diff --git a/go.mod b/go.mod index c6a16bb54..3b4257002 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/apex/log v1.9.0 github.com/dlclark/regexp2 v1.10.0 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 - github.com/google/go-cmp v0.5.9 + github.com/google/go-cmp v0.6.0 github.com/google/uuid v1.3.0 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/go-hclog v1.5.0 @@ -31,14 +31,14 @@ require ( ) require ( - github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect + github.com/ProtonMail/go-crypto v1.1.0-alpha.0 // indirect github.com/agext/levenshtein v1.2.3 // indirect github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 // indirect github.com/cloudflare/circl v1.3.7 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/fatih/color v1.14.1 // indirect + github.com/fatih/color v1.16.0 // indirect github.com/go-test/deep v1.1.0 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/hashicorp/errwrap v1.0.0 // indirect @@ -48,7 +48,7 @@ require ( github.com/hashicorp/go-plugin v1.4.10 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/hc-install v0.5.2 // indirect + github.com/hashicorp/hc-install v0.6.3 // indirect github.com/hashicorp/hcl/v2 v2.17.0 // indirect github.com/hashicorp/logutils v1.0.0 // indirect github.com/hashicorp/terraform-exec v0.18.1 // indirect @@ -57,7 +57,7 @@ require ( github.com/hashicorp/terraform-svchost v0.1.1 // indirect github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.9 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect @@ -75,15 +75,15 @@ require ( github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/zclconf/go-cty v1.13.2 // indirect go.uber.org/ratelimit v0.2.0 // indirect - golang.org/x/crypto v0.18.0 // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.20.0 // indirect - golang.org/x/sys v0.16.0 // indirect + golang.org/x/crypto v0.21.0 // indirect + golang.org/x/mod v0.15.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect google.golang.org/grpc v1.56.3 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 1f3e13e60..f51d22eda 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,9 @@ -github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= -github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= -github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA= -github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= -github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= -github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= +dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/ProtonMail/go-crypto v1.1.0-alpha.0 h1:nHGfwXmFvJrSR9xu8qL7BkO4DqTHXE9N5vPhgY2I+j0= +github.com/ProtonMail/go-crypto v1.1.0-alpha.0/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/akamai/AkamaiOPEN-edgegrid-golang/v7 v7.6.1 h1:KrYkNvCKBGPs/upjgJCojZnnmt5XdEPWS4L2zRQm7+o= @@ -24,10 +24,10 @@ github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 h1:zV3ejI06 github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= github.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= -github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= -github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= +github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= +github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -37,22 +37,24 @@ github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= -github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= -github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= -github.com/go-git/go-billy/v5 v5.4.1 h1:Uwp5tDRkPr+l/TnbHOQzp+tmJfLceOlbVucgpTz8ix4= -github.com/go-git/go-billy/v5 v5.4.1/go.mod h1:vjbugF6Fz7JIflbVpl1hJsGjSHNltrSw45YK/ukIvQg= -github.com/go-git/go-git/v5 v5.6.1 h1:q4ZRqQl4pR/ZJHc1L5CFjGA1a10u76aV1iC+nh+bHsk= -github.com/go-git/go-git/v5 v5.6.1/go.mod h1:mvyoL6Unz0PiTQrGQfSfiLFhBH1c1e84ylC2MDs4ee8= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= +github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= +github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= +github.com/go-git/go-git/v5 v5.11.0 h1:XIZc1p+8YzypNr34itUfSvYJcv+eYdTnTvOZ2vD3cA4= +github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lKqXmCUiUCY= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-ozzo/ozzo-validation/v4 v4.3.0 h1:byhDUpfEwjsVQb1vBunvIjh2BHQ9ead57VkAEY4V+Es= github.com/go-ozzo/ozzo-validation/v4 v4.3.0/go.mod h1:2NKgrcHl3z6cJs+3Oo940FPRiTzuqKbvfrL2RxCj6Ew= github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -61,8 +63,8 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -86,8 +88,8 @@ github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/C github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/hc-install v0.5.2 h1:SfwMFnEXVVirpwkDuSF5kymUOhrUxrTq3udEseZdOD0= -github.com/hashicorp/hc-install v0.5.2/go.mod h1:9QISwe6newMWIfEiXpzuu1k9HAGtQYgnSH8H9T8wmoI= +github.com/hashicorp/hc-install v0.6.3 h1:yE/r1yJvWbtrJ0STwScgEnCanb0U9v7zp0Gbkmcoxqs= +github.com/hashicorp/hc-install v0.6.3/go.mod h1:KamGdbodYzlufbWh4r9NRo8y6GLHWZP2GBtdnms1Ln0= github.com/hashicorp/hcl/v2 v2.17.0 h1:z1XvSUyXd1HP10U4lrLg5e0JMVz6CPaJvAgxM0KNZVY= github.com/hashicorp/hcl/v2 v2.17.0/go.mod h1:gJyW2PTShkJqQBKpAmPO3yxMxIuoXkOF2TpqXzrQyx4= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= @@ -121,8 +123,6 @@ github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKe github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= -github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jedib0t/go-pretty/v6 v6.0.4 h1:7WaHUeKo5yc2vABlsh30p4VWxQoXaWktBY/nR/2qnPg= @@ -158,8 +158,8 @@ github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= @@ -193,8 +193,8 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/skeema/knownhosts v1.1.0 h1:Wvr9V0MxhjRbl3f9nMnKnFfiWTJmtECJ9Njkea3ysW0= -github.com/skeema/knownhosts v1.1.0/go.mod h1:sKFq3RD6/TKZkSWn8boUbDC7Qkgcv+8XXijpFO6roag= +github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ= +github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= github.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4SauJk4cUOwJs= @@ -237,20 +237,18 @@ go.uber.org/ratelimit v0.2.0 h1:UQE2Bgi7p2B85uP5dC2bbRtig0C+OeNRnNEafLjsLPA= go.uber.org/ratelimit v0.2.0/go.mod h1:YYBV4e4naJvhpitQrWJu1vCpgB7CboMe0qhltKt6mUg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= -golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= +golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= @@ -261,22 +259,20 @@ golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= +golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= @@ -287,8 +283,8 @@ google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc= google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 6df1544a31428875870fae7488b5f9f219598de2 Mon Sep 17 00:00:00 2001 From: Michal Mazur Date: Wed, 13 Mar 2024 09:04:52 +0000 Subject: [PATCH 32/52] DXE-3411 Refactor property resource test --- .../property/resource_akamai_property_test.go | 32 ++++++------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/pkg/providers/property/resource_akamai_property_test.go b/pkg/providers/property/resource_akamai_property_test.go index 561349b7a..f36c531d1 100644 --- a/pkg/providers/property/resource_akamai_property_test.go +++ b/pkg/providers/property/resource_akamai_property_test.go @@ -1698,7 +1698,7 @@ func TestPropertyResource_versionNotesLifecycle(t *testing.T) { client := &papi.Mock{} - mockRead := func(notes string, rules papi.Rules) []*mock.Call { + mockRead := func(notes string, rules papi.Rules) testutils.MockCalls { getPropertyCall := client.On("GetProperty", mock.Anything, papi.GetPropertyRequest{ PropertyID: id, ContractID: ctr, @@ -1748,7 +1748,7 @@ func TestPropertyResource_versionNotesLifecycle(t *testing.T) { }, }, nil) - return []*mock.Call{getPropertyCall, getHostnamesCall, getRuleTreeCall, getPropertyVersionCall} + return testutils.MockCalls{getPropertyCall, getHostnamesCall, getRuleTreeCall, getPropertyVersionCall} } mockUpdate := func(currentNotes, newNotes string, rules papi.Rules) { @@ -1809,19 +1809,13 @@ func TestPropertyResource_versionNotesLifecycle(t *testing.T) { ValidateRules: true, }).Return(&papi.UpdateRulesResponse{}, nil).Once() - for _, m := range mockRead(versionNotes1, rules1And2.Rules) { - m.Times(2) - } + mockRead(versionNotes1, rules1And2.Rules).Times(2) // step 2 - refresh + plan - for _, m := range mockRead(versionNotes2, rules1And2.Rules) { - m.Times(2) - } + mockRead(versionNotes2, rules1And2.Rules).Times(2) // step 3 - refresh + update + read + plan - for _, m := range mockRead(versionNotes2, rules1And2.Rules) { - m.Times(1) - } + mockRead(versionNotes2, rules1And2.Rules).Times(1) var rules3 papi.RulesUpdate rulesJSON = testutils.LoadFixtureBytes(t, path.Join(testdataDir, rulesFile3)) @@ -1830,14 +1824,10 @@ func TestPropertyResource_versionNotesLifecycle(t *testing.T) { mockUpdate(versionNotes3, "updatedNotes2", rules3.Rules) - for _, m := range mockRead(versionNotes3, rules3.Rules) { - m.Times(2) - } + mockRead(versionNotes3, rules3.Rules).Times(2) // step 4 - refresh + update + read + plan - for _, m := range mockRead(versionNotes3, rules3.Rules) { - m.Times(1) - } + mockRead(versionNotes3, rules3.Rules).Times(1) var rules4And5 papi.RulesUpdate rulesJSON = testutils.LoadFixtureBytes(t, path.Join(testdataDir, rulesFile4And5)) @@ -1846,14 +1836,10 @@ func TestPropertyResource_versionNotesLifecycle(t *testing.T) { mockUpdate(versionNotes3, rules4And5.Comments, rules4And5.Rules) - for _, m := range mockRead(rules4And5.Comments, rules4And5.Rules) { - m.Times(2) - } + mockRead(rules4And5.Comments, rules4And5.Rules).Times(2) // step 5 - refresh + plan - for _, m := range mockRead(rules4And5.Comments, rules4And5.Rules) { - m.Times(2) - } + mockRead(rules4And5.Comments, rules4And5.Rules).Times(2) // cleanup client.On("RemoveProperty", mock.Anything, papi.RemovePropertyRequest{ From 6f54f5ea12d0f465b009aaeeae094992715fd432 Mon Sep 17 00:00:00 2001 From: Michal Wojcik Date: Mon, 5 Feb 2024 15:21:17 +0100 Subject: [PATCH 33/52] DXE-3480 Re-sign request on retry --- go.mod | 1 + go.sum | 3 +++ pkg/akamai/configure_context.go | 24 ++++++++++++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/go.mod b/go.mod index 3b4257002..eccee635b 100644 --- a/go.mod +++ b/go.mod @@ -23,6 +23,7 @@ require ( github.com/iancoleman/strcase v0.3.0 github.com/jedib0t/go-pretty/v6 v6.0.4 github.com/jinzhu/copier v0.3.2 + github.com/mgwoj/go-retryablehttp v0.0.1 github.com/spf13/cast v1.5.0 github.com/stretchr/testify v1.8.4 github.com/tj/assert v0.0.3 diff --git a/go.sum b/go.sum index f51d22eda..8c8009087 100644 --- a/go.sum +++ b/go.sum @@ -77,6 +77,7 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs= +github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= @@ -163,6 +164,8 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= +github.com/mgwoj/go-retryablehttp v0.0.1 h1:RC4k0erMX9r3ItB7wiSwE/CHfZriCKbubnK1mwT+3j8= +github.com/mgwoj/go-retryablehttp v0.0.1/go.mod h1:0sYyWaw+FJEhpAqcK4J4kF1K3NOrk2H9LcjRvbPy3p0= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= diff --git a/pkg/akamai/configure_context.go b/pkg/akamai/configure_context.go index 1a79e547d..01e712242 100644 --- a/pkg/akamai/configure_context.go +++ b/pkg/akamai/configure_context.go @@ -2,7 +2,12 @@ package akamai import ( "context" + "errors" + "net/http" + "net/url" "os" + "strings" + "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgegrid" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" @@ -10,6 +15,7 @@ import ( "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/google/uuid" + "github.com/mgwoj/go-retryablehttp" "github.com/spf13/cast" ) @@ -25,17 +31,35 @@ func configureContext(cfg contextConfig) (*meta.OperationMeta, error) { operationID := uuid.NewString() log := logger.FromContext(cfg.ctx, "OperationID", operationID) + retryClient := retryablehttp.NewClient() + retryClient.RetryMax = 10 + retryClient.RetryWaitMin = 10 * time.Second + retryClient.RetryWaitMax = 5 * time.Minute + sess, err := session.New( session.WithSigner(cfg.edgegridConfig), session.WithUserAgent(cfg.userAgent), session.WithLog(log), session.WithHTTPTracing(cast.ToBool(os.Getenv("AKAMAI_HTTP_TRACE_ENABLED"))), session.WithRequestLimit(cfg.requestLimit), + session.WithClient(retryClient.StandardClient()), ) if err != nil { return nil, err } + retryClient.Postprocess = func(r *http.Request) error { + return sess.Sign(r) + } + retryClient.CheckRetry = func(ctx context.Context, resp *http.Response, err error) (bool, error) { + var urlErr *url.Error + if resp != nil && resp.Request.Method == "GET" || + resp == nil && errors.As(err, &urlErr) && strings.ToUpper(urlErr.Op) == "GET" { + return retryablehttp.DefaultRetryPolicy(ctx, resp, err) + } + return false, nil + } + cache.Enable(cfg.enableCache) return meta.New(sess, log.HCLog(), operationID) From 476a8562c880dd3d84461d96666a1e0f58f7185c Mon Sep 17 00:00:00 2001 From: Michal Wojcik Date: Fri, 9 Feb 2024 18:52:55 +0100 Subject: [PATCH 34/52] DXE-3480 Re-sign request on redirect --- pkg/akamai/configure_context.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/akamai/configure_context.go b/pkg/akamai/configure_context.go index 01e712242..dc04fcd91 100644 --- a/pkg/akamai/configure_context.go +++ b/pkg/akamai/configure_context.go @@ -51,6 +51,11 @@ func configureContext(cfg contextConfig) (*meta.OperationMeta, error) { retryClient.Postprocess = func(r *http.Request) error { return sess.Sign(r) } + + retryClient.HTTPClient.CheckRedirect = func(req *http.Request, via []*http.Request) error { + return sess.Sign(req) + } + retryClient.CheckRetry = func(ctx context.Context, resp *http.Response, err error) (bool, error) { var urlErr *url.Error if resp != nil && resp.Request.Method == "GET" || From e837ced8b61e1e918394db99356bdb8e05fa6a0f Mon Sep 17 00:00:00 2001 From: Michal Wojcik Date: Fri, 16 Feb 2024 13:28:27 +0100 Subject: [PATCH 35/52] DXE-3480 Configurable retry --- CHANGELOG.md | 8 ++ go.mod | 2 +- go.sum | 4 +- pkg/akamai/configure_context.go | 67 +++++++++++--- pkg/akamai/framework_provider.go | 89 ++++++++++++++++++- pkg/akamai/sdk_provider.go | 89 ++++++++++++++++--- .../resource_akamai_property_activation.go | 8 +- 7 files changed, 233 insertions(+), 34 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5500cb7db..b8eeb59c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,6 +51,14 @@ +* Global + * Requests limit value is configurable via field `request_limit` or environment variable `AKAMAI_REQUEST_LIMIT` + * Added retryable logic for all GET requests to the API. + This behavior can be disabled using `retry_disabled` field from `akamai` provider configuration or via environment variable `AKAMAI_RETRY_DISABLED`. + It can be fine-tuned using following fields or environment variables: + * `retry_max` or `AKAMAI_RETRY_MAX` - The maximum number retires of API requests, default is 10 + * `retry_wait_min` or `AKAMAI_RETRY_WAIT_MIN` - The minimum wait time in seconds between API requests retries, default is 1 sec + * `retry_wait_max` or `AKAMAI_RETRY_WAIT_MAX` - The maximum wait time in minutes between API requests retries, default is 30 sec diff --git a/go.mod b/go.mod index eccee635b..0fb541f18 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( github.com/iancoleman/strcase v0.3.0 github.com/jedib0t/go-pretty/v6 v6.0.4 github.com/jinzhu/copier v0.3.2 - github.com/mgwoj/go-retryablehttp v0.0.1 + github.com/mgwoj/go-retryablehttp v0.0.3 github.com/spf13/cast v1.5.0 github.com/stretchr/testify v1.8.4 github.com/tj/assert v0.0.3 diff --git a/go.sum b/go.sum index 8c8009087..64b3565d1 100644 --- a/go.sum +++ b/go.sum @@ -164,8 +164,8 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= -github.com/mgwoj/go-retryablehttp v0.0.1 h1:RC4k0erMX9r3ItB7wiSwE/CHfZriCKbubnK1mwT+3j8= -github.com/mgwoj/go-retryablehttp v0.0.1/go.mod h1:0sYyWaw+FJEhpAqcK4J4kF1K3NOrk2H9LcjRvbPy3p0= +github.com/mgwoj/go-retryablehttp v0.0.3 h1:DUvKxbkHLVzaZ1C1IYZX114tNA+FLmVC7lC1yUHd5Tw= +github.com/mgwoj/go-retryablehttp v0.0.3/go.mod h1:0sYyWaw+FJEhpAqcK4J4kF1K3NOrk2H9LcjRvbPy3p0= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= diff --git a/pkg/akamai/configure_context.go b/pkg/akamai/configure_context.go index dc04fcd91..4d5842fa1 100644 --- a/pkg/akamai/configure_context.go +++ b/pkg/akamai/configure_context.go @@ -25,30 +25,65 @@ type contextConfig struct { ctx context.Context requestLimit int enableCache bool + retryMax int + retryWaitMin time.Duration + retryWaitMax time.Duration + retryDisabled bool } func configureContext(cfg contextConfig) (*meta.OperationMeta, error) { operationID := uuid.NewString() log := logger.FromContext(cfg.ctx, "OperationID", operationID) - retryClient := retryablehttp.NewClient() - retryClient.RetryMax = 10 - retryClient.RetryWaitMin = 10 * time.Second - retryClient.RetryWaitMax = 5 * time.Minute - - sess, err := session.New( + opts := []session.Option{ session.WithSigner(cfg.edgegridConfig), session.WithUserAgent(cfg.userAgent), session.WithLog(log), session.WithHTTPTracing(cast.ToBool(os.Getenv("AKAMAI_HTTP_TRACE_ENABLED"))), session.WithRequestLimit(cfg.requestLimit), - session.WithClient(retryClient.StandardClient()), - ) + } + var sess session.Session + var err error + if cfg.retryDisabled { + sess, err = sessionWithoutRetry(opts) + } else { + sess, err = sessionWithRetry(cfg, opts) + } if err != nil { return nil, err } + cache.Enable(cfg.enableCache) + + return meta.New(sess, log.HCLog(), operationID) +} + +func sessionWithoutRetry(opts []session.Option) (session.Session, error) { + return session.New(opts...) +} - retryClient.Postprocess = func(r *http.Request) error { +func sessionWithRetry(cfg contextConfig, opts []session.Option) (session.Session, error) { + if cfg.retryMax == 0 { + cfg.retryMax = 10 + } + if cfg.retryWaitMin == 0 { + cfg.retryWaitMin = time.Duration(1) * time.Second + } + if cfg.retryWaitMax == 0 { + cfg.retryWaitMax = time.Duration(30) * time.Second + } + + retryClient := retryablehttp.NewClient() + retryClient.RetryMax = cfg.retryMax + retryClient.RetryWaitMin = cfg.retryWaitMin + retryClient.RetryWaitMax = cfg.retryWaitMax + + opts = append(opts, session.WithClient(retryClient.StandardClient())) + sess, err := session.New(opts...) + if err != nil { + return nil, err + } + + retryClient.PrepareRetry = func(r *http.Request) error { return sess.Sign(r) } @@ -58,14 +93,18 @@ func configureContext(cfg contextConfig) (*meta.OperationMeta, error) { retryClient.CheckRetry = func(ctx context.Context, resp *http.Response, err error) (bool, error) { var urlErr *url.Error - if resp != nil && resp.Request.Method == "GET" || - resp == nil && errors.As(err, &urlErr) && strings.ToUpper(urlErr.Op) == "GET" { + if (resp != nil && resp.Request.Method == http.MethodGet) || + (resp == nil && errors.As(err, &urlErr) && strings.ToUpper(urlErr.Op) == http.MethodGet) { + if ctx.Err() != nil { + return false, ctx.Err() + } + if resp != nil && resp.StatusCode == http.StatusConflict { + return true, nil + } return retryablehttp.DefaultRetryPolicy(ctx, resp, err) } return false, nil } - cache.Enable(cfg.enableCache) - - return meta.New(sess, log.HCLog(), operationID) + return sess, nil } diff --git a/pkg/akamai/framework_provider.go b/pkg/akamai/framework_provider.go index fcd1eeaf5..157f45ffe 100644 --- a/pkg/akamai/framework_provider.go +++ b/pkg/akamai/framework_provider.go @@ -4,6 +4,7 @@ import ( "context" "os" "strconv" + "time" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf/validators" "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" @@ -31,6 +32,10 @@ type ProviderModel struct { EdgercConfig types.Set `tfsdk:"config"` CacheEnabled types.Bool `tfsdk:"cache_enabled"` RequestLimit types.Int64 `tfsdk:"request_limit"` + RetryMax types.Int64 `tfsdk:"retry_max"` + RetryWaitMin types.Int64 `tfsdk:"retry_wait_min"` + RetryWaitMax types.Int64 `tfsdk:"retry_wait_max"` + RetryDisabled types.Bool `tfsdk:"retry_disabled"` } // ConfigModel represents the model of edgegrid configuration block @@ -76,6 +81,22 @@ func (p *Provider) Schema(_ context.Context, _ provider.SchemaRequest, resp *pro Description: "The maximum number of API requests to be made per second (0 for no limit)", Optional: true, }, + "retry_max": schema.Int64Attribute{ + Description: "The maximum number retires of API requests, default 10", + Optional: true, + }, + "retry_wait_min": schema.Int64Attribute{ + Description: "The minimum wait time in seconds between API requests retries, default is 1 sec", + Optional: true, + }, + "retry_wait_max": schema.Int64Attribute{ + Description: "The maximum wait time in seconds between API requests retries, default is 30 sec", + Optional: true, + }, + "retry_disabled": schema.BoolAttribute{ + Description: "Should the retries of API requests be disabled, default false", + Optional: true, + }, }, Blocks: map[string]schema.Block{ "config": schema.SetNestedBlock{ @@ -169,12 +190,46 @@ func (p *Provider) Configure(ctx context.Context, req provider.ConfigureRequest, return } + requestLimit, err := getFrameworkConfigInt(data.RequestLimit, "AKAMAI_REQUEST_LIMIT") + if err != nil { + resp.Diagnostics.Append(diag.NewErrorDiagnostic("configuring context failed", err.Error())) + return + } + + retryMax, err := getFrameworkConfigInt(data.RetryMax, "AKAMAI_RETRY_MAX") + if err != nil { + resp.Diagnostics.Append(diag.NewErrorDiagnostic("configuring context failed", err.Error())) + return + } + + retryWaitMin, err := getFrameworkConfigInt(data.RetryWaitMin, "AKAMAI_RETRY_WAIT_MIN") + if err != nil { + resp.Diagnostics.Append(diag.NewErrorDiagnostic("configuring context failed", err.Error())) + return + } + + retryWaitMax, err := getFrameworkConfigInt(data.RetryWaitMax, "AKAMAI_RETRY_WAIT_MAX") + if err != nil { + resp.Diagnostics.Append(diag.NewErrorDiagnostic("configuring context failed", err.Error())) + return + } + + retryDisabled, err := getFrameworkConfigBool(data.RetryDisabled, "AKAMAI_RETRY_DISABLED") + if err != nil { + resp.Diagnostics.Append(diag.NewErrorDiagnostic("configuring context failed", err.Error())) + return + } + meta, err := configureContext(contextConfig{ edgegridConfig: edgegridConfig, userAgent: userAgent(req.TerraformVersion), ctx: ctx, - requestLimit: int(data.RequestLimit.ValueInt64()), + requestLimit: requestLimit, enableCache: data.CacheEnabled.ValueBool(), + retryMax: retryMax, + retryWaitMin: time.Duration(retryWaitMin) * time.Second, + retryWaitMax: time.Duration(retryWaitMax) * time.Second, + retryDisabled: retryDisabled, }) if err != nil { resp.Diagnostics.Append(diag.NewErrorDiagnostic("configuring context failed", err.Error())) @@ -185,7 +240,7 @@ func (p *Provider) Configure(ctx context.Context, req provider.ConfigureRequest, resp.ResourceData = meta } -// Resources returns slice of fuctions used to instantiate resource implementations +// Resources returns slice of functions used to instantiate resource implementations func (p *Provider) Resources(_ context.Context) []func() resource.Resource { resources := make([]func() resource.Resource, 0) @@ -196,7 +251,7 @@ func (p *Provider) Resources(_ context.Context) []func() resource.Resource { return resources } -// DataSources returns slice of fuctions used to instantiate data source implementations +// DataSources returns slice of functions used to instantiate data source implementations func (p *Provider) DataSources(_ context.Context) []func() datasource.DataSource { dataSources := make([]func() datasource.DataSource, 0) @@ -206,3 +261,31 @@ func (p *Provider) DataSources(_ context.Context) []func() datasource.DataSource return dataSources } + +func getFrameworkConfigInt(tfValue types.Int64, envKey string) (int, error) { + ret := int(tfValue.ValueInt64()) + if tfValue.IsNull() { + if v := os.Getenv(envKey); v != "" { + vv, err := strconv.Atoi(v) + if err != nil { + return 0, err + } + ret = vv + } + } + return ret, nil +} + +func getFrameworkConfigBool(tfValue types.Bool, envKey string) (bool, error) { + ret := tfValue.ValueBool() + if tfValue.IsNull() { + if v := os.Getenv(envKey); v != "" { + vv, err := strconv.ParseBool(v) + if err != nil { + return false, err + } + ret = vv + } + } + return ret, nil +} diff --git a/pkg/akamai/sdk_provider.go b/pkg/akamai/sdk_provider.go index a8fb3d6e0..3f85db3af 100644 --- a/pkg/akamai/sdk_provider.go +++ b/pkg/akamai/sdk_provider.go @@ -6,6 +6,7 @@ import ( "fmt" "os" "strconv" + "time" "github.com/akamai/terraform-provider-akamai/v5/pkg/cache" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/collections" @@ -74,6 +75,26 @@ func NewSDKProvider(subprovs ...subprovider.Subprovider) plugin.ProviderFunc { Type: schema.TypeInt, Description: "The maximum number of API requests to be made per second (0 for no limit)", }, + "retry_max": { + Optional: true, + Type: schema.TypeInt, + Description: "The maximum number retires of API requests, default 10", + }, + "retry_wait_min": { + Optional: true, + Type: schema.TypeInt, + Description: "The minimum wait time in seconds between API requests retries, default is 1 sec", + }, + "retry_wait_max": { + Optional: true, + Type: schema.TypeInt, + Description: "The maximum wait time in seconds between API requests retries, default is 30 sec", + }, + "retry_disabled": { + Optional: true, + Type: schema.TypeBool, + Description: "Should the retries of API requests be disabled, default false", + }, }, ResourcesMap: make(map[string]*schema.Resource), DataSourcesMap: make(map[string]*schema.Resource), @@ -148,17 +169,29 @@ func configureProviderContext(p *schema.Provider) schema.ConfigureContextFunc { return nil, diag.FromErr(err) } - requestLimit, err := tf.GetIntValue("request_limit", d) + requestLimit, err := getPluginConfigInt(d, "request_limit", "AKAMAI_REQUEST_LIMIT") if err != nil { - if !errors.Is(err, tf.ErrNotFound) { - return nil, diag.FromErr(err) - } - if v := os.Getenv("AKAMAI_REQUEST_LIMIT"); v != "" { - requestLimit, err = strconv.Atoi(v) - if err != nil { - return nil, diag.FromErr(err) - } - } + return nil, diag.FromErr(err) + } + + retryMax, err := getPluginConfigInt(d, "retry_max", "AKAMAI_RETRY_MAX") + if err != nil { + return nil, diag.FromErr(err) + } + + retryWaitMin, err := getPluginConfigInt(d, "retry_wait_min", "AKAMAI_RETRY_WAIT_MIN") + if err != nil { + return nil, diag.FromErr(err) + } + + retryWaitMax, err := getPluginConfigInt(d, "retry_wait_max", "AKAMAI_RETRY_WAIT_MAX") + if err != nil { + return nil, diag.FromErr(err) + } + + retryDisabled, err := getPluginConfigBool(d, "retry_disabled", "AKAMAI_RETRY_DISABLED") + if err != nil { + return nil, diag.FromErr(err) } meta, err := configureContext(contextConfig{ @@ -167,6 +200,10 @@ func configureProviderContext(p *schema.Provider) schema.ConfigureContextFunc { ctx: ctx, requestLimit: requestLimit, enableCache: cacheEnabled, + retryMax: retryMax, + retryWaitMin: time.Duration(retryWaitMin) * time.Second, + retryWaitMax: time.Duration(retryWaitMax) * time.Second, + retryDisabled: retryDisabled, }) if err != nil { return nil, diag.FromErr(err) @@ -186,3 +223,35 @@ func NewProtoV6SDKProvider(subproviders []subprovider.Subprovider) (func() tfpro return pluginProvider }, err } + +func getPluginConfigInt(d *schema.ResourceData, key string, envKey string) (int, error) { + value, err := tf.GetIntValue(key, d) + if err != nil { + if !errors.Is(err, tf.ErrNotFound) { + return 0, err + } + if v := os.Getenv(envKey); v != "" { + value, err = strconv.Atoi(v) + if err != nil { + return 0, err + } + } + } + return value, nil +} + +func getPluginConfigBool(d *schema.ResourceData, key string, envKey string) (bool, error) { + value, err := tf.GetBoolValue(key, d) + if err != nil { + if !errors.Is(err, tf.ErrNotFound) { + return false, err + } + if v := os.Getenv(envKey); v != "" { + value, err = strconv.ParseBool(v) + if err != nil { + return false, err + } + } + } + return value, nil +} diff --git a/pkg/providers/property/resource_akamai_property_activation.go b/pkg/providers/property/resource_akamai_property_activation.go index dff25b952..dbcd7405d 100644 --- a/pkg/providers/property/resource_akamai_property_activation.go +++ b/pkg/providers/property/resource_akamai_property_activation.go @@ -994,7 +994,7 @@ func createActivation(ctx context.Context, client papi.PAPI, request papi.Create return "", diag.Errorf("%s: %s", errMsg, err) } - if actID, ok := isActivationPedingOrActive(ctx, client, expectedActivation{ + if actID, ok := isActivationPendingOrActive(ctx, client, expectedActivation{ PropertyID: request.PropertyID, Version: request.Activation.PropertyVersion, Network: request.Activation.Network, @@ -1046,8 +1046,8 @@ type expectedActivation struct { Type papi.ActivationType } -// isActivationPedingOrActive check if latest activation is of specified version and has status Pending or Active -func isActivationPedingOrActive(ctx context.Context, client papi.PAPI, expected expectedActivation) (string, bool) { +// isActivationPendingOrActive check if latest activation is of specified version and has status Pending or Active +func isActivationPendingOrActive(ctx context.Context, client papi.PAPI, expected expectedActivation) (string, bool) { log := hclog.FromContext(ctx) log.Debug("getting activation") @@ -1069,7 +1069,7 @@ func isActivationPedingOrActive(ctx context.Context, client papi.PAPI, expected log.Debug("no activation items; retrying") return "", false } - latestActivationItem := activations[0] // grab the lastest one returned by api + latestActivationItem := activations[0] // grab the latest one returned by api if latestActivationItem.PropertyVersion != expected.Version { log.Debug("latest version mismatch; retrying") From f19772dc47809f6d8f33a1442b2b117dc7d4d16a Mon Sep 17 00:00:00 2001 From: Michal Wojcik Date: Tue, 12 Mar 2024 15:26:05 +0100 Subject: [PATCH 36/52] DXE-3480 Incorporate "go-retryablehttp" until https://github.com/hashicorp/go-retryablehttp/pull/216 is merged --- .golangci.yaml | 6 + GNUmakefile | 2 +- build/internal/docker_jenkins.bash | 2 +- go.mod | 3 +- go.sum | 3 - pkg/akamai/configure_context.go | 2 +- pkg/retryablehttp/CHANGELOG.md | 15 + pkg/retryablehttp/CODEOWNERS | 1 + pkg/retryablehttp/LICENSE | 369 ++++++++ pkg/retryablehttp/README.md | 62 ++ pkg/retryablehttp/client.go | 867 ++++++++++++++++++ pkg/retryablehttp/client_test.go | 1162 ++++++++++++++++++++++++ pkg/retryablehttp/roundtripper.go | 55 ++ pkg/retryablehttp/roundtripper_test.go | 144 +++ 14 files changed, 2685 insertions(+), 8 deletions(-) create mode 100644 pkg/retryablehttp/CHANGELOG.md create mode 100644 pkg/retryablehttp/CODEOWNERS create mode 100644 pkg/retryablehttp/LICENSE create mode 100644 pkg/retryablehttp/README.md create mode 100644 pkg/retryablehttp/client.go create mode 100644 pkg/retryablehttp/client_test.go create mode 100644 pkg/retryablehttp/roundtripper.go create mode 100644 pkg/retryablehttp/roundtripper_test.go diff --git a/.golangci.yaml b/.golangci.yaml index a5740c532..8403ab3d3 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -18,6 +18,12 @@ issues: max-issues-per-linter: 0 max-same-issues: 0 exclude-rules: + - path: pkg/retryablehttp/.*\.go + linters: + - errcheck + - revive + - gocyclo + - ineffassign - path: gen\.go linters: - gocyclo diff --git a/GNUmakefile b/GNUmakefile index 1513a7683..34f3424a2 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,4 +1,4 @@ -TEST ?= $$(go list ./...) +TEST ?= $$(go list ./... | grep -v retryablehttp) PKG_NAME = akamai # Local provider install parameters diff --git a/build/internal/docker_jenkins.bash b/build/internal/docker_jenkins.bash index 114e6ea3f..02d3f579f 100755 --- a/build/internal/docker_jenkins.bash +++ b/build/internal/docker_jenkins.bash @@ -107,7 +107,7 @@ docker exec akatf-container sh -c 'cd terraform-provider-akamai; make terraform- echo "Running tests with xUnit output" docker exec akatf-container sh -c 'cd terraform-provider-akamai; go mod tidy; - 2>&1 go test -timeout $TIMEOUT -v -coverpkg=./... -coverprofile=../profile.out -covermode=$COVERMODE ./... | tee ../tests.output' + 2>&1 go test -timeout $TIMEOUT -v -coverpkg=./... -coverprofile=../profile.out -covermode=$COVERMODE -skip TestClient_DefaultRetryPolicy_TLS ./... | tee ../tests.output' docker exec akatf-container sh -c 'cat tests.output | go-junit-report' > test/tests.xml docker exec akatf-container sh -c 'cat tests.output' > test/tests.output sed -i -e 's/skip=/skipped=/g;s/ failures=/ errors="0" failures=/g' test/tests.xml diff --git a/go.mod b/go.mod index 0fb541f18..0c4a3a447 100644 --- a/go.mod +++ b/go.mod @@ -10,6 +10,7 @@ require ( github.com/go-ozzo/ozzo-validation/v4 v4.3.0 github.com/google/go-cmp v0.6.0 github.com/google/uuid v1.3.0 + github.com/hashicorp/go-cleanhttp v0.5.2 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/go-hclog v1.5.0 github.com/hashicorp/terraform-plugin-framework v1.3.3 @@ -23,7 +24,6 @@ require ( github.com/iancoleman/strcase v0.3.0 github.com/jedib0t/go-pretty/v6 v6.0.4 github.com/jinzhu/copier v0.3.2 - github.com/mgwoj/go-retryablehttp v0.0.3 github.com/spf13/cast v1.5.0 github.com/stretchr/testify v1.8.4 github.com/tj/assert v0.0.3 @@ -44,7 +44,6 @@ require ( github.com/golang/protobuf v1.5.3 // indirect github.com/hashicorp/errwrap v1.0.0 // indirect github.com/hashicorp/go-checkpoint v0.5.0 // indirect - github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-plugin v1.4.10 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect diff --git a/go.sum b/go.sum index 64b3565d1..f51d22eda 100644 --- a/go.sum +++ b/go.sum @@ -77,7 +77,6 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs= -github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= @@ -164,8 +163,6 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= -github.com/mgwoj/go-retryablehttp v0.0.3 h1:DUvKxbkHLVzaZ1C1IYZX114tNA+FLmVC7lC1yUHd5Tw= -github.com/mgwoj/go-retryablehttp v0.0.3/go.mod h1:0sYyWaw+FJEhpAqcK4J4kF1K3NOrk2H9LcjRvbPy3p0= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= diff --git a/pkg/akamai/configure_context.go b/pkg/akamai/configure_context.go index 4d5842fa1..2b56f5896 100644 --- a/pkg/akamai/configure_context.go +++ b/pkg/akamai/configure_context.go @@ -14,8 +14,8 @@ import ( "github.com/akamai/terraform-provider-akamai/v5/pkg/cache" "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v5/pkg/retryablehttp" "github.com/google/uuid" - "github.com/mgwoj/go-retryablehttp" "github.com/spf13/cast" ) diff --git a/pkg/retryablehttp/CHANGELOG.md b/pkg/retryablehttp/CHANGELOG.md new file mode 100644 index 000000000..7a17b9f99 --- /dev/null +++ b/pkg/retryablehttp/CHANGELOG.md @@ -0,0 +1,15 @@ +## 0.7.5 (Nov 8, 2023) + +BUG FIXES + +- client: fixes an issue where the request body is not preserved on temporary redirects or re-established HTTP/2 connections [GH-207] + +## 0.7.4 (Jun 6, 2023) + +BUG FIXES + +- client: fixing an issue where the Content-Type header wouldn't be sent with an empty payload when using HTTP/2 [GH-194] + +## 0.7.3 (May 15, 2023) + +Initial release diff --git a/pkg/retryablehttp/CODEOWNERS b/pkg/retryablehttp/CODEOWNERS new file mode 100644 index 000000000..f8389c995 --- /dev/null +++ b/pkg/retryablehttp/CODEOWNERS @@ -0,0 +1 @@ +* @hashicorp/release-engineering \ No newline at end of file diff --git a/pkg/retryablehttp/LICENSE b/pkg/retryablehttp/LICENSE new file mode 100644 index 000000000..b75897e43 --- /dev/null +++ b/pkg/retryablehttp/LICENSE @@ -0,0 +1,369 @@ +The whole folder will be removed one the https://github.com/hashicorp/go-retryablehttp/pull/216 will be approved by HarshiCorp + +---- + +Copyright (c) 2015 HashiCorp, Inc. + +Mozilla Public License, version 2.0 + +1. Definitions + +1.1. "Contributor" + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + +1.2. "Contributor Version" + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + a. that the initial Contributor has attached the notice described in + Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the terms of + a Secondary License. + +1.6. "Executable Form" + + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + + means a work that combines Covered Software with other material, in a + separate file or files, that is not Covered Software. + +1.8. "License" + + means this document. + +1.9. "Licensable" + + means having the right to grant, to the maximum extent possible, whether + at the time of the initial grant or subsequently, any and all of the + rights conveyed by this License. + +1.10. "Modifications" + + means any of the following: + + a. any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + +1.11. "Patent Claims" of a Contributor + + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the License, + by the making, using, selling, offering for sale, having made, import, + or transfer of either its Contributions or its Contributor Version. + +1.12. "Secondary License" + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public + License, Version 3.0, or any later versions of those licenses. + +1.13. "Source Code Form" + + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that controls, is + controlled by, or is under common control with You. For purposes of this + definition, "control" means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent (50%) of the + outstanding shares or beneficial ownership of such entity. + + +2. License Grants and Conditions + +2.1. Grants + + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + a. under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + + b. under Patent Claims of such Contributor to make, use, sell, offer for + sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + + The licenses granted in Section 2.1 with respect to any Contribution + become effective for each Contribution on the date the Contributor first + distributes such Contribution. + +2.3. Limitations on Grant Scope + + The licenses granted in this Section 2 are the only rights granted under + this License. No additional rights or licenses will be implied from the + distribution or licensing of Covered Software under this License. + Notwithstanding Section 2.1(b) above, no patent license is granted by a + Contributor: + + a. for any code that a Contributor has removed from Covered Software; or + + b. for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. under Patent Claims infringed by Covered Software in the absence of + its Contributions. + + This License does not grant any rights in the trademarks, service marks, + or logos of any Contributor (except as may be necessary to comply with + the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this + License (see Section 10.2) or under the terms of a Secondary License (if + permitted under the terms of Section 3.3). + +2.5. Representation + + Each Contributor represents that the Contributor believes its + Contributions are its original creation(s) or it has sufficient rights to + grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + + This License is not intended to limit any rights You have under + applicable copyright doctrines of fair use, fair dealing, or other + equivalents. + +2.7. Conditions + + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in + Section 2.1. + + +3. Responsibilities + +3.1. Distribution of Source Form + + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under + the terms of this License. You must inform recipients that the Source + Code Form of the Covered Software is governed by the terms of this + License, and how they can obtain a copy of this License. You may not + attempt to alter or restrict the recipients' rights in the Source Code + Form. + +3.2. Distribution of Executable Form + + If You distribute Covered Software in Executable Form then: + + a. such Covered Software must also be made available in Source Code Form, + as described in Section 3.1, and You must inform recipients of the + Executable Form how they can obtain a copy of such Source Code Form by + reasonable means in a timely manner, at a charge no more than the cost + of distribution to the recipient; and + + b. You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter the + recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for + the Covered Software. If the Larger Work is a combination of Covered + Software with a work governed by one or more Secondary Licenses, and the + Covered Software is not Incompatible With Secondary Licenses, this + License permits You to additionally distribute such Covered Software + under the terms of such Secondary License(s), so that the recipient of + the Larger Work may, at their option, further distribute the Covered + Software under the terms of either this License or such Secondary + License(s). + +3.4. Notices + + You may not remove or alter the substance of any license notices + (including copyright notices, patent notices, disclaimers of warranty, or + limitations of liability) contained within the Source Code Form of the + Covered Software, except that You may alter any license notices to the + extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on + behalf of any Contributor. You must make it absolutely clear that any + such warranty, support, indemnity, or liability obligation is offered by + You alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + + If it is impossible for You to comply with any of the terms of this License + with respect to some or all of the Covered Software due to statute, + judicial order, or regulation then You must: (a) comply with the terms of + this License to the maximum extent possible; and (b) describe the + limitations and the code they affect. Such description must be placed in a + text file included with all distributions of the Covered Software under + this License. Except to the extent prohibited by statute or regulation, + such description must be sufficiently detailed for a recipient of ordinary + skill to be able to understand it. + +5. Termination + +5.1. The rights granted under this License will terminate automatically if You + fail to comply with any of its terms. However, if You become compliant, + then the rights granted under this License from a particular Contributor + are reinstated (a) provisionally, unless and until such Contributor + explicitly and finally terminates Your grants, and (b) on an ongoing + basis, if such Contributor fails to notify You of the non-compliance by + some reasonable means prior to 60 days after You have come back into + compliance. Moreover, Your grants from a particular Contributor are + reinstated on an ongoing basis if such Contributor notifies You of the + non-compliance by some reasonable means, this is the first time You have + received notice of non-compliance with this License from such + Contributor, and You become compliant prior to 30 days after Your receipt + of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, + counter-claims, and cross-claims) alleging that a Contributor Version + directly or indirectly infringes any patent, then the rights granted to + You by any and all Contributors for the Covered Software under Section + 2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user + license agreements (excluding distributors and resellers) which have been + validly granted by You or Your distributors under this License prior to + termination shall survive termination. + +6. Disclaimer of Warranty + + Covered Software is provided under this License on an "as is" basis, + without warranty of any kind, either expressed, implied, or statutory, + including, without limitation, warranties that the Covered Software is free + of defects, merchantable, fit for a particular purpose or non-infringing. + The entire risk as to the quality and performance of the Covered Software + is with You. Should any Covered Software prove defective in any respect, + You (not any Contributor) assume the cost of any necessary servicing, + repair, or correction. This disclaimer of warranty constitutes an essential + part of this License. No use of any Covered Software is authorized under + this License except under this disclaimer. + +7. Limitation of Liability + + Under no circumstances and under no legal theory, whether tort (including + negligence), contract, or otherwise, shall any Contributor, or anyone who + distributes Covered Software as permitted above, be liable to You for any + direct, indirect, special, incidental, or consequential damages of any + character including, without limitation, damages for lost profits, loss of + goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses, even if such party shall have been + informed of the possibility of such damages. This limitation of liability + shall not apply to liability for death or personal injury resulting from + such party's negligence to the extent applicable law prohibits such + limitation. Some jurisdictions do not allow the exclusion or limitation of + incidental or consequential damages, so this exclusion and limitation may + not apply to You. + +8. Litigation + + Any litigation relating to this License may be brought only in the courts + of a jurisdiction where the defendant maintains its principal place of + business and such litigation shall be governed by laws of that + jurisdiction, without reference to its conflict-of-law provisions. Nothing + in this Section shall prevent a party's ability to bring cross-claims or + counter-claims. + +9. Miscellaneous + + This License represents the complete agreement concerning the subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. Any law or regulation which provides that + the language of a contract shall be construed against the drafter shall not + be used to construe this License against a Contributor. + + +10. Versions of the License + +10.1. New Versions + + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + +10.2. Effect of New Versions + + You may distribute the Covered Software under the terms of the version + of the License under which You originally received the Covered Software, + or under the terms of any subsequent version published by the license + steward. + +10.3. Modified Versions + + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a + modified version of this License if you rename the license and remove + any references to the name of the license steward (except to note that + such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary + Licenses If You choose to distribute Source Code Form that is + Incompatible With Secondary Licenses under the terms of this version of + the License, the notice described in Exhibit B of this License must be + attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the + terms of the Mozilla Public License, v. + 2.0. If a copy of the MPL was not + distributed with this file, You can + obtain one at + http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, +then You may include the notice in a location (such as a LICENSE file in a +relevant directory) where a recipient would be likely to look for such a +notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice + + This Source Code Form is "Incompatible + With Secondary Licenses", as defined by + the Mozilla Public License, v. 2.0. + diff --git a/pkg/retryablehttp/README.md b/pkg/retryablehttp/README.md new file mode 100644 index 000000000..8943becf1 --- /dev/null +++ b/pkg/retryablehttp/README.md @@ -0,0 +1,62 @@ +go-retryablehttp +================ + +[![Build Status](http://img.shields.io/travis/hashicorp/go-retryablehttp.svg?style=flat-square)][travis] +[![Go Documentation](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)][godocs] + +[travis]: http://travis-ci.org/hashicorp/go-retryablehttp +[godocs]: http://godoc.org/github.com/hashicorp/go-retryablehttp + +The `retryablehttp` package provides a familiar HTTP client interface with +automatic retries and exponential backoff. It is a thin wrapper over the +standard `net/http` client library and exposes nearly the same public API. This +makes `retryablehttp` very easy to drop into existing programs. + +`retryablehttp` performs automatic retries under certain conditions. Mainly, if +an error is returned by the client (connection errors, etc.), or if a 500-range +response code is received (except 501), then a retry is invoked after a wait +period. Otherwise, the response is returned and left to the caller to +interpret. + +The main difference from `net/http` is that requests which take a request body +(POST/PUT et. al) can have the body provided in a number of ways (some more or +less efficient) that allow "rewinding" the request body if the initial request +fails so that the full request can be attempted again. See the +[godoc](http://godoc.org/github.com/hashicorp/go-retryablehttp) for more +details. + +Version 0.6.0 and before are compatible with Go prior to 1.12. From 0.6.1 onward, Go 1.12+ is required. +From 0.6.7 onward, Go 1.13+ is required. + +Example Use +=========== + +Using this library should look almost identical to what you would do with +`net/http`. The most simple example of a GET request is shown below: + +```go +resp, err := retryablehttp.Get("/foo") +if err != nil { + panic(err) +} +``` + +The returned response object is an `*http.Response`, the same thing you would +usually get from `net/http`. Had the request failed one or more times, the above +call would block and retry with exponential backoff. + +## Getting a stdlib `*http.Client` with retries + +It's possible to convert a `*retryablehttp.Client` directly to a `*http.Client`. +This makes use of retryablehttp broadly applicable with minimal effort. Simply +configure a `*retryablehttp.Client` as you wish, and then call `StandardClient()`: + +```go +retryClient := retryablehttp.NewClient() +retryClient.RetryMax = 10 + +standardClient := retryClient.StandardClient() // *http.Client +``` + +For more usage and examples see the +[godoc](http://godoc.org/github.com/hashicorp/go-retryablehttp). diff --git a/pkg/retryablehttp/client.go b/pkg/retryablehttp/client.go new file mode 100644 index 000000000..c8fe8f453 --- /dev/null +++ b/pkg/retryablehttp/client.go @@ -0,0 +1,867 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Package retryablehttp provides a familiar HTTP client interface with +// automatic retries and exponential backoff. It is a thin wrapper over the +// standard net/http client library and exposes nearly the same public API. +// This makes retryablehttp very easy to drop into existing programs. +// +// retryablehttp performs automatic retries under certain conditions. Mainly, if +// an error is returned by the client (connection errors etc), or if a 500-range +// response is received, then a retry is invoked. Otherwise, the response is +// returned and left to the caller to interpret. +// +// Requests which take a request body should provide a non-nil function +// parameter. The best choice is to provide either a function satisfying +// ReaderFunc which provides multiple io.Readers in an efficient manner, a +// *bytes.Buffer (the underlying raw byte slice will be used) or a raw byte +// slice. As it is a reference type, and we will wrap it as needed by readers, +// we can efficiently re-use the request body without needing to copy it. If an +// io.Reader (such as a *bytes.Reader) is provided, the full body will be read +// prior to the first request, and will be efficiently re-used for any retries. +// ReadSeeker can be used, but some users have observed occasional data races +// between the net/http library and the Seek functionality of some +// implementations of ReadSeeker, so should be avoided if possible. +package retryablehttp + +import ( + "bytes" + "context" + "crypto/x509" + "fmt" + "io" + "io/ioutil" + "log" + "math" + "math/rand" + "net/http" + "net/url" + "os" + "regexp" + "strconv" + "strings" + "sync" + "time" + + cleanhttp "github.com/hashicorp/go-cleanhttp" +) + +var ( + // Default retry configuration + defaultRetryWaitMin = 1 * time.Second + defaultRetryWaitMax = 30 * time.Second + defaultRetryMax = 4 + + // defaultLogger is the logger provided with defaultClient + defaultLogger = log.New(os.Stderr, "", log.LstdFlags) + + // defaultClient is used for performing requests without explicitly making + // a new client. It is purposely private to avoid modifications. + defaultClient = NewClient() + + // We need to consume response bodies to maintain http connections, but + // limit the size we consume to respReadLimit. + respReadLimit = int64(4096) + + // A regular expression to match the error returned by net/http when the + // configured number of redirects is exhausted. This error isn't typed + // specifically so we resort to matching on the error string. + redirectsErrorRe = regexp.MustCompile(`stopped after \d+ redirects\z`) + + // A regular expression to match the error returned by net/http when the + // scheme specified in the URL is invalid. This error isn't typed + // specifically so we resort to matching on the error string. + schemeErrorRe = regexp.MustCompile(`unsupported protocol scheme`) + + // A regular expression to match the error returned by net/http when the + // TLS certificate is not trusted. This error isn't typed + // specifically so we resort to matching on the error string. + notTrustedErrorRe = regexp.MustCompile(`certificate is not trusted`) +) + +// ReaderFunc is the type of function that can be given natively to NewRequest +type ReaderFunc func() (io.Reader, error) + +// ResponseHandlerFunc is a type of function that takes in a Response, and does something with it. +// The ResponseHandlerFunc is called when the HTTP client successfully receives a response and the +// CheckRetry function indicates that a retry of the base request is not necessary. +// If an error is returned from this function, the CheckRetry policy will be used to determine +// whether to retry the whole request (including this handler). +// +// Make sure to check status codes! Even if the request was completed it may have a non-2xx status code. +// +// The response body is not automatically closed. It must be closed either by the ResponseHandlerFunc or +// by the caller out-of-band. Failure to do so will result in a memory leak. +type ResponseHandlerFunc func(*http.Response) error + +// LenReader is an interface implemented by many in-memory io.Reader's. Used +// for automatically sending the right Content-Length header when possible. +type LenReader interface { + Len() int +} + +// Request wraps the metadata needed to create HTTP requests. +type Request struct { + // body is a seekable reader over the request body payload. This is + // used to rewind the request data in between retries. + body ReaderFunc + + responseHandler ResponseHandlerFunc + + // Embed an HTTP request directly. This makes a *Request act exactly + // like an *http.Request so that all meta methods are supported. + *http.Request +} + +// WithContext returns wrapped Request with a shallow copy of underlying *http.Request +// with its context changed to ctx. The provided ctx must be non-nil. +func (r *Request) WithContext(ctx context.Context) *Request { + return &Request{ + body: r.body, + responseHandler: r.responseHandler, + Request: r.Request.WithContext(ctx), + } +} + +// SetResponseHandler allows setting the response handler. +func (r *Request) SetResponseHandler(fn ResponseHandlerFunc) { + r.responseHandler = fn +} + +// BodyBytes allows accessing the request body. It is an analogue to +// http.Request's Body variable, but it returns a copy of the underlying data +// rather than consuming it. +// +// This function is not thread-safe; do not call it at the same time as another +// call, or at the same time this request is being used with Client.Do. +func (r *Request) BodyBytes() ([]byte, error) { + if r.body == nil { + return nil, nil + } + body, err := r.body() + if err != nil { + return nil, err + } + buf := new(bytes.Buffer) + _, err = buf.ReadFrom(body) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} + +// SetBody allows setting the request body. +// +// It is useful if a new body needs to be set without constructing a new Request. +func (r *Request) SetBody(rawBody interface{}) error { + bodyReader, contentLength, err := getBodyReaderAndContentLength(rawBody) + if err != nil { + return err + } + r.body = bodyReader + r.ContentLength = contentLength + if bodyReader != nil { + r.GetBody = func() (io.ReadCloser, error) { + body, err := bodyReader() + if err != nil { + return nil, err + } + if rc, ok := body.(io.ReadCloser); ok { + return rc, nil + } + return io.NopCloser(body), nil + } + } else { + r.GetBody = func() (io.ReadCloser, error) { return http.NoBody, nil } + } + return nil +} + +// WriteTo allows copying the request body into a writer. +// +// It writes data to w until there's no more data to write or +// when an error occurs. The return int64 value is the number of bytes +// written. Any error encountered during the write is also returned. +// The signature matches io.WriterTo interface. +func (r *Request) WriteTo(w io.Writer) (int64, error) { + body, err := r.body() + if err != nil { + return 0, err + } + if c, ok := body.(io.Closer); ok { + defer c.Close() + } + return io.Copy(w, body) +} + +func getBodyReaderAndContentLength(rawBody interface{}) (ReaderFunc, int64, error) { + var bodyReader ReaderFunc + var contentLength int64 + + switch body := rawBody.(type) { + // If they gave us a function already, great! Use it. + case ReaderFunc: + bodyReader = body + tmp, err := body() + if err != nil { + return nil, 0, err + } + if lr, ok := tmp.(LenReader); ok { + contentLength = int64(lr.Len()) + } + if c, ok := tmp.(io.Closer); ok { + c.Close() + } + + case func() (io.Reader, error): + bodyReader = body + tmp, err := body() + if err != nil { + return nil, 0, err + } + if lr, ok := tmp.(LenReader); ok { + contentLength = int64(lr.Len()) + } + if c, ok := tmp.(io.Closer); ok { + c.Close() + } + + // If a regular byte slice, we can read it over and over via new + // readers + case []byte: + buf := body + bodyReader = func() (io.Reader, error) { + return bytes.NewReader(buf), nil + } + contentLength = int64(len(buf)) + + // If a bytes.Buffer we can read the underlying byte slice over and + // over + case *bytes.Buffer: + buf := body + bodyReader = func() (io.Reader, error) { + return bytes.NewReader(buf.Bytes()), nil + } + contentLength = int64(buf.Len()) + + // We prioritize *bytes.Reader here because we don't really want to + // deal with it seeking so want it to match here instead of the + // io.ReadSeeker case. + case *bytes.Reader: + buf, err := ioutil.ReadAll(body) + if err != nil { + return nil, 0, err + } + bodyReader = func() (io.Reader, error) { + return bytes.NewReader(buf), nil + } + contentLength = int64(len(buf)) + + // Compat case + case io.ReadSeeker: + raw := body + bodyReader = func() (io.Reader, error) { + _, err := raw.Seek(0, 0) + return ioutil.NopCloser(raw), err + } + if lr, ok := raw.(LenReader); ok { + contentLength = int64(lr.Len()) + } + + // Read all in so we can reset + case io.Reader: + buf, err := ioutil.ReadAll(body) + if err != nil { + return nil, 0, err + } + if len(buf) == 0 { + bodyReader = func() (io.Reader, error) { + return http.NoBody, nil + } + contentLength = 0 + } else { + bodyReader = func() (io.Reader, error) { + return bytes.NewReader(buf), nil + } + contentLength = int64(len(buf)) + } + + // No body provided, nothing to do + case nil: + + // Unrecognized type + default: + return nil, 0, fmt.Errorf("cannot handle type %T", rawBody) + } + return bodyReader, contentLength, nil +} + +// FromRequest wraps an http.Request in a retryablehttp.Request +func FromRequest(r *http.Request) (*Request, error) { + bodyReader, _, err := getBodyReaderAndContentLength(r.Body) + if err != nil { + return nil, err + } + // Could assert contentLength == r.ContentLength + return &Request{body: bodyReader, Request: r}, nil +} + +// NewRequest creates a new wrapped request. +func NewRequest(method, url string, rawBody interface{}) (*Request, error) { + return NewRequestWithContext(context.Background(), method, url, rawBody) +} + +// NewRequestWithContext creates a new wrapped request with the provided context. +// +// The context controls the entire lifetime of a request and its response: +// obtaining a connection, sending the request, and reading the response headers and body. +func NewRequestWithContext(ctx context.Context, method, url string, rawBody interface{}) (*Request, error) { + httpReq, err := http.NewRequestWithContext(ctx, method, url, nil) + if err != nil { + return nil, err + } + + req := &Request{ + Request: httpReq, + } + if err := req.SetBody(rawBody); err != nil { + return nil, err + } + + return req, nil +} + +// Logger interface allows to use other loggers than +// standard log.Logger. +type Logger interface { + Printf(string, ...interface{}) +} + +// LeveledLogger is an interface that can be implemented by any logger or a +// logger wrapper to provide leveled logging. The methods accept a message +// string and a variadic number of key-value pairs. For log.Printf style +// formatting where message string contains a format specifier, use Logger +// interface. +type LeveledLogger interface { + Error(msg string, keysAndValues ...interface{}) + Info(msg string, keysAndValues ...interface{}) + Debug(msg string, keysAndValues ...interface{}) + Warn(msg string, keysAndValues ...interface{}) +} + +// hookLogger adapts an LeveledLogger to Logger for use by the existing hook functions +// without changing the API. +type hookLogger struct { + LeveledLogger +} + +func (h hookLogger) Printf(s string, args ...interface{}) { + h.Info(fmt.Sprintf(s, args...)) +} + +// RequestLogHook allows a function to run before each retry. The HTTP +// request which will be made, and the retry number (0 for the initial +// request) are available to users. The internal logger is exposed to +// consumers. +type RequestLogHook func(Logger, *http.Request, int) + +// ResponseLogHook is like RequestLogHook, but allows running a function +// on each HTTP response. This function will be invoked at the end of +// every HTTP request executed, regardless of whether a subsequent retry +// needs to be performed or not. If the response body is read or closed +// from this method, this will affect the response returned from Do(). +type ResponseLogHook func(Logger, *http.Response) + +// CheckRetry specifies a policy for handling retries. It is called +// following each request with the response and error values returned by +// the http.Client. If CheckRetry returns false, the Client stops retrying +// and returns the response to the caller. If CheckRetry returns an error, +// that error value is returned in lieu of the error from the request. The +// Client will close any response body when retrying, but if the retry is +// aborted it is up to the CheckRetry callback to properly close any +// response body before returning. +type CheckRetry func(ctx context.Context, resp *http.Response, err error) (bool, error) + +// Backoff specifies a policy for how long to wait between retries. +// It is called after a failing request to determine the amount of time +// that should pass before trying again. +type Backoff func(min, max time.Duration, attemptNum int, resp *http.Response) time.Duration + +// ErrorHandler is called if retries are expired, containing the last status +// from the http library. If not specified, default behavior for the library is +// to close the body and return an error indicating how many tries were +// attempted. If overriding this, be sure to close the body if needed. +type ErrorHandler func(resp *http.Response, err error, numTries int) (*http.Response, error) + +// PrepareRetry is called before retry operation. It can be used for example to re-sign the request +type PrepareRetry func(req *http.Request) error + +// Client is used to make HTTP requests. It adds additional functionality +// like automatic retries to tolerate minor outages. +type Client struct { + HTTPClient *http.Client // Internal HTTP client. + Logger interface{} // Customer logger instance. Can be either Logger or LeveledLogger + + RetryWaitMin time.Duration // Minimum time to wait + RetryWaitMax time.Duration // Maximum time to wait + RetryMax int // Maximum number of retries + + // RequestLogHook allows a user-supplied function to be called + // before each retry. + RequestLogHook RequestLogHook + + // ResponseLogHook allows a user-supplied function to be called + // with the response from each HTTP request executed. + ResponseLogHook ResponseLogHook + + // CheckRetry specifies the policy for handling retries, and is called + // after each request. The default policy is DefaultRetryPolicy. + CheckRetry CheckRetry + + // Backoff specifies the policy for how long to wait between retries + Backoff Backoff + + // ErrorHandler specifies the custom error handler to use, if any + ErrorHandler ErrorHandler + + // PrepareRetry can prepare the request for retry operation, for example re-sign it + PrepareRetry PrepareRetry + + loggerInit sync.Once + clientInit sync.Once +} + +// NewClient creates a new Client with default settings. +func NewClient() *Client { + return &Client{ + HTTPClient: cleanhttp.DefaultPooledClient(), + Logger: defaultLogger, + RetryWaitMin: defaultRetryWaitMin, + RetryWaitMax: defaultRetryWaitMax, + RetryMax: defaultRetryMax, + CheckRetry: DefaultRetryPolicy, + Backoff: DefaultBackoff, + PrepareRetry: DefaultPrepareRetry, + } +} + +func (c *Client) logger() interface{} { + c.loggerInit.Do(func() { + if c.Logger == nil { + return + } + + switch c.Logger.(type) { + case Logger, LeveledLogger: + // ok + default: + // This should happen in dev when they are setting Logger and work on code, not in prod. + panic(fmt.Sprintf("invalid logger type passed, must be Logger or LeveledLogger, was %T", c.Logger)) + } + }) + + return c.Logger +} + +// DefaultRetryPolicy provides a default callback for Client.CheckRetry, which +// will retry on connection errors and server errors. +func DefaultRetryPolicy(ctx context.Context, resp *http.Response, err error) (bool, error) { + // do not retry on context.Canceled or context.DeadlineExceeded + if ctx.Err() != nil { + return false, ctx.Err() + } + + // don't propagate other errors + shouldRetry, _ := baseRetryPolicy(resp, err) + return shouldRetry, nil +} + +// ErrorPropagatedRetryPolicy is the same as DefaultRetryPolicy, except it +// propagates errors back instead of returning nil. This allows you to inspect +// why it decided to retry or not. +func ErrorPropagatedRetryPolicy(ctx context.Context, resp *http.Response, err error) (bool, error) { + // do not retry on context.Canceled or context.DeadlineExceeded + if ctx.Err() != nil { + return false, ctx.Err() + } + + return baseRetryPolicy(resp, err) +} + +func baseRetryPolicy(resp *http.Response, err error) (bool, error) { + if err != nil { + if v, ok := err.(*url.Error); ok { + // Don't retry if the error was due to too many redirects. + if redirectsErrorRe.MatchString(v.Error()) { + return false, v + } + + // Don't retry if the error was due to an invalid protocol scheme. + if schemeErrorRe.MatchString(v.Error()) { + return false, v + } + + // Don't retry if the error was due to TLS cert verification failure. + if notTrustedErrorRe.MatchString(v.Error()) { + return false, v + } + if _, ok := v.Err.(x509.UnknownAuthorityError); ok { + return false, v + } + } + + // The error is likely recoverable so retry. + return true, nil + } + + // 429 Too Many Requests is recoverable. Sometimes the server puts + // a Retry-After response header to indicate when the server is + // available to start processing request from client. + if resp.StatusCode == http.StatusTooManyRequests { + return true, nil + } + + // Check the response code. We retry on 500-range responses to allow + // the server time to recover, as 500's are typically not permanent + // errors and may relate to outages on the server side. This will catch + // invalid response codes as well, like 0 and 999. + if resp.StatusCode == 0 || (resp.StatusCode >= 500 && resp.StatusCode != http.StatusNotImplemented) { + return true, fmt.Errorf("unexpected HTTP status %s", resp.Status) + } + + return false, nil +} + +// DefaultBackoff provides a default callback for Client.Backoff which +// will perform exponential backoff based on the attempt number and limited +// by the provided minimum and maximum durations. +// +// It also tries to parse Retry-After response header when a http.StatusTooManyRequests +// (HTTP Code 429) is found in the resp parameter. Hence it will return the number of +// seconds the server states it may be ready to process more requests from this client. +func DefaultBackoff(min, max time.Duration, attemptNum int, resp *http.Response) time.Duration { + if resp != nil { + if resp.StatusCode == http.StatusTooManyRequests || resp.StatusCode == http.StatusServiceUnavailable { + if s, ok := resp.Header["Retry-After"]; ok { + if sleep, err := strconv.ParseInt(s[0], 10, 64); err == nil { + return time.Second * time.Duration(sleep) + } + } + } + } + + mult := math.Pow(2, float64(attemptNum)) * float64(min) + sleep := time.Duration(mult) + if float64(sleep) != mult || sleep > max { + sleep = max + } + return sleep +} + +// DefaultPrepareRetry is performing noop during prepare retry +func DefaultPrepareRetry(_ *http.Request) error { + // noop + return nil +} + +// LinearJitterBackoff provides a callback for Client.Backoff which will +// perform linear backoff based on the attempt number and with jitter to +// prevent a thundering herd. +// +// min and max here are *not* absolute values. The number to be multiplied by +// the attempt number will be chosen at random from between them, thus they are +// bounding the jitter. +// +// For instance: +// * To get strictly linear backoff of one second increasing each retry, set +// both to one second (1s, 2s, 3s, 4s, ...) +// * To get a small amount of jitter centered around one second increasing each +// retry, set to around one second, such as a min of 800ms and max of 1200ms +// (892ms, 2102ms, 2945ms, 4312ms, ...) +// * To get extreme jitter, set to a very wide spread, such as a min of 100ms +// and a max of 20s (15382ms, 292ms, 51321ms, 35234ms, ...) +func LinearJitterBackoff(min, max time.Duration, attemptNum int, resp *http.Response) time.Duration { + // attemptNum always starts at zero but we want to start at 1 for multiplication + attemptNum++ + + if max <= min { + // Unclear what to do here, or they are the same, so return min * + // attemptNum + return min * time.Duration(attemptNum) + } + + // Seed rand; doing this every time is fine + rand := rand.New(rand.NewSource(int64(time.Now().Nanosecond()))) + + // Pick a random number that lies somewhere between the min and max and + // multiply by the attemptNum. attemptNum starts at zero so we always + // increment here. We first get a random percentage, then apply that to the + // difference between min and max, and add to min. + jitter := rand.Float64() * float64(max-min) + jitterMin := int64(jitter) + int64(min) + return time.Duration(jitterMin * int64(attemptNum)) +} + +// PassthroughErrorHandler is an ErrorHandler that directly passes through the +// values from the net/http library for the final request. The body is not +// closed. +func PassthroughErrorHandler(resp *http.Response, err error, _ int) (*http.Response, error) { + return resp, err +} + +// Do wraps calling an HTTP method with retries. +func (c *Client) Do(req *Request) (*http.Response, error) { + c.clientInit.Do(func() { + if c.HTTPClient == nil { + c.HTTPClient = cleanhttp.DefaultPooledClient() + } + }) + + logger := c.logger() + + if logger != nil { + switch v := logger.(type) { + case LeveledLogger: + v.Debug("performing request", "method", req.Method, "url", req.URL) + case Logger: + v.Printf("[DEBUG] %s %s", req.Method, req.URL) + } + } + + var resp *http.Response + var attempt int + var shouldRetry bool + var doErr, respErr, checkErr, prepareErr error + + for i := 0; ; i++ { + doErr, respErr, prepareErr = nil, nil, nil + attempt++ + + // Always rewind the request body when non-nil. + if req.body != nil { + body, err := req.body() + if err != nil { + c.HTTPClient.CloseIdleConnections() + return resp, err + } + if c, ok := body.(io.ReadCloser); ok { + req.Body = c + } else { + req.Body = ioutil.NopCloser(body) + } + } + + if c.RequestLogHook != nil { + switch v := logger.(type) { + case LeveledLogger: + c.RequestLogHook(hookLogger{v}, req.Request, i) + case Logger: + c.RequestLogHook(v, req.Request, i) + default: + c.RequestLogHook(nil, req.Request, i) + } + } + + // Attempt the request + resp, doErr = c.HTTPClient.Do(req.Request) + + // Check if we should continue with retries. + shouldRetry, checkErr = c.CheckRetry(req.Context(), resp, doErr) + if !shouldRetry && doErr == nil && req.responseHandler != nil { + respErr = req.responseHandler(resp) + shouldRetry, checkErr = c.CheckRetry(req.Context(), resp, respErr) + } + + err := doErr + if respErr != nil { + err = respErr + } + if err != nil { + switch v := logger.(type) { + case LeveledLogger: + v.Error("request failed", "error", err, "method", req.Method, "url", req.URL) + case Logger: + v.Printf("[ERR] %s %s request failed: %v", req.Method, req.URL, err) + } + } else { + // Call this here to maintain the behavior of logging all requests, + // even if CheckRetry signals to stop. + if c.ResponseLogHook != nil { + // Call the response logger function if provided. + switch v := logger.(type) { + case LeveledLogger: + c.ResponseLogHook(hookLogger{v}, resp) + case Logger: + c.ResponseLogHook(v, resp) + default: + c.ResponseLogHook(nil, resp) + } + } + } + + if !shouldRetry { + break + } + + // We do this before drainBody because there's no need for the I/O if + // we're breaking out + remain := c.RetryMax - i + if remain <= 0 { + break + } + + // We're going to retry, consume any response to reuse the connection. + if doErr == nil { + c.drainBody(resp.Body) + } + + wait := c.Backoff(c.RetryWaitMin, c.RetryWaitMax, i, resp) + if logger != nil { + desc := fmt.Sprintf("%s %s", req.Method, req.URL) + if resp != nil { + desc = fmt.Sprintf("%s (status: %d)", desc, resp.StatusCode) + } + switch v := logger.(type) { + case LeveledLogger: + v.Debug("retrying request", "request", desc, "timeout", wait, "remaining", remain) + case Logger: + v.Printf("[DEBUG] %s: retrying in %s (%d left)", desc, wait, remain) + } + } + timer := time.NewTimer(wait) + select { + case <-req.Context().Done(): + timer.Stop() + c.HTTPClient.CloseIdleConnections() + return nil, req.Context().Err() + case <-timer.C: + } + + // Make shallow copy of http Request so that we can modify its body + // without racing against the closeBody call in persistConn.writeLoop. + httpreq := *req.Request + req.Request = &httpreq + + if err := c.PrepareRetry(req.Request); err != nil { + prepareErr = err + break + } + } + + // this is the closest we have to success criteria + if doErr == nil && respErr == nil && checkErr == nil && prepareErr == nil && !shouldRetry { + return resp, nil + } + + defer c.HTTPClient.CloseIdleConnections() + + var err error + if prepareErr != nil { + err = prepareErr + } else if checkErr != nil { + err = checkErr + } else if respErr != nil { + err = respErr + } else { + err = doErr + } + + if c.ErrorHandler != nil { + return c.ErrorHandler(resp, err, attempt) + } + + // By default, we close the response body and return an error without + // returning the response + if resp != nil { + c.drainBody(resp.Body) + } + + // this means CheckRetry thought the request was a failure, but didn't + // communicate why + if err == nil { + return nil, fmt.Errorf("%s %s giving up after %d attempt(s)", + req.Method, req.URL, attempt) + } + + return nil, fmt.Errorf("%s %s giving up after %d attempt(s): %w", + req.Method, req.URL, attempt, err) +} + +// Try to read the response body so we can reuse this connection. +func (c *Client) drainBody(body io.ReadCloser) { + defer body.Close() + _, err := io.Copy(ioutil.Discard, io.LimitReader(body, respReadLimit)) + if err != nil { + if c.logger() != nil { + switch v := c.logger().(type) { + case LeveledLogger: + v.Error("error reading response body", "error", err) + case Logger: + v.Printf("[ERR] error reading response body: %v", err) + } + } + } +} + +// Get is a shortcut for doing a GET request without making a new client. +func Get(url string) (*http.Response, error) { + return defaultClient.Get(url) +} + +// Get is a convenience helper for doing simple GET requests. +func (c *Client) Get(url string) (*http.Response, error) { + req, err := NewRequest("GET", url, nil) + if err != nil { + return nil, err + } + return c.Do(req) +} + +// Head is a shortcut for doing a HEAD request without making a new client. +func Head(url string) (*http.Response, error) { + return defaultClient.Head(url) +} + +// Head is a convenience method for doing simple HEAD requests. +func (c *Client) Head(url string) (*http.Response, error) { + req, err := NewRequest("HEAD", url, nil) + if err != nil { + return nil, err + } + return c.Do(req) +} + +// Post is a shortcut for doing a POST request without making a new client. +func Post(url, bodyType string, body interface{}) (*http.Response, error) { + return defaultClient.Post(url, bodyType, body) +} + +// Post is a convenience method for doing simple POST requests. +func (c *Client) Post(url, bodyType string, body interface{}) (*http.Response, error) { + req, err := NewRequest("POST", url, body) + if err != nil { + return nil, err + } + req.Header.Set("Content-Type", bodyType) + return c.Do(req) +} + +// PostForm is a shortcut to perform a POST with form data without creating +// a new client. +func PostForm(url string, data url.Values) (*http.Response, error) { + return defaultClient.PostForm(url, data) +} + +// PostForm is a convenience method for doing simple POST operations using +// pre-filled url.Values form data. +func (c *Client) PostForm(url string, data url.Values) (*http.Response, error) { + return c.Post(url, "application/x-www-form-urlencoded", strings.NewReader(data.Encode())) +} + +// StandardClient returns a stdlib *http.Client with a custom Transport, which +// shims in a *retryablehttp.Client for added retries. +func (c *Client) StandardClient() *http.Client { + return &http.Client{ + Transport: &RoundTripper{Client: c}, + } +} diff --git a/pkg/retryablehttp/client_test.go b/pkg/retryablehttp/client_test.go new file mode 100644 index 000000000..a751d3fd2 --- /dev/null +++ b/pkg/retryablehttp/client_test.go @@ -0,0 +1,1162 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package retryablehttp + +import ( + "bytes" + "context" + "errors" + "fmt" + "io" + "io/ioutil" + "net" + "net/http" + "net/http/httptest" + "net/http/httputil" + "net/url" + "strconv" + "strings" + "sync/atomic" + "testing" + "time" + + "github.com/hashicorp/go-hclog" +) + +func TestRequest(t *testing.T) { + // Fails on invalid request + _, err := NewRequest("GET", "://foo", nil) + if err == nil { + t.Fatalf("should error") + } + + // Works with no request body + _, err = NewRequest("GET", "http://foo", nil) + if err != nil { + t.Fatalf("err: %v", err) + } + + // Works with request body + body := bytes.NewReader([]byte("yo")) + req, err := NewRequest("GET", "/", body) + if err != nil { + t.Fatalf("err: %v", err) + } + + // Request allows typical HTTP request forming methods + req.Header.Set("X-Test", "foo") + if v, ok := req.Header["X-Test"]; !ok || len(v) != 1 || v[0] != "foo" { + t.Fatalf("bad headers: %v", req.Header) + } + + // Sets the Content-Length automatically for LenReaders + if req.ContentLength != 2 { + t.Fatalf("bad ContentLength: %d", req.ContentLength) + } +} + +func TestFromRequest(t *testing.T) { + // Works with no request body + httpReq, err := http.NewRequest("GET", "http://foo", nil) + if err != nil { + t.Fatalf("err: %v", err) + } + _, err = FromRequest(httpReq) + if err != nil { + t.Fatalf("err: %v", err) + } + + // Works with request body + body := bytes.NewReader([]byte("yo")) + httpReq, err = http.NewRequest("GET", "/", body) + if err != nil { + t.Fatalf("err: %v", err) + } + req, err := FromRequest(httpReq) + if err != nil { + t.Fatalf("err: %v", err) + } + + // Preserves headers + httpReq.Header.Set("X-Test", "foo") + if v, ok := req.Header["X-Test"]; !ok || len(v) != 1 || v[0] != "foo" { + t.Fatalf("bad headers: %v", req.Header) + } + + // Preserves the Content-Length automatically for LenReaders + if req.ContentLength != 2 { + t.Fatalf("bad ContentLength: %d", req.ContentLength) + } +} + +// Since normal ways we would generate a Reader have special cases, use a +// custom type here +type custReader struct { + val string + pos int +} + +func (c *custReader) Read(p []byte) (n int, err error) { + if c.val == "" { + c.val = "hello" + } + if c.pos >= len(c.val) { + return 0, io.EOF + } + var i int + for i = 0; i < len(p) && i+c.pos < len(c.val); i++ { + p[i] = c.val[i+c.pos] + } + c.pos += i + return i, nil +} + +func TestClient_Do(t *testing.T) { + testBytes := []byte("hello") + // Native func + testClientDo(t, ReaderFunc(func() (io.Reader, error) { + return bytes.NewReader(testBytes), nil + })) + // Native func, different Go type + testClientDo(t, func() (io.Reader, error) { + return bytes.NewReader(testBytes), nil + }) + // []byte + testClientDo(t, testBytes) + // *bytes.Buffer + testClientDo(t, bytes.NewBuffer(testBytes)) + // *bytes.Reader + testClientDo(t, bytes.NewReader(testBytes)) + // io.ReadSeeker + testClientDo(t, strings.NewReader(string(testBytes))) + // io.Reader + testClientDo(t, &custReader{}) +} + +func testClientDo(t *testing.T, body interface{}) { + // Create a request + req, err := NewRequest("PUT", "http://127.0.0.1:28934/v1/foo", body) + if err != nil { + t.Fatalf("err: %v", err) + } + req.Header.Set("foo", "bar") + + // Track the number of times the logging hook was called + retryCount := -1 + + // Create the client. Use short retry windows. + client := NewClient() + client.RetryWaitMin = 10 * time.Millisecond + client.RetryWaitMax = 50 * time.Millisecond + client.RetryMax = 50 + client.RequestLogHook = func(logger Logger, req *http.Request, retryNumber int) { + retryCount = retryNumber + + if logger != client.Logger { + t.Fatalf("Client logger was not passed to logging hook") + } + + dumpBytes, err := httputil.DumpRequestOut(req, false) + if err != nil { + t.Fatal("Dumping requests failed") + } + + dumpString := string(dumpBytes) + if !strings.Contains(dumpString, "PUT /v1/foo") { + t.Fatalf("Bad request dump:\n%s", dumpString) + } + } + + // Send the request + var resp *http.Response + doneCh := make(chan struct{}) + errCh := make(chan error, 1) + go func() { + defer close(doneCh) + defer close(errCh) + var err error + resp, err = client.Do(req) + errCh <- err + }() + + select { + case <-doneCh: + t.Fatalf("should retry on error") + case <-time.After(200 * time.Millisecond): + // Client should still be retrying due to connection failure. + } + + // Create the mock handler. First we return a 500-range response to ensure + // that we power through and keep retrying in the face of recoverable + // errors. + code := int64(500) + handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + // Check the request details + if r.Method != "PUT" { + t.Fatalf("bad method: %s", r.Method) + } + if r.RequestURI != "/v1/foo" { + t.Fatalf("bad uri: %s", r.RequestURI) + } + + // Check the headers + if v := r.Header.Get("foo"); v != "bar" { + t.Fatalf("bad header: expect foo=bar, got foo=%v", v) + } + + // Check the payload + body, err := ioutil.ReadAll(r.Body) + if err != nil { + t.Fatalf("err: %s", err) + } + expected := []byte("hello") + if !bytes.Equal(body, expected) { + t.Fatalf("bad: %v", body) + } + + w.WriteHeader(int(atomic.LoadInt64(&code))) + }) + + // Create a test server + list, err := net.Listen("tcp", ":28934") + if err != nil { + t.Fatalf("err: %v", err) + } + defer list.Close() + go http.Serve(list, handler) + + // Wait again + select { + case <-doneCh: + t.Fatalf("should retry on 500-range") + case <-time.After(200 * time.Millisecond): + // Client should still be retrying due to 500's. + } + + // Start returning 200's + atomic.StoreInt64(&code, 200) + + // Wait again + select { + case <-doneCh: + case <-time.After(time.Second): + t.Fatalf("timed out") + } + + if resp.StatusCode != 200 { + t.Fatalf("exected 200, got: %d", resp.StatusCode) + } + + if retryCount < 0 { + t.Fatal("request log hook was not called") + } + + err = <-errCh + if err != nil { + t.Fatalf("err: %v", err) + } +} + +func TestClient_Do_WithResponseHandler(t *testing.T) { + // Create the client. Use short retry windows so we fail faster. + client := NewClient() + client.RetryWaitMin = 10 * time.Millisecond + client.RetryWaitMax = 10 * time.Millisecond + client.RetryMax = 2 + + var checks int + client.CheckRetry = func(_ context.Context, resp *http.Response, err error) (bool, error) { + checks++ + if err != nil && strings.Contains(err.Error(), "nonretryable") { + return false, nil + } + return DefaultRetryPolicy(context.TODO(), resp, err) + } + + // Mock server which always responds 200. + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(200) + })) + defer ts.Close() + + var shouldSucceed bool + tests := []struct { + name string + handler ResponseHandlerFunc + expectedChecks int // often 2x number of attempts since we check twice + err string + }{ + { + name: "nil handler", + handler: nil, + expectedChecks: 1, + }, + { + name: "handler always succeeds", + handler: func(*http.Response) error { + return nil + }, + expectedChecks: 2, + }, + { + name: "handler always fails in a retryable way", + handler: func(*http.Response) error { + return errors.New("retryable failure") + }, + expectedChecks: 6, + }, + { + name: "handler always fails in a nonretryable way", + handler: func(*http.Response) error { + return errors.New("nonretryable failure") + }, + expectedChecks: 2, + }, + { + name: "handler succeeds on second attempt", + handler: func(*http.Response) error { + if shouldSucceed { + return nil + } + shouldSucceed = true + return errors.New("retryable failure") + }, + expectedChecks: 4, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + checks = 0 + shouldSucceed = false + // Create the request + req, err := NewRequest("GET", ts.URL, nil) + if err != nil { + t.Fatalf("err: %v", err) + } + req.SetResponseHandler(tt.handler) + + // Send the request. + _, err = client.Do(req) + if err != nil && !strings.Contains(err.Error(), tt.err) { + t.Fatalf("error does not match expectation, expected: %s, got: %s", tt.err, err.Error()) + } + if err == nil && tt.err != "" { + t.Fatalf("no error, expected: %s", tt.err) + } + + if checks != tt.expectedChecks { + t.Fatalf("expected %d attempts, got %d attempts", tt.expectedChecks, checks) + } + }) + } +} + +func TestClient_Do_WithPrepareRetry(t *testing.T) { + // Create the client. Use short retry windows so we fail faster. + client := NewClient() + client.RetryWaitMin = 10 * time.Millisecond + client.RetryWaitMax = 10 * time.Millisecond + client.RetryMax = 2 + + var checks int + client.CheckRetry = func(_ context.Context, resp *http.Response, err error) (bool, error) { + checks++ + if err != nil && strings.Contains(err.Error(), "nonretryable") { + return false, nil + } + return DefaultRetryPolicy(context.TODO(), resp, err) + } + + var prepareChecks int + client.PrepareRetry = func(req *http.Request) error { + prepareChecks++ + req.Header.Set("foo", strconv.Itoa(prepareChecks)) + return nil + } + + // Mock server which always responds 200. + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(200) + })) + defer ts.Close() + + var shouldSucceed bool + tests := []struct { + name string + handler ResponseHandlerFunc + expectedChecks int // often 2x number of attempts since we check twice + expectedPrepareChecks int + err string + }{ + { + name: "nil handler", + handler: nil, + expectedChecks: 1, + expectedPrepareChecks: 0, + }, + { + name: "handler always succeeds", + handler: func(*http.Response) error { + return nil + }, + expectedChecks: 2, + expectedPrepareChecks: 0, + }, + { + name: "handler always fails in a retryable way", + handler: func(*http.Response) error { + return errors.New("retryable failure") + }, + expectedChecks: 6, + expectedPrepareChecks: 2, + }, + { + name: "handler always fails in a nonretryable way", + handler: func(*http.Response) error { + return errors.New("nonretryable failure") + }, + expectedChecks: 2, + expectedPrepareChecks: 0, + }, + { + name: "handler succeeds on second attempt", + handler: func(*http.Response) error { + if shouldSucceed { + return nil + } + shouldSucceed = true + return errors.New("retryable failure") + }, + expectedChecks: 4, + expectedPrepareChecks: 1, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + checks = 0 + prepareChecks = 0 + shouldSucceed = false + // Create the request + req, err := NewRequest("GET", ts.URL, nil) + if err != nil { + t.Fatalf("err: %v", err) + } + req.SetResponseHandler(tt.handler) + + // Send the request. + _, err = client.Do(req) + if err != nil && !strings.Contains(err.Error(), tt.err) { + t.Fatalf("error does not match expectation, expected: %s, got: %s", tt.err, err.Error()) + } + if err == nil && tt.err != "" { + t.Fatalf("no error, expected: %s", tt.err) + } + + if checks != tt.expectedChecks { + t.Fatalf("expected %d attempts, got %d attempts", tt.expectedChecks, checks) + } + + if prepareChecks != tt.expectedPrepareChecks { + t.Fatalf("expected %d attempts of prepare check, got %d attempts", tt.expectedPrepareChecks, prepareChecks) + } + header := req.Request.Header.Get("foo") + if tt.expectedPrepareChecks == 0 && header != "" { + t.Fatalf("expected no changes to request header 'foo', but got '%s'", header) + } + expectedHeader := strconv.Itoa(tt.expectedPrepareChecks) + if tt.expectedPrepareChecks != 0 && header != expectedHeader { + t.Fatalf("expected changes in request header 'foo' '%s', but got '%s'", expectedHeader, header) + } + + }) + } +} + +func TestClient_Do_fails(t *testing.T) { + // Mock server which always responds 500. + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(500) + })) + defer ts.Close() + + tests := []struct { + name string + cr CheckRetry + err string + }{ + { + name: "default_retry_policy", + cr: DefaultRetryPolicy, + err: "giving up after 3 attempt(s)", + }, + { + name: "error_propagated_retry_policy", + cr: ErrorPropagatedRetryPolicy, + err: "giving up after 3 attempt(s): unexpected HTTP status 500 Internal Server Error", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + // Create the client. Use short retry windows so we fail faster. + client := NewClient() + client.RetryWaitMin = 10 * time.Millisecond + client.RetryWaitMax = 10 * time.Millisecond + client.CheckRetry = tt.cr + client.RetryMax = 2 + + // Create the request + req, err := NewRequest("POST", ts.URL, nil) + if err != nil { + t.Fatalf("err: %v", err) + } + + // Send the request. + _, err = client.Do(req) + if err == nil || !strings.HasSuffix(err.Error(), tt.err) { + t.Fatalf("expected giving up error, got: %#v", err) + } + }) + } +} + +func TestClient_Get(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "GET" { + t.Fatalf("bad method: %s", r.Method) + } + if r.RequestURI != "/foo/bar" { + t.Fatalf("bad uri: %s", r.RequestURI) + } + w.WriteHeader(200) + })) + defer ts.Close() + + // Make the request. + resp, err := NewClient().Get(ts.URL + "/foo/bar") + if err != nil { + t.Fatalf("err: %v", err) + } + resp.Body.Close() +} + +func TestClient_RequestLogHook(t *testing.T) { + t.Run("RequestLogHook successfully called with default Logger", func(t *testing.T) { + testClientRequestLogHook(t, defaultLogger) + }) + t.Run("RequestLogHook successfully called with nil Logger", func(t *testing.T) { + testClientRequestLogHook(t, nil) + }) + t.Run("RequestLogHook successfully called with nil typed Logger", func(t *testing.T) { + testClientRequestLogHook(t, Logger(nil)) + }) + t.Run("RequestLogHook successfully called with nil typed LeveledLogger", func(t *testing.T) { + testClientRequestLogHook(t, LeveledLogger(nil)) + }) +} + +func testClientRequestLogHook(t *testing.T, logger interface{}) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "GET" { + t.Fatalf("bad method: %s", r.Method) + } + if r.RequestURI != "/foo/bar" { + t.Fatalf("bad uri: %s", r.RequestURI) + } + w.WriteHeader(200) + })) + defer ts.Close() + + retries := -1 + testURIPath := "/foo/bar" + + client := NewClient() + client.Logger = logger + client.RequestLogHook = func(logger Logger, req *http.Request, retry int) { + retries = retry + + if logger != client.Logger { + t.Fatalf("Client logger was not passed to logging hook") + } + + dumpBytes, err := httputil.DumpRequestOut(req, false) + if err != nil { + t.Fatal("Dumping requests failed") + } + + dumpString := string(dumpBytes) + if !strings.Contains(dumpString, "GET "+testURIPath) { + t.Fatalf("Bad request dump:\n%s", dumpString) + } + } + + // Make the request. + resp, err := client.Get(ts.URL + testURIPath) + if err != nil { + t.Fatalf("err: %v", err) + } + resp.Body.Close() + + if retries < 0 { + t.Fatal("Logging hook was not called") + } +} + +func TestClient_ResponseLogHook(t *testing.T) { + t.Run("ResponseLogHook successfully called with hclog Logger", func(t *testing.T) { + buf := new(bytes.Buffer) + l := hclog.New(&hclog.LoggerOptions{ + Output: buf, + }) + testClientResponseLogHook(t, l, buf) + }) + t.Run("ResponseLogHook successfully called with nil Logger", func(t *testing.T) { + buf := new(bytes.Buffer) + testClientResponseLogHook(t, nil, buf) + }) + t.Run("ResponseLogHook successfully called with nil typed Logger", func(t *testing.T) { + buf := new(bytes.Buffer) + testClientResponseLogHook(t, Logger(nil), buf) + }) + t.Run("ResponseLogHook successfully called with nil typed LeveledLogger", func(t *testing.T) { + buf := new(bytes.Buffer) + testClientResponseLogHook(t, LeveledLogger(nil), buf) + }) +} + +func testClientResponseLogHook(t *testing.T, l interface{}, buf *bytes.Buffer) { + passAfter := time.Now().Add(100 * time.Millisecond) + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if time.Now().After(passAfter) { + w.WriteHeader(200) + w.Write([]byte("test_200_body")) + } else { + w.WriteHeader(500) + w.Write([]byte("test_500_body")) + } + })) + defer ts.Close() + + client := NewClient() + + client.Logger = l + client.RetryWaitMin = 10 * time.Millisecond + client.RetryWaitMax = 10 * time.Millisecond + client.RetryMax = 15 + client.ResponseLogHook = func(logger Logger, resp *http.Response) { + if resp.StatusCode == 200 { + successLog := "test_log_pass" + // Log something when we get a 200 + if logger != nil { + logger.Printf(successLog) + } else { + buf.WriteString(successLog) + } + } else { + // Log the response body when we get a 500 + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + t.Fatalf("err: %v", err) + } + failLog := string(body) + if logger != nil { + logger.Printf(failLog) + } else { + buf.WriteString(failLog) + } + } + } + + // Perform the request. Exits when we finally get a 200. + resp, err := client.Get(ts.URL) + if err != nil { + t.Fatalf("err: %v", err) + } + + // Make sure we can read the response body still, since we did not + // read or close it from the response log hook. + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + t.Fatalf("err: %v", err) + } + if string(body) != "test_200_body" { + t.Fatalf("expect %q, got %q", "test_200_body", string(body)) + } + + // Make sure we wrote to the logger on callbacks. + out := buf.String() + if !strings.Contains(out, "test_log_pass") { + t.Fatalf("expect response callback on 200: %q", out) + } + if !strings.Contains(out, "test_500_body") { + t.Fatalf("expect response callback on 500: %q", out) + } +} + +func TestClient_NewRequestWithContext(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + r, err := NewRequestWithContext(ctx, http.MethodGet, "/abc", nil) + if err != nil { + t.Fatalf("err: %v", err) + } + if r.Context() != ctx { + t.Fatal("Context must be set") + } +} + +func TestClient_RequestWithContext(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(200) + w.Write([]byte("test_200_body")) + })) + defer ts.Close() + + req, err := NewRequest(http.MethodGet, ts.URL, nil) + if err != nil { + t.Fatalf("err: %v", err) + } + ctx, cancel := context.WithCancel(req.Request.Context()) + reqCtx := req.WithContext(ctx) + if reqCtx == req { + t.Fatal("WithContext must return a new Request object") + } + + client := NewClient() + + called := 0 + client.CheckRetry = func(_ context.Context, resp *http.Response, err error) (bool, error) { + called++ + return DefaultRetryPolicy(reqCtx.Request.Context(), resp, err) + } + + cancel() + _, err = client.Do(reqCtx) + + if called != 1 { + t.Fatalf("CheckRetry called %d times, expected 1", called) + } + + e := fmt.Sprintf("GET %s giving up after 1 attempt(s): %s", ts.URL, context.Canceled.Error()) + + if err.Error() != e { + t.Fatalf("Expected err to contain %s, got: %v", e, err) + } +} + +func TestClient_CheckRetry(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + http.Error(w, "test_500_body", http.StatusInternalServerError) + })) + defer ts.Close() + + client := NewClient() + + retryErr := errors.New("retryError") + called := 0 + client.CheckRetry = func(_ context.Context, resp *http.Response, err error) (bool, error) { + if called < 1 { + called++ + return DefaultRetryPolicy(context.TODO(), resp, err) + } + + return false, retryErr + } + + // CheckRetry should return our retryErr value and stop the retry loop. + _, err := client.Get(ts.URL) + + if called != 1 { + t.Fatalf("CheckRetry called %d times, expected 1", called) + } + + if err.Error() != fmt.Sprintf("GET %s giving up after 2 attempt(s): retryError", ts.URL) { + t.Fatalf("Expected retryError, got:%v", err) + } +} + +func TestClient_DefaultBackoff(t *testing.T) { + for _, code := range []int{http.StatusTooManyRequests, http.StatusServiceUnavailable} { + t.Run(fmt.Sprintf("http_%d", code), func(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Retry-After", "2") + http.Error(w, fmt.Sprintf("test_%d_body", code), code) + })) + defer ts.Close() + + client := NewClient() + + var retryAfter time.Duration + retryable := false + + client.CheckRetry = func(_ context.Context, resp *http.Response, err error) (bool, error) { + retryable, _ = DefaultRetryPolicy(context.Background(), resp, err) + retryAfter = DefaultBackoff(client.RetryWaitMin, client.RetryWaitMax, 1, resp) + return false, nil + } + + _, err := client.Get(ts.URL) + if err != nil { + t.Fatalf("expected no errors since retryable") + } + + if !retryable { + t.Fatal("Since the error is recoverable, the default policy shall return true") + } + + if retryAfter != 2*time.Second { + t.Fatalf("The header Retry-After specified 2 seconds, and shall not be %d seconds", retryAfter/time.Second) + } + }) + } +} + +func TestClient_DefaultRetryPolicy_TLS(t *testing.T) { + ts := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(200) + })) + defer ts.Close() + + attempts := 0 + client := NewClient() + client.CheckRetry = func(_ context.Context, resp *http.Response, err error) (bool, error) { + attempts++ + return DefaultRetryPolicy(context.TODO(), resp, err) + } + + _, err := client.Get(ts.URL) + if err == nil { + t.Fatalf("expected x509 error, got nil") + } + if attempts != 1 { + t.Fatalf("expected 1 attempt, got %d", attempts) + } +} + +func TestClient_DefaultRetryPolicy_redirects(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + http.Redirect(w, r, "/", http.StatusFound) + })) + defer ts.Close() + + attempts := 0 + client := NewClient() + client.CheckRetry = func(_ context.Context, resp *http.Response, err error) (bool, error) { + attempts++ + return DefaultRetryPolicy(context.TODO(), resp, err) + } + + _, err := client.Get(ts.URL) + if err == nil { + t.Fatalf("expected redirect error, got nil") + } + if attempts != 1 { + t.Fatalf("expected 1 attempt, got %d", attempts) + } +} + +func TestClient_DefaultRetryPolicy_invalidscheme(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(200) + })) + defer ts.Close() + + attempts := 0 + client := NewClient() + client.CheckRetry = func(_ context.Context, resp *http.Response, err error) (bool, error) { + attempts++ + return DefaultRetryPolicy(context.TODO(), resp, err) + } + + url := strings.Replace(ts.URL, "http", "ftp", 1) + _, err := client.Get(url) + if err == nil { + t.Fatalf("expected scheme error, got nil") + } + if attempts != 1 { + t.Fatalf("expected 1 attempt, got %d", attempts) + } +} + +func TestClient_CheckRetryStop(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + http.Error(w, "test_500_body", http.StatusInternalServerError) + })) + defer ts.Close() + + client := NewClient() + + // Verify that this stops retries on the first try, with no errors from the client. + called := 0 + client.CheckRetry = func(_ context.Context, resp *http.Response, err error) (bool, error) { + called++ + return false, nil + } + + _, err := client.Get(ts.URL) + + if called != 1 { + t.Fatalf("CheckRetry called %d times, expected 1", called) + } + + if err != nil { + t.Fatalf("Expected no error, got:%v", err) + } +} + +func TestClient_Head(t *testing.T) { + // Mock server which always responds 200. + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "HEAD" { + t.Fatalf("bad method: %s", r.Method) + } + if r.RequestURI != "/foo/bar" { + t.Fatalf("bad uri: %s", r.RequestURI) + } + w.WriteHeader(200) + })) + defer ts.Close() + + // Make the request. + resp, err := NewClient().Head(ts.URL + "/foo/bar") + if err != nil { + t.Fatalf("err: %v", err) + } + resp.Body.Close() +} + +func TestClient_Post(t *testing.T) { + // Mock server which always responds 200. + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "POST" { + t.Fatalf("bad method: %s", r.Method) + } + if r.RequestURI != "/foo/bar" { + t.Fatalf("bad uri: %s", r.RequestURI) + } + if ct := r.Header.Get("Content-Type"); ct != "application/json" { + t.Fatalf("bad content-type: %s", ct) + } + + // Check the payload + body, err := ioutil.ReadAll(r.Body) + if err != nil { + t.Fatalf("err: %s", err) + } + expected := []byte(`{"hello":"world"}`) + if !bytes.Equal(body, expected) { + t.Fatalf("bad: %v", body) + } + + w.WriteHeader(200) + })) + defer ts.Close() + + // Make the request. + resp, err := NewClient().Post( + ts.URL+"/foo/bar", + "application/json", + strings.NewReader(`{"hello":"world"}`)) + if err != nil { + t.Fatalf("err: %v", err) + } + resp.Body.Close() +} + +func TestClient_PostForm(t *testing.T) { + // Mock server which always responds 200. + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "POST" { + t.Fatalf("bad method: %s", r.Method) + } + if r.RequestURI != "/foo/bar" { + t.Fatalf("bad uri: %s", r.RequestURI) + } + if ct := r.Header.Get("Content-Type"); ct != "application/x-www-form-urlencoded" { + t.Fatalf("bad content-type: %s", ct) + } + + // Check the payload + body, err := ioutil.ReadAll(r.Body) + if err != nil { + t.Fatalf("err: %s", err) + } + expected := []byte(`hello=world`) + if !bytes.Equal(body, expected) { + t.Fatalf("bad: %v", body) + } + + w.WriteHeader(200) + })) + defer ts.Close() + + // Create the form data. + form, err := url.ParseQuery("hello=world") + if err != nil { + t.Fatalf("err: %v", err) + } + + // Make the request. + resp, err := NewClient().PostForm(ts.URL+"/foo/bar", form) + if err != nil { + t.Fatalf("err: %v", err) + } + resp.Body.Close() +} + +func TestBackoff(t *testing.T) { + type tcase struct { + min time.Duration + max time.Duration + i int + expect time.Duration + } + cases := []tcase{ + { + time.Second, + 5 * time.Minute, + 0, + time.Second, + }, + { + time.Second, + 5 * time.Minute, + 1, + 2 * time.Second, + }, + { + time.Second, + 5 * time.Minute, + 2, + 4 * time.Second, + }, + { + time.Second, + 5 * time.Minute, + 3, + 8 * time.Second, + }, + { + time.Second, + 5 * time.Minute, + 63, + 5 * time.Minute, + }, + { + time.Second, + 5 * time.Minute, + 128, + 5 * time.Minute, + }, + } + + for _, tc := range cases { + if v := DefaultBackoff(tc.min, tc.max, tc.i, nil); v != tc.expect { + t.Fatalf("bad: %#v -> %s", tc, v) + } + } +} + +func TestClient_BackoffCustom(t *testing.T) { + var retries int32 + + client := NewClient() + client.Backoff = func(min, max time.Duration, attemptNum int, resp *http.Response) time.Duration { + atomic.AddInt32(&retries, 1) + return time.Millisecond * 1 + } + + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if atomic.LoadInt32(&retries) == int32(client.RetryMax) { + w.WriteHeader(200) + return + } + w.WriteHeader(500) + })) + defer ts.Close() + + // Make the request. + resp, err := client.Get(ts.URL + "/foo/bar") + if err != nil { + t.Fatalf("err: %v", err) + } + resp.Body.Close() + if retries != int32(client.RetryMax) { + t.Fatalf("expected retries: %d != %d", client.RetryMax, retries) + } +} + +func TestClient_StandardClient(t *testing.T) { + // Create a retryable HTTP client. + client := NewClient() + + // Get a standard client. + standard := client.StandardClient() + + // Ensure the underlying retrying client is set properly. + if v := standard.Transport.(*RoundTripper).Client; v != client { + t.Fatalf("expected %v, got %v", client, v) + } +} + +func TestClient_RedirectWithBody(t *testing.T) { + var redirects int32 + // Mock server which always responds 200. + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.RequestURI { + case "/redirect": + w.Header().Set("Location", "/target") + w.WriteHeader(http.StatusTemporaryRedirect) + case "/target": + atomic.AddInt32(&redirects, 1) + w.WriteHeader(http.StatusCreated) + default: + t.Fatalf("bad uri: %s", r.RequestURI) + } + })) + defer ts.Close() + + client := NewClient() + client.RequestLogHook = func(logger Logger, req *http.Request, retryNumber int) { + if _, err := req.GetBody(); err != nil { + t.Fatalf("unexpected error with GetBody: %v", err) + } + } + // create a request with a body + req, err := NewRequest(http.MethodPost, ts.URL+"/redirect", strings.NewReader(`{"foo":"bar"}`)) + if err != nil { + t.Fatalf("err: %v", err) + } + + resp, err := client.Do(req) + if err != nil { + t.Fatalf("err: %v", err) + } + resp.Body.Close() + + if resp.StatusCode != http.StatusCreated { + t.Fatalf("expected status code 201, got: %d", resp.StatusCode) + } + + // now one without a body + if err := req.SetBody(nil); err != nil { + t.Fatalf("err: %v", err) + } + + resp, err = client.Do(req) + if err != nil { + t.Fatalf("err: %v", err) + } + resp.Body.Close() + + if resp.StatusCode != http.StatusCreated { + t.Fatalf("expected status code 201, got: %d", resp.StatusCode) + } + + if atomic.LoadInt32(&redirects) != 2 { + t.Fatalf("Expected the client to be redirected 2 times, got: %d", atomic.LoadInt32(&redirects)) + } +} diff --git a/pkg/retryablehttp/roundtripper.go b/pkg/retryablehttp/roundtripper.go new file mode 100644 index 000000000..8c407adb3 --- /dev/null +++ b/pkg/retryablehttp/roundtripper.go @@ -0,0 +1,55 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package retryablehttp + +import ( + "errors" + "net/http" + "net/url" + "sync" +) + +// RoundTripper implements the http.RoundTripper interface, using a retrying +// HTTP client to execute requests. +// +// It is important to note that retryablehttp doesn't always act exactly as a +// RoundTripper should. This is highly dependent on the retryable client's +// configuration. +type RoundTripper struct { + // The client to use during requests. If nil, the default retryablehttp + // client and settings will be used. + Client *Client + + // once ensures that the logic to initialize the default client runs at + // most once, in a single thread. + once sync.Once +} + +// init initializes the underlying retryable client. +func (rt *RoundTripper) init() { + if rt.Client == nil { + rt.Client = NewClient() + } +} + +// RoundTrip satisfies the http.RoundTripper interface. +func (rt *RoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { + rt.once.Do(rt.init) + + // Convert the request to be retryable. + retryableReq, err := FromRequest(req) + if err != nil { + return nil, err + } + + // Execute the request. + resp, err := rt.Client.Do(retryableReq) + // If we got an error returned by standard library's `Do` method, unwrap it + // otherwise we will wind up erroneously re-nesting the error. + if _, ok := err.(*url.Error); ok { + return resp, errors.Unwrap(err) + } + + return resp, err +} diff --git a/pkg/retryablehttp/roundtripper_test.go b/pkg/retryablehttp/roundtripper_test.go new file mode 100644 index 000000000..dcb02dfc9 --- /dev/null +++ b/pkg/retryablehttp/roundtripper_test.go @@ -0,0 +1,144 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package retryablehttp + +import ( + "context" + "errors" + "io/ioutil" + "net" + "net/http" + "net/http/httptest" + "net/url" + "reflect" + "sync/atomic" + "testing" +) + +func TestRoundTripper_implements(t *testing.T) { + // Compile-time proof of interface satisfaction. + var _ http.RoundTripper = &RoundTripper{} +} + +func TestRoundTripper_init(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(200) + })) + defer ts.Close() + + // Start with a new empty RoundTripper. + rt := &RoundTripper{} + + // RoundTrip once. + req, _ := http.NewRequest("GET", ts.URL, nil) + if _, err := rt.RoundTrip(req); err != nil { + t.Fatal(err) + } + + // Check that the Client was initialized. + if rt.Client == nil { + t.Fatal("expected rt.Client to be initialized") + } + + // Save the Client for later comparison. + initialClient := rt.Client + + // RoundTrip again. + req, _ = http.NewRequest("GET", ts.URL, nil) + if _, err := rt.RoundTrip(req); err != nil { + t.Fatal(err) + } + + // Check that the underlying Client is unchanged. + if rt.Client != initialClient { + t.Fatalf("expected %v, got %v", initialClient, rt.Client) + } +} + +func TestRoundTripper_RoundTrip(t *testing.T) { + var reqCount int32 = 0 + + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + reqNo := atomic.AddInt32(&reqCount, 1) + if reqNo < 3 { + w.WriteHeader(404) + } else { + w.WriteHeader(200) + w.Write([]byte("success!")) + } + })) + defer ts.Close() + + // Make a client with some custom settings to verify they are used. + retryClient := NewClient() + retryClient.CheckRetry = func(_ context.Context, resp *http.Response, _ error) (bool, error) { + return resp.StatusCode == 404, nil + } + + // Get the standard client and execute the request. + client := retryClient.StandardClient() + resp, err := client.Get(ts.URL) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + + // Check the response to ensure the client behaved as expected. + if resp.StatusCode != 200 { + t.Fatalf("expected 200, got %d", resp.StatusCode) + } + if v, err := ioutil.ReadAll(resp.Body); err != nil { + t.Fatal(err) + } else if string(v) != "success!" { + t.Fatalf("expected %q, got %q", "success!", v) + } +} + +func TestRoundTripper_TransportFailureErrorHandling(t *testing.T) { + // Make a client with some custom settings to verify they are used. + retryClient := NewClient() + retryClient.CheckRetry = func(_ context.Context, resp *http.Response, err error) (bool, error) { + if err != nil { + return true, err + } + + return false, nil + } + + retryClient.ErrorHandler = PassthroughErrorHandler + + expectedError := &url.Error{ + Op: "Get", + URL: "http://999.999.999.999:999/", + Err: &net.OpError{ + Op: "dial", + Net: "tcp", + Err: &net.DNSError{ + Name: "999.999.999.999", + Err: "no such host", + IsNotFound: true, + }, + }, + } + + // Get the standard client and execute the request. + client := retryClient.StandardClient() + _, err := client.Get("http://999.999.999.999:999/") + + // assert expectations + if !reflect.DeepEqual(expectedError, normalizeError(err)) { + t.Fatalf("expected %q, got %q", expectedError, err) + } +} + +func normalizeError(err error) error { + var dnsError *net.DNSError + + if errors.As(err, &dnsError) { + // this field is populated with the DNS server on on CI, but not locally + dnsError.Server = "" + } + + return err +} From e320833d4e5b4206e4ee0b6dbb0af6bf0a47adfb Mon Sep 17 00:00:00 2001 From: Wojciech Zagrajczuk Date: Wed, 13 Mar 2024 13:25:30 +0000 Subject: [PATCH 37/52] DXE-3480 Incorporate "go-retryablehttp" until https://github.com/hashicorp/go-retryablehttp/pull/216 is merged --- pkg/retryablehttp/LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/retryablehttp/LICENSE b/pkg/retryablehttp/LICENSE index b75897e43..573014545 100644 --- a/pkg/retryablehttp/LICENSE +++ b/pkg/retryablehttp/LICENSE @@ -1,4 +1,4 @@ -The whole folder will be removed one the https://github.com/hashicorp/go-retryablehttp/pull/216 will be approved by HarshiCorp +The whole folder will be removed once the https://github.com/hashicorp/go-retryablehttp/pull/216 will be approved and merged to original repo by HarshiCorp ---- From 90bdc7a032d83cb994243b5ae51b60ab0fb7c8a2 Mon Sep 17 00:00:00 2001 From: Dawid Dzhafarov Date: Thu, 14 Mar 2024 10:10:36 +0000 Subject: [PATCH 38/52] DXE-3595 Add support for `ranked-failover` property and add new fields to GTM --- CHANGELOG.md | 7 +- .../resource_akamai_cps_upload_certificate.go | 29 +- pkg/providers/gtm/data_akamai_gtm_domain.go | 76 +++- .../gtm/data_akamai_gtm_domain_test.go | 46 +- .../gtm/resource_akamai_gtm_domain.go | 42 +- .../gtm/resource_akamai_gtm_domain_test.go | 89 ++++ .../gtm/resource_akamai_gtm_property.go | 151 ++++++- .../gtm/resource_akamai_gtm_property_test.go | 400 ++++++++++++++---- .../create_basic_with_sign_and_serve.tf | 14 + .../create_basic_additional_liveness_tests.tf | 73 ++++ .../create_ranked_failover_0_precedence.tf | 78 ++++ ...create_ranked_failover_empty_precedence.tf | 76 ++++ ...eate_ranked_failover_no_traffic_targets.tf | 61 +++ .../create_ranked_failover_precedence.tf | 77 ++++ 14 files changed, 1103 insertions(+), 116 deletions(-) create mode 100644 pkg/providers/gtm/testdata/TestResGtmDomain/create_basic_with_sign_and_serve.tf create mode 100644 pkg/providers/gtm/testdata/TestResGtmProperty/create_basic_additional_liveness_tests.tf create mode 100644 pkg/providers/gtm/testdata/TestResGtmProperty/precedence/create_ranked_failover_0_precedence.tf create mode 100644 pkg/providers/gtm/testdata/TestResGtmProperty/precedence/create_ranked_failover_empty_precedence.tf create mode 100644 pkg/providers/gtm/testdata/TestResGtmProperty/precedence/create_ranked_failover_no_traffic_targets.tf create mode 100644 pkg/providers/gtm/testdata/TestResGtmProperty/precedence/create_ranked_failover_precedence.tf diff --git a/CHANGELOG.md b/CHANGELOG.md index b8eeb59c6..386e98b7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -77,7 +77,12 @@ - +* GTM + * Added fields: + * `precedence` inside `traffic_target` in `akamai_gtm_property` resource and `akamai_gtm_domain` data source + * `sign_and_serve` and `sign_and_serve_algorithm` in `akamai_gtm_domain` data source and resource + * `http_method`, `http_request_body`, `alternate_ca_certificates` and `pre_2023_security_posture` inside `liveness_test` in `akamai_gtm_property` resource and `akamai_gtm_domain` data source + * Added support for `ranked-failover` properties in `akamai_gtm_property` resource diff --git a/pkg/providers/cps/resource_akamai_cps_upload_certificate.go b/pkg/providers/cps/resource_akamai_cps_upload_certificate.go index 79533e194..77fe58dbe 100644 --- a/pkg/providers/cps/resource_akamai_cps_upload_certificate.go +++ b/pkg/providers/cps/resource_akamai_cps_upload_certificate.go @@ -91,9 +91,32 @@ func resourceCPSUploadCertificate() *schema.Resource { Description: "Whether to wait for certificate to be deployed", }, "unacknowledged_warnings": { - Type: schema.TypeBool, - Computed: true, - Description: "Used to distinguish whether there are unacknowledged warnings for a certificate", + Type: schema.TypeBool, + ConfigMode: 0, + Required: false, + Optional: false, + Computed: true, + ForceNew: false, + DiffSuppressFunc: nil, + DiffSuppressOnRefresh: false, + Default: nil, + DefaultFunc: nil, + Description: "Used to distinguish whether there are unacknowledged warnings for a certificate", + InputDefault: "", + StateFunc: nil, + Elem: nil, + MaxItems: 0, + MinItems: 0, + Set: nil, + ComputedWhen: nil, + ConflictsWith: nil, + ExactlyOneOf: nil, + AtLeastOneOf: nil, + RequiredWith: nil, + Deprecated: "", + ValidateFunc: nil, + ValidateDiagFunc: nil, + Sensitive: false, }, "timeouts": { Type: schema.TypeList, diff --git a/pkg/providers/gtm/data_akamai_gtm_domain.go b/pkg/providers/gtm/data_akamai_gtm_domain.go index 701165f01..fa3e6e05f 100644 --- a/pkg/providers/gtm/data_akamai_gtm_domain.go +++ b/pkg/providers/gtm/data_akamai_gtm_domain.go @@ -14,7 +14,6 @@ import ( ) var _ datasource.DataSource = &domainDataSource{} - var _ datasource.DataSourceWithConfigure = &domainDataSource{} // NewGTMDomainDataSource returns a new GTM domain data source @@ -356,6 +355,10 @@ var ( Computed: true, ElementType: types.StringType, }, + "precedence": schema.Int64Attribute{ + Description: "Non-negative integer that ranks the order of the backups that GTM will hand out in the event that the primary Traffic Target has been declared down", + Computed: true, + }, }, }, }, @@ -391,6 +394,14 @@ var ( Computed: true, Description: "Treats a 5xx HTTP response as a failure if the testObjectProtocol is http, https or ftp.", }, + "http_method": schema.StringAttribute{ + Computed: true, + Description: "Contains HTTP method to send if the `testObjectProtocol` is `http` or `https`. Supported values are `TRACE`, `HEAD`, `OPTIONS`, `GET`, `PUT`, `POST`, `PATCH`, `DELETE`. When omitted or `null`, this value defaults to `GET`.", + }, + "http_request_body": schema.StringAttribute{ + Computed: true, + Description: "Contains Base64-encoded HTTP request body to send if the `testObjectProtocol` is `http` or `https`. When omitted or `null`, omits the request body from the request.", + }, "name": schema.StringAttribute{ Computed: true, Description: "A descriptive name for the liveness test.", @@ -455,6 +466,14 @@ var ( Computed: true, Description: "Indicates a base64-encoded private key.", }, + "alternate_ca_certificates": schema.ListAttribute{ + Computed: true, + Description: "List of alternate trust anchors (CA certificates)", + ElementType: types.StringType, + }, + "pre_2023_security_posture": schema.BoolAttribute{ + Computed: true, + }, }, Blocks: map[string]schema.Block{ "http_headers": &schema.SetNestedBlock{ @@ -813,6 +832,8 @@ type ( ModificationComments types.String `tfsdk:"modification_comments"` RoundRobinPrefix types.String `tfsdk:"round_robin_prefix"` ServerMonitorPool types.String `tfsdk:"server_monitor_pool"` + SignAndServe types.Bool `tfsdk:"sign_and_serve"` + SignAndServeAlgorithm types.String `tfsdk:"sign_and_serve_algorithm"` Type types.String `tfsdk:"type"` Status *status `tfsdk:"status"` LoadImbalancePercentage types.Float64 `tfsdk:"load_imbalance_percentage"` @@ -852,6 +873,7 @@ type ( } livenessTest struct { + AlternateCACertificates types.List `tfsdk:"alternate_ca_certificates"` AnswersRequired types.Bool `tfsdk:"answers_required"` Disabled types.Bool `tfsdk:"disabled"` DisableNonstandardPortWarning types.Bool `tfsdk:"disable_nonstandard_port_warning"` @@ -860,8 +882,11 @@ type ( HTTPError3xx types.Bool `tfsdk:"http_error3xx"` HTTPError4xx types.Bool `tfsdk:"http_error4xx"` HTTPError5xx types.Bool `tfsdk:"http_error5xx"` + HTTPMethod types.String `tfsdk:"http_method"` + HTTPRequestBody types.String `tfsdk:"http_request_body"` Name types.String `tfsdk:"name"` PeerCertificateVerification types.Bool `tfsdk:"peer_certificate_verification"` + Pre2023SecurityPosture types.Bool `tfsdk:"pre_2023_security_posture"` RequestString types.String `tfsdk:"request_string"` ResponseString types.String `tfsdk:"response_string"` ResourceType types.String `tfsdk:"resource_type"` @@ -896,6 +921,7 @@ type ( HandoutCNAME types.String `tfsdk:"handout_cname"` Name types.String `tfsdk:"name"` Servers types.List `tfsdk:"servers"` + Precedence types.Int64 `tfsdk:"precedence"` } property struct { @@ -1119,6 +1145,14 @@ func (d *domainDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, MarkdownDescription: "The name of the pool from which servermonitors are drawn for liveness tests in this datacenter. If omitted (null), the domain-wide default is used. (If no domain-wide default is specified, the pool used is all servermonitors in the same continent as the datacenter.)", Computed: true, }, + "sign_and_serve": schema.BoolAttribute{ + MarkdownDescription: "If set (true) we will sign the domain's resource records so that they can be validated by a validating resolver.", + Computed: true, + }, + "sign_and_serve_algorithm": schema.StringAttribute{ + MarkdownDescription: "The signing algorithm to use for signAndServe. One of the following values: RSA_SHA1, RSA_SHA256, RSA_SHA512, ECDSA_P256_SHA256, ECDSA_P384_SHA384, ED25519, ED448.", + Computed: true, + }, "type": schema.StringAttribute{ MarkdownDescription: "Specifies the load balancing behavior for the property. ", Computed: true, @@ -1201,7 +1235,7 @@ func populateDomain(ctx context.Context, domain *gtm.Domain) (*domainDataSourceM if diags.HasError() { return nil, diags } - return &domainDataSourceModel{ + domainModel := &domainDataSourceModel{ Name: types.StringValue(domain.Name), CNameCoalescingEnabled: types.BoolValue(domain.CNameCoalescingEnabled), DefaultErrorPenalty: types.Int64Value(int64(domain.DefaultErrorPenalty)), @@ -1229,6 +1263,7 @@ func populateDomain(ctx context.Context, domain *gtm.Domain) (*domainDataSourceM ModificationComments: types.StringValue(domain.ModificationComments), RoundRobinPrefix: types.StringValue(domain.RoundRobinPrefix), ServerMonitorPool: types.StringValue(domain.ServermonitorPool), + SignAndServe: types.BoolValue(domain.SignAndServe), Type: types.StringValue(domain.Type), LoadImbalancePercentage: types.Float64Value(domain.LoadImbalancePercentage), ID: types.StringValue(domain.Name), @@ -1240,7 +1275,11 @@ func populateDomain(ctx context.Context, domain *gtm.Domain) (*domainDataSourceM CIDRMaps: cidrMaps, ASMaps: getASMaps(domain.ASMaps), Links: getLinks(domain.Links), - }, nil + } + if domain.SignAndServeAlgorithm != nil { + domainModel.SignAndServeAlgorithm = types.StringValue(*domain.SignAndServeAlgorithm) + } + return domainModel, nil } func getLinks(links []*gtm.Link) []link { @@ -1430,7 +1469,11 @@ func getProperties(ctx context.Context, properties []*gtm.Property) ([]property, if prop.LivenessTests != nil { propertyInstance.LivenessTests = make([]livenessTest, len(prop.LivenessTests)) for i, lt := range prop.LivenessTests { - propertyInstance.LivenessTests[i] = populateLivenessTest(lt) + ltModel, diags := populateLivenessTest(lt) + if diags.HasError() { + return nil, diags + } + propertyInstance.LivenessTests[i] = ltModel } } @@ -1535,9 +1578,14 @@ func getResources(resources []*gtm.Resource) []domainResource { return result } -func populateLivenessTest(lt *gtm.LivenessTest) livenessTest { - return livenessTest{ +func populateLivenessTest(lt *gtm.LivenessTest) (livenessTest, diag.Diagnostics) { + altCACerts, diags := types.ListValueFrom(context.TODO(), types.StringType, lt.AlternateCACertificates) + if diags.HasError() { + return livenessTest{}, diags + } + ltModel := livenessTest{ AnswersRequired: types.BoolValue(lt.AnswersRequired), + AlternateCACertificates: altCACerts, Disabled: types.BoolValue(lt.Disabled), DisableNonstandardPortWarning: types.BoolValue(lt.DisableNonstandardPortWarning), ErrorPenalty: types.Float64Value(lt.ErrorPenalty), @@ -1546,6 +1594,7 @@ func populateLivenessTest(lt *gtm.LivenessTest) livenessTest { HTTPError5xx: types.BoolValue(lt.HTTPError5xx), Name: types.StringValue(lt.Name), PeerCertificateVerification: types.BoolValue(lt.PeerCertificateVerification), + Pre2023SecurityPosture: types.BoolValue(lt.Pre2023SecurityPosture), RequestString: types.StringValue(lt.RequestString), ResponseString: types.StringValue(lt.ResponseString), ResourceType: types.StringValue(lt.ResourceType), @@ -1562,6 +1611,13 @@ func populateLivenessTest(lt *gtm.LivenessTest) livenessTest { SSLClientPrivateKey: types.StringValue(lt.SSLClientPrivateKey), HTTPHeaders: populateHTTPHeaders(lt.HTTPHeaders), } + if lt.HTTPMethod != nil { + ltModel.HTTPMethod = types.StringValue(*lt.HTTPMethod) + } + if lt.HTTPRequestBody != nil { + ltModel.HTTPRequestBody = types.StringValue(*lt.HTTPRequestBody) + } + return ltModel, diags } func populateHTTPHeaders(headers []*gtm.HTTPHeader) []httpHeader { @@ -1603,14 +1659,18 @@ func populateTrafficTarget(ctx context.Context, t *gtm.TrafficTarget) (trafficTa if diags.HasError() { return trafficTarget{}, diags } - return trafficTarget{ + tt := trafficTarget{ DatacenterID: types.Int64Value(int64(t.DatacenterID)), Enabled: types.BoolValue(t.Enabled), Weight: types.Float64Value(t.Weight), HandoutCNAME: types.StringValue(t.HandoutCName), Name: types.StringValue(t.Name), Servers: servers, - }, nil + } + if t.Precedence != nil { + tt.Precedence = types.Int64Value(int64(*t.Precedence)) + } + return tt, nil } func populateLoadObject(ctx context.Context, lo *gtm.LoadObject) (loadObject, diag.Diagnostics) { diff --git a/pkg/providers/gtm/data_akamai_gtm_domain_test.go b/pkg/providers/gtm/data_akamai_gtm_domain_test.go index 8c941a19a..baf29a4e8 100644 --- a/pkg/providers/gtm/data_akamai_gtm_domain_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_domain_test.go @@ -5,6 +5,8 @@ import ( "regexp" "testing" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" @@ -36,6 +38,8 @@ func TestDataGtmDomain(t *testing.T) { EndUserMappingEnabled: false, LastModified: "2023-01-25T10:21:45.000+00:00", MaxTTL: 172800, + SignAndServe: true, + SignAndServeAlgorithm: ptr.To("RSA_SHA1"), Status: >m.ResponseStatus{ ChangeID: "ca7e5b1d-1303-42d3-b6c0-8cb62ae849d4", Message: "ERROR: zone is child of existing GTM domain devexp-terraform.akadns.net, which is not allowed", @@ -134,12 +138,24 @@ func TestDataGtmDomain(t *testing.T) { Href: "https://akaa-ouijhfns55qwgfuc-knsod5nrjl2w2gmt.luna-dev.akamaiapis.net/config-gtm/v1/domains/test.cli.devexp-terraform.akadns.net/properties/property", Rel: "self", }}, - LivenessTests: []*gtm.LivenessTest{{ - AnswersRequired: false, - DisableNonstandardPortWarning: false, - HTTPError3xx: true, - TestObjectProtocol: "HTTP", - }}, + LivenessTests: []*gtm.LivenessTest{ + { + AnswersRequired: false, + DisableNonstandardPortWarning: false, + HTTPError3xx: true, + TestObjectProtocol: "HTTP", + AlternateCACertificates: []string{"test1"}, + Pre2023SecurityPosture: true, + HTTPMethod: ptr.To("GET"), + HTTPRequestBody: ptr.To("TestBody"), + }, + { + AnswersRequired: false, + DisableNonstandardPortWarning: false, + HTTPError3xx: true, + TestObjectProtocol: "HTTP", + }, + }, TrafficTargets: []*gtm.TrafficTarget{{ DatacenterID: 3131, Enabled: true, @@ -147,7 +163,8 @@ func TestDataGtmDomain(t *testing.T) { "1.2.3.4", "2.3.4.5", }, - Weight: 1, + Weight: 1, + Precedence: ptr.To(10), }}, }}, }, nil) @@ -166,6 +183,8 @@ func TestDataGtmDomain(t *testing.T) { "end_user_mapping_enabled": "false", "last_modified": "2023-01-25T10:21:45.000+00:00", "max_ttl": "172800", + "sign_and_serve": "true", + "sign_and_serve_algorithm": "RSA_SHA1", "as_maps.0.name": "New Map 1", "as_maps.0.default_datacenter.datacenter_id": "3133", "as_maps.0.default_datacenter.nickname": "Default (all others)", @@ -209,18 +228,27 @@ func TestDataGtmDomain(t *testing.T) { "properties.0.liveness_tests.0.disable_nonstandard_port_warning": "false", "properties.0.liveness_tests.0.http_error3xx": "true", "properties.0.liveness_tests.0.test_object_protocol": "HTTP", + "properties.0.liveness_tests.0.alternate_ca_certificates.0": "test1", + "properties.0.liveness_tests.0.pre_2023_security_posture": "true", + "properties.0.liveness_tests.0.http_method": "GET", + "properties.0.liveness_tests.0.http_request_body": "TestBody", + "properties.0.liveness_tests.1.pre_2023_security_posture": "false", "properties.0.traffic_targets.0.datacenter_id": "3131", "properties.0.traffic_targets.0.enabled": "true", "properties.0.traffic_targets.0.servers.0": "1.2.3.4", "properties.0.traffic_targets.0.servers.1": "2.3.4.5", "properties.0.traffic_targets.0.weight": "1", + "properties.0.traffic_targets.0.precedence": "10", "links.0.href": "https://akaa-ouijhfns55qwgfuc-knsod5nrjl2w2gmt.luna-dev.akamaiapis.net/config-gtm/v1/domains/test.cli.devexp-terraform.akadns.net/properties", "links.0.rel": "properties", "links.1.href": "https://akaa-ouijhfns55qwgfuc-knsod5nrjl2w2gmt.luna-dev.akamaiapis.net/config-gtm/v1/domains/test.cli.devexp-terraform.akadns.net/resources", "links.1.rel": "resources", }, - expectedMissingAttributes: nil, - expectError: nil, + expectedMissingAttributes: []string{ + "properties.0.liveness_tests.1.http_method", + "properties.0.liveness_tests.1.http_request_body", + "properties.0.liveness_tests.1.alternate_ca_certificates", + }, }, "missing required argument name": { givenTF: "missing_domain_name.tf", diff --git a/pkg/providers/gtm/resource_akamai_gtm_domain.go b/pkg/providers/gtm/resource_akamai_gtm_domain.go index 2f1b1e74b..0b4e236ab 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_domain.go +++ b/pkg/providers/gtm/resource_akamai_gtm_domain.go @@ -8,13 +8,12 @@ import ( "strings" "time" - "github.com/hashicorp/go-cty/cty" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - + "github.com/hashicorp/go-cty/cty" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -178,6 +177,16 @@ func resourceGTMv1Domain() *schema.Resource { Type: schema.TypeBool, Optional: true, }, + "sign_and_serve": { + Type: schema.TypeBool, + Optional: true, + Description: "If set (true) we will sign the domain's resource records so that they can be validated by a validating resolver.", + }, + "sign_and_serve_algorithm": { + Type: schema.TypeString, + Optional: true, + Description: "The signing algorithm to use for signAndServe. One of the following values: RSA_SHA1, RSA_SHA256, RSA_SHA512, ECDSA_P256_SHA256, ECDSA_P384_SHA384, ED25519, ED448.", + }, }, } } @@ -239,7 +248,7 @@ func resourceGTMv1DomainCreate(ctx context.Context, d *schema.ResourceData, m in } cStatus, err := Client(meta).CreateDomain(ctx, newDom, queryArgs) if err != nil { - // Errored. Lets see if special hack + // Errored. Let's see if special hack if !HashiAcc { logger.Errorf("Domain Create failed: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -443,7 +452,7 @@ func resourceGTMv1DomainDelete(ctx context.Context, d *schema.ResourceData, m in } uStat, err := Client(meta).DeleteDomain(ctx, existDom) if err != nil { - // Errored. Lets see if special hack + // Errored. Let's see if special hack if !HashiAcc { logger.Errorf("Error Domain Delete: %s", err.Error()) return append(diags, diag.Diagnostic{ @@ -715,6 +724,19 @@ func populateDomainObject(d *schema.ResourceData, dom *gtm.Domain, m interface{} dom.EndUserMappingEnabled = vbool } + signAndServe, err := tf.GetBoolValue("sign_and_serve", d) + if err != nil && !errors.Is(err, tf.ErrNotFound) { + return fmt.Errorf("could not get `sign_and_serve` attribute: %s", err) + } + dom.SignAndServe = signAndServe + signAndServeAlgorithm, err := tf.GetStringValue("sign_and_serve_algorithm", d) + if err != nil && !errors.Is(err, tf.ErrNotFound) { + return fmt.Errorf("could not get `sign_and_serve_algorithm` attribute: %s", err) + } + if signAndServeAlgorithm != "" { + dom.SignAndServeAlgorithm = ptr.To(signAndServeAlgorithm) + } + return nil } @@ -755,13 +777,21 @@ func populateTerraformState(d *schema.ResourceData, dom *gtm.Domain, m interface "min_test_interval": dom.MinTestInterval, "ping_packet_size": dom.PingPacketSize, "default_ssl_client_certificate": dom.DefaultSSLClientCertificate, - "end_user_mapping_enabled": dom.EndUserMappingEnabled} { + "sign_and_serve": dom.SignAndServe, + "end_user_mapping_enabled": dom.EndUserMappingEnabled, + } { // walk through all state elements err := d.Set(stateKey, stateValue) if err != nil { logger.Errorf("populateTerraformState failed: %s", err.Error()) } } + if dom.SignAndServeAlgorithm != nil { + err := d.Set("sign_and_serve_algorithm", dom.SignAndServeAlgorithm) + if err != nil { + logger.Errorf("populateTerraformState failed: %s", err.Error()) + } + } } // Util function to wait for change deployment. return true if complete. false if not - error or nil (timeout) diff --git a/pkg/providers/gtm/resource_akamai_gtm_domain_test.go b/pkg/providers/gtm/resource_akamai_gtm_domain_test.go index fbe380c04..5d02e2c9f 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_domain_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_domain_test.go @@ -5,6 +5,8 @@ import ( "regexp" "testing" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" @@ -68,6 +70,8 @@ func TestResGTMDomain(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "name", gtmTestDomain), resource.TestCheckResourceAttr(resourceName, "type", "weighted"), resource.TestCheckResourceAttr(resourceName, "load_imbalance_percentage", "10"), + resource.TestCheckResourceAttr(resourceName, "sign_and_serve", "false"), + resource.TestCheckNoResourceAttr(resourceName, "sign_and_serve_algorithm"), ), }, { @@ -76,6 +80,66 @@ func TestResGTMDomain(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "name", gtmTestDomain), resource.TestCheckResourceAttr(resourceName, "type", "weighted"), resource.TestCheckResourceAttr(resourceName, "load_imbalance_percentage", "20"), + resource.TestCheckResourceAttr(resourceName, "sign_and_serve", "false"), + resource.TestCheckNoResourceAttr(resourceName, "sign_and_serve_algorithm"), + ), + }, + }, + }) + }) + + client.AssertExpectations(t) + }) + + t.Run("create domain with sign and serve", func(t *testing.T) { + client := >m.Mock{} + + getCall := client.On("GetDomain", + mock.Anything, // ctx is irrelevant for this test + gtmTestDomain, + ).Return(nil, >m.Error{ + StatusCode: http.StatusNotFound, + }) + + dr := gtm.DomainResponse{} + dr.Resource = &testDomainWithSignAndServe + dr.Status = &pendingResponseStatus + client.On("CreateDomain", + mock.Anything, // ctx is irrelevant for this test + mock.AnythingOfType("*gtm.Domain"), + mock.AnythingOfType("map[string]string"), + ).Return(&dr, nil).Run(func(args mock.Arguments) { + getCall.ReturnArguments = mock.Arguments{args.Get(1).(*gtm.Domain), nil} + }) + + client.On("NewDomain", + mock.Anything, // ctx is irrelevant for this test + mock.AnythingOfType("string"), + mock.AnythingOfType("string"), + ).Return(&testDomainWithSignAndServe) + + client.On("GetDomainStatus", + mock.Anything, // ctx is irrelevant for this test + mock.AnythingOfType("string"), + ).Return(&completeResponseStatus, nil) + + client.On("DeleteDomain", + mock.Anything, // ctx is irrelevant for this test + mock.AnythingOfType("*gtm.Domain"), + ).Return(&completeResponseStatus, nil) + + useClient(client, func() { + resource.UnitTest(t, resource.TestCase{ + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), + Steps: []resource.TestStep{ + { + Config: testutils.LoadFixtureString(t, "testdata/TestResGtmDomain/create_basic_with_sign_and_serve.tf"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, "name", gtmTestDomain), + resource.TestCheckResourceAttr(resourceName, "type", "weighted"), + resource.TestCheckResourceAttr(resourceName, "load_imbalance_percentage", "10"), + resource.TestCheckResourceAttr(resourceName, "sign_and_serve", "true"), + resource.TestCheckResourceAttr(resourceName, "sign_and_serve_algorithm", "RSA-SHA1"), ), }, }, @@ -132,6 +196,8 @@ func TestResGTMDomain(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "name", gtmTestDomain), resource.TestCheckResourceAttr(resourceName, "type", "weighted"), resource.TestCheckResourceAttr(resourceName, "load_imbalance_percentage", "10"), + resource.TestCheckResourceAttr(resourceName, "sign_and_serve", "false"), + resource.TestCheckNoResourceAttr(resourceName, "sign_and_serve_algorithm"), ), }, { @@ -257,6 +323,8 @@ func TestResGTMDomain(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "name", gtmTestDomain), resource.TestCheckResourceAttr(resourceName, "type", "weighted"), resource.TestCheckResourceAttr(resourceName, "load_imbalance_percentage", "10"), + resource.TestCheckResourceAttr(resourceName, "sign_and_serve", "false"), + resource.TestCheckNoResourceAttr(resourceName, "sign_and_serve_algorithm"), ), }, { @@ -543,6 +611,27 @@ var ( Type: "weighted", } + testDomainWithSignAndServe = gtm.Domain{ + Datacenters: datacenters, + DefaultErrorPenalty: 75, + DefaultSSLClientCertificate: "", + DefaultSSLClientPrivateKey: "", + DefaultTimeoutPenalty: 25, + EmailNotificationList: make([]string, 0), + LastModified: "2019-04-25T14:53:12.000+00:00", + LastModifiedBy: "operator", + Links: links, + LoadFeedback: false, + LoadImbalancePercentage: 10.0, + ModificationComments: "Edit Property test_property", + Name: gtmTestDomain, + Properties: properties, + Status: testStatus, + Type: "weighted", + SignAndServeAlgorithm: ptr.To("RSA-SHA1"), + SignAndServe: true, + } + deniedResponseStatus = gtm.ResponseStatus{ ChangeID: "40e36abd-bfb2-4635-9fca-62175cf17007", Links: &[]gtm.Link{ diff --git a/pkg/providers/gtm/resource_akamai_gtm_property.go b/pkg/providers/gtm/resource_akamai_gtm_property.go index a9f79885e..4a0c6c47e 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_property.go +++ b/pkg/providers/gtm/resource_akamai_gtm_property.go @@ -9,6 +9,7 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" @@ -24,7 +25,7 @@ func resourceGTMv1Property() *schema.Resource { ReadContext: resourceGTMv1PropertyRead, UpdateContext: resourceGTMv1PropertyUpdate, DeleteContext: resourceGTMv1PropertyDelete, - CustomizeDiff: validateTestObject, + CustomizeDiff: customDiffGTMProperty, Importer: &schema.ResourceImporter{ State: resourceGTMv1PropertyImport, }, @@ -215,6 +216,10 @@ func resourceGTMv1Property() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "precedence": { + Type: schema.TypeInt, + Optional: true, + }, }, }, }, @@ -265,6 +270,14 @@ func resourceGTMv1Property() *schema.Resource { Type: schema.TypeBool, Optional: true, }, + "http_method": { + Type: schema.TypeString, + Optional: true, + }, + "http_request_body": { + Type: schema.TypeString, + Optional: true, + }, "disabled": { Type: schema.TypeBool, Optional: true, @@ -334,6 +347,17 @@ func resourceGTMv1Property() *schema.Resource { Type: schema.TypeBool, Optional: true, }, + "pre_2023_security_posture": { + Type: schema.TypeBool, + Optional: true, + }, + "alternate_ca_certificates": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, }, }, }, @@ -353,11 +377,64 @@ func parseResourceStringID(id string) (string, string, error) { } -// validateTestObject checks if `test_object` is provided when `test_object_protocol` is set to `HTTP`, `HTTPS` or `FTP` -func validateTestObject(_ context.Context, d *schema.ResourceDiff, m interface{}) error { +func validatePrecedence(trafficTargets []interface{}) error { + precedenceCounter := map[int]int{} + minPrecedence := 256 + + for _, itemRaw := range trafficTargets { + item, ok := itemRaw.(map[string]interface{}) + if !ok { + return fmt.Errorf("could not cast the value of type %T to map[string]interface{}", itemRaw) + } + precedence, ok := item["precedence"].(int) + if !ok { + return fmt.Errorf("could not cast the value of type %T to int", item["precedence"]) + } + precedenceCounter[precedence]++ + + if precedence < minPrecedence { + minPrecedence = precedence + } + } + + if precedenceCounter[minPrecedence] > 1 { + return fmt.Errorf("property cannot have multiple primary traffic targets (targets with lowest precedence)") + } + + return nil +} + +func validateTrafficTargets(d *schema.ResourceDiff) error { + propertyTypeRaw := d.Get("type") + propertyType, ok := propertyTypeRaw.(string) + if !ok { + return fmt.Errorf("could not cast the value of type %T to string", propertyType) + } + if propertyType == "ranked-failover" { + trafficTargetsRaw := d.Get("traffic_target") + trafficTargets, ok := trafficTargetsRaw.([]interface{}) + if !ok { + return fmt.Errorf("could not cast the value of type %T to []interface{}", trafficTargets) + } + if len(trafficTargets) == 0 { + return fmt.Errorf("at least one 'traffic_target' has to be defined and enabled") + } + if err := validatePrecedence(trafficTargets); err != nil { + return err + } + } + return nil +} + +// customDiffGTMProperty performs additional logic to the resource as part of custom diff function +func customDiffGTMProperty(_ context.Context, d *schema.ResourceDiff, m interface{}) error { meta := meta.Must(m) - logger := meta.Log("Akamai GTM", "validateTestObject") - logger.Debug("Validating test_object") + logger := meta.Log("Akamai GTM", "customDiffGTMProperty") + logger.Debug("customDiffGTMProperty") + + if err := validateTrafficTargets(d); err != nil { + return err + } livenessTestRaw, ok := d.GetOkExists("liveness_test") if !ok { @@ -880,7 +957,7 @@ func populatePropertyObject(ctx context.Context, d *schema.ResourceData, prop *g } if strings.ToUpper(ptype) != "STATIC" { - populateTrafficTargetObject(ctx, d, prop, m) + populateTrafficTargetObject(d, prop, m) } populateStaticRRSetObject(ctx, meta, d, prop) populateLivenessTestObject(ctx, meta, d, prop) @@ -951,13 +1028,17 @@ func populateTerraformPropertyState(d *schema.ResourceData, prop *gtm.Property, logger.Errorf("Error setting traffic target: %s", err) } } - populateTerraformStaticRRSetState(d, prop, m) - populateTerraformLivenessTestState(d, prop, m) + if err := populateTerraformStaticRRSetState(d, prop, m); err != nil { + logger.Errorf("error setting static RR set: %s", err) + } + if err := populateTerraformLivenessTestState(d, prop, m); err != nil { + logger.Errorf("error setting liveness test: %s", err) + } } // create and populate GTM Property TrafficTargets object -func populateTrafficTargetObject(ctx context.Context, d *schema.ResourceData, prop *gtm.Property, m interface{}) { +func populateTrafficTargetObject(d *schema.ResourceData, prop *gtm.Property, m interface{}) { meta := meta.Must(m) logger := meta.Log("Akamai GTM", "populateTrafficTargetObject") @@ -967,8 +1048,9 @@ func populateTrafficTargetObject(ctx context.Context, d *schema.ResourceData, pr trafficObjList := make([]*gtm.TrafficTarget, len(traffTargList)) // create new object list for i, v := range traffTargList { ttMap := v.(map[string]interface{}) - trafficTarget := Client(meta).NewTrafficTarget(ctx) // create new object + trafficTarget := >m.TrafficTarget{} trafficTarget.DatacenterID = ttMap["datacenter_id"].(int) + trafficTarget.Precedence = ptr.To(ttMap["precedence"].(int)) trafficTarget.Enabled = ttMap["enabled"].(bool) trafficTarget.Weight = ttMap["weight"].(float64) if ttMap["servers"] != nil { @@ -1012,6 +1094,9 @@ func populateTerraformTrafficTargetState(d *schema.ResourceData, prop *gtm.Prope tt["weight"] = ttObject.Weight tt["handout_cname"] = ttObject.HandoutCName tt["servers"] = ttObject.Servers + if ttObject.Precedence != nil { + tt["precedence"] = *ttObject.Precedence + } // remove object delete(objectInventory, objIndex) } @@ -1026,6 +1111,9 @@ func populateTerraformTrafficTargetState(d *schema.ResourceData, prop *gtm.Prope "handout_cname": mttObj.HandoutCName, "servers": mttObj.Servers, } + if mttObj.Precedence != nil { + ttNew["precedence"] = mttObj.Precedence + } ttStateList = append(ttStateList, ttNew) } } @@ -1059,7 +1147,7 @@ func populateStaticRRSetObject(ctx context.Context, meta meta.Meta, d *schema.Re } // create and populate Terraform static_rr_sets schema -func populateTerraformStaticRRSetState(d *schema.ResourceData, prop *gtm.Property, m interface{}) { +func populateTerraformStaticRRSetState(d *schema.ResourceData, prop *gtm.Property, m interface{}) error { meta := meta.Must(m) logger := meta.Log("Akamai GTM", "populateTerraformStaticRRSetState") @@ -1096,8 +1184,8 @@ func populateTerraformStaticRRSetState(d *schema.ResourceData, prop *gtm.Propert rrStateList = append(rrStateList, rrNew) } } - _ = d.Set("static_rr_set", rrStateList) + return d.Set("static_rr_set", rrStateList) } // Populate existing Liveness test object from resource data @@ -1120,6 +1208,13 @@ func populateLivenessTestObject(ctx context.Context, meta meta.Meta, d *schema.R lt.HTTPError3xx = v["http_error3xx"].(bool) lt.HTTPError4xx = v["http_error4xx"].(bool) lt.HTTPError5xx = v["http_error5xx"].(bool) + if v["http_method"].(string) != "" { + lt.HTTPMethod = ptr.To(v["http_method"].(string)) + } + if v["http_request_body"].(string) != "" { + lt.HTTPRequestBody = ptr.To(v["http_request_body"].(string)) + } + lt.Pre2023SecurityPosture = v["pre_2023_security_posture"].(bool) lt.Disabled = v["disabled"].(bool) lt.TestObjectPassword = v["test_object_password"].(string) lt.TestObjectPort = v["test_object_port"].(int) @@ -1143,6 +1238,14 @@ func populateLivenessTestObject(ctx context.Context, meta meta.Meta, d *schema.R } lt.HTTPHeaders = headerObjList } + alternateCACerts := v["alternate_ca_certificates"].([]interface{}) + if alternateCACerts != nil { + var certList []string + for _, certRaw := range alternateCACerts { + certList = append(certList, certRaw.(string)) + } + lt.AlternateCACertificates = certList + } liveTestObjList[i] = lt } prop.LivenessTests = liveTestObjList @@ -1150,7 +1253,7 @@ func populateLivenessTestObject(ctx context.Context, meta meta.Meta, d *schema.R } // create and populate Terraform liveness_test schema -func populateTerraformLivenessTestState(d *schema.ResourceData, prop *gtm.Property, m interface{}) { +func populateTerraformLivenessTestState(d *schema.ResourceData, prop *gtm.Property, m interface{}) error { meta := meta.Must(m) logger := meta.Log("Akamai GTM", "populateTerraformLivenessTestState") @@ -1192,6 +1295,16 @@ func populateTerraformLivenessTestState(d *schema.ResourceData, prop *gtm.Proper lt["answers_required"] = ltObject.AnswersRequired lt["resource_type"] = ltObject.ResourceType lt["recursion_requested"] = ltObject.RecursionRequested + lt["pre_2023_security_posture"] = ltObject.Pre2023SecurityPosture + if ltObject.HTTPMethod != nil { + lt["http_method"] = ltObject.HTTPMethod + } + if ltObject.HTTPRequestBody != nil { + lt["http_request_body"] = ltObject.HTTPRequestBody + } + if ltObject.AlternateCACertificates != nil { + lt["alternate_ca_certificates"] = ltObject.AlternateCACertificates + } httpHeaderListNew := make([]interface{}, len(ltObject.HTTPHeaders)) for i, r := range ltObject.HTTPHeaders { httpHeaderNew := map[string]interface{}{ @@ -1232,6 +1345,16 @@ func populateTerraformLivenessTestState(d *schema.ResourceData, prop *gtm.Proper "answers_required": l.AnswersRequired, "resource_type": l.ResourceType, "recursion_requested": l.RecursionRequested, + "pre_2023_security_posture": l.Pre2023SecurityPosture, + } + if l.HTTPMethod != nil { + ltNew["http_method"] = l.HTTPMethod + } + if l.HTTPRequestBody != nil { + ltNew["http_request_body"] = l.HTTPRequestBody + } + if l.AlternateCACertificates != nil { + ltNew["alternate_ca_certificates"] = l.AlternateCACertificates } httpHeaderListNew := make([]interface{}, len(l.HTTPHeaders)) for i, r := range l.HTTPHeaders { @@ -1245,8 +1368,8 @@ func populateTerraformLivenessTestState(d *schema.ResourceData, prop *gtm.Proper ltStateList = append(ltStateList, ltNew) } } - _ = d.Set("liveness_test", ltStateList) + return d.Set("liveness_test", ltStateList) } func convertStringToInterfaceList(stringList []string, m interface{}) []interface{} { diff --git a/pkg/providers/gtm/resource_akamai_gtm_property_test.go b/pkg/providers/gtm/resource_akamai_gtm_property_test.go index 5de0a8ff4..ffe9499ad 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_property_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_property_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" @@ -27,7 +28,6 @@ func TestResGTMProperty(t *testing.T) { property: getBasicProperty(), init: func(t *testing.T, m *gtm.Mock) { mockNewProperty(m, propertyName) - mockNewTrafficTarget(m, 1) mockNewStaticRRSet(m) mockNewLivenessTest(m, "lt5", "HTTP", "/junk", 40, 1, 30) mockNewLivenessTest(m, "lt2", "HTTP", "/junk", 30, 80, 20) @@ -35,7 +35,6 @@ func TestResGTMProperty(t *testing.T) { // read mockGetProperty(m, getBasicProperty(), propertyName, gtmTestDomain, 4) // update - mockNewTrafficTarget(m, 1) mockNewStaticRRSet(m) mockNewLivenessTest(m, "lt5", "HTTP", "/junk", 50, 1, 30) mockNewLivenessTest(m, "lt2", "HTTP", "/junk", 30, 0, 20) @@ -54,6 +53,11 @@ func TestResGTMProperty(t *testing.T) { resource.TestCheckResourceAttr(propertyResourceName, "type", "weighted-round-robin"), resource.TestCheckResourceAttr(propertyResourceName, "weighted_hash_bits_for_ipv4", "0"), resource.TestCheckResourceAttr(propertyResourceName, "weighted_hash_bits_for_ipv6", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.http_method", ""), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.http_request_body", ""), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.alternate_ca_certificates.#", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.pre_2023_security_posture", "false"), + resource.TestCheckResourceAttr(propertyResourceName, "traffic_target.0.precedence", "0"), resource.TestCheckResourceAttr(propertyResourceName, "id", "gtm_terra_testdomain.akadns.net:tfexample_prop_1"), ), }, @@ -64,6 +68,42 @@ func TestResGTMProperty(t *testing.T) { resource.TestCheckResourceAttr(propertyResourceName, "type", "weighted-round-robin"), resource.TestCheckResourceAttr(propertyResourceName, "weighted_hash_bits_for_ipv4", "0"), resource.TestCheckResourceAttr(propertyResourceName, "weighted_hash_bits_for_ipv6", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.http_method", ""), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.http_request_body", ""), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.alternate_ca_certificates.#", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.pre_2023_security_posture", "false"), + resource.TestCheckResourceAttr(propertyResourceName, "traffic_target.0.precedence", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "id", "gtm_terra_testdomain.akadns.net:tfexample_prop_1"), + ), + }, + }, + }, + "create property with additional liveness test fields": { + property: getBasicPropertyWithLivenessTests(), + init: func(t *testing.T, m *gtm.Mock) { + mockNewProperty(m, propertyName) + mockNewStaticRRSet(m) + mockNewLivenessTest(m, "lt5", "HTTP", "/junk", 40, 1, 30) + mockNewLivenessTest(m, "lt2", "HTTP", "/junk", 30, 80, 20) + mockCreateProperty(m, getBasicPropertyWithLivenessTests(), gtmTestDomain) + // read + mockGetProperty(m, getBasicPropertyWithLivenessTests(), propertyName, gtmTestDomain, 3) + // delete + mockDeleteProperty(m, getBasicPropertyWithLivenessTests(), gtmTestDomain) + }, + steps: []resource.TestStep{ + { + Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/create_basic_additional_liveness_tests.tf"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(propertyResourceName, "name", "tfexample_prop_1"), + resource.TestCheckResourceAttr(propertyResourceName, "type", "weighted-round-robin"), + resource.TestCheckResourceAttr(propertyResourceName, "weighted_hash_bits_for_ipv4", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "weighted_hash_bits_for_ipv6", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.http_method", "GET"), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.http_request_body", "Body"), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.pre_2023_security_posture", "true"), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.alternate_ca_certificates.0", "test1"), + resource.TestCheckResourceAttr(propertyResourceName, "traffic_target.0.precedence", "0"), resource.TestCheckResourceAttr(propertyResourceName, "id", "gtm_terra_testdomain.akadns.net:tfexample_prop_1"), ), }, @@ -73,7 +113,6 @@ func TestResGTMProperty(t *testing.T) { property: getBasicProperty(), init: func(t *testing.T, m *gtm.Mock) { mockNewProperty(m, propertyName) - mockNewTrafficTarget(m, 1) mockNewStaticRRSet(m) mockNewLivenessTest(m, "lt5", "HTTP", "/junk", 40, 1, 30) mockNewLivenessTest(m, "lt2", "HTTP", "/junk", 30, 80, 20) @@ -93,12 +132,11 @@ func TestResGTMProperty(t *testing.T) { }, }, }, - "create propery denied": { + "create property denied": { property: nil, init: func(t *testing.T, m *gtm.Mock) { // create mockNewProperty(m, propertyName) - mockNewTrafficTarget(m, 1) mockNewStaticRRSet(m) mockNewLivenessTest(m, "lt5", "HTTP", "/junk", 40, 1, 30) mockNewLivenessTest(m, "lt2", "HTTP", "/junk", 30, 80, 20) @@ -125,7 +163,6 @@ func TestResGTMProperty(t *testing.T) { init: func(t *testing.T, m *gtm.Mock) { // create 1st property mockNewProperty(m, propertyName) - mockNewTrafficTarget(m, 1) mockNewStaticRRSet(m) mockNewLivenessTest(m, "lt5", "HTTP", "/junk", 40, 1, 30) mockNewLivenessTest(m, "lt2", "HTTP", "/junk", 30, 80, 20) @@ -137,7 +174,6 @@ func TestResGTMProperty(t *testing.T) { propertyWithUpdatedName := getBasicProperty() propertyWithUpdatedName.Name = updatedPropertyName mockNewProperty(m, updatedPropertyName) - mockNewTrafficTarget(m, 1) mockNewStaticRRSet(m) mockNewLivenessTest(m, "lt5", "HTTP", "/junk", 40, 1, 30) mockNewLivenessTest(m, "lt2", "HTTP", "/junk", 30, 80, 20) @@ -154,6 +190,11 @@ func TestResGTMProperty(t *testing.T) { resource.TestCheckResourceAttr(propertyResourceName, "name", "tfexample_prop_1"), resource.TestCheckResourceAttr(propertyResourceName, "weighted_hash_bits_for_ipv4", "0"), resource.TestCheckResourceAttr(propertyResourceName, "weighted_hash_bits_for_ipv6", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.http_method", ""), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.http_request_body", ""), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.alternate_ca_certificates.#", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.pre_2023_security_posture", "false"), + resource.TestCheckResourceAttr(propertyResourceName, "traffic_target.0.precedence", "0"), resource.TestCheckResourceAttr(propertyResourceName, "id", "gtm_terra_testdomain.akadns.net:tfexample_prop_1"), ), }, @@ -163,6 +204,11 @@ func TestResGTMProperty(t *testing.T) { resource.TestCheckResourceAttr(propertyResourceName, "name", "tfexample_prop_1-updated"), resource.TestCheckResourceAttr(propertyResourceName, "weighted_hash_bits_for_ipv4", "0"), resource.TestCheckResourceAttr(propertyResourceName, "weighted_hash_bits_for_ipv6", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.http_method", ""), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.http_request_body", ""), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.alternate_ca_certificates.#", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.pre_2023_security_posture", "false"), + resource.TestCheckResourceAttr(propertyResourceName, "traffic_target.0.precedence", "0"), resource.TestCheckResourceAttr(propertyResourceName, "id", "gtm_terra_testdomain.akadns.net:tfexample_prop_1-updated"), ), }, @@ -173,7 +219,6 @@ func TestResGTMProperty(t *testing.T) { init: func(t *testing.T, m *gtm.Mock) { // create property with test_object_protocol in first liveness test different from HTTP, HTTPS, FTP mockNewProperty(m, propertyName) - mockNewTrafficTarget(m, 1) mockNewStaticRRSet(m) mockNewLivenessTest(m, "lt5", "SNMP", "", 40, 1, 30) mockNewLivenessTest(m, "lt2", "HTTP", "/junk", 30, 80, 20) @@ -195,11 +240,91 @@ func TestResGTMProperty(t *testing.T) { resource.TestCheckResourceAttr(propertyResourceName, "type", "weighted-round-robin"), resource.TestCheckResourceAttr(propertyResourceName, "weighted_hash_bits_for_ipv4", "0"), resource.TestCheckResourceAttr(propertyResourceName, "weighted_hash_bits_for_ipv6", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.http_method", ""), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.http_request_body", ""), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.alternate_ca_certificates.#", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.pre_2023_security_posture", "false"), + resource.TestCheckResourceAttr(propertyResourceName, "traffic_target.0.precedence", "0"), resource.TestCheckResourceAttr(propertyResourceName, "id", "gtm_terra_testdomain.akadns.net:tfexample_prop_1"), ), }, }, }, + "create property with 'ranked-failover' type and two empty precedences in traffic target - error": { + property: getRankedFailoverPropertyNoPrecedence(), + steps: []resource.TestStep{ + { + Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/precedence/create_ranked_failover_empty_precedence.tf"), + ExpectError: regexp.MustCompile(`Error: property cannot have multiple primary traffic targets \(targets with lowest precedence\)`), + }, + }, + }, "create property with 'ranked-failover' type and no traffic targets - error": { + property: getRankedFailoverPropertyNoPrecedence(), + steps: []resource.TestStep{ + { + Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/precedence/create_ranked_failover_no_traffic_targets.tf"), + ExpectError: regexp.MustCompile(`Error: at least one 'traffic_target' has to be defined and enabled`), + }, + }, + }, + "create property with 'ranked-failover' type and allow single empty precedence value": { + property: getRankedFailoverPropertyWithPrecedence(), + init: func(t *testing.T, m *gtm.Mock) { + mockNewProperty(m, propertyName) + mockNewStaticRRSet(m) + mockNewLivenessTest(m, "lt5", "HTTP", "/junk", 40, 1, 30) + mockNewLivenessTest(m, "lt2", "HTTP", "/junk", 30, 80, 20) + mockCreateProperty(m, getRankedFailoverPropertyWithPrecedence(), gtmTestDomain) + // read + mockGetProperty(m, getRankedFailoverPropertyWithPrecedence(), propertyName, gtmTestDomain, 3) + // delete + mockDeleteProperty(m, getRankedFailoverPropertyWithPrecedence(), gtmTestDomain) + }, + steps: []resource.TestStep{ + { + Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/precedence/create_ranked_failover_precedence.tf"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(propertyResourceName, "name", "tfexample_prop_1"), + resource.TestCheckResourceAttr(propertyResourceName, "weighted_hash_bits_for_ipv4", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "weighted_hash_bits_for_ipv6", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "id", "gtm_terra_testdomain.akadns.net:tfexample_prop_1"), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.http_method", ""), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.http_request_body", ""), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.alternate_ca_certificates.#", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "liveness_test.0.pre_2023_security_posture", "false"), + resource.TestCheckResourceAttr(propertyResourceName, "traffic_target.0.precedence", "10"), + resource.TestCheckResourceAttr(propertyResourceName, "traffic_target.1.precedence", "0"), + ), + }, + }, + }, + "create property with 'ranked-failover' type and 0 set as precedence value": { + property: getRankedFailoverPropertyWithPrecedence(), + init: func(t *testing.T, m *gtm.Mock) { + mockNewProperty(m, propertyName) + mockNewStaticRRSet(m) + mockNewLivenessTest(m, "lt5", "HTTP", "/junk", 40, 1, 30) + mockNewLivenessTest(m, "lt2", "HTTP", "/junk", 30, 80, 20) + mockCreateProperty(m, getRankedFailoverPropertyWithPrecedence(), gtmTestDomain) + // read + mockGetProperty(m, getRankedFailoverPropertyWithPrecedence(), propertyName, gtmTestDomain, 3) + // delete + mockDeleteProperty(m, getRankedFailoverPropertyWithPrecedence(), gtmTestDomain) + }, + steps: []resource.TestStep{ + { + Config: testutils.LoadFixtureString(t, "testdata/TestResGtmProperty/precedence/create_ranked_failover_0_precedence.tf"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(propertyResourceName, "name", "tfexample_prop_1"), + resource.TestCheckResourceAttr(propertyResourceName, "weighted_hash_bits_for_ipv4", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "weighted_hash_bits_for_ipv6", "0"), + resource.TestCheckResourceAttr(propertyResourceName, "id", "gtm_terra_testdomain.akadns.net:tfexample_prop_1"), + resource.TestCheckResourceAttr(propertyResourceName, "traffic_target.0.precedence", "10"), + resource.TestCheckResourceAttr(propertyResourceName, "traffic_target.1.precedence", "0"), + ), + }, + }, + }, "create property with test_object_protocol set to 'FTP' - test_object required error": { property: getBasicProperty(), steps: []resource.TestStep{ @@ -365,36 +490,20 @@ func TestResourceGTMTrafficTargetOrder(t *testing.T) { } } -// getUpdatedProperty gets the property with updated values taken from `update_basic.tf` -func getUpdatedProperty() *gtm.Property { +// getRankedFailoverPropertyWithPrecedence gets the property values taken from `create_ranked_failover_precedence.tf` +func getRankedFailoverPropertyWithPrecedence() *gtm.Property { return >m.Property{ - BackupCName: "", - BackupIP: "", - BalanceByDownloadScore: false, - Comments: "", - DynamicTTL: 300, - FailbackDelay: 0, - FailoverDelay: 0, - HandoutMode: "normal", - HandoutLimit: 5, - HealthMax: 0, - HealthMultiplier: 0, - HealthThreshold: 0, - IPv6: false, + DynamicTTL: 300, + HandoutMode: "normal", + HandoutLimit: 5, LivenessTests: []*gtm.LivenessTest{ { DisableNonstandardPortWarning: false, Name: "lt5", - RequestString: "", - ResponseString: "", - SSLClientCertificate: "", - SSLClientPrivateKey: "", - TestInterval: 50, + TestInterval: 40, TestObject: "/junk", - TestObjectPassword: "", TestObjectPort: 1, TestObjectProtocol: "HTTP", - TestObjectUsername: "", TestTimeout: 30.0, HTTPHeaders: []*gtm.HTTPHeader{ { @@ -414,10 +523,8 @@ func getUpdatedProperty() *gtm.Property { HTTPHeaders: []*gtm.HTTPHeader{}, }, }, - MapName: "", - MaxUnreachablePenalty: 0, - Name: "tfexample_prop_1", - ScoreAggregationType: "median", + Name: "tfexample_prop_1", + ScoreAggregationType: "median", StaticRRSets: []*gtm.StaticRRSet{ { Type: "MX", @@ -425,55 +532,142 @@ func getUpdatedProperty() *gtm.Property { Rdata: []string{"100 test_e"}, }, }, - StickinessBonusConstant: 0, TrafficTargets: []*gtm.TrafficTarget{ + { + DatacenterID: 3131, + Enabled: true, + HandoutCName: "test", + Servers: []string{ + "1.2.3.9", + }, + Weight: 200.0, + Precedence: ptr.To(10), + }, { DatacenterID: 3132, Enabled: true, HandoutCName: "test", Servers: []string{ - "1.2.3.5", + "1.2.3.9", + }, + Weight: 200.0, + Precedence: ptr.To(0), + }, + }, + Type: "ranked-failover", + } +} + +// getRankedFailoverPropertyNoPrecedence gets the property values taken from `create_ranked_failover_empty_precedence.tf` +func getRankedFailoverPropertyNoPrecedence() *gtm.Property { + return >m.Property{ + DynamicTTL: 300, + HandoutMode: "normal", + HandoutLimit: 5, + Name: "tfexample_prop_1", + ScoreAggregationType: "median", + StaticRRSets: []*gtm.StaticRRSet{ + { + Type: "MX", + TTL: 300, + Rdata: []string{"100 test_e"}, + }, + }, + TrafficTargets: []*gtm.TrafficTarget{ + { + DatacenterID: 3131, + Enabled: true, + HandoutCName: "test", + Servers: []string{ + "1.2.3.9", + }, + Weight: 200.0, + }, + { + DatacenterID: 3132, + Enabled: true, + HandoutCName: "test", + Servers: []string{ + "1.2.3.9", }, Weight: 200.0, }, }, - Type: "weighted-round-robin", - UnreachableThreshold: 0, - UseComputedTargets: false, + Type: "ranked-failover", + } +} + +// getUpdatedProperty gets the property with updated values taken from `update_basic.tf` +func getUpdatedProperty() *gtm.Property { + return >m.Property{ + DynamicTTL: 300, + HandoutMode: "normal", + HandoutLimit: 5, + LivenessTests: []*gtm.LivenessTest{ + { + Name: "lt5", + TestInterval: 50, + TestObject: "/junk", + TestObjectPort: 1, + TestObjectProtocol: "HTTP", + TestTimeout: 30.0, + HTTPHeaders: []*gtm.HTTPHeader{ + { + Name: "test_name", + Value: "test_value", + }, + }, + }, + { + Name: "lt2", + TestInterval: 30, + TestObjectProtocol: "HTTP", + TestTimeout: 20, + TestObject: "/junk", + TestObjectPort: 80, + PeerCertificateVerification: true, + HTTPHeaders: []*gtm.HTTPHeader{}, + }, + }, + Name: "tfexample_prop_1", + ScoreAggregationType: "median", + StaticRRSets: []*gtm.StaticRRSet{ + { + Type: "MX", + TTL: 300, + Rdata: []string{"100 test_e"}, + }, + }, + TrafficTargets: []*gtm.TrafficTarget{ + { + DatacenterID: 3132, + Enabled: true, + HandoutCName: "test", + Servers: []string{ + "1.2.3.5", + }, + Weight: 200.0, + Precedence: ptr.To(0), + }, + }, + Type: "weighted-round-robin", } } // getBasicProperty gets the property values taken from `create_basic.tf` func getBasicProperty() *gtm.Property { return >m.Property{ - BackupCName: "", - BackupIP: "", - BalanceByDownloadScore: false, - Comments: "", - DynamicTTL: 300, - FailbackDelay: 0, - FailoverDelay: 0, - HandoutMode: "normal", - HandoutLimit: 5, - HealthMax: 0, - HealthMultiplier: 0, - HealthThreshold: 0, - IPv6: false, + DynamicTTL: 300, + HandoutMode: "normal", + HandoutLimit: 5, LivenessTests: []*gtm.LivenessTest{ { - DisableNonstandardPortWarning: false, - Name: "lt5", - RequestString: "", - ResponseString: "", - SSLClientCertificate: "", - SSLClientPrivateKey: "", - TestInterval: 40, - TestObject: "/junk", - TestObjectPassword: "", - TestObjectPort: 1, - TestObjectProtocol: "HTTP", - TestObjectUsername: "", - TestTimeout: 30.0, + Name: "lt5", + TestInterval: 40, + TestObject: "/junk", + TestObjectPort: 1, + TestObjectProtocol: "HTTP", + TestTimeout: 30.0, HTTPHeaders: []*gtm.HTTPHeader{ { Name: "test_name", @@ -492,10 +686,8 @@ func getBasicProperty() *gtm.Property { HTTPHeaders: []*gtm.HTTPHeader{}, }, }, - MapName: "", - MaxUnreachablePenalty: 0, - Name: "tfexample_prop_1", - ScoreAggregationType: "median", + Name: "tfexample_prop_1", + ScoreAggregationType: "median", StaticRRSets: []*gtm.StaticRRSet{ { Type: "MX", @@ -503,7 +695,6 @@ func getBasicProperty() *gtm.Property { Rdata: []string{"100 test_e"}, }, }, - StickinessBonusConstant: 0, TrafficTargets: []*gtm.TrafficTarget{ { DatacenterID: 3131, @@ -512,12 +703,72 @@ func getBasicProperty() *gtm.Property { Servers: []string{ "1.2.3.9", }, - Weight: 200.0, + Weight: 200.0, + Precedence: ptr.To(0), + }, + }, + Type: "weighted-round-robin", + } +} + +// getBasicPropertyWithLivenessTests gets the property values taken from `create_basic_additional_liveness_tests.tf` +func getBasicPropertyWithLivenessTests() *gtm.Property { + return >m.Property{ + DynamicTTL: 300, + HandoutMode: "normal", + HandoutLimit: 5, + LivenessTests: []*gtm.LivenessTest{ + { + Name: "lt5", + TestInterval: 40, + TestObject: "/junk", + TestObjectPort: 1, + TestObjectProtocol: "HTTP", + TestTimeout: 30.0, + HTTPHeaders: []*gtm.HTTPHeader{ + { + Name: "test_name", + Value: "test_value", + }, + }, + HTTPMethod: ptr.To("GET"), + HTTPRequestBody: ptr.To("Body"), + Pre2023SecurityPosture: true, + AlternateCACertificates: []string{"test1"}, + }, + { + Name: "lt2", + TestInterval: 30, + TestObjectProtocol: "HTTP", + TestTimeout: 20, + TestObject: "/junk", + TestObjectPort: 80, + PeerCertificateVerification: true, + HTTPHeaders: []*gtm.HTTPHeader{}, + }, + }, + Name: "tfexample_prop_1", + ScoreAggregationType: "median", + StaticRRSets: []*gtm.StaticRRSet{ + { + Type: "MX", + TTL: 300, + Rdata: []string{"100 test_e"}, + }, + }, + TrafficTargets: []*gtm.TrafficTarget{ + { + DatacenterID: 3131, + Enabled: true, + HandoutCName: "test", + Servers: []string{ + "1.2.3.9", + }, + Weight: 200.0, + Precedence: ptr.To(0), }, }, - Type: "weighted-round-robin", - UnreachableThreshold: 0, - UseComputedTargets: false, + Type: "weighted-round-robin", } } @@ -530,7 +781,6 @@ func getMocks() *gtm.Mock { Return(nil, >m.Error{StatusCode: http.StatusNotFound}) // create mockNewProperty(client, "tfexample_prop_1") - mockNewTrafficTarget(client, 3) mockNewLivenessTest(client, "lt5", "HTTP", "/junk", 40, 80, 30.0) // mock.AnythingOfType *gtm.Property is used is those mock calls as there are too many different test cases to mock // each one and for those test it's not important, since we are only checking the diff diff --git a/pkg/providers/gtm/testdata/TestResGtmDomain/create_basic_with_sign_and_serve.tf b/pkg/providers/gtm/testdata/TestResGtmDomain/create_basic_with_sign_and_serve.tf new file mode 100644 index 000000000..778e19a6b --- /dev/null +++ b/pkg/providers/gtm/testdata/TestResGtmDomain/create_basic_with_sign_and_serve.tf @@ -0,0 +1,14 @@ +provider "akamai" { + edgerc = "../../common/testutils/edgerc" +} + +resource "akamai_gtm_domain" "testdomain" { + name = "gtm_terra_testdomain.akadns.net" + type = "weighted" + contract = "1-2ABCDEF" + comment = "Test" + group = "123ABC" + load_imbalance_percentage = 10.0 + sign_and_serve = true + sign_and_serve_algorithm = "RSA-SHA1" +} diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/create_basic_additional_liveness_tests.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/create_basic_additional_liveness_tests.tf new file mode 100644 index 000000000..6ec7b5690 --- /dev/null +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/create_basic_additional_liveness_tests.tf @@ -0,0 +1,73 @@ +provider "akamai" { + edgerc = "../../common/testutils/edgerc" +} + +locals { + gtmTestDomain = "gtm_terra_testdomain.akadns.net" +} + +resource "akamai_gtm_property" "tfexample_prop_1" { + domain = local.gtmTestDomain + name = "tfexample_prop_1" + type = "weighted-round-robin" + score_aggregation_type = "median" + handout_limit = 5 + handout_mode = "normal" + traffic_target { + datacenter_id = 3131 + enabled = true + weight = 200 + servers = ["1.2.3.9"] + handout_cname = "test" + } + + liveness_test { + name = "lt5" + test_interval = 40 + test_object_protocol = "HTTP" + test_timeout = 30 + answers_required = false + disable_nonstandard_port_warning = false + error_penalty = 0 + http_error3xx = false + http_error4xx = false + http_error5xx = false + http_method = "GET" + http_request_body = "Body" + pre_2023_security_posture = true + alternate_ca_certificates = ["test1"] + disabled = false + http_header { + name = "test_name" + value = "test_value" + } + peer_certificate_verification = false + recursion_requested = false + request_string = "" + resource_type = "" + response_string = "" + ssl_client_certificate = "" + ssl_client_private_key = "" + test_object = "/junk" + test_object_password = "" + test_object_port = 1 + test_object_username = "" + timeout_penalty = 0 + } + liveness_test { + name = "lt2" + test_interval = 30 + test_object_protocol = "HTTP" + test_timeout = 20 + test_object = "/junk" + } + static_rr_set { + type = "MX" + ttl = 300 + rdata = ["100 test_e"] + } + failover_delay = 0 + failback_delay = 0 + wait_on_complete = false +} + diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/precedence/create_ranked_failover_0_precedence.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/precedence/create_ranked_failover_0_precedence.tf new file mode 100644 index 000000000..43ca8e63b --- /dev/null +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/precedence/create_ranked_failover_0_precedence.tf @@ -0,0 +1,78 @@ +provider "akamai" { + edgerc = "../../common/testutils/edgerc" +} + +locals { + gtmTestDomain = "gtm_terra_testdomain.akadns.net" +} + +resource "akamai_gtm_property" "tfexample_prop_1" { + domain = local.gtmTestDomain + name = "tfexample_prop_1" + type = "ranked-failover" + score_aggregation_type = "median" + handout_limit = 5 + handout_mode = "normal" + traffic_target { + datacenter_id = 3131 + enabled = true + weight = 200 + servers = ["1.2.3.9"] + handout_cname = "test" + precedence = 10 + } + traffic_target { + datacenter_id = 3132 + enabled = true + weight = 200 + servers = ["1.2.3.9"] + handout_cname = "test" + precedence = 0 + } + + liveness_test { + name = "lt5" + test_interval = 40 + test_object_protocol = "HTTP" + test_timeout = 30 + answers_required = false + disable_nonstandard_port_warning = false + error_penalty = 0 + http_error3xx = false + http_error4xx = false + http_error5xx = false + disabled = false + http_header { + name = "test_name" + value = "test_value" + } + peer_certificate_verification = false + recursion_requested = false + request_string = "" + resource_type = "" + response_string = "" + ssl_client_certificate = "" + ssl_client_private_key = "" + test_object = "/junk" + test_object_password = "" + test_object_port = 1 + test_object_username = "" + timeout_penalty = 0 + } + liveness_test { + name = "lt2" + test_interval = 30 + test_object_protocol = "HTTP" + test_timeout = 20 + test_object = "/junk" + } + static_rr_set { + type = "MX" + ttl = 300 + rdata = ["100 test_e"] + } + failover_delay = 0 + failback_delay = 0 + wait_on_complete = false +} + diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/precedence/create_ranked_failover_empty_precedence.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/precedence/create_ranked_failover_empty_precedence.tf new file mode 100644 index 000000000..ca7294a15 --- /dev/null +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/precedence/create_ranked_failover_empty_precedence.tf @@ -0,0 +1,76 @@ +provider "akamai" { + edgerc = "../../common/testutils/edgerc" +} + +locals { + gtmTestDomain = "gtm_terra_testdomain.akadns.net" +} + +resource "akamai_gtm_property" "tfexample_prop_1" { + domain = local.gtmTestDomain + name = "tfexample_prop_1" + type = "ranked-failover" + score_aggregation_type = "median" + handout_limit = 5 + handout_mode = "normal" + traffic_target { + datacenter_id = 3131 + enabled = true + weight = 200 + servers = ["1.2.3.9"] + handout_cname = "test" + } + traffic_target { + datacenter_id = 3132 + enabled = true + weight = 200 + servers = ["1.2.3.9"] + handout_cname = "test" + } + + liveness_test { + name = "lt5" + test_interval = 40 + test_object_protocol = "HTTP" + test_timeout = 30 + answers_required = false + disable_nonstandard_port_warning = false + error_penalty = 0 + http_error3xx = false + http_error4xx = false + http_error5xx = false + disabled = false + http_header { + name = "test_name" + value = "test_value" + } + peer_certificate_verification = false + recursion_requested = false + request_string = "" + resource_type = "" + response_string = "" + ssl_client_certificate = "" + ssl_client_private_key = "" + test_object = "/junk" + test_object_password = "" + test_object_port = 1 + test_object_username = "" + timeout_penalty = 0 + } + liveness_test { + name = "lt2" + test_interval = 30 + test_object_protocol = "HTTP" + test_timeout = 20 + test_object = "/junk" + } + static_rr_set { + type = "MX" + ttl = 300 + rdata = ["100 test_e"] + } + failover_delay = 0 + failback_delay = 0 + wait_on_complete = false +} + diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/precedence/create_ranked_failover_no_traffic_targets.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/precedence/create_ranked_failover_no_traffic_targets.tf new file mode 100644 index 000000000..4873fcabd --- /dev/null +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/precedence/create_ranked_failover_no_traffic_targets.tf @@ -0,0 +1,61 @@ +provider "akamai" { + edgerc = "../../common/testutils/edgerc" +} + +locals { + gtmTestDomain = "gtm_terra_testdomain.akadns.net" +} + +resource "akamai_gtm_property" "tfexample_prop_1" { + domain = local.gtmTestDomain + name = "tfexample_prop_1" + type = "ranked-failover" + score_aggregation_type = "median" + handout_limit = 5 + handout_mode = "normal" + liveness_test { + name = "lt5" + test_interval = 40 + test_object_protocol = "HTTP" + test_timeout = 30 + answers_required = false + disable_nonstandard_port_warning = false + error_penalty = 0 + http_error3xx = false + http_error4xx = false + http_error5xx = false + disabled = false + http_header { + name = "test_name" + value = "test_value" + } + peer_certificate_verification = false + recursion_requested = false + request_string = "" + resource_type = "" + response_string = "" + ssl_client_certificate = "" + ssl_client_private_key = "" + test_object = "/junk" + test_object_password = "" + test_object_port = 1 + test_object_username = "" + timeout_penalty = 0 + } + liveness_test { + name = "lt2" + test_interval = 30 + test_object_protocol = "HTTP" + test_timeout = 20 + test_object = "/junk" + } + static_rr_set { + type = "MX" + ttl = 300 + rdata = ["100 test_e"] + } + failover_delay = 0 + failback_delay = 0 + wait_on_complete = false +} + diff --git a/pkg/providers/gtm/testdata/TestResGtmProperty/precedence/create_ranked_failover_precedence.tf b/pkg/providers/gtm/testdata/TestResGtmProperty/precedence/create_ranked_failover_precedence.tf new file mode 100644 index 000000000..0ab7456ed --- /dev/null +++ b/pkg/providers/gtm/testdata/TestResGtmProperty/precedence/create_ranked_failover_precedence.tf @@ -0,0 +1,77 @@ +provider "akamai" { + edgerc = "../../common/testutils/edgerc" +} + +locals { + gtmTestDomain = "gtm_terra_testdomain.akadns.net" +} + +resource "akamai_gtm_property" "tfexample_prop_1" { + domain = local.gtmTestDomain + name = "tfexample_prop_1" + type = "ranked-failover" + score_aggregation_type = "median" + handout_limit = 5 + handout_mode = "normal" + traffic_target { + datacenter_id = 3131 + enabled = true + weight = 200 + servers = ["1.2.3.9"] + handout_cname = "test" + precedence = 10 + } + traffic_target { + datacenter_id = 3132 + enabled = true + weight = 200 + servers = ["1.2.3.9"] + handout_cname = "test" + } + + liveness_test { + name = "lt5" + test_interval = 40 + test_object_protocol = "HTTP" + test_timeout = 30 + answers_required = false + disable_nonstandard_port_warning = false + error_penalty = 0 + http_error3xx = false + http_error4xx = false + http_error5xx = false + disabled = false + http_header { + name = "test_name" + value = "test_value" + } + peer_certificate_verification = false + recursion_requested = false + request_string = "" + resource_type = "" + response_string = "" + ssl_client_certificate = "" + ssl_client_private_key = "" + test_object = "/junk" + test_object_password = "" + test_object_port = 1 + test_object_username = "" + timeout_penalty = 0 + } + liveness_test { + name = "lt2" + test_interval = 30 + test_object_protocol = "HTTP" + test_timeout = 20 + test_object = "/junk" + } + static_rr_set { + type = "MX" + ttl = 300 + rdata = ["100 test_e"] + } + failover_delay = 0 + failback_delay = 0 + wait_on_complete = false +} + From 5931bd6d77e131119cb57164fc4ad08f7410fe6f Mon Sep 17 00:00:00 2001 From: Wojciech Zagrajczuk Date: Thu, 14 Mar 2024 13:25:00 +0000 Subject: [PATCH 39/52] DXE-3641 Adjust code after dropping trivial non-API dependent methods from DNS & GTM --- .../gtm/data_akamai_gtm_default_datacenter.go | 2 +- ...data_akamai_gtm_default_datacenter_test.go | 4 - .../gtm/resource_akamai_gtm_asmap.go | 28 +++-- .../gtm/resource_akamai_gtm_asmap_test.go | 56 +++------ .../gtm/resource_akamai_gtm_cidrmap.go | 14 ++- .../gtm/resource_akamai_gtm_cidrmap_test.go | 20 --- .../gtm/resource_akamai_gtm_datacenter.go | 11 +- .../resource_akamai_gtm_datacenter_test.go | 12 -- .../gtm/resource_akamai_gtm_domain.go | 16 ++- .../gtm/resource_akamai_gtm_domain_test.go | 42 ------- .../gtm/resource_akamai_gtm_geomap.go | 36 ++++-- .../gtm/resource_akamai_gtm_geomap_test.go | 20 --- .../gtm/resource_akamai_gtm_property.go | 114 +++++++++++------- .../gtm/resource_akamai_gtm_property_test.go | 79 ------------ .../gtm/resource_akamai_gtm_resource.go | 43 ++++--- .../gtm/resource_akamai_gtm_resource_test.go | 108 ----------------- 16 files changed, 186 insertions(+), 419 deletions(-) diff --git a/pkg/providers/gtm/data_akamai_gtm_default_datacenter.go b/pkg/providers/gtm/data_akamai_gtm_default_datacenter.go index 1b4f27904..5bba65fe5 100644 --- a/pkg/providers/gtm/data_akamai_gtm_default_datacenter.go +++ b/pkg/providers/gtm/data_akamai_gtm_default_datacenter.go @@ -75,7 +75,7 @@ func dataSourceGTMDefaultDatacenterRead(ctx context.Context, d *schema.ResourceD "dcid": dcID, }).Debug("Start Default Datacenter Retrieval") - var defaultDC = Client(meta).NewDatacenter(ctx) + var defaultDC *gtm.Datacenter switch dcID { case gtm.MapDefaultDC: defaultDC, err = Client(meta).CreateMapsDefaultDatacenter(ctx, domain) diff --git a/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go b/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go index cbf29e953..1277822f6 100644 --- a/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go @@ -22,10 +22,6 @@ func TestAccDataSourceGTMDefaultDatacenter_basic(t *testing.T) { mock.AnythingOfType("string"), ).Return(&dc, nil) - client.On("NewDatacenter", - mock.Anything, // ctx is irrelevant for this test - ).Return(&dc) - dataSourceName := "data.akamai_gtm_default_datacenter.test" useClient(client, func() { diff --git a/pkg/providers/gtm/resource_akamai_gtm_asmap.go b/pkg/providers/gtm/resource_akamai_gtm_asmap.go index 8ff7045e9..684c77cd9 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_asmap.go +++ b/pkg/providers/gtm/resource_akamai_gtm_asmap.go @@ -161,7 +161,14 @@ func resourceGTMv1ASMapCreate(ctx context.Context, d *schema.ResourceData, m int }) } - newAS := populateNewASMapObject(ctx, meta, d, m) + newAS, err := populateNewASMapObject(d, m) + if err != nil { + return append(diags, diag.Diagnostic{ + Severity: diag.Error, + Summary: "asMap populate failed", + Detail: err.Error(), + }) + } logger.Debugf("Proposed New asMap: [%v]", newAS) cStatus, err := Client(meta).CreateASMap(ctx, newAS, domain) if err != nil { @@ -413,16 +420,21 @@ func resourceGTMv1ASMapDelete(ctx context.Context, d *schema.ResourceData, m int } // Create and populate a new asMap object from asMap data -func populateNewASMapObject(ctx context.Context, meta meta.Meta, d *schema.ResourceData, m interface{}) *gtm.ASMap { +func populateNewASMapObject(d *schema.ResourceData, m interface{}) (*gtm.ASMap, error) { - asMapName, _ := tf.GetStringValue("name", d) - asObj := Client(meta).NewASMap(ctx, asMapName) - asObj.DefaultDatacenter = >m.DatacenterBase{} - asObj.Assignments = make([]*gtm.ASAssignment, 1) - asObj.Links = make([]*gtm.Link, 1) + asMapName, err := tf.GetStringValue("name", d) + if err != nil { + return nil, err + } + asObj := >m.ASMap{ + Name: asMapName, + DefaultDatacenter: >m.DatacenterBase{}, + Assignments: make([]*gtm.ASAssignment, 1), + Links: make([]*gtm.Link, 1), + } populateASMapObject(d, asObj, m) - return asObj + return asObj, nil } diff --git a/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go b/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go index 968c65598..96d590702 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go @@ -13,14 +13,11 @@ import ( ) func TestResGTMASMap(t *testing.T) { - dc := gtm.Datacenter{ - DatacenterID: asmap.DefaultDatacenter.DatacenterID, - Nickname: asmap.DefaultDatacenter.Nickname, - } - t.Run("create asmap", func(t *testing.T) { client := >m.Mock{} + asmap, dc := getASMapTestData() + getCall := client.On("GetASMap", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("string"), @@ -33,11 +30,6 @@ func TestResGTMASMap(t *testing.T) { resp.Resource = &asmap resp.Status = &pendingResponseStatus - client.On("NewASMap", - mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("string"), - ).Return(&asmap, nil) - client.On("GetDatacenter", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("int"), @@ -100,6 +92,8 @@ func TestResGTMASMap(t *testing.T) { t.Run("create asmap failed", func(t *testing.T) { client := >m.Mock{} + _, dc := getASMapTestData() + client.On("CreateASMap", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("*gtm.ASMap"), @@ -114,11 +108,6 @@ func TestResGTMASMap(t *testing.T) { mock.AnythingOfType("string"), ).Return(&dc, nil) - client.On("NewASMap", - mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("string"), - ).Return(&asmap, nil) - useClient(client, func() { resource.UnitTest(t, resource.TestCase{ ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), @@ -137,6 +126,8 @@ func TestResGTMASMap(t *testing.T) { t.Run("create asmap denied", func(t *testing.T) { client := >m.Mock{} + asmap, dc := getASMapTestData() + dr := gtm.ASMapResponse{} dr.Resource = &asmap dr.Status = &deniedResponseStatus @@ -152,11 +143,6 @@ func TestResGTMASMap(t *testing.T) { mock.AnythingOfType("string"), ).Return(&dc, nil) - client.On("NewASMap", - mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("string"), - ).Return(&asmap, nil) - useClient(client, func() { resource.UnitTest(t, resource.TestCase{ ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), @@ -175,14 +161,7 @@ func TestResGTMASMap(t *testing.T) { t.Run("import asmap", func(t *testing.T) { client := >m.Mock{} - resp := gtm.ASMapResponse{} - resp.Resource = &asmap - resp.Status = &pendingResponseStatus - - client.On("NewASMap", - mock.Anything, - mock.AnythingOfType("string"), - ).Return(&asmap, nil) + asmap, dc := getASMapTestData() client.On("GetDatacenter", mock.Anything, @@ -341,10 +320,7 @@ func TestGTMASMapOrder(t *testing.T) { // getASMapMocks mocks creation and deletion of a resource func getASMapMocks() *gtm.Mock { - dc := gtm.Datacenter{ - DatacenterID: asmap.DefaultDatacenter.DatacenterID, - Nickname: asmap.DefaultDatacenter.Nickname, - } + asmap, dc := getASMapTestData() client := >m.Mock{} @@ -358,11 +334,6 @@ func getASMapMocks() *gtm.Mock { resp.Resource = &asMapDiffOrder resp.Status = &pendingResponseStatus - client.On("NewASMap", - mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("string"), - ).Return(&asmap, nil) - client.On("GetDatacenter", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("int"), @@ -426,8 +397,10 @@ var ( }, }, } +) - asmap = gtm.ASMap{ +func getASMapTestData() (gtm.ASMap, gtm.Datacenter) { + asmap := gtm.ASMap{ Name: "tfexample_as_1", DefaultDatacenter: >m.DatacenterBase{ DatacenterID: 5400, @@ -450,4 +423,9 @@ var ( }, }, } -) + dc := gtm.Datacenter{ + DatacenterID: asmap.DefaultDatacenter.DatacenterID, + Nickname: asmap.DefaultDatacenter.Nickname, + } + return asmap, dc +} diff --git a/pkg/providers/gtm/resource_akamai_gtm_cidrmap.go b/pkg/providers/gtm/resource_akamai_gtm_cidrmap.go index 9d1b809cc..c13311dca 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_cidrmap.go +++ b/pkg/providers/gtm/resource_akamai_gtm_cidrmap.go @@ -115,7 +115,7 @@ func resourceGTMv1CIDRMapCreate(ctx context.Context, d *schema.ResourceData, m i }) } - newCidr := populateNewCIDRMapObject(ctx, meta, d, m) + newCidr := populateNewCIDRMapObject(meta, d, m) logger.Debugf("Proposed New CidrMap: [%v]", newCidr) cStatus, err := Client(meta).CreateCIDRMap(ctx, newCidr, domain) if err != nil { @@ -369,7 +369,7 @@ func resourceGTMv1CIDRMapDelete(ctx context.Context, d *schema.ResourceData, m i } // Create and populate a new cidrMap object from cidrMap data -func populateNewCIDRMapObject(ctx context.Context, meta meta.Meta, d *schema.ResourceData, m interface{}) *gtm.CIDRMap { +func populateNewCIDRMapObject(meta meta.Meta, d *schema.ResourceData, m interface{}) *gtm.CIDRMap { logger := meta.Log("Akamai GTM", "populateNewCIDRMapObject") cidrMapName, err := tf.GetStringValue("name", d) @@ -377,10 +377,12 @@ func populateNewCIDRMapObject(ctx context.Context, meta meta.Meta, d *schema.Res logger.Errorf("cidrMap name not found in ResourceData: %s", err.Error()) } - cidrObj := Client(meta).NewCIDRMap(ctx, cidrMapName) - cidrObj.DefaultDatacenter = >m.DatacenterBase{} - cidrObj.Assignments = make([]*gtm.CIDRAssignment, 0) - cidrObj.Links = make([]*gtm.Link, 1) + cidrObj := >m.CIDRMap{ + Name: cidrMapName, + DefaultDatacenter: >m.DatacenterBase{}, + Assignments: make([]*gtm.CIDRAssignment, 0), + Links: make([]*gtm.Link, 1), + } populateCIDRMapObject(d, cidrObj, m) return cidrObj diff --git a/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go b/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go index 45a8ad359..4b7cd2f7f 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go @@ -36,11 +36,6 @@ func TestResGTMCIDRMap(t *testing.T) { getCall.ReturnArguments = mock.Arguments{resp.Resource, nil} }) - client.On("NewCIDRMap", - mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("string"), - ).Return(&cidr, nil) - client.On("GetDatacenter", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("int"), @@ -100,11 +95,6 @@ func TestResGTMCIDRMap(t *testing.T) { StatusCode: http.StatusBadRequest, }) - client.On("NewCIDRMap", - mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("string"), - ).Return(&cidr, nil) - client.On("GetDatacenter", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("int"), @@ -138,11 +128,6 @@ func TestResGTMCIDRMap(t *testing.T) { gtmTestDomain, ).Return(&dr, nil) - client.On("NewCIDRMap", - mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("string"), - ).Return(&cidr, nil) - client.On("GetDatacenter", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("int"), @@ -284,11 +269,6 @@ func getCIDRMapMocks() *gtm.Mock { mockGetCIDRMap.ReturnArguments = mock.Arguments{resp.Resource, nil} }) - client.On("NewCIDRMap", - mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("string"), - ).Return(&cidr, nil) - client.On("GetDatacenter", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("int"), diff --git a/pkg/providers/gtm/resource_akamai_gtm_datacenter.go b/pkg/providers/gtm/resource_akamai_gtm_datacenter.go index 91818f449..adbc7bb8a 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_datacenter.go +++ b/pkg/providers/gtm/resource_akamai_gtm_datacenter.go @@ -183,7 +183,7 @@ func resourceGTMv1DatacenterCreate(ctx context.Context, d *schema.ResourceData, } var diags diag.Diagnostics logger.Infof("Creating datacenter [%s] in domain [%s]", datacenterName, domain) - newDC, err := populateNewDatacenterObject(ctx, meta, d, m) + newDC, err := populateNewDatacenterObject(d, m) if err != nil { return diag.FromErr(err) } @@ -459,10 +459,11 @@ func resourceGTMv1DatacenterDelete(ctx context.Context, d *schema.ResourceData, } // Create and populate a new datacenter object from resource data -func populateNewDatacenterObject(ctx context.Context, meta meta.Meta, d *schema.ResourceData, m interface{}) (*gtm.Datacenter, error) { +func populateNewDatacenterObject(d *schema.ResourceData, m interface{}) (*gtm.Datacenter, error) { - dcObj := Client(meta).NewDatacenter(ctx) - dcObj.DefaultLoadObject = gtm.NewLoadObject() + dcObj := >m.Datacenter{ + DefaultLoadObject: >m.LoadObject{}, + } err := populateDatacenterObject(d, dcObj, m) return dcObj, err @@ -532,7 +533,7 @@ func populateDatacenterObject(d *schema.ResourceData, dc *gtm.Datacenter, m inte if dloList, err := tf.GetInterfaceArrayValue("default_load_object", d); err != nil || len(dloList) == 0 { dc.DefaultLoadObject = nil } else { - dloObject := gtm.NewLoadObject() + dloObject := >m.LoadObject{} dloMap, ok := dloList[0].(map[string]interface{}) if !ok { logger.Errorf("populateDatacenterObject default_load_object failed") diff --git a/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go b/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go index 7c13a2e20..b2c8a9bdc 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go @@ -59,10 +59,6 @@ func TestResGTMDatacenter(t *testing.T) { getCall.ReturnArguments = mock.Arguments{args.Get(1).(*gtm.Datacenter), nil} }) - client.On("NewDatacenter", - mock.Anything, // ctx is irrelevant for this test - ).Return(>m.Datacenter{}) - client.On("GetDomainStatus", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("string"), @@ -120,10 +116,6 @@ func TestResGTMDatacenter(t *testing.T) { StatusCode: http.StatusBadRequest, }) - client.On("NewDatacenter", - mock.Anything, // ctx is irrelevant for this test - ).Return(&dc) - useClient(client, func() { resource.UnitTest(t, resource.TestCase{ ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), @@ -151,10 +143,6 @@ func TestResGTMDatacenter(t *testing.T) { gtmTestDomain, ).Return(&dr, nil) - client.On("NewDatacenter", - mock.Anything, // ctx is irrelevant for this test - ).Return(&dc) - useClient(client, func() { resource.UnitTest(t, resource.TestCase{ ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), diff --git a/pkg/providers/gtm/resource_akamai_gtm_domain.go b/pkg/providers/gtm/resource_akamai_gtm_domain.go index 0b4e236ab..d627fd589 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_domain.go +++ b/pkg/providers/gtm/resource_akamai_gtm_domain.go @@ -231,7 +231,7 @@ func resourceGTMv1DomainCreate(ctx context.Context, d *schema.ResourceData, m in return diag.FromErr(err) } logger.Infof("Creating domain [%s]", dname) - newDom, err := populateNewDomainObject(ctx, meta, d, m) + newDom, err := populateNewDomainObject(d, m) if err != nil { return diag.FromErr(err) } @@ -541,11 +541,17 @@ func validateDomainType(v interface{}, _ cty.Path) diag.Diagnostics { } // Create and populate a new domain object from resource data -func populateNewDomainObject(ctx context.Context, meta meta.Meta, d *schema.ResourceData, m interface{}) (*gtm.Domain, error) { +func populateNewDomainObject(d *schema.ResourceData, m interface{}) (*gtm.Domain, error) { - name, _ := tf.GetStringValue("name", d) - domObj := Client(meta).NewDomain(ctx, name, d.Get("type").(string)) - err := populateDomainObject(d, domObj, m) + name, err := tf.GetStringValue("name", d) + if err != nil { + return nil, err + } + domObj := >m.Domain{ + Name: name, + Type: d.Get("type").(string), + } + err = populateDomainObject(d, domObj, m) return domObj, err diff --git a/pkg/providers/gtm/resource_akamai_gtm_domain_test.go b/pkg/providers/gtm/resource_akamai_gtm_domain_test.go index 5d02e2c9f..1dc4cf3a1 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_domain_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_domain_test.go @@ -36,12 +36,6 @@ func TestResGTMDomain(t *testing.T) { getCall.ReturnArguments = mock.Arguments{args.Get(1).(*gtm.Domain), nil} }) - client.On("NewDomain", - mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("string"), - mock.AnythingOfType("string"), - ).Return(&testDomain) - client.On("GetDomainStatus", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("string"), @@ -112,12 +106,6 @@ func TestResGTMDomain(t *testing.T) { getCall.ReturnArguments = mock.Arguments{args.Get(1).(*gtm.Domain), nil} }) - client.On("NewDomain", - mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("string"), - mock.AnythingOfType("string"), - ).Return(&testDomainWithSignAndServe) - client.On("GetDomainStatus", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("string"), @@ -170,12 +158,6 @@ func TestResGTMDomain(t *testing.T) { getCall.ReturnArguments = mock.Arguments{args.Get(1).(*gtm.Domain), nil} }) - client.On("NewDomain", - mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("string"), - mock.AnythingOfType("string"), - ).Return(&testDomain) - client.On("GetDomainStatus", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("string"), @@ -222,12 +204,6 @@ func TestResGTMDomain(t *testing.T) { StatusCode: http.StatusBadRequest, }) - client.On("NewDomain", - mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("string"), - mock.AnythingOfType("string"), - ).Return(&testDomain) - useClient(client, func() { resource.UnitTest(t, resource.TestCase{ ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), @@ -255,12 +231,6 @@ func TestResGTMDomain(t *testing.T) { mock.AnythingOfType("map[string]string"), ).Return(&dr, nil) - client.On("NewDomain", - mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("string"), - mock.AnythingOfType("string"), - ).Return(&testDomain) - useClient(client, func() { resource.UnitTest(t, resource.TestCase{ ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), @@ -297,12 +267,6 @@ func TestResGTMDomain(t *testing.T) { getCall.ReturnArguments = mock.Arguments{args.Get(1).(*gtm.Domain), nil} }) - client.On("NewDomain", - mock.Anything, - mock.AnythingOfType("string"), - mock.AnythingOfType("string"), - ).Return(&testDomain) - client.On("GetDomainStatus", mock.Anything, mock.AnythingOfType("string"), @@ -412,12 +376,6 @@ func getGTMDomainMocks() *gtm.Mock { mockGetDomain.ReturnArguments = mock.Arguments{args.Get(1).(*gtm.Domain), nil} }) - client.On("NewDomain", - mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("string"), - mock.AnythingOfType("string"), - ).Return(&testDomain) - client.On("GetDomainStatus", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("string"), diff --git a/pkg/providers/gtm/resource_akamai_gtm_geomap.go b/pkg/providers/gtm/resource_akamai_gtm_geomap.go index dcde18be4..e8383d39f 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_geomap.go +++ b/pkg/providers/gtm/resource_akamai_gtm_geomap.go @@ -95,7 +95,7 @@ func resourceGTMv1GeoMapCreate(ctx context.Context, d *schema.ResourceData, m in return diag.FromErr(err) } - name, _ := tf.GetStringValue("name", d) + name, err := tf.GetStringValue("name", d) if err != nil { return diag.FromErr(err) } @@ -117,7 +117,15 @@ func resourceGTMv1GeoMapCreate(ctx context.Context, d *schema.ResourceData, m in }) } - newGeo := populateNewGeoMapObject(ctx, meta, d, m) + newGeo, err := populateNewGeoMapObject(d, m) + if err != nil { + logger.Errorf("geoMap populate failed: %s", err.Error()) + return append(diags, diag.Diagnostic{ + Severity: diag.Error, + Summary: "geoMap populate failed", + Detail: err.Error(), + }) + } logger.Debugf("Proposed New geoMap: [%v]", newGeo) cStatus, err := Client(meta).CreateGeoMap(ctx, newGeo, domain) if err != nil { @@ -302,7 +310,10 @@ func resourceGTMv1GeoMapImport(d *schema.ResourceData, m interface{}) ([]*schema populateTerraformGeoMapState(d, geo, m) // use same Id as passed in - name, _ := tf.GetStringValue("name", d) + name, err := tf.GetStringValue("name", d) + if err != nil { + return []*schema.ResourceData{d}, err + } logger.Infof("[Akamai GTM] geoMap [%s] [%s] Imported", d.Id(), name) return []*schema.ResourceData{d}, nil } @@ -380,16 +391,21 @@ func resourceGTMv1GeoMapDelete(ctx context.Context, d *schema.ResourceData, m in } // Create and populate a new geoMap object from geoMap data -func populateNewGeoMapObject(ctx context.Context, meta meta.Meta, d *schema.ResourceData, m interface{}) *gtm.GeoMap { +func populateNewGeoMapObject(d *schema.ResourceData, m interface{}) (*gtm.GeoMap, error) { - name, _ := tf.GetStringValue("name", d) - geoObj := Client(meta).NewGeoMap(ctx, name) - geoObj.DefaultDatacenter = >m.DatacenterBase{} - geoObj.Assignments = make([]*gtm.GeoAssignment, 1) - geoObj.Links = make([]*gtm.Link, 1) + name, err := tf.GetStringValue("name", d) + if err != nil { + return nil, err + } + geoObj := >m.GeoMap{ + Name: name, + DefaultDatacenter: >m.DatacenterBase{}, + Assignments: make([]*gtm.GeoAssignment, 1), + Links: make([]*gtm.Link, 1), + } populateGeoMapObject(d, geoObj, m) - return geoObj + return geoObj, nil } // Populate existing geoMap object from geoMap data diff --git a/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go b/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go index c398dc08d..55c942348 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go @@ -39,11 +39,6 @@ func TestResGTMGeoMap(t *testing.T) { getCall.ReturnArguments = mock.Arguments{args.Get(1).(*gtm.GeoMap), nil} }) - client.On("NewGeoMap", - mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("string"), - ).Return(&geo, nil) - client.On("GetDatacenter", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("int"), @@ -105,11 +100,6 @@ func TestResGTMGeoMap(t *testing.T) { StatusCode: http.StatusBadRequest, }) - client.On("NewGeoMap", - mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("string"), - ).Return(&geo, nil) - client.On("GetDatacenter", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("int"), @@ -143,11 +133,6 @@ func TestResGTMGeoMap(t *testing.T) { gtmTestDomain, ).Return(&dr, nil) - client.On("NewGeoMap", - mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("string"), - ).Return(&geo, nil) - client.On("GetDatacenter", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("int"), @@ -282,11 +267,6 @@ func getGeoMapMocks() *gtm.Mock { mockGetGeoMap.ReturnArguments = mock.Arguments{args.Get(1).(*gtm.GeoMap), nil} }) - client.On("NewGeoMap", - mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("string"), - ).Return(&geo, nil) - client.On("GetDatacenter", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("int"), diff --git a/pkg/providers/gtm/resource_akamai_gtm_property.go b/pkg/providers/gtm/resource_akamai_gtm_property.go index 4a0c6c47e..5eedaa79e 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_property.go +++ b/pkg/providers/gtm/resource_akamai_gtm_property.go @@ -531,7 +531,7 @@ func resourceGTMv1PropertyCreate(ctx context.Context, d *schema.ResourceData, m } logger.Infof("Creating property [%s] in domain [%s]", propertyName, domain) - newProp, err := populateNewPropertyObject(ctx, meta, d, m) + newProp, err := populateNewPropertyObject(d, m) if err != nil { return diag.FromErr(err) } @@ -629,7 +629,7 @@ func resourceGTMv1PropertyUpdate(ctx context.Context, d *schema.ResourceData, m return diag.FromErr(err) } logger.Debugf("Updating Property BEFORE: %v", existProp) - err = populatePropertyObject(ctx, d, existProp, m) + err = populatePropertyObject(d, existProp, m) if err != nil { return diag.FromErr(err) } @@ -759,7 +759,7 @@ func resourceGTMv1PropertyDelete(ctx context.Context, d *schema.ResourceData, m // nolint:gocyclo // Populate existing property object from resource data -func populatePropertyObject(ctx context.Context, d *schema.ResourceData, prop *gtm.Property, m interface{}) error { +func populatePropertyObject(d *schema.ResourceData, prop *gtm.Property, m interface{}) error { meta := meta.Must(m) logger := meta.Log("Akamai GTM", "populatePropertyObject") @@ -959,20 +959,25 @@ func populatePropertyObject(ctx context.Context, d *schema.ResourceData, prop *g if strings.ToUpper(ptype) != "STATIC" { populateTrafficTargetObject(d, prop, m) } - populateStaticRRSetObject(ctx, meta, d, prop) - populateLivenessTestObject(ctx, meta, d, prop) + populateStaticRRSetObject(d, prop) + populateLivenessTestObject(d, prop) return nil } // Create and populate a new property object from resource data -func populateNewPropertyObject(ctx context.Context, meta meta.Meta, d *schema.ResourceData, m interface{}) (*gtm.Property, error) { +func populateNewPropertyObject(d *schema.ResourceData, m interface{}) (*gtm.Property, error) { - name, _ := tf.GetStringValue("name", d) - propObj := Client(meta).NewProperty(ctx, name) - propObj.TrafficTargets = make([]*gtm.TrafficTarget, 0) - propObj.LivenessTests = make([]*gtm.LivenessTest, 0) - err := populatePropertyObject(ctx, d, propObj, m) + name, err := tf.GetStringValue("name", d) + if err != nil { + return nil, err + } + propObj := >m.Property{ + Name: name, + TrafficTargets: make([]*gtm.TrafficTarget, 0), + LivenessTests: make([]*gtm.LivenessTest, 0), + } + err = populatePropertyObject(d, propObj, m) return propObj, err @@ -1080,7 +1085,11 @@ func populateTerraformTrafficTargetState(d *schema.ResourceData, prop *gtm.Prope objectInventory[aObj.DatacenterID] = aObj } } - ttStateList, _ := tf.GetInterfaceArrayValue("traffic_target", d) + + ttStateList, err := tf.GetInterfaceArrayValue("traffic_target", d) + if err != nil { + return err + } for _, ttMap := range ttStateList { tt := ttMap.(map[string]interface{}) objIndex := tt["datacenter_id"].(int) @@ -1122,7 +1131,7 @@ func populateTerraformTrafficTargetState(d *schema.ResourceData, prop *gtm.Prope } // Populate existing static_rr_sets object from resource data -func populateStaticRRSetObject(ctx context.Context, meta meta.Meta, d *schema.ResourceData, prop *gtm.Property) { +func populateStaticRRSetObject(d *schema.ResourceData, prop *gtm.Property) { // pull apart List staticSetList, err := tf.GetInterfaceArrayValue("static_rr_set", d) @@ -1130,9 +1139,10 @@ func populateStaticRRSetObject(ctx context.Context, meta meta.Meta, d *schema.Re staticObjList := make([]*gtm.StaticRRSet, len(staticSetList)) // create new object list for i, v := range staticSetList { recMap := v.(map[string]interface{}) - record := Client(meta).NewStaticRRSet(ctx) // create new object - record.TTL = recMap["ttl"].(int) - record.Type = recMap["type"].(string) + record := >m.StaticRRSet{ + TTL: recMap["ttl"].(int), + Type: recMap["type"].(string), + } if recMap["rdata"] != nil { rls := make([]string, len(recMap["rdata"].([]interface{}))) for i, d := range recMap["rdata"].([]interface{}) { @@ -1157,7 +1167,11 @@ func populateTerraformStaticRRSetState(d *schema.ResourceData, prop *gtm.Propert objectInventory[aObj.Type] = aObj } } - rrStateList, _ := tf.GetInterfaceArrayValue("static_rr_set", d) + + rrStateList, err := tf.GetInterfaceArrayValue("static_rr_set", d) + if err != nil { + return err + } for _, rrMap := range rrStateList { rr := rrMap.(map[string]interface{}) objIndex := rr["type"].(string) @@ -1189,51 +1203,55 @@ func populateTerraformStaticRRSetState(d *schema.ResourceData, prop *gtm.Propert } // Populate existing Liveness test object from resource data -func populateLivenessTestObject(ctx context.Context, meta meta.Meta, d *schema.ResourceData, prop *gtm.Property) { +func populateLivenessTestObject(d *schema.ResourceData, prop *gtm.Property) { liveTestList, err := tf.GetInterfaceArrayValue("liveness_test", d) if err == nil { liveTestObjList := make([]*gtm.LivenessTest, len(liveTestList)) // create new object list for i, l := range liveTestList { v := l.(map[string]interface{}) - lt := Client(meta).NewLivenessTest(ctx, v["name"].(string), - v["test_object_protocol"].(string), - v["test_interval"].(int), - float32(v["test_timeout"].(float64))) // create new object - lt.ErrorPenalty = v["error_penalty"].(float64) - lt.PeerCertificateVerification = v["peer_certificate_verification"].(bool) - lt.TestObject = v["test_object"].(string) - lt.RequestString = v["request_string"].(string) - lt.ResponseString = v["response_string"].(string) - lt.HTTPError3xx = v["http_error3xx"].(bool) - lt.HTTPError4xx = v["http_error4xx"].(bool) - lt.HTTPError5xx = v["http_error5xx"].(bool) + + lt := >m.LivenessTest{ + Name: v["name"].(string), + TestObjectProtocol: v["test_object_protocol"].(string), + TestInterval: v["test_interval"].(int), + TestTimeout: float32(v["test_timeout"].(float64)), + ErrorPenalty: v["error_penalty"].(float64), + PeerCertificateVerification: v["peer_certificate_verification"].(bool), + TestObject: v["test_object"].(string), + RequestString: v["request_string"].(string), + ResponseString: v["response_string"].(string), + HTTPError3xx: v["http_error3xx"].(bool), + HTTPError4xx: v["http_error4xx"].(bool), + HTTPError5xx: v["http_error5xx"].(bool), + Pre2023SecurityPosture: v["pre_2023_security_posture"].(bool), + Disabled: v["disabled"].(bool), + TestObjectPassword: v["test_object_password"].(string), + TestObjectPort: v["test_object_port"].(int), + SSLClientPrivateKey: v["ssl_client_private_key"].(string), + SSLClientCertificate: v["ssl_client_certificate"].(string), + DisableNonstandardPortWarning: v["disable_nonstandard_port_warning"].(bool), + TestObjectUsername: v["test_object_username"].(string), + TimeoutPenalty: v["timeout_penalty"].(float64), + AnswersRequired: v["answers_required"].(bool), + ResourceType: v["resource_type"].(string), + RecursionRequested: v["recursion_requested"].(bool), + } if v["http_method"].(string) != "" { lt.HTTPMethod = ptr.To(v["http_method"].(string)) } if v["http_request_body"].(string) != "" { lt.HTTPRequestBody = ptr.To(v["http_request_body"].(string)) } - lt.Pre2023SecurityPosture = v["pre_2023_security_posture"].(bool) - lt.Disabled = v["disabled"].(bool) - lt.TestObjectPassword = v["test_object_password"].(string) - lt.TestObjectPort = v["test_object_port"].(int) - lt.SSLClientPrivateKey = v["ssl_client_private_key"].(string) - lt.SSLClientCertificate = v["ssl_client_certificate"].(string) - lt.DisableNonstandardPortWarning = v["disable_nonstandard_port_warning"].(bool) - lt.TestObjectUsername = v["test_object_username"].(string) - lt.TimeoutPenalty = v["timeout_penalty"].(float64) - lt.AnswersRequired = v["answers_required"].(bool) - lt.ResourceType = v["resource_type"].(string) - lt.RecursionRequested = v["recursion_requested"].(bool) httpHeaderList := v["http_header"].([]interface{}) if httpHeaderList != nil { headerObjList := make([]*gtm.HTTPHeader, len(httpHeaderList)) // create new object list for i, h := range httpHeaderList { recMap := h.(map[string]interface{}) - record := lt.NewHTTPHeader() // create new object - record.Name = recMap["name"].(string) - record.Value = recMap["value"].(string) + record := >m.HTTPHeader{ + Name: recMap["name"].(string), + Value: recMap["value"].(string), + } headerObjList[i] = record } lt.HTTPHeaders = headerObjList @@ -1263,7 +1281,11 @@ func populateTerraformLivenessTestState(d *schema.ResourceData, prop *gtm.Proper objectInventory[aObj.Name] = aObj } } - ltStateList, _ := tf.GetInterfaceArrayValue("liveness_test", d) + + ltStateList, err := tf.GetInterfaceArrayValue("liveness_test", d) + if err != nil { + return err + } for _, ltMap := range ltStateList { lt := ltMap.(map[string]interface{}) objIndex := lt["name"].(string) diff --git a/pkg/providers/gtm/resource_akamai_gtm_property_test.go b/pkg/providers/gtm/resource_akamai_gtm_property_test.go index ffe9499ad..fc8f80eb5 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_property_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_property_test.go @@ -27,17 +27,10 @@ func TestResGTMProperty(t *testing.T) { "create property": { property: getBasicProperty(), init: func(t *testing.T, m *gtm.Mock) { - mockNewProperty(m, propertyName) - mockNewStaticRRSet(m) - mockNewLivenessTest(m, "lt5", "HTTP", "/junk", 40, 1, 30) - mockNewLivenessTest(m, "lt2", "HTTP", "/junk", 30, 80, 20) mockCreateProperty(m, getBasicProperty(), gtmTestDomain) // read mockGetProperty(m, getBasicProperty(), propertyName, gtmTestDomain, 4) // update - mockNewStaticRRSet(m) - mockNewLivenessTest(m, "lt5", "HTTP", "/junk", 50, 1, 30) - mockNewLivenessTest(m, "lt2", "HTTP", "/junk", 30, 0, 20) mockUpdateProperty(m, getUpdatedProperty(), gtmTestDomain) // read mockGetDomainStatus(m, gtmTestDomain, 2) @@ -81,10 +74,6 @@ func TestResGTMProperty(t *testing.T) { "create property with additional liveness test fields": { property: getBasicPropertyWithLivenessTests(), init: func(t *testing.T, m *gtm.Mock) { - mockNewProperty(m, propertyName) - mockNewStaticRRSet(m) - mockNewLivenessTest(m, "lt5", "HTTP", "/junk", 40, 1, 30) - mockNewLivenessTest(m, "lt2", "HTTP", "/junk", 30, 80, 20) mockCreateProperty(m, getBasicPropertyWithLivenessTests(), gtmTestDomain) // read mockGetProperty(m, getBasicPropertyWithLivenessTests(), propertyName, gtmTestDomain, 3) @@ -112,10 +101,6 @@ func TestResGTMProperty(t *testing.T) { "create property failed": { property: getBasicProperty(), init: func(t *testing.T, m *gtm.Mock) { - mockNewProperty(m, propertyName) - mockNewStaticRRSet(m) - mockNewLivenessTest(m, "lt5", "HTTP", "/junk", 40, 1, 30) - mockNewLivenessTest(m, "lt2", "HTTP", "/junk", 30, 80, 20) // bad request status code returned m.On("CreateProperty", mock.Anything, @@ -136,10 +121,6 @@ func TestResGTMProperty(t *testing.T) { property: nil, init: func(t *testing.T, m *gtm.Mock) { // create - mockNewProperty(m, propertyName) - mockNewStaticRRSet(m) - mockNewLivenessTest(m, "lt5", "HTTP", "/junk", 40, 1, 30) - mockNewLivenessTest(m, "lt2", "HTTP", "/junk", 30, 80, 20) // denied response status returned deniedResponse := gtm.PropertyResponse{ Resource: getBasicProperty(), @@ -162,10 +143,6 @@ func TestResGTMProperty(t *testing.T) { property: getBasicProperty(), init: func(t *testing.T, m *gtm.Mock) { // create 1st property - mockNewProperty(m, propertyName) - mockNewStaticRRSet(m) - mockNewLivenessTest(m, "lt5", "HTTP", "/junk", 40, 1, 30) - mockNewLivenessTest(m, "lt2", "HTTP", "/junk", 30, 80, 20) mockCreateProperty(m, getBasicProperty(), gtmTestDomain) // read mockGetProperty(m, getBasicProperty(), propertyName, gtmTestDomain, 4) @@ -173,10 +150,6 @@ func TestResGTMProperty(t *testing.T) { mockDeleteProperty(m, getBasicProperty(), gtmTestDomain) propertyWithUpdatedName := getBasicProperty() propertyWithUpdatedName.Name = updatedPropertyName - mockNewProperty(m, updatedPropertyName) - mockNewStaticRRSet(m) - mockNewLivenessTest(m, "lt5", "HTTP", "/junk", 40, 1, 30) - mockNewLivenessTest(m, "lt2", "HTTP", "/junk", 30, 80, 20) mockCreateProperty(m, propertyWithUpdatedName, gtmTestDomain) // read mockGetProperty(m, propertyWithUpdatedName, updatedPropertyName, gtmTestDomain, 3) @@ -218,10 +191,6 @@ func TestResGTMProperty(t *testing.T) { property: getBasicProperty(), init: func(t *testing.T, m *gtm.Mock) { // create property with test_object_protocol in first liveness test different from HTTP, HTTPS, FTP - mockNewProperty(m, propertyName) - mockNewStaticRRSet(m) - mockNewLivenessTest(m, "lt5", "SNMP", "", 40, 1, 30) - mockNewLivenessTest(m, "lt2", "HTTP", "/junk", 30, 80, 20) // alter mocked property propertyWithLivenessTest := getBasicProperty() propertyWithLivenessTest.LivenessTests[0].TestObject = "" @@ -270,10 +239,6 @@ func TestResGTMProperty(t *testing.T) { "create property with 'ranked-failover' type and allow single empty precedence value": { property: getRankedFailoverPropertyWithPrecedence(), init: func(t *testing.T, m *gtm.Mock) { - mockNewProperty(m, propertyName) - mockNewStaticRRSet(m) - mockNewLivenessTest(m, "lt5", "HTTP", "/junk", 40, 1, 30) - mockNewLivenessTest(m, "lt2", "HTTP", "/junk", 30, 80, 20) mockCreateProperty(m, getRankedFailoverPropertyWithPrecedence(), gtmTestDomain) // read mockGetProperty(m, getRankedFailoverPropertyWithPrecedence(), propertyName, gtmTestDomain, 3) @@ -301,10 +266,6 @@ func TestResGTMProperty(t *testing.T) { "create property with 'ranked-failover' type and 0 set as precedence value": { property: getRankedFailoverPropertyWithPrecedence(), init: func(t *testing.T, m *gtm.Mock) { - mockNewProperty(m, propertyName) - mockNewStaticRRSet(m) - mockNewLivenessTest(m, "lt5", "HTTP", "/junk", 40, 1, 30) - mockNewLivenessTest(m, "lt2", "HTTP", "/junk", 30, 80, 20) mockCreateProperty(m, getRankedFailoverPropertyWithPrecedence(), gtmTestDomain) // read mockGetProperty(m, getRankedFailoverPropertyWithPrecedence(), propertyName, gtmTestDomain, 3) @@ -780,8 +741,6 @@ func getMocks() *gtm.Mock { getPropertyCall := client.On("GetProperty", mock.Anything, "tfexample_prop_1", gtmTestDomain). Return(nil, >m.Error{StatusCode: http.StatusNotFound}) // create - mockNewProperty(client, "tfexample_prop_1") - mockNewLivenessTest(client, "lt5", "HTTP", "/junk", 40, 80, 30.0) // mock.AnythingOfType *gtm.Property is used is those mock calls as there are too many different test cases to mock // each one and for those test it's not important, since we are only checking the diff client.On("CreateProperty", mock.Anything, mock.AnythingOfType("*gtm.Property"), mock.AnythingOfType("string")).Return(>m.PropertyResponse{ @@ -800,44 +759,6 @@ func getMocks() *gtm.Mock { return client } -func mockNewProperty(client *gtm.Mock, propertyName string) { - client.On("NewProperty", - mock.Anything, - propertyName, - ).Return(>m.Property{ - Name: propertyName, - }).Once() -} - -func mockNewTrafficTarget(client *gtm.Mock, times int) { - client.On("NewTrafficTarget", - mock.Anything, - ).Return(>m.TrafficTarget{}).Times(times) -} - -func mockNewStaticRRSet(client *gtm.Mock) { - client.On("NewStaticRRSet", - mock.Anything, - ).Return(>m.StaticRRSet{}).Once() -} - -func mockNewLivenessTest(client *gtm.Mock, name, protocol, object string, interval, port int, timeout float32) { - client.On("NewLivenessTest", - mock.Anything, - name, - protocol, - interval, - timeout, - ).Return(>m.LivenessTest{ - Name: name, - TestObjectProtocol: protocol, - TestInterval: interval, - TestTimeout: timeout, - TestObjectPort: port, - TestObject: object, - }).Once() -} - func mockCreateProperty(client *gtm.Mock, property *gtm.Property, domain string) { resp := gtm.PropertyResponse{} resp.Resource = property diff --git a/pkg/providers/gtm/resource_akamai_gtm_resource.go b/pkg/providers/gtm/resource_akamai_gtm_resource.go index 386528248..c16a9b1a3 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_resource.go +++ b/pkg/providers/gtm/resource_akamai_gtm_resource.go @@ -137,7 +137,7 @@ func resourceGTMv1ResourceCreate(ctx context.Context, d *schema.ResourceData, m } var diags diag.Diagnostics logger.Infof("Creating resource [%s] in domain [%s]", name, domain) - newRsrc, err := populateNewResourceObject(ctx, meta, d, m) + newRsrc, err := populateNewResourceObject(d, m) if err != nil { return diag.FromErr(err) } @@ -252,7 +252,7 @@ func resourceGTMv1ResourceUpdate(ctx context.Context, d *schema.ResourceData, m }) } logger.Debugf("Updating Resource BEFORE: %v", existRsrc) - if err := populateResourceObject(ctx, d, existRsrc, m); err != nil { + if err := populateResourceObject(d, existRsrc, m); err != nil { return diag.FromErr(err) } logger.Debugf("Updating Resource PROPOSED: %v", existRsrc) @@ -321,12 +321,22 @@ func resourceGTMv1ResourceImport(d *schema.ResourceData, m interface{}) ([]*sche if err != nil { return nil, err } - _ = d.Set("domain", domain) - _ = d.Set("wait_on_complete", true) + + err = d.Set("domain", domain) + if err != nil { + return nil, err + } + err = d.Set("wait_on_complete", true) + if err != nil { + return nil, err + } populateTerraformResourceState(d, rsrc, m) // use same Id as passed in - name, _ := tf.GetStringValue("name", d) + name, err := tf.GetStringValue("name", d) + if err != nil { + return nil, err + } logger.Infof("Resource [%s] [%s] Imported", d.Id(), name) return []*schema.ResourceData{d}, nil } @@ -406,12 +416,17 @@ func resourceGTMv1ResourceDelete(ctx context.Context, d *schema.ResourceData, m } // Create and populate a new resource object from resource data -func populateNewResourceObject(ctx context.Context, meta meta.Meta, d *schema.ResourceData, m interface{}) (*gtm.Resource, error) { +func populateNewResourceObject(d *schema.ResourceData, m interface{}) (*gtm.Resource, error) { - name, _ := tf.GetStringValue("name", d) - rsrcObj := Client(meta).NewResource(ctx, name) - rsrcObj.ResourceInstances = make([]*gtm.ResourceInstance, 0) - err := populateResourceObject(ctx, d, rsrcObj, m) + name, err := tf.GetStringValue("name", d) + if err != nil { + return nil, err + } + rsrcObj := >m.Resource{ + Name: name, + ResourceInstances: make([]*gtm.ResourceInstance, 0), + } + err = populateResourceObject(d, rsrcObj, m) return rsrcObj, err @@ -419,7 +434,7 @@ func populateNewResourceObject(ctx context.Context, meta meta.Meta, d *schema.Re // nolint:gocyclo // Populate existing resource object from resource data -func populateResourceObject(ctx context.Context, d *schema.ResourceData, rsrc *gtm.Resource, m interface{}) error { +func populateResourceObject(d *schema.ResourceData, rsrc *gtm.Resource, m interface{}) error { meta := meta.Must(m) logger := meta.Log("Akamai GTM", "resourceGTMv1ResourceDelete") @@ -518,7 +533,7 @@ func populateResourceObject(ctx context.Context, d *schema.ResourceData, rsrc *g } if _, ok := d.GetOk("resource_instance"); ok { - populateResourceInstancesObject(ctx, meta, d, rsrc) + populateResourceInstancesObject(meta, d, rsrc) } else if d.HasChange("resource_instance") { rsrc.ResourceInstances = make([]*gtm.ResourceInstance, 0) } @@ -556,7 +571,7 @@ func populateTerraformResourceState(d *schema.ResourceData, rsrc *gtm.Resource, } // create and populate GTM Resource ResourceInstances object -func populateResourceInstancesObject(ctx context.Context, meta meta.Meta, d *schema.ResourceData, rsrc *gtm.Resource) { +func populateResourceInstancesObject(meta meta.Meta, d *schema.ResourceData, rsrc *gtm.Resource) { logger := meta.Log("Akamai GTM", "populateResourceInstancesObject") // pull apart List @@ -565,7 +580,7 @@ func populateResourceInstancesObject(ctx context.Context, meta meta.Meta, d *sch rsrcInstanceObjList := make([]*gtm.ResourceInstance, len(rsrcInstances)) // create new object list for i, v := range rsrcInstances { riMap := v.(map[string]interface{}) - rsrcInstance := Client(meta).NewResourceInstance(ctx, rsrc, riMap["datacenter_id"].(int)) // create new object + rsrcInstance := >m.ResourceInstance{DatacenterID: riMap["datacenter_id"].(int)} rsrcInstance.UseDefaultLoadObject = riMap["use_default_load_object"].(bool) if riMap["load_servers"] != nil { loadServers, ok := riMap["load_servers"].(*schema.Set) diff --git a/pkg/providers/gtm/resource_akamai_gtm_resource_test.go b/pkg/providers/gtm/resource_akamai_gtm_resource_test.go index 7801ab052..a678f7d12 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_resource_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_resource_test.go @@ -35,33 +35,6 @@ func TestResGTMResource(t *testing.T) { getCall.ReturnArguments = mock.Arguments{args.Get(1).(*gtm.Resource), nil} }) - resCall := client.On("NewResource", - mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("string"), - ) - - resCall.RunFn = func(args mock.Arguments) { - resCall.ReturnArguments = mock.Arguments{ - >m.Resource{ - Name: args.String(1), - }, - } - } - - resInstCall := client.On("NewResourceInstance", - mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("*gtm.Resource"), - mock.AnythingOfType("int"), - ) - - resInstCall.RunFn = func(args mock.Arguments) { - resInstCall.ReturnArguments = mock.Arguments{ - >m.ResourceInstance{ - DatacenterID: args.Int(2), - }, - } - } - client.On("GetDomainStatus", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("string"), @@ -119,33 +92,6 @@ func TestResGTMResource(t *testing.T) { StatusCode: http.StatusBadRequest, }) - resCall := client.On("NewResource", - mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("string"), - ) - - resCall.RunFn = func(args mock.Arguments) { - resCall.ReturnArguments = mock.Arguments{ - >m.Resource{ - Name: args.String(1), - }, - } - } - - resInstCall := client.On("NewResourceInstance", - mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("*gtm.Resource"), - mock.AnythingOfType("int"), - ) - - resInstCall.RunFn = func(args mock.Arguments) { - resInstCall.ReturnArguments = mock.Arguments{ - >m.ResourceInstance{ - DatacenterID: args.Int(2), - }, - } - } - useClient(client, func() { resource.UnitTest(t, resource.TestCase{ ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), @@ -173,33 +119,6 @@ func TestResGTMResource(t *testing.T) { gtmTestDomain, ).Return(&dr, nil) - resCall := client.On("NewResource", - mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("string"), - ) - - resCall.RunFn = func(args mock.Arguments) { - resCall.ReturnArguments = mock.Arguments{ - >m.Resource{ - Name: args.String(1), - }, - } - } - - resInstCall := client.On("NewResourceInstance", - mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("*gtm.Resource"), - mock.AnythingOfType("int"), - ) - - resInstCall.RunFn = func(args mock.Arguments) { - resInstCall.ReturnArguments = mock.Arguments{ - >m.ResourceInstance{ - DatacenterID: args.Int(2), - }, - } - } - useClient(client, func() { resource.UnitTest(t, resource.TestCase{ ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), @@ -314,33 +233,6 @@ func getGTMResourceMocks() *gtm.Mock { mockGetResource.ReturnArguments = mock.Arguments{args.Get(1).(*gtm.Resource), nil} }) - resCall := client.On("NewResource", - mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("string"), - ) - - resCall.RunFn = func(args mock.Arguments) { - resCall.ReturnArguments = mock.Arguments{ - >m.Resource{ - Name: args.String(1), - }, - } - } - - resInstCall := client.On("NewResourceInstance", - mock.Anything, // ctx is irrelevant for this test - mock.AnythingOfType("*gtm.Resource"), - mock.AnythingOfType("int"), - ) - - resInstCall.RunFn = func(args mock.Arguments) { - resInstCall.ReturnArguments = mock.Arguments{ - >m.ResourceInstance{ - DatacenterID: args.Int(2), - }, - } - } - client.On("DeleteResource", mock.Anything, // ctx is irrelevant for this test mock.AnythingOfType("*gtm.Resource"), From 8111d37c2724850edf944fe3285955e57c90c5d6 Mon Sep 17 00:00:00 2001 From: Shubham Kabra Date: Mon, 26 Feb 2024 10:24:34 -0500 Subject: [PATCH 40/52] SECKSD-24662 akamai_appsec_selected_hostnames data source and resource are deprecated with a scheduled end-of-life in v7.0.0 of our provider use the akamai_appsec_configuration instead --- CHANGELOG.md | 5 +++++ .../appsec/data_akamai_appsec_selected_hostnames.go | 1 + .../appsec/resource_akamai_appsec_selected_hostname.go | 1 + 3 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 386e98b7c..754f49a05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -133,6 +133,11 @@ +#### DEPRECATIONS + +* Appsec + * `akamai_appsec_selected_hostnames` data source and resource are deprecated with a scheduled end-of-life in v7.0.0 of our provider. Use the `akamai_appsec_configuration` instead. + ## 5.6.0 (Feb 19, 2024) #### FEATURES/ENHANCEMENTS: diff --git a/pkg/providers/appsec/data_akamai_appsec_selected_hostnames.go b/pkg/providers/appsec/data_akamai_appsec_selected_hostnames.go index a0484704b..32c590e85 100644 --- a/pkg/providers/appsec/data_akamai_appsec_selected_hostnames.go +++ b/pkg/providers/appsec/data_akamai_appsec_selected_hostnames.go @@ -38,6 +38,7 @@ func dataSourceSelectedHostnames() *schema.Resource { Description: "Text representation", }, }, + DeprecationMessage: "This data source is deprecated with a scheduled end-of-life in v7.0.0 of our provider. Use the akamai_appsec_configuration instead.", } } diff --git a/pkg/providers/appsec/resource_akamai_appsec_selected_hostname.go b/pkg/providers/appsec/resource_akamai_appsec_selected_hostname.go index ff357e31c..c454a9f8c 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_selected_hostname.go +++ b/pkg/providers/appsec/resource_akamai_appsec_selected_hostname.go @@ -52,6 +52,7 @@ func resourceSelectedHostname() *schema.Resource { Description: "How the hostnames are to be applied (APPEND, REMOVE or REPLACE)", }, }, + DeprecationMessage: "This resource is deprecated with a scheduled end-of-life in v7.0.0 of our provider. Use the akamai_appsec_configuration instead.", } } From ea4994d5883f3f9456cca8eddb7268c557e53671 Mon Sep 17 00:00:00 2001 From: Nagendran Alagesan Date: Fri, 8 Mar 2024 09:46:51 +0000 Subject: [PATCH 41/52] SECKSD-23389 Added DiffSuppressFunc to ukraine_geo_control_action to take suppress plan changes for existing terraform state --- CHANGELOG.md | 1 + pkg/providers/appsec/diff_suppress_funcs.go | 20 +++ .../appsec/diff_suppress_funcs_test.go | 42 ++++++ .../appsec/resource_akamai_appsec_ip_geo.go | 9 +- .../resource_akamai_appsec_ip_geo_test.go | 139 ++++++++++++++++++ .../testdata/TestResIPGeo/UkraineGeo.json | 7 + 6 files changed, 214 insertions(+), 4 deletions(-) create mode 100644 pkg/providers/appsec/diff_suppress_funcs_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 754f49a05..057a7cfd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -137,6 +137,7 @@ * Appsec * `akamai_appsec_selected_hostnames` data source and resource are deprecated with a scheduled end-of-life in v7.0.0 of our provider. Use the `akamai_appsec_configuration` instead. + * Fixed ukraine_geo_control_action drift issue ([I#484](https://github.com/akamai/terraform-provider-akamai/issues/484)) ## 5.6.0 (Feb 19, 2024) diff --git a/pkg/providers/appsec/diff_suppress_funcs.go b/pkg/providers/appsec/diff_suppress_funcs.go index 88a42ecae..a26d76688 100644 --- a/pkg/providers/appsec/diff_suppress_funcs.go +++ b/pkg/providers/appsec/diff_suppress_funcs.go @@ -3,12 +3,14 @@ package appsec import ( "bytes" "encoding/json" + "fmt" "log" "reflect" "sort" "strings" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -364,3 +366,21 @@ func compareMatchTargets(oldTarget, newTarget *appsec.CreateMatchTargetResponse) return reflect.DeepEqual(oldTarget, newTarget) } + +// suppress the diff if ukraine_geo_control_action is not passed in terraform config +func suppressDiffUkraineGeoControlAction(_, _, _ string, d *schema.ResourceData) bool { + key := "ukraine_geo_control_action" + + oldValue, newValue := d.GetChange(key) + oldUkraineGeoControlAction, ok := oldValue.(string) + if !ok { + logger.Get("APPSEC", "diffSuppressRules").Error(fmt.Sprintf("cannot parse ukraine_geo_control_action state properly for old value %v", oldValue)) + return true + } + newUkraineGeoControlAction, ok := newValue.(string) + if !ok { + logger.Get("APPSEC", "diffSuppressRules").Error(fmt.Sprintf("cannot parse ukraine_geo_control_action state properly for new value %v", oldValue)) + return true + } + return oldUkraineGeoControlAction == newUkraineGeoControlAction +} diff --git a/pkg/providers/appsec/diff_suppress_funcs_test.go b/pkg/providers/appsec/diff_suppress_funcs_test.go new file mode 100644 index 000000000..565128814 --- /dev/null +++ b/pkg/providers/appsec/diff_suppress_funcs_test.go @@ -0,0 +1,42 @@ +package appsec + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/tj/assert" +) + +func TestUkraineGeoControlActionEqual(t *testing.T) { + + tests := map[string]struct { + ukraineGeoControlAction interface{} + expected bool + }{ + "action set": { + ukraineGeoControlAction: "alert", + expected: false, + }, + "action not set": { + expected: true, + }, + } + + resourceSchema := map[string]*schema.Schema{ + "ukraine_geo_control_action": { + Type: schema.TypeString, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + resourceDataMap := map[string]interface{}{ + "ukraine_geo_control_action": test.ukraineGeoControlAction, + } + resourceData := schema.TestResourceDataRaw(t, resourceSchema, resourceDataMap) + + res := suppressDiffUkraineGeoControlAction("", "", "", resourceData) + assert.Equal(t, test.expected, res) + }) + } +} diff --git a/pkg/providers/appsec/resource_akamai_appsec_ip_geo.go b/pkg/providers/appsec/resource_akamai_appsec_ip_geo.go index 5ed547ef8..15afa92f2 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_ip_geo.go +++ b/pkg/providers/appsec/resource_akamai_appsec_ip_geo.go @@ -75,9 +75,10 @@ func resourceIPGeo() *schema.Resource { Description: "List of IDs of network list that are always allowed", }, "ukraine_geo_control_action": { - Type: schema.TypeString, - Optional: true, - Description: "Action set for Ukraine geo control", + Type: schema.TypeString, + Optional: true, + DiffSuppressFunc: suppressDiffUkraineGeoControlAction, + Description: "Action set for Ukraine geo control", }, }, } @@ -310,7 +311,7 @@ func readForBlockSpecificIPGeo(d *schema.ResourceData, ipgeo *appsec.GetIPGeoRes return diag.Errorf("%s: %s", tf.ErrValueSet, err.Error()) } } - if ipgeo.UkraineGeoControls != nil { + if ipgeo.UkraineGeoControls != nil && ipgeo.UkraineGeoControls.Action != "" { if err := d.Set("ukraine_geo_control_action", ipgeo.UkraineGeoControls.Action); err != nil { return diag.Errorf("%s: %s", tf.ErrValueSet, err.Error()) } diff --git a/pkg/providers/appsec/resource_akamai_appsec_ip_geo_test.go b/pkg/providers/appsec/resource_akamai_appsec_ip_geo_test.go index 3e79ac018..2facd57b7 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_ip_geo_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_ip_geo_test.go @@ -189,6 +189,145 @@ func TestAkamaiIPGeo_res_block(t *testing.T) { client.AssertExpectations(t) }) + t.Run("match by Ukraine Geo ID field not included in config", func(t *testing.T) { + client := &appsec.Mock{} + + configVersion(t, 43253, client) + + updateRequest := appsec.UpdateIPGeoRequest{ + ConfigID: 43253, + Version: 7, + PolicyID: "AAAA_81230", + Block: "blockSpecificIPGeo", + ASNControls: &appsec.IPGeoASNControls{ + BlockedIPNetworkLists: &appsec.IPGeoNetworkLists{ + NetworkList: []string{ + "40721_ASNLIST1", + "44811_ASNLIST2", + }, + }, + }, + GeoControls: &appsec.IPGeoGeoControls{ + BlockedIPNetworkLists: &appsec.IPGeoNetworkLists{ + NetworkList: []string{ + "40731_BMROLLOUTGEO", + "44831_ECSCGEOBLACKLIST", + }, + }, + }, + IPControls: &appsec.IPGeoIPControls{ + BlockedIPNetworkLists: &appsec.IPGeoNetworkLists{ + NetworkList: []string{ + "49181_ADTIPBLACKLIST", + "49185_ADTWAFBYPASSLIST", + }, + }, + AllowedIPNetworkLists: &appsec.IPGeoNetworkLists{ + NetworkList: []string{ + "68762_ADYEN", + "69601_ADYENPRODWHITELIST", + }, + }, + }, + } + getIPGeoResponse(t, 43253, 7, "AAAA_81230", "testdata/TestResIPGeo/UkraineGeo.json", client) + updateIPGeoResponse(t, 43253, 7, "AAAA_81230", "testdata/TestResIPGeo/IPGeo.json", updateRequest, client) + updateIPGeoProtectionResponseAllProtectionsFalse(t, 43253, 7, "AAAA_81230", "testdata/TestResIPGeoProtection/PolicyProtections.json", client) + useClient(client, func() { + resource.Test(t, resource.TestCase{ + IsUnitTest: true, + ProviderFactories: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testutils.LoadFixtureString(t, "testdata/TestResIPGeo/match_by_id.tf"), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("akamai_appsec_ip_geo.test", "id", "43253:AAAA_81230"), + ), + }, + { + Config: testutils.LoadFixtureString(t, "testdata/TestResIPGeo/match_by_id.tf"), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("akamai_appsec_ip_geo.test", "id", "43253:AAAA_81230"), + ), + }, + }, + }) + }) + + client.AssertExpectations(t) + }) + + t.Run("match by Ukraine Geo ID field included with same action", func(t *testing.T) { + client := &appsec.Mock{} + + configVersion(t, 43253, client) + + updateRequest := appsec.UpdateIPGeoRequest{ + ConfigID: 43253, + Version: 7, + PolicyID: "AAAA_81230", + Block: "blockSpecificIPGeo", + ASNControls: &appsec.IPGeoASNControls{ + BlockedIPNetworkLists: &appsec.IPGeoNetworkLists{ + NetworkList: []string{ + "40721_ASNLIST1", + "44811_ASNLIST2", + }, + }, + }, + GeoControls: &appsec.IPGeoGeoControls{ + BlockedIPNetworkLists: &appsec.IPGeoNetworkLists{ + NetworkList: []string{ + "40731_BMROLLOUTGEO", + "44831_ECSCGEOBLACKLIST", + }, + }, + }, + IPControls: &appsec.IPGeoIPControls{ + BlockedIPNetworkLists: &appsec.IPGeoNetworkLists{ + NetworkList: []string{ + "49181_ADTIPBLACKLIST", + "49185_ADTWAFBYPASSLIST", + }, + }, + AllowedIPNetworkLists: &appsec.IPGeoNetworkLists{ + NetworkList: []string{ + "68762_ADYEN", + "69601_ADYENPRODWHITELIST", + }, + }, + }, + UkraineGeoControls: &appsec.UkraineGeoControl{ + Action: "alert", + }, + } + getIPGeoResponse(t, 43253, 7, "AAAA_81230", "testdata/TestResIPGeo/UkraineGeo.json", client) + updateIPGeoResponse(t, 43253, 7, "AAAA_81230", "testdata/TestResIPGeo/IPGeo.json", updateRequest, client) + updateIPGeoProtectionResponseAllProtectionsFalse(t, 43253, 7, "AAAA_81230", "testdata/TestResIPGeoProtection/PolicyProtections.json", client) + useClient(client, func() { + resource.Test(t, resource.TestCase{ + IsUnitTest: true, + ProviderFactories: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testutils.LoadFixtureString(t, "testdata/TestResIPGeo/ukraine_match_by_id.tf"), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("akamai_appsec_ip_geo.test1", "id", "43253:AAAA_81230"), + ), + }, + { + Config: testutils.LoadFixtureString(t, "testdata/TestResIPGeo/ukraine_match_by_id.tf"), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("akamai_appsec_ip_geo.test1", "id", "43253:AAAA_81230"), + ), + }, + }, + }) + }) + + client.AssertExpectations(t) + }) + t.Run("match by IPGeo Allow ID", func(t *testing.T) { client := &appsec.Mock{} diff --git a/pkg/providers/appsec/testdata/TestResIPGeo/UkraineGeo.json b/pkg/providers/appsec/testdata/TestResIPGeo/UkraineGeo.json index 48d043ad5..837e03116 100644 --- a/pkg/providers/appsec/testdata/TestResIPGeo/UkraineGeo.json +++ b/pkg/providers/appsec/testdata/TestResIPGeo/UkraineGeo.json @@ -1,5 +1,12 @@ { "block": "blockSpecificIPGeo", + "asnControls": { + "blockedIPNetworkLists": { + "networkList": [ + "40721_ASNLIST1","44811_ASNLIST2" + ] + } + }, "geoControls": { "blockedIPNetworkLists": { "networkList": [ From b3a5ecc3eec00890e0ed53b023eb20905837830e Mon Sep 17 00:00:00 2001 From: Praveen Sathyesh Venkata Rao Date: Tue, 12 Mar 2024 14:28:28 +0000 Subject: [PATCH 42/52] SECKSD-22860 Added PenaltyBoxConditions and EvalPenaltyBoxConditions to akamai terraform provider --- CHANGELOG.md | 8 + ...amai_appsec_eval_penalty_box_conditions.go | 95 ++++++++ ...appsec_eval_penalty_box_conditions_test.go | 62 +++++ ...ta_akamai_appsec_penalty_box_conditions.go | 96 ++++++++ ...amai_appsec_penalty_box_conditions_test.go | 62 +++++ pkg/providers/appsec/diff_suppress_funcs.go | 23 ++ pkg/providers/appsec/provider.go | 4 + ...amai_appsec_eval_penalty_box_conditions.go | 230 ++++++++++++++++++ ...appsec_eval_penalty_box_conditions_test.go | 138 +++++++++++ ...ce_akamai_appsec_penalty_box_conditions.go | 228 +++++++++++++++++ ...amai_appsec_penalty_box_conditions_test.go | 133 ++++++++++ pkg/providers/appsec/templates.go | 4 + .../PenaltyBoxConditions.json | 13 + .../match_by_id.tf | 11 + .../PenaltyBoxConditions.json | 13 + .../TestDSPenaltyBoxConditions/match_by_id.tf | 11 + .../PenaltyBoxConditions.json | 13 + .../PenaltyBoxConditionsEmpty.json | 4 + .../match_by_id.tf | 11 + .../match_by_id_for_delete.tf | 10 + .../PenaltyBoxConditions.json | 13 + .../PenaltyBoxConditionsEmpty.json | 4 + .../match_by_id.tf | 11 + .../match_by_id_for_delete.tf | 10 + 24 files changed, 1207 insertions(+) create mode 100644 pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions.go create mode 100644 pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions_test.go create mode 100644 pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions.go create mode 100644 pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions_test.go create mode 100644 pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions.go create mode 100644 pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions_test.go create mode 100644 pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions.go create mode 100644 pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions_test.go create mode 100644 pkg/providers/appsec/testdata/TestDSEvalPenaltyBoxConditions/PenaltyBoxConditions.json create mode 100644 pkg/providers/appsec/testdata/TestDSEvalPenaltyBoxConditions/match_by_id.tf create mode 100644 pkg/providers/appsec/testdata/TestDSPenaltyBoxConditions/PenaltyBoxConditions.json create mode 100644 pkg/providers/appsec/testdata/TestDSPenaltyBoxConditions/match_by_id.tf create mode 100644 pkg/providers/appsec/testdata/TestResEvalPenaltyBoxConditions/PenaltyBoxConditions.json create mode 100644 pkg/providers/appsec/testdata/TestResEvalPenaltyBoxConditions/PenaltyBoxConditionsEmpty.json create mode 100644 pkg/providers/appsec/testdata/TestResEvalPenaltyBoxConditions/match_by_id.tf create mode 100644 pkg/providers/appsec/testdata/TestResEvalPenaltyBoxConditions/match_by_id_for_delete.tf create mode 100644 pkg/providers/appsec/testdata/TestResPenaltyBoxConditions/PenaltyBoxConditions.json create mode 100644 pkg/providers/appsec/testdata/TestResPenaltyBoxConditions/PenaltyBoxConditionsEmpty.json create mode 100644 pkg/providers/appsec/testdata/TestResPenaltyBoxConditions/match_by_id.tf create mode 100644 pkg/providers/appsec/testdata/TestResPenaltyBoxConditions/match_by_id_for_delete.tf diff --git a/CHANGELOG.md b/CHANGELOG.md index 057a7cfd7..901978d0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,14 @@ #### FEATURES/ENHANCEMENTS: +* Appsec + * Added resource: + * `akamai_appsec_penalty_box_conditions` - read and update + * `akamai_appsec_eval_penalty_box_conditions` - read and update + * Added new data source: + * `akamai_appsec_penalty_box_conditions` - read + * `akamai_appsec_eval_penalty_box_conditions` - read + * PAPI * Added attributes to akamai_property datasource: * `contract_id`, `group_id`, `latest_version`, `note`, `production_version`, `product_id`, `property_id`, `rule_format`, `staging_version` diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions.go b/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions.go new file mode 100644 index 000000000..73d71bf80 --- /dev/null +++ b/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions.go @@ -0,0 +1,95 @@ +package appsec + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" +) + +func dataSourceEvalPenaltyBoxConditions() *schema.Resource { + return &schema.Resource{ + ReadContext: dataSourceEvalPenaltyBoxConditionsRead, + Schema: map[string]*schema.Schema{ + "config_id": { + Type: schema.TypeInt, + Required: true, + Description: "Unique identifier of the security configuration", + }, + "security_policy_id": { + Type: schema.TypeString, + Required: true, + Description: "Unique identifier of the security policy", + }, + "json": { + Type: schema.TypeString, + Computed: true, + Description: "JSON representation", + }, + "output_text": { + Type: schema.TypeString, + Computed: true, + Description: "Text output in tabular form", + }, + }, + } +} + +func dataSourceEvalPenaltyBoxConditionsRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { + meta := meta.Must(m) + client := inst.Client(meta) + logger := meta.Log("APPSEC", "dataSourceEvalPenaltyBoxConditionsRead") + + getPenaltyBoxConditions := appsec.GetPenaltyBoxConditionsRequest{} + + configID, err := tf.GetIntValue("config_id", d) + if err != nil { + return diag.FromErr(err) + } + getPenaltyBoxConditions.ConfigID = configID + + if getPenaltyBoxConditions.Version, err = getLatestConfigVersion(ctx, configID, m); err != nil { + return diag.FromErr(err) + } + + policyID, err := tf.GetStringValue("security_policy_id", d) + if err != nil { + return diag.FromErr(err) + } + getPenaltyBoxConditions.PolicyID = policyID + + penaltyBoxConditions, err := client.GetEvalPenaltyBoxConditions(ctx, getPenaltyBoxConditions) + if err != nil { + logger.Errorf("calling 'getEvalPenaltyBox': %s", err.Error()) + return diag.FromErr(err) + } + + ots := OutputTemplates{} + InitTemplates(ots) + + outputText, err := RenderTemplates(ots, "evalPenaltyBoxConditionsDS", penaltyBoxConditions) + if err != nil { + return diag.FromErr(err) + } + if err := d.Set("output_text", outputText); err != nil { + return diag.Errorf("%s: %s", tf.ErrValueSet, err.Error()) + } + + jsonBody, err := json.Marshal(penaltyBoxConditions) + if err != nil { + return diag.FromErr(err) + } + + if err := d.Set("json", string(jsonBody)); err != nil { + return diag.Errorf("%s: %s", tf.ErrValueSet, err.Error()) + } + + d.SetId(fmt.Sprintf("%d:%s", configID, policyID)) + + return nil +} diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions_test.go b/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions_test.go new file mode 100644 index 000000000..b51528599 --- /dev/null +++ b/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions_test.go @@ -0,0 +1,62 @@ +package appsec + +import ( + "bytes" + "encoding/json" + "testing" + + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" +) + +func TestAkamaiEvalPenaltyBoxConditions_data_basic(t *testing.T) { + t.Run("match by EvalPenaltyBoxCondition ID", func(t *testing.T) { + client := &appsec.Mock{} + + config := appsec.GetConfigurationResponse{} + err := json.Unmarshal(testutils.LoadFixtureBytes(t, "testdata/TestResConfiguration/LatestConfiguration.json"), &config) + require.NoError(t, err) + + client.On("GetConfiguration", + mock.Anything, + appsec.GetConfigurationRequest{ConfigID: 43253}, + ).Return(&config, nil) + + penaltyBoxCondition := appsec.GetPenaltyBoxConditionsResponse{} + penaltyBoxConditionBytes := testutils.LoadFixtureBytes(t, "testdata/TestDSEvalPenaltyBoxConditions/PenaltyBoxConditions.json") + var penaltyBoxConditionsJSON bytes.Buffer + err = json.Compact(&penaltyBoxConditionsJSON, []byte(penaltyBoxConditionBytes)) + require.NoError(t, err) + err = json.Unmarshal(penaltyBoxConditionBytes, &penaltyBoxCondition) + require.NoError(t, err) + + expectedOutputText := "\n+---------------------------------+\n| evalPenaltyBoxConditionsDS |\n+--------------------+------------+\n| CONDITIONSOPERATOR | CONDITIONS |\n+--------------------+------------+\n| AND | True |\n+--------------------+------------+\n" + client.On("GetEvalPenaltyBoxConditions", + mock.Anything, + appsec.GetPenaltyBoxConditionsRequest{ConfigID: 43253, Version: 7, PolicyID: "AAAA_81230"}, + ).Return(&penaltyBoxCondition, nil) + + useClient(client, func() { + resource.Test(t, resource.TestCase{ + IsUnitTest: true, + ProviderFactories: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testutils.LoadFixtureString(t, "testdata/TestDSEvalPenaltyBoxConditions/match_by_id.tf"), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("data.akamai_appsec_eval_penalty_box_conditions.test", "id", "43253:AAAA_81230"), + resource.TestCheckResourceAttr("data.akamai_appsec_eval_penalty_box_conditions.test", "json", penaltyBoxConditionsJSON.String()), + resource.TestCheckResourceAttr("data.akamai_appsec_eval_penalty_box_conditions.test", "output_text", expectedOutputText), + ), + }, + }, + }) + }) + + client.AssertExpectations(t) + }) + +} diff --git a/pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions.go b/pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions.go new file mode 100644 index 000000000..455a4ce90 --- /dev/null +++ b/pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions.go @@ -0,0 +1,96 @@ +package appsec + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" +) + +func dataSourcePenaltyBoxConditions() *schema.Resource { + return &schema.Resource{ + ReadContext: dataSourcePenaltyBoxConditionsRead, + Schema: map[string]*schema.Schema{ + "config_id": { + Type: schema.TypeInt, + Required: true, + Description: "Unique identifier of the security configuration", + }, + "security_policy_id": { + Type: schema.TypeString, + Required: true, + Description: "Unique identifier of the security policy", + }, + "json": { + Type: schema.TypeString, + Computed: true, + Description: "JSON representation", + }, + "output_text": { + Type: schema.TypeString, + Computed: true, + Description: "Text representation", + }, + }, + } +} + +func dataSourcePenaltyBoxConditionsRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { + meta := meta.Must(m) + client := inst.Client(meta) + logger := meta.Log("APPSEC", "dataSourcePenaltyBoxConditionsRead") + + penaltyBoxConditionsReq := appsec.GetPenaltyBoxConditionsRequest{} + + configID, err := tf.GetIntValue("config_id", d) + if err != nil { + return diag.FromErr(err) + } + penaltyBoxConditionsReq.ConfigID = configID + + if penaltyBoxConditionsReq.Version, err = getLatestConfigVersion(ctx, configID, m); err != nil { + return diag.FromErr(err) + } + + policyID, err := tf.GetStringValue("security_policy_id", d) + if err != nil { + return diag.FromErr(err) + } + penaltyBoxConditionsReq.PolicyID = policyID + + penaltyBoxConditionsResponse, err := client.GetPenaltyBoxConditions(ctx, penaltyBoxConditionsReq) + if err != nil { + logger.Errorf("calling 'getPenaltyBoxConditions': %s", err.Error()) + return diag.FromErr(err) + } + + ots := OutputTemplates{} + InitTemplates(ots) + + outputtext, err := RenderTemplates(ots, "penaltyBoxConditionsDS", penaltyBoxConditionsResponse) + if err != nil { + return diag.FromErr(err) + } + if err := d.Set("output_text", outputtext); err != nil { + + return diag.Errorf("%s: %s", tf.ErrValueSet, err.Error()) + } + + jsonBody, err := json.Marshal(penaltyBoxConditionsResponse) + if err != nil { + return diag.FromErr(err) + } + + if err := d.Set("json", string(jsonBody)); err != nil { + return diag.Errorf("%s: %s", tf.ErrValueSet, err.Error()) + } + + d.SetId(fmt.Sprintf("%d:%s", configID, policyID)) + + return nil +} diff --git a/pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions_test.go b/pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions_test.go new file mode 100644 index 000000000..1044be759 --- /dev/null +++ b/pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions_test.go @@ -0,0 +1,62 @@ +package appsec + +import ( + "bytes" + "encoding/json" + "testing" + + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" +) + +func TestAkamaiPenaltyBoxConditions_data_basic(t *testing.T) { + t.Run("match by Config ID", func(t *testing.T) { + client := &appsec.Mock{} + + config := appsec.GetConfigurationResponse{} + err := json.Unmarshal(testutils.LoadFixtureBytes(t, "testdata/TestResConfiguration/LatestConfiguration.json"), &config) + require.NoError(t, err) + + client.On("GetConfiguration", + mock.Anything, + appsec.GetConfigurationRequest{ConfigID: 43253}, + ).Return(&config, nil) + + getPenaltyBoxConditionsResponse := appsec.GetPenaltyBoxConditionsResponse{} + penaltyBoxConditionBytes := testutils.LoadFixtureBytes(t, "testdata/TestDSPenaltyBoxConditions/PenaltyBoxConditions.json") + var penaltyBoxConditionsJSON bytes.Buffer + err = json.Compact(&penaltyBoxConditionsJSON, []byte(penaltyBoxConditionBytes)) + require.NoError(t, err) + err = json.Unmarshal(penaltyBoxConditionBytes, &getPenaltyBoxConditionsResponse) + require.NoError(t, err) + + expectedOutputText := "\n+---------------------------------+\n| penaltyBoxConditionsDS |\n+--------------------+------------+\n| CONDITIONSOPERATOR | CONDITIONS |\n+--------------------+------------+\n| AND | True |\n+--------------------+------------+\n" + client.On("GetPenaltyBoxConditions", + mock.Anything, + appsec.GetPenaltyBoxConditionsRequest{ConfigID: 43253, Version: 7, PolicyID: "AAAA_81230"}, + ).Return(&getPenaltyBoxConditionsResponse, nil) + + useClient(client, func() { + resource.Test(t, resource.TestCase{ + IsUnitTest: true, + ProviderFactories: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testutils.LoadFixtureString(t, "testdata/TestDSPenaltyBoxConditions/match_by_id.tf"), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("data.akamai_appsec_penalty_box_conditions.test", "id", "43253:AAAA_81230"), + resource.TestCheckResourceAttr("data.akamai_appsec_penalty_box_conditions.test", "json", penaltyBoxConditionsJSON.String()), + resource.TestCheckResourceAttr("data.akamai_appsec_penalty_box_conditions.test", "output_text", expectedOutputText), + ), + }, + }, + }) + }) + + client.AssertExpectations(t) + }) + +} diff --git a/pkg/providers/appsec/diff_suppress_funcs.go b/pkg/providers/appsec/diff_suppress_funcs.go index a26d76688..83f6fb525 100644 --- a/pkg/providers/appsec/diff_suppress_funcs.go +++ b/pkg/providers/appsec/diff_suppress_funcs.go @@ -210,6 +210,29 @@ func compareAttackPayloadLoggingSettings(oldValue, newValue *appsec.UpdateAdvanc return reflect.DeepEqual(oldValue, newValue) } +func suppressEquivalentPenaltyBoxConditionsDiffs(_, oldValue, newValue string, _ *schema.ResourceData) bool { + var oldJSON, newJSON appsec.GetPenaltyBoxConditionsResponse + if oldValue == newValue { + return true + } + if err := json.Unmarshal([]byte(oldValue), &oldJSON); err != nil { + return false + } + if err := json.Unmarshal([]byte(newValue), &newJSON); err != nil { + return false + } + diff := comparePenaltyBoxConditions(&oldJSON, &newJSON) + return diff +} + +func comparePenaltyBoxConditions(oldValue, newValue *appsec.GetPenaltyBoxConditionsResponse) bool { + if oldValue.ConditionOperator != newValue.ConditionOperator { + return false + } + + return reflect.DeepEqual(oldValue, newValue) +} + func suppressCustomDenyJSONDiffs(_, oldString, newString string, _ *schema.ResourceData) bool { var ob, nb bytes.Buffer if err := json.Compact(&ob, []byte(oldString)); err != nil { diff --git a/pkg/providers/appsec/provider.go b/pkg/providers/appsec/provider.go index 1564ce630..763a9d5af 100644 --- a/pkg/providers/appsec/provider.go +++ b/pkg/providers/appsec/provider.go @@ -79,6 +79,7 @@ func (p *Subprovider) SDKResources() map[string]*schema.Resource { "akamai_appsec_eval": resourceEval(), "akamai_appsec_eval_group": resourceEvalGroup(), "akamai_appsec_eval_penalty_box": resourceEvalPenaltyBox(), + "akamai_appsec_eval_penalty_box_conditions": resourceEvalPenaltyBoxConditions(), "akamai_appsec_eval_rule": resourceEvalRule(), "akamai_appsec_ip_geo": resourceIPGeo(), "akamai_appsec_ip_geo_protection": resourceIPGeoProtection(), @@ -89,6 +90,7 @@ func (p *Subprovider) SDKResources() map[string]*schema.Resource { "akamai_appsec_match_target": resourceMatchTarget(), "akamai_appsec_match_target_sequence": resourceMatchTargetSequence(), "akamai_appsec_penalty_box": resourcePenaltyBox(), + "akamai_appsec_penalty_box_conditions": resourcePenaltyBoxConditions(), "akamai_appsec_rate_policy": resourceRatePolicy(), "akamai_appsec_rate_policy_action": resourceRatePolicyAction(), "akamai_appsec_rate_protection": resourceRateProtection(), @@ -136,6 +138,7 @@ func (p *Subprovider) SDKDataSources() map[string]*schema.Resource { "akamai_appsec_eval": dataSourceEval(), "akamai_appsec_eval_groups": dataSourceEvalGroups(), "akamai_appsec_eval_penalty_box": dataSourceEvalPenaltyBox(), + "akamai_appsec_eval_penalty_box_conditions": dataSourceEvalPenaltyBoxConditions(), "akamai_appsec_eval_rules": dataSourceEvalRules(), "akamai_appsec_export_configuration": dataSourceExportConfiguration(), "akamai_appsec_failover_hostnames": dataSourceFailoverHostnames(), @@ -148,6 +151,7 @@ func (p *Subprovider) SDKDataSources() map[string]*schema.Resource { "akamai_appsec_malware_policy_actions": dataSourceMalwarePolicyActions(), "akamai_appsec_match_targets": dataSourceMatchTargets(), "akamai_appsec_penalty_box": dataSourcePenaltyBox(), + "akamai_appsec_penalty_box_conditions": dataSourcePenaltyBoxConditions(), "akamai_appsec_rate_policies": dataSourceRatePolicies(), "akamai_appsec_rate_policy_actions": dataSourceRatePolicyActions(), "akamai_appsec_reputation_profile_actions": dataSourceReputationProfileActions(), diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions.go b/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions.go new file mode 100644 index 000000000..1d8237057 --- /dev/null +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions.go @@ -0,0 +1,230 @@ +package appsec + +import ( + "context" + "encoding/json" + "fmt" + "strconv" + + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" +) + +// appsec v1 +// +// https://techdocs.akamai.com/application-security/reference/api +func resourceEvalPenaltyBoxConditions() *schema.Resource { + return &schema.Resource{ + CreateContext: resourceEvalPenaltyBoxConditionsCreate, + ReadContext: resourceEvalPenaltyBoxConditionsRead, + UpdateContext: resourceEvalPenaltyBoxConditionsUpdate, + DeleteContext: resourceEvalPenaltyBoxConditionsDelete, + CustomizeDiff: customdiff.All( + VerifyIDUnchanged, + ), + Importer: &schema.ResourceImporter{ + StateContext: schema.ImportStatePassthroughContext, + }, + Schema: map[string]*schema.Schema{ + "config_id": { + Type: schema.TypeInt, + Required: true, + Description: "Unique identifier of the security configuration", + }, + "security_policy_id": { + Type: schema.TypeString, + Required: true, + Description: "Unique identifier of the security policy", + }, + "penalty_box_conditions": { + Type: schema.TypeString, + Required: true, + ValidateDiagFunc: validation.ToDiagFunc(validation.StringIsJSON), + DiffSuppressFunc: suppressEquivalentPenaltyBoxConditionsDiffs, + Description: "Description of evaluation penalty box conditions", + }, + }, + } +} + +func resourceEvalPenaltyBoxConditionsCreate(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { + must := meta.Must(m) + client := inst.Client(must) + logger := must.Log("APPSEC", "resourceEvalPenaltyBoxConditionsCreate") + logger.Debugf("in resourceEvalPenaltyBoxConditionsCreate") + + configID, err := tf.GetIntValue("config_id", d) + if err != nil { + return diag.FromErr(err) + } + version, err := getModifiableConfigVersion(ctx, configID, "evalPenaltyBoxConditions", m) + if err != nil { + return diag.FromErr(err) + } + policyID, err := tf.GetStringValue("security_policy_id", d) + if err != nil { + return diag.FromErr(err) + } + + jsonPostPayload := d.Get("penalty_box_conditions") + conditionsPayload := appsec.PenaltyBoxConditionsPayload{} + err = json.Unmarshal([]byte(jsonPostPayload.(string)), &conditionsPayload) + if err != nil { + return diag.FromErr(err) + } + + createPenaltyBoxConditions := appsec.UpdatePenaltyBoxConditionsRequest{ + ConfigID: configID, + Version: version, + PolicyID: policyID, + ConditionsPayload: conditionsPayload, + } + + _, err = client.UpdateEvalPenaltyBoxConditions(ctx, createPenaltyBoxConditions) + if err != nil { + logger.Errorf("calling 'createEvalPenaltyBoxConditions': %s", err.Error()) + return diag.FromErr(err) + } + + d.SetId(fmt.Sprintf("%d:%s", createPenaltyBoxConditions.ConfigID, createPenaltyBoxConditions.PolicyID)) + + return resourceEvalPenaltyBoxConditionsRead(ctx, d, m) +} + +func resourceEvalPenaltyBoxConditionsRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { + must := meta.Must(m) + client := inst.Client(must) + logger := must.Log("APPSEC", "resourceEvalPenaltyBoxConditionsRead") + logger.Debugf("in resourceEvalPenaltyBoxConditionsRead") + + iDParts, err := splitID(d.Id(), 2, "configID:securityPolicyID") + if err != nil { + return diag.FromErr(err) + } + configID, err := strconv.Atoi(iDParts[0]) + if err != nil { + return diag.FromErr(err) + } + version, err := getLatestConfigVersion(ctx, configID, m) + if err != nil { + return diag.FromErr(err) + } + policyID := iDParts[1] + + getPenaltyBoxConditions := appsec.GetPenaltyBoxConditionsRequest{ + ConfigID: configID, + Version: version, + PolicyID: policyID, + } + + penaltyBoxConditions, err := client.GetEvalPenaltyBoxConditions(ctx, getPenaltyBoxConditions) + if err != nil { + logger.Errorf("calling 'GetEvalPenaltyBoxConditions': %s", err.Error()) + return diag.FromErr(err) + } + + if err := d.Set("config_id", getPenaltyBoxConditions.ConfigID); err != nil { + return diag.Errorf("%s: %s", tf.ErrValueSet, err.Error()) + } + if err := d.Set("security_policy_id", getPenaltyBoxConditions.PolicyID); err != nil { + return diag.Errorf("%s: %s", tf.ErrValueSet, err.Error()) + } + jsonBody, err := json.Marshal(penaltyBoxConditions) + if err != nil { + return diag.FromErr(err) + } + if err := d.Set("penalty_box_conditions", string(jsonBody)); err != nil { + return diag.Errorf("%s: %s", tf.ErrValueSet, err.Error()) + } + + return nil +} + +func resourceEvalPenaltyBoxConditionsUpdate(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { + must := meta.Must(m) + client := inst.Client(must) + logger := must.Log("APPSEC", "resourceEvalPenaltyBoxConditionsUpdate") + logger.Debugf("in resourceEvalPenaltyBoxConditionsUpdate") + + iDParts, err := splitID(d.Id(), 2, "configID:securityPolicyID") + if err != nil { + return diag.FromErr(err) + } + configID, err := strconv.Atoi(iDParts[0]) + if err != nil { + return diag.FromErr(err) + } + version, err := getModifiableConfigVersion(ctx, configID, "evalPenaltyBoxConditions", m) + if err != nil { + return diag.FromErr(err) + } + policyID := iDParts[1] + + jsonPostPayload := d.Get("penalty_box_conditions") + conditionsPayload := appsec.PenaltyBoxConditionsPayload{} + err = json.Unmarshal([]byte(jsonPostPayload.(string)), &conditionsPayload) + if err != nil { + return diag.FromErr(err) + } + + updatePenaltyBoxConditions := appsec.UpdatePenaltyBoxConditionsRequest{ + ConfigID: configID, + Version: version, + PolicyID: policyID, + ConditionsPayload: conditionsPayload, + } + + _, err = client.UpdateEvalPenaltyBoxConditions(ctx, updatePenaltyBoxConditions) + if err != nil { + logger.Errorf("calling 'updateEvalPenaltyBoxConditions': %s", err.Error()) + return diag.FromErr(err) + } + + return resourceEvalPenaltyBoxConditionsRead(ctx, d, m) +} + +func resourceEvalPenaltyBoxConditionsDelete(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { + meta := meta.Must(m) + client := inst.Client(meta) + logger := meta.Log("APPSEC", "resourceEvalPenaltyBoxConditionsUpdate") + logger.Debugf("in resourceEvalPenaltyBoxConditionsDelete") + + iDParts, err := splitID(d.Id(), 2, "configID:securityPolicyID") + if err != nil { + return diag.FromErr(err) + } + configID, err := strconv.Atoi(iDParts[0]) + if err != nil { + return diag.FromErr(err) + } + version, err := getModifiableConfigVersion(ctx, configID, "evalPenaltyBoxConditions", m) + if err != nil { + return diag.FromErr(err) + } + policyID := iDParts[1] + + conditionsPayload := appsec.PenaltyBoxConditionsPayload{ + ConditionOperator: "AND", + Conditions: &appsec.RuleConditions{}, + } + + removePenaltyBoxConditions := appsec.UpdatePenaltyBoxConditionsRequest{ + ConfigID: configID, + Version: version, + PolicyID: policyID, + ConditionsPayload: conditionsPayload, + } + + _, err = client.UpdateEvalPenaltyBoxConditions(ctx, removePenaltyBoxConditions) + if err != nil { + logger.Errorf("calling 'removeEvalPenaltyBoxConditions': %s", err.Error()) + return diag.FromErr(err) + } + + return nil +} diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions_test.go b/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions_test.go new file mode 100644 index 000000000..86ce7931b --- /dev/null +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions_test.go @@ -0,0 +1,138 @@ +package appsec + +import ( + "encoding/json" + "testing" + + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" +) + +func TestAkamaiEvalPenaltyBoxConditions_res_basic(t *testing.T) { + var ( + configVersion = func(t *testing.T, configId int, client *appsec.Mock) appsec.GetConfigurationResponse { + configResponse := appsec.GetConfigurationResponse{} + err := json.Unmarshal(testutils.LoadFixtureBytes(t, "testdata/TestResConfiguration/LatestConfiguration.json"), &configResponse) + require.NoError(t, err) + + client.On("GetConfiguration", + mock.Anything, + appsec.GetConfigurationRequest{ConfigID: configId}, + ).Return(&configResponse, nil) + + return configResponse + } + + evalPenaltyBoxConditionsRead = func(t *testing.T, configId int, version int, policyId string, client *appsec.Mock, path string) { + evalPenaltyBoxConditionsResponse := appsec.GetPenaltyBoxConditionsResponse{} + err := json.Unmarshal(testutils.LoadFixtureBytes(t, path), &evalPenaltyBoxConditionsResponse) + require.NoError(t, err) + + client.On("GetEvalPenaltyBoxConditions", + mock.Anything, // ctx is irrelevant for this test + appsec.GetPenaltyBoxConditionsRequest{ConfigID: configId, Version: version, PolicyID: policyId}, + ).Return(&evalPenaltyBoxConditionsResponse, nil) + } + + evalPenaltyBoxConditionsUpdate = func(t *testing.T, evalPenaltyBoxConditionsUpdateReq appsec.UpdatePenaltyBoxConditionsRequest, client *appsec.Mock) { + evalPenaltyBoxConditionsResponse := appsec.UpdatePenaltyBoxConditionsResponse{} + + err := json.Unmarshal(testutils.LoadFixtureBytes(t, "testdata/TestResEvalPenaltyBoxConditions/PenaltyBoxConditions.json"), &evalPenaltyBoxConditionsResponse) + require.NoError(t, err) + + client.On("UpdateEvalPenaltyBoxConditions", + mock.Anything, + evalPenaltyBoxConditionsUpdateReq, + ).Return(&evalPenaltyBoxConditionsResponse, nil).Once() + } + + evalPenaltyBoxConditionsDelete = func(t *testing.T, evalPenaltyBoxConditionsUpdateReq appsec.UpdatePenaltyBoxConditionsRequest, client *appsec.Mock) { + evalPenaltyBoxConditionsDeleteResponse := appsec.UpdatePenaltyBoxConditionsResponse{} + + err := json.Unmarshal(testutils.LoadFixtureBytes(t, "testdata/TestResEvalPenaltyBoxConditions/PenaltyBoxConditionsEmpty.json"), &evalPenaltyBoxConditionsDeleteResponse) + require.NoError(t, err) + + client.On("UpdateEvalPenaltyBoxConditions", + mock.Anything, + evalPenaltyBoxConditionsUpdateReq, + ).Return(&evalPenaltyBoxConditionsDeleteResponse, nil) + } + ) + + t.Run("match by EvalPenaltyBoxConditions ID", func(t *testing.T) { + client := &appsec.Mock{} + configResponse := configVersion(t, 43253, client) + + // eval penalty box condition read test + evalPenaltyBoxConditionsRead(t, 43253, 7, "AAAA_81230", client, "testdata/TestResEvalPenaltyBoxConditions/PenaltyBoxConditions.json") + + // eval Penalty Box conditions update test + evalPenaltyBoxConditionsUpdateReq := appsec.PenaltyBoxConditionsPayload{} + err := json.Unmarshal(testutils.LoadFixtureBytes(t, "testdata/TestResEvalPenaltyBoxConditions/PenaltyBoxConditions.json"), &evalPenaltyBoxConditionsUpdateReq) + require.NoError(t, err) + + updatePenaltyBoxConditionsReq := appsec.UpdatePenaltyBoxConditionsRequest{ConfigID: configResponse.ID, Version: configResponse.LatestVersion, PolicyID: "AAAA_81230", ConditionsPayload: evalPenaltyBoxConditionsUpdateReq} + evalPenaltyBoxConditionsUpdate(t, updatePenaltyBoxConditionsReq, client) + + // eval Penalty box conditions delete test + evalPenaltyBoxConditionsDeleteReq := appsec.PenaltyBoxConditionsPayload{} + err = json.Unmarshal(testutils.LoadFixtureBytes(t, "testdata/TestResEvalPenaltyBoxConditions/PenaltyBoxConditionsEmpty.json"), &evalPenaltyBoxConditionsDeleteReq) + require.NoError(t, err) + + removeEvalPenaltyBoxConditionsReq := appsec.UpdatePenaltyBoxConditionsRequest{ConfigID: configResponse.ID, Version: configResponse.LatestVersion, PolicyID: "AAAA_81230", ConditionsPayload: evalPenaltyBoxConditionsDeleteReq} + evalPenaltyBoxConditionsDelete(t, removeEvalPenaltyBoxConditionsReq, client) + + useClient(client, func() { + resource.Test(t, resource.TestCase{ + IsUnitTest: true, + ProviderFactories: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testutils.LoadFixtureString(t, "testdata/TestResEvalPenaltyBoxConditions/match_by_id.tf"), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("akamai_appsec_eval_penalty_box_conditions.test", "id", "43253:AAAA_81230"), + ), + }, + }, + }) + }) + + client.AssertExpectations(t) + }) + + t.Run("match by EvalPenaltyBoxConditions ID for Delete case", func(t *testing.T) { + client := &appsec.Mock{} + configResponse := configVersion(t, 43253, client) + + // eval penalty box condition read test + evalPenaltyBoxConditionsRead(t, 43253, 7, "AAAA", client, "testdata/TestResEvalPenaltyBoxConditions/PenaltyBoxConditionsEmpty.json") + + // eval Penalty box conditions delete test + evalPenaltyBoxConditionsDeleteReq := appsec.PenaltyBoxConditionsPayload{} + err := json.Unmarshal(testutils.LoadFixtureBytes(t, "testdata//TestResEvalPenaltyBoxConditions/PenaltyBoxConditionsEmpty.json"), &evalPenaltyBoxConditionsDeleteReq) + require.NoError(t, err) + + removeEvalPenaltyBoxConditionsReq := appsec.UpdatePenaltyBoxConditionsRequest{ConfigID: configResponse.ID, Version: configResponse.LatestVersion, PolicyID: "AAAA", ConditionsPayload: evalPenaltyBoxConditionsDeleteReq} + evalPenaltyBoxConditionsDelete(t, removeEvalPenaltyBoxConditionsReq, client) + + useClient(client, func() { + resource.Test(t, resource.TestCase{ + IsUnitTest: true, + ProviderFactories: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testutils.LoadFixtureString(t, "testdata/TestResEvalPenaltyBoxConditions/match_by_id_for_delete.tf"), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("akamai_appsec_eval_penalty_box_conditions.delete_condition", "id", "43253:AAAA"), + ), + }, + }, + }) + }) + + client.AssertExpectations(t) + }) +} diff --git a/pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions.go b/pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions.go new file mode 100644 index 000000000..5910d7e72 --- /dev/null +++ b/pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions.go @@ -0,0 +1,228 @@ +package appsec + +import ( + "context" + "encoding/json" + "fmt" + "strconv" + + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" +) + +// appsec v1 +// +// https://techdocs.akamai.com/application-security/reference/api +func resourcePenaltyBoxConditions() *schema.Resource { + return &schema.Resource{ + CreateContext: resourcePenaltyBoxConditionsCreate, + ReadContext: resourcePenaltyBoxConditionsRead, + UpdateContext: resourcePenaltyBoxConditionsUpdate, + DeleteContext: resourcePenaltyBoxConditionsDelete, + CustomizeDiff: customdiff.All( + VerifyIDUnchanged, + ), + Importer: &schema.ResourceImporter{ + StateContext: schema.ImportStatePassthroughContext, + }, + Schema: map[string]*schema.Schema{ + "config_id": { + Type: schema.TypeInt, + Required: true, + Description: "Unique identifier of the security configuration", + }, + "security_policy_id": { + Type: schema.TypeString, + Required: true, + Description: "Unique identifier of the security policy", + }, + "penalty_box_conditions": { + Type: schema.TypeString, + Required: true, + ValidateDiagFunc: validation.ToDiagFunc(validation.StringIsJSON), + DiffSuppressFunc: suppressEquivalentPenaltyBoxConditionsDiffs, + Description: "Describes the conditions and the operator to be applied for penalty box", + }, + }, + } +} + +func resourcePenaltyBoxConditionsCreate(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { + meta := meta.Must(m) + client := inst.Client(meta) + logger := meta.Log("APPSEC", "resourcePenaltyBoxConditionsCreate") + logger.Debugf("in resourcePenaltyBoxConditionsCreate") + + configID, err := tf.GetIntValue("config_id", d) + if err != nil { + return diag.FromErr(err) + } + policyID, err := tf.GetStringValue("security_policy_id", d) + if err != nil { + return diag.FromErr(err) + } + version, err := getModifiableConfigVersion(ctx, configID, "penaltyBoxConditions", m) + if err != nil { + return diag.FromErr(err) + } + jsonPostPayload := d.Get("penalty_box_conditions") + conditionsJSON := appsec.PenaltyBoxConditionsPayload{} + err = json.Unmarshal([]byte(jsonPostPayload.(string)), &conditionsJSON) + if err != nil { + return diag.FromErr(err) + } + + updatePenaltyBoxConditions := appsec.UpdatePenaltyBoxConditionsRequest{ + ConfigID: configID, + Version: version, + PolicyID: policyID, + ConditionsPayload: conditionsJSON, + } + + _, err = client.UpdatePenaltyBoxConditions(ctx, updatePenaltyBoxConditions) + if err != nil { + logger.Errorf("calling 'createPenaltyBoxConditions': %s", err.Error()) + return diag.FromErr(err) + } + + d.SetId(fmt.Sprintf("%d:%s", updatePenaltyBoxConditions.ConfigID, updatePenaltyBoxConditions.PolicyID)) + + return resourcePenaltyBoxConditionsRead(ctx, d, m) +} + +func resourcePenaltyBoxConditionsRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { + meta := meta.Must(m) + client := inst.Client(meta) + logger := meta.Log("APPSEC", "resourcePenaltyBoxConditionsRead") + + iDParts, err := splitID(d.Id(), 2, "configID:securityPolicyID") + if err != nil { + return diag.FromErr(err) + } + configID, err := strconv.Atoi(iDParts[0]) + if err != nil { + return diag.FromErr(err) + } + version, err := getLatestConfigVersion(ctx, configID, m) + if err != nil { + return diag.FromErr(err) + } + policyID := iDParts[1] + + getPenaltyBoxConditions := appsec.GetPenaltyBoxConditionsRequest{ + ConfigID: configID, + Version: version, + PolicyID: policyID, + } + + penaltyBoxConditions, err := client.GetPenaltyBoxConditions(ctx, getPenaltyBoxConditions) + if err != nil { + logger.Errorf("calling 'getPenaltyBoxConditions': %s", err.Error()) + return diag.FromErr(err) + } + + if err := d.Set("config_id", configID); err != nil { + return diag.Errorf("%s: %s", tf.ErrValueSet, err.Error()) + } + if err := d.Set("security_policy_id", policyID); err != nil { + return diag.Errorf("%s: %s", tf.ErrValueSet, err.Error()) + } + jsonBody, err := json.Marshal(penaltyBoxConditions) + if err != nil { + return diag.FromErr(err) + } + if err := d.Set("penalty_box_conditions", string(jsonBody)); err != nil { + return diag.Errorf("%s: %s", tf.ErrValueSet, err.Error()) + } + + return nil +} + +func resourcePenaltyBoxConditionsUpdate(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { + meta := meta.Must(m) + client := inst.Client(meta) + logger := meta.Log("APPSEC", "resourcePenaltyBoxConditionsUpdate") + logger.Debugf("in resourcePenaltyBoxConditionsUpdate") + + iDParts, err := splitID(d.Id(), 2, "configID:securityPolicyID") + if err != nil { + return diag.FromErr(err) + } + configID, err := strconv.Atoi(iDParts[0]) + if err != nil { + return diag.FromErr(err) + } + version, err := getModifiableConfigVersion(ctx, configID, "penaltyBoxAction", m) + if err != nil { + return diag.FromErr(err) + } + policyID := iDParts[1] + jsonPostPayload := d.Get("penalty_box_conditions") + conditionsJSON := appsec.PenaltyBoxConditionsPayload{} + err = json.Unmarshal([]byte(jsonPostPayload.(string)), &conditionsJSON) + if err != nil { + return diag.FromErr(err) + } + + updatePenaltyBoxConditions := appsec.UpdatePenaltyBoxConditionsRequest{ + ConfigID: configID, + Version: version, + PolicyID: policyID, + ConditionsPayload: conditionsJSON, + } + + _, err = client.UpdatePenaltyBoxConditions(ctx, updatePenaltyBoxConditions) + if err != nil { + logger.Errorf("calling 'updatePenaltyBox': %s", err.Error()) + return diag.FromErr(err) + } + + return resourcePenaltyBoxConditionsRead(ctx, d, m) +} + +func resourcePenaltyBoxConditionsDelete(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { + meta := meta.Must(m) + client := inst.Client(meta) + logger := meta.Log("APPSEC", "resourcePenaltyBoxConditionsDelete") + logger.Debugf("in resourcePenaltyBoxConditionsDelete") + + iDParts, err := splitID(d.Id(), 2, "configID:securityPolicyID") + if err != nil { + return diag.FromErr(err) + } + configID, err := strconv.Atoi(iDParts[0]) + if err != nil { + return diag.FromErr(err) + } + version, err := getModifiableConfigVersion(ctx, configID, "penaltyBoxAction", m) + if err != nil { + return diag.FromErr(err) + } + policyID := iDParts[1] + + conditionsJSON := appsec.PenaltyBoxConditionsPayload{ + ConditionOperator: "AND", + Conditions: &appsec.RuleConditions{}, + } + + updatePenaltyBoxConditions := appsec.UpdatePenaltyBoxConditionsRequest{ + ConfigID: configID, + Version: version, + PolicyID: policyID, + ConditionsPayload: conditionsJSON, + } + + _, err = client.UpdatePenaltyBoxConditions(ctx, updatePenaltyBoxConditions) + if err != nil { + logger.Errorf("calling 'UpdatePenaltyBoxConditions': %s", err.Error()) + return diag.FromErr(err) + } + + return nil + +} diff --git a/pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions_test.go b/pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions_test.go new file mode 100644 index 000000000..c424ffcfd --- /dev/null +++ b/pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions_test.go @@ -0,0 +1,133 @@ +package appsec + +import ( + "encoding/json" + "testing" + + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" +) + +func TestAkamaiPenaltyBoxConditions_res_basic(t *testing.T) { + var ( + configVersion = func(t *testing.T, configId int, client *appsec.Mock) appsec.GetConfigurationResponse { + configResponse := appsec.GetConfigurationResponse{} + err := json.Unmarshal(testutils.LoadFixtureBytes(t, "testdata/TestResConfiguration/LatestConfiguration.json"), &configResponse) + require.NoError(t, err) + + client.On("GetConfiguration", + mock.Anything, + appsec.GetConfigurationRequest{ConfigID: configId}, + ).Return(&configResponse, nil) + + return configResponse + } + + penaltyBoxConditionsRead = func(t *testing.T, configId int, version int, policyId string, client *appsec.Mock, path string) { + penaltyBoxConditionsResponse := appsec.GetPenaltyBoxConditionsResponse{} + err := json.Unmarshal(testutils.LoadFixtureBytes(t, path), &penaltyBoxConditionsResponse) + require.NoError(t, err) + + client.On("GetPenaltyBoxConditions", + mock.Anything, + appsec.GetPenaltyBoxConditionsRequest{ConfigID: configId, Version: version, PolicyID: policyId}, + ).Return(&penaltyBoxConditionsResponse, nil) + } + + penaltyBoxConditionsUpdate = func(t *testing.T, penaltyBoxConditionsUpdateReq appsec.UpdatePenaltyBoxConditionsRequest, client *appsec.Mock) { + penaltyBoxConditionsResponse := appsec.UpdatePenaltyBoxConditionsResponse{} + + err := json.Unmarshal(testutils.LoadFixtureBytes(t, "testdata/TestResPenaltyBoxConditions/PenaltyBoxConditions.json"), &penaltyBoxConditionsResponse) + require.NoError(t, err) + + client.On("UpdatePenaltyBoxConditions", + mock.Anything, + penaltyBoxConditionsUpdateReq, + ).Return(&penaltyBoxConditionsResponse, nil).Once() + } + + penaltyBoxConditionsDelete = func(t *testing.T, penaltyBoxConditionsUpdateReq appsec.UpdatePenaltyBoxConditionsRequest, client *appsec.Mock) { + penaltyBoxConditionsDeleteResponse := appsec.UpdatePenaltyBoxConditionsResponse{} + + err := json.Unmarshal(testutils.LoadFixtureBytes(t, "testdata/TestResPenaltyBoxConditions/PenaltyBoxConditionsEmpty.json"), &penaltyBoxConditionsDeleteResponse) + require.NoError(t, err) + + client.On("UpdatePenaltyBoxConditions", + mock.Anything, + penaltyBoxConditionsUpdateReq, // ctx is irrelevant for this test + ).Return(&penaltyBoxConditionsDeleteResponse, nil) + } + ) + + t.Run("match by PenaltyBoxConditions ID", func(t *testing.T) { + client := &appsec.Mock{} + configResponse := configVersion(t, 43253, client) + + penaltyBoxConditionsRead(t, 43253, 7, "AAAA_81230", client, "testdata/TestResPenaltyBoxConditions/PenaltyBoxConditions.json") + + penaltyBoxConditionsUpdateReq := appsec.PenaltyBoxConditionsPayload{} + err := json.Unmarshal(testutils.LoadFixtureBytes(t, "testdata/TestResPenaltyBoxConditions/PenaltyBoxConditions.json"), &penaltyBoxConditionsUpdateReq) + require.NoError(t, err) + + updatePenaltyBoxConditionsReq := appsec.UpdatePenaltyBoxConditionsRequest{ConfigID: configResponse.ID, Version: configResponse.LatestVersion, PolicyID: "AAAA_81230", ConditionsPayload: penaltyBoxConditionsUpdateReq} + penaltyBoxConditionsUpdate(t, updatePenaltyBoxConditionsReq, client) + + penaltyBoxConditionsDeleteReq := appsec.PenaltyBoxConditionsPayload{} + err = json.Unmarshal(testutils.LoadFixtureBytes(t, "testdata/TestResPenaltyBoxConditions/PenaltyBoxConditionsEmpty.json"), &penaltyBoxConditionsDeleteReq) + require.NoError(t, err) + + removePenaltyBoxConditionsReq := appsec.UpdatePenaltyBoxConditionsRequest{ConfigID: configResponse.ID, Version: configResponse.LatestVersion, PolicyID: "AAAA_81230", ConditionsPayload: penaltyBoxConditionsDeleteReq} + penaltyBoxConditionsDelete(t, removePenaltyBoxConditionsReq, client) + + useClient(client, func() { + resource.Test(t, resource.TestCase{ + IsUnitTest: true, + ProviderFactories: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testutils.LoadFixtureString(t, "testdata/TestResPenaltyBoxConditions/match_by_id.tf"), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("akamai_appsec_penalty_box_conditions.test", "id", "43253:AAAA_81230"), + ), + }, + }, + }) + }) + + client.AssertExpectations(t) + }) + + t.Run("match by PenaltyBoxConditions ID for Delete case", func(t *testing.T) { + client := &appsec.Mock{} + configResponse := configVersion(t, 43253, client) + + penaltyBoxConditionsRead(t, 43253, 7, "AAAA", client, "testdata/TestResPenaltyBoxConditions/PenaltyBoxConditionsEmpty.json") + + penaltyBoxConditionsDeleteReq := appsec.PenaltyBoxConditionsPayload{} + err := json.Unmarshal(testutils.LoadFixtureBytes(t, "testdata/TestResPenaltyBoxConditions/PenaltyBoxConditionsEmpty.json"), &penaltyBoxConditionsDeleteReq) + require.NoError(t, err) + + removePenaltyBoxConditionsReq := appsec.UpdatePenaltyBoxConditionsRequest{ConfigID: configResponse.ID, Version: configResponse.LatestVersion, PolicyID: "AAAA", ConditionsPayload: penaltyBoxConditionsDeleteReq} + penaltyBoxConditionsDelete(t, removePenaltyBoxConditionsReq, client) + + useClient(client, func() { + resource.Test(t, resource.TestCase{ + IsUnitTest: true, + ProviderFactories: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testutils.LoadFixtureString(t, "testdata/TestResPenaltyBoxConditions/match_by_id_for_delete.tf"), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("akamai_appsec_penalty_box_conditions.delete_condition", "id", "43253:AAAA"), + ), + }, + }, + }) + }) + + client.AssertExpectations(t) + }) +} diff --git a/pkg/providers/appsec/templates.go b/pkg/providers/appsec/templates.go index b0039b7d8..23efdd684 100644 --- a/pkg/providers/appsec/templates.go +++ b/pkg/providers/appsec/templates.go @@ -288,7 +288,9 @@ func InitTemplates(otm map[string]*OutputTemplate) { otm["failoverHostnamesDS"] = &OutputTemplate{TemplateName: "failoverHostnamesDS", TableTitle: "Hostname", TemplateType: "TABULAR", TemplateString: "{{range $index, $element := .HostnameList}}{{if $index}},{{end}}{{.Hostname}}{{end}}"} otm["bypassNetworkListsDS"] = &OutputTemplate{TemplateName: "bypassNetworkListsDS", TableTitle: "Network List|ID", TemplateType: "TABULAR", TemplateString: "{{range $index, $element := .NetworkLists}}{{if $index}},{{end}}{{.Name}}|{{.ID}}{{end}}"} otm["penaltyBoxDS"] = &OutputTemplate{TemplateName: "penaltyBoxDS", TableTitle: "PenaltyBoxProtection|Action", TemplateType: "TABULAR", TemplateString: "{{.PenaltyBoxProtection}}|{{.Action}}"} + otm["penaltyBoxConditionsDS"] = &OutputTemplate{TemplateName: "penaltyBoxConditionsDS", TableTitle: "ConditionsOperator|Conditions", TemplateType: "TABULAR", TemplateString: "{{.ConditionOperator}}|{{range $index, $element := .Conditions}}{{if $index}},{{end}}True{{else}}False{{end}}"} otm["evalPenaltyBoxDS"] = &OutputTemplate{TemplateName: "EvaluationPenaltyBoxDS", TableTitle: "PenaltyBoxProtection|Action", TemplateType: "TABULAR", TemplateString: "{{.PenaltyBoxProtection}}|{{.Action}}"} + otm["evalPenaltyBoxConditionsDS"] = &OutputTemplate{TemplateName: "evalPenaltyBoxConditionsDS", TableTitle: "ConditionsOperator|Conditions", TemplateType: "TABULAR", TemplateString: "{{.ConditionOperator}}|{{range $index, $element := .Conditions}}{{if $index}},{{end}}True{{else}}False{{end}}"} otm["selectableHostsDS"] = &OutputTemplate{TemplateName: "selectableHostsDS", TableTitle: "Hostname|ConfigIDInProduction|ConfigNameInProduction", TemplateType: "TABULAR", TemplateString: "{{range .AvailableSet}}{{.Hostname}}|{{ dash .ConfigIDInProduction }}|{{.ConfigNameInProduction}},{{end}}"} otm["selectedHostsDS"] = &OutputTemplate{TemplateName: "selectedHostsDS", TableTitle: "Hostnames", TemplateType: "TABULAR", TemplateString: "{{range $index, $element := .HostnameList}}{{if $index}},{{end}}{{.Hostname}}{{end}}"} otm["siemsettingsDS"] = &OutputTemplate{TemplateName: "siemsettingsDS", TableTitle: "Enable For All Policies|Enable Siem|Enabled Botman Siem Events|Siem Definition ID", TemplateType: "TABULAR", TemplateString: "{{.EnableForAllPolicies}}|{{.EnableSiem}}|{{.EnabledBotmanSiemEvents}}|{{.SiemDefinitionID}}"} @@ -348,6 +350,7 @@ func InitTemplates(otm map[string]*OutputTemplate) { otm["CustomRuleAction.tf"] = &OutputTemplate{TemplateName: "CustomRuleAction.tf", TableTitle: "CustomRuleAction", TemplateType: "TERRAFORM", TemplateString: "{{ $config := .ConfigID }}{{ $version := .Version }}{{ $prev_secpolicy := \"\" }}{{ range $index, $element := .SecurityPolicies }}{{$prev_secpolicy:=$element.ID}} {{ range $index, $element := .CustomRuleActions }}\n// terraform import akamai_appsec_custom_rule_action.akamai_appsec_custom_rule_action_{{$prev_secpolicy}}{{if $index}}_{{$index}}{{end}} {{$config}}:{{$prev_secpolicy}}:{{.ID}}\nresource \"akamai_appsec_custom_rule_action\" \"akamai_appsec_custom_rule_action_{{$prev_secpolicy}}{{if $index}}_{{$index}}{{end}}\" { \n config_id = {{$config}}\n security_policy_id = \"{{$prev_secpolicy}}\" \n custom_rule_id = {{.ID}} \n custom_rule_action = \"{{.Action}}\" \n } \n {{end}}{{end}}"} otm["MatchTarget.tf"] = &OutputTemplate{TemplateName: "MatchTarget.tf", TableTitle: "MatchTarget", TemplateType: "TERRAFORM", TemplateString: "{{ $config := .ConfigID }}{{ $version := .Version }}{{range $index, $element := .MatchTargets.WebsiteTargets}}\n// terraform import akamai_appsec_match_target.akamai_appsec_match_target_{{.ID}}{{if $index}}_{{$index}}{{end}} {{$config}}:{{.ID}} \nresource \"akamai_appsec_match_target\" \"akamai_appsec_match_target_{{.ID}}{{if $index}}_{{$index}}{{end}}\" { \n config_id = {{$config}}\n match_target = <<-EOF\n {{marshalwithoutid .}} \n EOF \n }\n {{end}}\n {{range $index, $element := .MatchTargets.APITargets}}\n// terraform import akamai_appsec_match_target.akamai_appsec_match_target_{{.ID}}{{if $index}}_{{$index}}{{end}} {{$config}}:{{.ID}}\n resource \"akamai_appsec_match_target\" \"akamai_appsec_match_target_{{.ID}}{{if $index}}_{{$index}}{{end}}\" { \n config_id = {{$config}}\n match_target = <<-EOF\n {{marshalwithoutid .}} \n EOF \n }\n {{end}}"} otm["PenaltyBox.tf"] = &OutputTemplate{TemplateName: "PenaltyBox.tf", TableTitle: "PenaltyBox", TemplateType: "TERRAFORM", TemplateString: "{{ $config := .ConfigID }}{{ $version := .Version }}{{ $prev_secpolicy := \"\" }}{{range $index, $element := .SecurityPolicies}}{{$prev_secpolicy := .ID}}{{with .PenaltyBox}}\n// terraform import akamai_appsec_penalty_box.akamai_appsec_penalty_box_{{$prev_secpolicy}}{{if $index}}_{{$index}}{{end}} {{$config}}:{{$prev_secpolicy}}\nresource \"akamai_appsec_penalty_box\" \"akamai_appsec_penalty_box_{{$prev_secpolicy}}{{if $index}}_{{$index}}{{end}}\" { \n config_id = {{$config}}\n security_policy_id = \"{{$prev_secpolicy}}\" \n penalty_box_protection = \"{{.PenaltyBoxProtection}}\" \n penalty_box_action = \"{{.Action}}\" \n}\n{{end}}{{end}}"} + otm["PenaltyBoxConditions.tf"] = &OutputTemplate{TemplateName: "PenaltyBoxConditions.tf", TableTitle: "PenaltyBoxConditions", TemplateType: "TERRAFORM", TemplateString: "{{ $config := .ConfigID }}{{ $version := .Version }}{{ $prev_secpolicy := \"\" }}{{range $index, $element := .SecurityPolicies}}{{$prev_secpolicy := .ID}}{{with .PenaltyBoxConditions}}\n// terraform import akamai_appsec_penalty_box_conditions.akamai_appsec_penalty_box_conditions_{{$prev_secpolicy}} {{if $index}}_{{$index}}{{end}} {{$config}}:{{$prev_secpolicy}}\n resource \"akamai_appsec_penalty_box_conditions\" \"akamai_appsec_penalty_box_conditions_{{$prev_secpolicy}}{{if $index}}_{{$index}}{{end}}\" { \n config_id = {{$config}}\n security_policy_id = \"{{$prev_secpolicy}}\" \n penalty_box_conditions = <<-EOF\n {{marshal .PenaltyBoxConditions}} \n EOF \n } \n}\n{{end}}{{end}}"} otm["RatePolicy.tf"] = &OutputTemplate{TemplateName: "RatePolicy.tf", TableTitle: "RatePolicy", TemplateType: "TERRAFORM", TemplateString: "{{ $config := .ConfigID }}{{range $index, $element := .RatePolicies}}\n// terraform import akamai_appsec_rate_policy.akamai_appsec_rate_policy{{if $index}}_{{$index}}{{end}} {{$config}}:{{.ID}} \nresource \"akamai_appsec_rate_policy\" \"akamai_appsec_rate_policy{{if $index}}_{{$index}}{{end}}\" { \n config_id = {{ $config }}\n rate_policy = <<-EOF\n {{marshalwithoutid .}} \n EOF \n \n }\n{{end}}"} otm["RatePolicyAction.tf"] = &OutputTemplate{TemplateName: "RatePolicyAction.tf", TableTitle: "RatePolicyAction", TemplateType: "TERRAFORM", TemplateString: "{{ $config := .ConfigID }}{{ $prev_secpolicy := \"\" }}{{range .SecurityPolicies}}{{$prev_secpolicy := .ID}} {{with .RatePolicyActions}} {{ range $index, $element := . }}\n// terraform import akamai_appsec_rate_policy_action.akamai_appsec_rate_policy_action_{{$prev_secpolicy}}{{if $index}}_{{$index}}{{end}} {{$config}}:{{$prev_secpolicy}}:{{.ID}}\nresource \"akamai_appsec_rate_policy_action\" \"akamai_appsec_rate_policy_action_{{$prev_secpolicy}}{{if $index}}_{{$index}}{{end}}\" { \n config_id = {{$config}}\n security_policy_id = \"{{$prev_secpolicy}}\" \n rate_policy_id = {{.ID}} \n ipv4_action = \"{{.Ipv4Action}}\" \n ipv6_action = \"{{.Ipv6Action}}\" \n }\n {{end}}{{end}} {{end}}"} otm["ReputationProfile.tf"] = &OutputTemplate{TemplateName: "ReputationProfile.tf", TableTitle: "ReputationProfile", TemplateType: "TERRAFORM", TemplateString: "{{ $config := .ConfigID }}{{range $index, $element := .ReputationProfiles}}\n// terraform import akamai_appsec_reputation_profile.akamai_appsec_reputation_profile{{if $index}}_{{$index}}{{end}} {{$config}}:{{.ID}}\nresource \"akamai_appsec_reputation_profile\" \"akamai_appsec_reputation_profile{{if $index}}_{{$index}}{{end}}\" { \n config_id = {{ $config}}\n reputation_profile = <<-EOF\n {{marshalwithoutid .}} \n \n EOF \n }\n{{end}}"} @@ -357,6 +360,7 @@ func InitTemplates(otm map[string]*OutputTemplate) { otm["AttackGroup.tf"] = &OutputTemplate{TemplateName: "AttackGroup.tf", TableTitle: "AttackGroup", TemplateType: "TERRAFORM", TemplateString: "{{ $config := .ConfigID }}{{ $prev_secpolicy := \"\" }}{{range .SecurityPolicies}}{{$prev_secpolicy := .ID}}{{with .WebApplicationFirewall.AttackGroupActions}} {{range $index, $element := .}}\n// terraform import akamai_appsec_attack_group.akamai_appsec_attack_group_{{$prev_secpolicy}}{{if $index}}_{{$index}}{{end}} {{$config}}:{{$prev_secpolicy}}:{{.Group}}\nresource \"akamai_appsec_attack_group\" \"akamai_appsec_attack_group_{{$prev_secpolicy}}{{if $index}}_{{$index}}{{end}}\" { \n config_id = {{$config}}\n security_policy_id = \"{{$prev_secpolicy}}\" \n attack_group = \"{{.Group}}\" \n attack_group_action = \"{{.Action}}\" \n{{ if or .AdvancedExceptionsList .Exception}} condition_exception = <<-EOF\n {{marshalconditionexception .}} \n \n EOF \n \n {{end}}}\n{{end}}{{end}}{{end}}"} otm["EvalGroup.tf"] = &OutputTemplate{TemplateName: "EvalGroup.tf", TableTitle: "EvaluationGroup", TemplateType: "TERRAFORM", TemplateString: "{{ $config := .ConfigID }}{{ $prev_secpolicy := \"\" }}{{range .SecurityPolicies}}{{$prev_secpolicy := .ID}} {{with .WebApplicationFirewall}}{{with .Evaluation}}{{with .AttackGroupActions}}{{range $index, $element := .}}\n// terraform import akamai_appsec_eval_group.akamai_appsec_eval_group_{{$prev_secpolicy}}{{if $index}}_{{$index}}{{end}} {{$config}}:{{$prev_secpolicy}}:{{.Group}}\nresource \"akamai_appsec_eval_group\" \"akamai_appsec_eval_group_{{$prev_secpolicy}}{{if $index}}_{{$index}}{{end}}\" { \n config_id = {{$config}}\n security_policy_id = \"{{$prev_secpolicy}}\" \n attack_group = \"{{.Group}}\" \n attack_group_action = \"{{.Action}}\"\n{{ if or .Exception .AdvancedExceptionsList}} condition_exception = <<-EOF\n {{marshalconditionexception .}} \n \n EOF \n \n{{end}}}\n{{end}}{{end}}{{end}}{{end}}{{end}}"} otm["EvalPenaltyBox.tf"] = &OutputTemplate{TemplateName: "EvalPenaltyBox.tf", TableTitle: "EvaluationPenaltyBox", TemplateType: "TERRAFORM", TemplateString: "{{ $config := .ConfigID }}{{ $version := .Version }}{{ $prev_secpolicy := \"\" }}{{range $index, $element := .SecurityPolicies}}{{$prev_secpolicy := .ID}}{{with .EvaluationPenaltyBox}}\n// terraform import akamai_appsec_eval_penalty_box.akamai_appsec_eval_penalty_box_{{$prev_secpolicy}}{{if $index}}_{{$index}}{{end}} {{$config}}:{{$prev_secpolicy}}\nresource \"akamai_appsec_eval_penalty_box\" \"akamai_appsec_eval_penalty_box_{{$prev_secpolicy}}{{if $index}}_{{$index}}{{end}}\" { \n config_id = {{$config}}\n security_policy_id = \"{{$prev_secpolicy}}\" \n penalty_box_protection = {{.PenaltyBoxProtection}} \n penalty_box_action = \"{{.Action}}\" \n}\n{{end}}{{end}}"} + otm["EvalPenaltyBoxConditions.tf"] = &OutputTemplate{TemplateName: "EvalPenaltyBoxConditions.tf", TableTitle: "EvalPenaltyBoxConditions", TemplateType: "TERRAFORM", TemplateString: "{{ $config := .ConfigID }}{{ $version := .Version }}{{ $prev_secpolicy := \"\" }}{{range $index, $element := .SecurityPolicies}}{{$prev_secpolicy := .ID}}{{with .EvalPenaltyBoxConditions}}\n// terraform import akamai_appsec_eval_penalty_box_conditions.akamai_appsec_eval_penalty_box_conditions_{{$prev_secpolicy}}{{if $index}}_{{$index}}{{end}} {{$config}}:{{$prev_secpolicy}}\nresource \"akamai_appsec_eval_penalty_box_conditions\" \"akamai_appsec_eval_penalty_box_conditions_{{$prev_secpolicy}}{{if $index}}_{{$index}}{{end}}\" { \n config_id = {{$config}}\n security_policy_id = \"{{$prev_secpolicy}}\" \n \n}\n{{end}}{{end}}"} otm["ThreatIntel.tf"] = &OutputTemplate{TemplateName: "ThreatIntel.tf", TableTitle: "ThreatIntel", TemplateType: "TERRAFORM", TemplateString: "{{ $config := .ConfigID }}{{ $version := .Version }}{{ $prev_secpolicy := \"\" }}{{range $index1, $element := .SecurityPolicies}}{{$prev_secpolicy := .ID}}\n// terraform import akamai_appsec_threat_intel.threat_intel{{if $index1}}_{{$index1}}{{end}} {{$config}}:{{$prev_secpolicy}} \nresource \"akamai_appsec_threat_intel\" \"threat_intel{{if $index1}}_{{$index1}}{{end}}\" { \n config_id = {{$config}}\n security_policy_id = \"{{$prev_secpolicy}}\" \n threat_intel = \"{{.WebApplicationFirewall.ThreatIntel}}\" \n }\n {{end}}"} otm["SecurityPolicy.tf"] = &OutputTemplate{TemplateName: "SecurityPolicy.tf", TableTitle: "SecurityPolicy", TemplateType: "TERRAFORM", TemplateString: "{{ $config := .ConfigID }}{{ $prev_secpolicy := \"\" }}{{ $spx := \"\" }} {{range $index, $element := .SecurityPolicies}}{{$prev_secpolicy := .ID}}{{ $spx := splitprefix \"_\" .ID}}\n// terraform import akamai_appsec_security_policy.akamai_appsec_security_policy{{if $index}}_{{$index}}{{end}} {{$config}}:{{.ID}}\nresource \"akamai_appsec_security_policy\" \"akamai_appsec_security_policy{{if $index}}_{{$index}}{{end}}\" { \n config_id = {{ $config }}\n security_policy_name = \"{{.Name}}\" \n security_policy_prefix = \"{{$spx._0}}\" \n default_settings = true\n }\n{{end}}"} otm["SelectedHostname.tf"] = &OutputTemplate{TemplateName: "SelectedHostname.tf", TableTitle: "SelectedHostname", TemplateType: "TERRAFORM", TemplateString: "\n// terraform import akamai_appsec_selected_hostnames.akamai_appsec_selected_hostname {{.ConfigID}}\nresource \"akamai_appsec_selected_hostnames\" \"akamai_appsec_selected_hostname\" { \n config_id = {{.ConfigID}}\n mode = \"REPLACE\" \n hostnames = [{{ range $index, $element := .SelectedHosts }}{{if $index}},{{end}}{{quote .}}{{end}}] \n }"} diff --git a/pkg/providers/appsec/testdata/TestDSEvalPenaltyBoxConditions/PenaltyBoxConditions.json b/pkg/providers/appsec/testdata/TestDSEvalPenaltyBoxConditions/PenaltyBoxConditions.json new file mode 100644 index 000000000..04d589459 --- /dev/null +++ b/pkg/providers/appsec/testdata/TestDSEvalPenaltyBoxConditions/PenaltyBoxConditions.json @@ -0,0 +1,13 @@ +{ + "conditionOperator": "AND", + "conditions": [ + { + "type": "filenameMatch", + "filenames": [ + "hh" + ], + "positiveMatch": true + } + ] +} + diff --git a/pkg/providers/appsec/testdata/TestDSEvalPenaltyBoxConditions/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSEvalPenaltyBoxConditions/match_by_id.tf new file mode 100644 index 000000000..cb97c21c7 --- /dev/null +++ b/pkg/providers/appsec/testdata/TestDSEvalPenaltyBoxConditions/match_by_id.tf @@ -0,0 +1,11 @@ +provider "akamai" { + edgerc = "../../test/edgerc" + cache_enabled = false +} + +data "akamai_appsec_eval_penalty_box_conditions" "test" { + config_id = 43253 + security_policy_id = "AAAA_81230" +} + + diff --git a/pkg/providers/appsec/testdata/TestDSPenaltyBoxConditions/PenaltyBoxConditions.json b/pkg/providers/appsec/testdata/TestDSPenaltyBoxConditions/PenaltyBoxConditions.json new file mode 100644 index 000000000..04d589459 --- /dev/null +++ b/pkg/providers/appsec/testdata/TestDSPenaltyBoxConditions/PenaltyBoxConditions.json @@ -0,0 +1,13 @@ +{ + "conditionOperator": "AND", + "conditions": [ + { + "type": "filenameMatch", + "filenames": [ + "hh" + ], + "positiveMatch": true + } + ] +} + diff --git a/pkg/providers/appsec/testdata/TestDSPenaltyBoxConditions/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSPenaltyBoxConditions/match_by_id.tf new file mode 100644 index 000000000..004269243 --- /dev/null +++ b/pkg/providers/appsec/testdata/TestDSPenaltyBoxConditions/match_by_id.tf @@ -0,0 +1,11 @@ +provider "akamai" { + edgerc = "../../test/edgerc" + cache_enabled = false +} + +data "akamai_appsec_penalty_box_conditions" "test" { + config_id = 43253 + security_policy_id = "AAAA_81230" +} + + diff --git a/pkg/providers/appsec/testdata/TestResEvalPenaltyBoxConditions/PenaltyBoxConditions.json b/pkg/providers/appsec/testdata/TestResEvalPenaltyBoxConditions/PenaltyBoxConditions.json new file mode 100644 index 000000000..5d731d662 --- /dev/null +++ b/pkg/providers/appsec/testdata/TestResEvalPenaltyBoxConditions/PenaltyBoxConditions.json @@ -0,0 +1,13 @@ +{ + "conditionOperator": "AND", + "conditions": [ + { + "type": "filenameMatch", + "filenames": [ + "hh" + ], + "order": 0, + "positiveMatch": true + } + ] +} \ No newline at end of file diff --git a/pkg/providers/appsec/testdata/TestResEvalPenaltyBoxConditions/PenaltyBoxConditionsEmpty.json b/pkg/providers/appsec/testdata/TestResEvalPenaltyBoxConditions/PenaltyBoxConditionsEmpty.json new file mode 100644 index 000000000..6fe79dbc8 --- /dev/null +++ b/pkg/providers/appsec/testdata/TestResEvalPenaltyBoxConditions/PenaltyBoxConditionsEmpty.json @@ -0,0 +1,4 @@ +{ + "conditionOperator": "AND", + "conditions": [ ] +} \ No newline at end of file diff --git a/pkg/providers/appsec/testdata/TestResEvalPenaltyBoxConditions/match_by_id.tf b/pkg/providers/appsec/testdata/TestResEvalPenaltyBoxConditions/match_by_id.tf new file mode 100644 index 000000000..71e8d1086 --- /dev/null +++ b/pkg/providers/appsec/testdata/TestResEvalPenaltyBoxConditions/match_by_id.tf @@ -0,0 +1,11 @@ +provider "akamai" { + edgerc = "../../test/edgerc" + cache_enabled = false +} + +resource "akamai_appsec_eval_penalty_box_conditions" "test" { + config_id = 43253 + security_policy_id = "AAAA_81230" + penalty_box_conditions = file("testdata/TestResEvalPenaltyBoxConditions/PenaltyBoxConditions.json") +} + diff --git a/pkg/providers/appsec/testdata/TestResEvalPenaltyBoxConditions/match_by_id_for_delete.tf b/pkg/providers/appsec/testdata/TestResEvalPenaltyBoxConditions/match_by_id_for_delete.tf new file mode 100644 index 000000000..9612212e5 --- /dev/null +++ b/pkg/providers/appsec/testdata/TestResEvalPenaltyBoxConditions/match_by_id_for_delete.tf @@ -0,0 +1,10 @@ +provider "akamai" { + edgerc = "../../test/edgerc" + cache_enabled = false +} + +resource "akamai_appsec_eval_penalty_box_conditions" "delete_condition" { + config_id = 43253 + security_policy_id = "AAAA" + penalty_box_conditions = file("testdata/TestResEvalPenaltyBoxConditions/PenaltyBoxConditionsEmpty.json") +} \ No newline at end of file diff --git a/pkg/providers/appsec/testdata/TestResPenaltyBoxConditions/PenaltyBoxConditions.json b/pkg/providers/appsec/testdata/TestResPenaltyBoxConditions/PenaltyBoxConditions.json new file mode 100644 index 000000000..5d731d662 --- /dev/null +++ b/pkg/providers/appsec/testdata/TestResPenaltyBoxConditions/PenaltyBoxConditions.json @@ -0,0 +1,13 @@ +{ + "conditionOperator": "AND", + "conditions": [ + { + "type": "filenameMatch", + "filenames": [ + "hh" + ], + "order": 0, + "positiveMatch": true + } + ] +} \ No newline at end of file diff --git a/pkg/providers/appsec/testdata/TestResPenaltyBoxConditions/PenaltyBoxConditionsEmpty.json b/pkg/providers/appsec/testdata/TestResPenaltyBoxConditions/PenaltyBoxConditionsEmpty.json new file mode 100644 index 000000000..f6ccd8943 --- /dev/null +++ b/pkg/providers/appsec/testdata/TestResPenaltyBoxConditions/PenaltyBoxConditionsEmpty.json @@ -0,0 +1,4 @@ +{ + "conditionOperator": "AND", + "conditions": [ ] +} \ No newline at end of file diff --git a/pkg/providers/appsec/testdata/TestResPenaltyBoxConditions/match_by_id.tf b/pkg/providers/appsec/testdata/TestResPenaltyBoxConditions/match_by_id.tf new file mode 100644 index 000000000..c41a6108c --- /dev/null +++ b/pkg/providers/appsec/testdata/TestResPenaltyBoxConditions/match_by_id.tf @@ -0,0 +1,11 @@ +provider "akamai" { + edgerc = "../../test/edgerc" + cache_enabled = false +} + +resource "akamai_appsec_penalty_box_conditions" "test" { + config_id = 43253 + security_policy_id = "AAAA_81230" + penalty_box_conditions = file("testdata/TestResPenaltyBoxConditions/PenaltyBoxConditions.json") +} + diff --git a/pkg/providers/appsec/testdata/TestResPenaltyBoxConditions/match_by_id_for_delete.tf b/pkg/providers/appsec/testdata/TestResPenaltyBoxConditions/match_by_id_for_delete.tf new file mode 100644 index 000000000..a37180026 --- /dev/null +++ b/pkg/providers/appsec/testdata/TestResPenaltyBoxConditions/match_by_id_for_delete.tf @@ -0,0 +1,10 @@ +provider "akamai" { + edgerc = "../../test/edgerc" + cache_enabled = false +} + +resource "akamai_appsec_penalty_box_conditions" "delete_condition" { + config_id = 43253 + security_policy_id = "AAAA" + penalty_box_conditions = file("testdata/TestResPenaltyBoxConditions/PenaltyBoxConditionsEmpty.json") +} \ No newline at end of file From 391d00e4dbbb8c625f1b2c6cfefe54440fa0b98d Mon Sep 17 00:00:00 2001 From: Nagendran Alagesan Date: Mon, 11 Mar 2024 14:47:56 -0400 Subject: [PATCH 43/52] SECKSD-23389 updated Changelog with correct details --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 901978d0c..8cbbe043a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -96,6 +96,9 @@ #### BUG FIXES: +* Appsec + * Fixed ukraine_geo_control_action drift issue ([I#484](https://github.com/akamai/terraform-provider-akamai/issues/484)) + * Cloudlets * Allowed empty value for match rules `json` attribute for data sources: * `akamai_cloudlets_api_prioritization_match_rule` @@ -145,7 +148,6 @@ * Appsec * `akamai_appsec_selected_hostnames` data source and resource are deprecated with a scheduled end-of-life in v7.0.0 of our provider. Use the `akamai_appsec_configuration` instead. - * Fixed ukraine_geo_control_action drift issue ([I#484](https://github.com/akamai/terraform-provider-akamai/issues/484)) ## 5.6.0 (Feb 19, 2024) From b4e246c5069dcc4d3128e3bf5dd0c8a5f63526ef Mon Sep 17 00:00:00 2001 From: Nagendran Alagesan Date: Thu, 14 Mar 2024 16:52:47 -0400 Subject: [PATCH 44/52] SECKSD-23389 fixed the test failure issue with test provider --- ...data_akamai_appsec_eval_penalty_box_conditions_test.go | 4 ++-- .../data_akamai_appsec_penalty_box_conditions_test.go | 4 ++-- ...urce_akamai_appsec_eval_penalty_box_conditions_test.go | 8 ++++---- .../appsec/resource_akamai_appsec_ip_geo_test.go | 8 ++++---- .../resource_akamai_appsec_penalty_box_conditions_test.go | 8 ++++---- .../TestDSEvalPenaltyBoxConditions/match_by_id.tf | 2 +- .../testdata/TestDSPenaltyBoxConditions/match_by_id.tf | 2 +- .../TestResEvalPenaltyBoxConditions/match_by_id.tf | 2 +- .../match_by_id_for_delete.tf | 2 +- .../testdata/TestResPenaltyBoxConditions/match_by_id.tf | 2 +- .../TestResPenaltyBoxConditions/match_by_id_for_delete.tf | 2 +- 11 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions_test.go b/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions_test.go index b51528599..7f85950d2 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions_test.go @@ -41,8 +41,8 @@ func TestAkamaiEvalPenaltyBoxConditions_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSEvalPenaltyBoxConditions/match_by_id.tf"), diff --git a/pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions_test.go b/pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions_test.go index 1044be759..2bc1beeb3 100644 --- a/pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions_test.go @@ -41,8 +41,8 @@ func TestAkamaiPenaltyBoxConditions_data_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestDSPenaltyBoxConditions/match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions_test.go b/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions_test.go index 86ce7931b..a78a85ab0 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions_test.go @@ -87,8 +87,8 @@ func TestAkamaiEvalPenaltyBoxConditions_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResEvalPenaltyBoxConditions/match_by_id.tf"), @@ -120,8 +120,8 @@ func TestAkamaiEvalPenaltyBoxConditions_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResEvalPenaltyBoxConditions/match_by_id_for_delete.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_ip_geo_test.go b/pkg/providers/appsec/resource_akamai_appsec_ip_geo_test.go index 2facd57b7..d47544a9d 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_ip_geo_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_ip_geo_test.go @@ -235,8 +235,8 @@ func TestAkamaiIPGeo_res_block(t *testing.T) { updateIPGeoProtectionResponseAllProtectionsFalse(t, 43253, 7, "AAAA_81230", "testdata/TestResIPGeoProtection/PolicyProtections.json", client) useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResIPGeo/match_by_id.tf"), @@ -306,8 +306,8 @@ func TestAkamaiIPGeo_res_block(t *testing.T) { updateIPGeoProtectionResponseAllProtectionsFalse(t, 43253, 7, "AAAA_81230", "testdata/TestResIPGeoProtection/PolicyProtections.json", client) useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResIPGeo/ukraine_match_by_id.tf"), diff --git a/pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions_test.go b/pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions_test.go index c424ffcfd..a52386208 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions_test.go @@ -84,8 +84,8 @@ func TestAkamaiPenaltyBoxConditions_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResPenaltyBoxConditions/match_by_id.tf"), @@ -115,8 +115,8 @@ func TestAkamaiPenaltyBoxConditions_res_basic(t *testing.T) { useClient(client, func() { resource.Test(t, resource.TestCase{ - IsUnitTest: true, - ProviderFactories: testAccProviders, + IsUnitTest: true, + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), Steps: []resource.TestStep{ { Config: testutils.LoadFixtureString(t, "testdata/TestResPenaltyBoxConditions/match_by_id_for_delete.tf"), diff --git a/pkg/providers/appsec/testdata/TestDSEvalPenaltyBoxConditions/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSEvalPenaltyBoxConditions/match_by_id.tf index cb97c21c7..8a97c5d21 100644 --- a/pkg/providers/appsec/testdata/TestDSEvalPenaltyBoxConditions/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSEvalPenaltyBoxConditions/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestDSPenaltyBoxConditions/match_by_id.tf b/pkg/providers/appsec/testdata/TestDSPenaltyBoxConditions/match_by_id.tf index 004269243..b3f79a859 100644 --- a/pkg/providers/appsec/testdata/TestDSPenaltyBoxConditions/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestDSPenaltyBoxConditions/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResEvalPenaltyBoxConditions/match_by_id.tf b/pkg/providers/appsec/testdata/TestResEvalPenaltyBoxConditions/match_by_id.tf index 71e8d1086..5c6f42bee 100644 --- a/pkg/providers/appsec/testdata/TestResEvalPenaltyBoxConditions/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResEvalPenaltyBoxConditions/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResEvalPenaltyBoxConditions/match_by_id_for_delete.tf b/pkg/providers/appsec/testdata/TestResEvalPenaltyBoxConditions/match_by_id_for_delete.tf index 9612212e5..f1f8a7085 100644 --- a/pkg/providers/appsec/testdata/TestResEvalPenaltyBoxConditions/match_by_id_for_delete.tf +++ b/pkg/providers/appsec/testdata/TestResEvalPenaltyBoxConditions/match_by_id_for_delete.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResPenaltyBoxConditions/match_by_id.tf b/pkg/providers/appsec/testdata/TestResPenaltyBoxConditions/match_by_id.tf index c41a6108c..bea664236 100644 --- a/pkg/providers/appsec/testdata/TestResPenaltyBoxConditions/match_by_id.tf +++ b/pkg/providers/appsec/testdata/TestResPenaltyBoxConditions/match_by_id.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } diff --git a/pkg/providers/appsec/testdata/TestResPenaltyBoxConditions/match_by_id_for_delete.tf b/pkg/providers/appsec/testdata/TestResPenaltyBoxConditions/match_by_id_for_delete.tf index a37180026..1cd2f4c21 100644 --- a/pkg/providers/appsec/testdata/TestResPenaltyBoxConditions/match_by_id_for_delete.tf +++ b/pkg/providers/appsec/testdata/TestResPenaltyBoxConditions/match_by_id_for_delete.tf @@ -1,5 +1,5 @@ provider "akamai" { - edgerc = "../../test/edgerc" + edgerc = "../../common/testutils/edgerc" cache_enabled = false } From 4341e2fb0506f439a37375d0340a86fe6bdf2ee2 Mon Sep 17 00:00:00 2001 From: Dawid Dzhafarov Date: Wed, 20 Mar 2024 12:07:41 +0000 Subject: [PATCH 45/52] DXE-3678 Added support for v2024-02-12 rule format --- CHANGELOG.md | 3 +- ...data_akamai_property_rules_builder_test.go | 39 + .../rule_format_v2024_02_12.gen.go | 16236 ++++++++++++++++ .../content_compression_v2024_02_12.json | 68 + .../default_v2024_02_12.json | 373 + .../dynamic_content_v2024_02_12.json | 29 + .../rules_v2024_02_12.tf | 268 + .../static_content_v2024_02_12.json | 110 + 8 files changed, 17125 insertions(+), 1 deletion(-) create mode 100644 pkg/providers/property/ruleformats/rule_format_v2024_02_12.gen.go create mode 100755 pkg/providers/property/testdata/TestDSPropertyRulesBuilder/content_compression_v2024_02_12.json create mode 100755 pkg/providers/property/testdata/TestDSPropertyRulesBuilder/default_v2024_02_12.json create mode 100755 pkg/providers/property/testdata/TestDSPropertyRulesBuilder/dynamic_content_v2024_02_12.json create mode 100644 pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2024_02_12.tf create mode 100755 pkg/providers/property/testdata/TestDSPropertyRulesBuilder/static_content_v2024_02_12.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cbbe043a..ce02b64dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,7 +57,8 @@ * Bumped various dependencies - +* PAPI + * `data_akamai_property_rules_builder` is now supporting `v2024-02-12` [rule format](https://techdocs.akamai.com/terraform/reference/rule-format-changes#v2024-02-12) * Global * Requests limit value is configurable via field `request_limit` or environment variable `AKAMAI_REQUEST_LIMIT` diff --git a/pkg/providers/property/data_akamai_property_rules_builder_test.go b/pkg/providers/property/data_akamai_property_rules_builder_test.go index df9c449b8..cf918a5eb 100644 --- a/pkg/providers/property/data_akamai_property_rules_builder_test.go +++ b/pkg/providers/property/data_akamai_property_rules_builder_test.go @@ -207,6 +207,45 @@ func TestDataPropertyRulesBuilder(t *testing.T) { }) }) }) + t.Run("valid rule with 3 children - v2024-02-12", func(t *testing.T) { + useClient(nil, nil, func() { + resource.UnitTest(t, resource.TestCase{ + ProtoV6ProviderFactories: testutils.NewProtoV6ProviderFactory(NewSubprovider()), + Steps: []resource.TestStep{{ + Config: testutils.LoadFixtureString(t, "testdata/TestDSPropertyRulesBuilder/rules_v2024_02_12.tf"), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("data.akamai_property_rules_builder.default", + "rule_format", + "v2024-02-12"), + testCheckResourceAttrJSON("data.akamai_property_rules_builder.default", + "json", + testutils.LoadFixtureString(t, "testdata/TestDSPropertyRulesBuilder/default_v2024_02_12.json")), + + resource.TestCheckResourceAttr("data.akamai_property_rules_builder.content_compression", + "rule_format", + "v2024-02-12"), + testCheckResourceAttrJSON("data.akamai_property_rules_builder.content_compression", + "json", + testutils.LoadFixtureString(t, "testdata/TestDSPropertyRulesBuilder/content_compression_v2024_02_12.json")), + + resource.TestCheckResourceAttr("data.akamai_property_rules_builder.static_content", + "rule_format", + "v2024-02-12"), + testCheckResourceAttrJSON("data.akamai_property_rules_builder.static_content", + "json", + testutils.LoadFixtureString(t, "testdata/TestDSPropertyRulesBuilder/static_content_v2024_02_12.json")), + + resource.TestCheckResourceAttr("data.akamai_property_rules_builder.dynamic_content", + "rule_format", + "v2024-02-12"), + testCheckResourceAttrJSON("data.akamai_property_rules_builder.dynamic_content", + "json", + testutils.LoadFixtureString(t, "testdata/TestDSPropertyRulesBuilder/dynamic_content_v2024_02_12.json")), + ), + }}, + }) + }) + }) t.Run("rule empty options - v2024-01-09", func(t *testing.T) { useClient(nil, nil, func() { resource.UnitTest(t, resource.TestCase{ diff --git a/pkg/providers/property/ruleformats/rule_format_v2024_02_12.gen.go b/pkg/providers/property/ruleformats/rule_format_v2024_02_12.gen.go new file mode 100644 index 000000000..c7e46e3c8 --- /dev/null +++ b/pkg/providers/property/ruleformats/rule_format_v2024_02_12.gen.go @@ -0,0 +1,16236 @@ +package ruleformats + +import ( + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" +) + +func init() { + schemasRegistry.register(RuleFormat{ + version: "rules_v2024_02_12", + behaviorsSchemas: getBehaviorsSchemaV20240212(), + criteriaSchemas: getCriteriaSchemaV20240212(), + typeMappings: map[string]interface{}{"adScalerCircuitBreaker.returnErrorResponseCodeBased.408": 408, "adScalerCircuitBreaker.returnErrorResponseCodeBased.500": 500, "adScalerCircuitBreaker.returnErrorResponseCodeBased.502": 502, "adScalerCircuitBreaker.returnErrorResponseCodeBased.504": 504}, + nameMappings: map[string]string{"allowFcmParentOverride": "allowFCMParentOverride", "allowHttpsCacheKeySharing": "allowHTTPSCacheKeySharing", "allowHttpsDowngrade": "allowHTTPSDowngrade", "allowHttpsUpgrade": "allowHTTPSUpgrade", "c": "C", "canBeCa": "canBeCA", "cn": "CN", "conditionalHttpStatus": "conditionalHTTPStatus", "contentCharacteristicsAmd": "contentCharacteristicsAMD", "contentCharacteristicsDd": "contentCharacteristicsDD", "dcpAuthHmacTransformation": "dcpAuthHMACTransformation", "detectSmartDnsProxy": "detectSmartDNSProxy", "detectSmartDnsProxyAction": "detectSmartDNSProxyAction", "detectSmartDnsProxyRedirecturl": "detectSmartDNSProxyRedirecturl", "enableCmcdSegmentPrefetch": "enableCMCDSegmentPrefetch", "enableEs256": "enableES256", "enableIpAvoidance": "enableIPAvoidance", "enableIpProtection": "enableIPProtection", "enableIpRedirectOnDeny": "enableIPRedirectOnDeny", "enableRs256": "enableRS256", "enableTokenInUri": "enableTokenInURI", "g2OToken": "g2oToken", "g2Oheader": "g2oheader", "i18NCharset": "i18nCharset", "i18NStatus": "i18nStatus", "isCertificateSniOnly": "isCertificateSNIOnly", "issuerRdns": "issuerRDNs", "logEdgeIp": "logEdgeIP", "o": "O", "originSettings": "origin_settings", "ou": "OU", "overrideIpAddresses": "overrideIPAddresses", "segmentDurationDash": "segmentDurationDASH", "segmentDurationDashCustom": "segmentDurationDASHCustom", "segmentDurationHds": "segmentDurationHDS", "segmentDurationHdsCustom": "segmentDurationHDSCustom", "segmentDurationHls": "segmentDurationHLS", "segmentDurationHlsCustom": "segmentDurationHLSCustom", "segmentSizeDash": "segmentSizeDASH", "segmentSizeHds": "segmentSizeHDS", "segmentSizeHls": "segmentSizeHLS", "sf3COriginHost": "sf3cOriginHost", "sf3COriginHostHeader": "sf3cOriginHostHeader", "smartDnsProxy": "smartDNSProxy", "standardTlsMigration": "standardTLSMigration", "standardTlsMigrationOverride": "standardTLSMigrationOverride", "subjectCn": "subjectCN", "subjectRdns": "subjectRDNs", "titleAicMobile": "title_aic_mobile", "titleAicNonmobile": "title_aic_nonmobile", "tokenAuthHlsTitle": "tokenAuthHLSTitle"}, + shouldFlatten: []string{"apiPrioritization.cloudletPolicy", "apiPrioritization.throttledCpCode", "apiPrioritization.throttledCpCode.cpCodeLimits", "apiPrioritization.netStorage", "applicationLoadBalancer.cloudletPolicy", "applicationLoadBalancer.allDownNetStorage", "audienceSegmentation.cloudletPolicy", "cpCode.value", "cpCode.value.cpCodeLimits", "edgeRedirector.cloudletPolicy", "failAction.netStorageHostname", "failAction.cpCode", "failAction.cpCode.cpCodeLimits", "firstPartyMarketing.cloudletPolicy", "firstPartyMarketingPlus.cloudletPolicy", "forwardRewrite.cloudletPolicy", "imageAndVideoManager.cpCodeOriginal", "imageAndVideoManager.cpCodeOriginal.cpCodeLimits", "imageAndVideoManager.cpCodeTransformed", "imageAndVideoManager.cpCodeTransformed.cpCodeLimits", "imageManager.cpCodeOriginal", "imageManager.cpCodeOriginal.cpCodeLimits", "imageManager.cpCodeTransformed", "imageManager.cpCodeTransformed.cpCodeLimits", "imageManagerVideo.cpCodeOriginal", "imageManagerVideo.cpCodeOriginal.cpCodeLimits", "imageManagerVideo.cpCodeTransformed", "imageManagerVideo.cpCodeTransformed.cpCodeLimits", "origin.netStorage", "origin.customCertificateAuthorities.subjectRDNs", "origin.customCertificateAuthorities.issuerRDNs", "origin.customCertificates.subjectRDNs", "origin.customCertificates.issuerRDNs", "phasedRelease.cloudletPolicy", "requestControl.cloudletPolicy", "requestControl.netStorage", "siteShield.ssmap", "visitorPrioritization.cloudletPolicy", "visitorPrioritization.waitingRoomCpCode", "visitorPrioritization.waitingRoomCpCode.cpCodeLimits", "visitorPrioritization.waitingRoomNetStorage", "webApplicationFirewall.firewallConfiguration", "matchCpCode.value", "matchCpCode.value.cpCodeLimits"}, + }) +} + +func getBehaviorsSchemaV20240212() map[string]*schema.Schema { + return map[string]*schema.Schema{ + "ad_scaler_circuit_breaker": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior works with `manifestRerouting` to provide the scale and reliability of Akamai network while simultaneously allowing third party partners to modify the requested media content with value-added features. The `adScalerCircuitBreaker` behavior specifies the fallback action in case the technology partner encounters errors and can't modify the requested media object. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "response_delay_based": { + Optional: true, + Description: "Triggers a fallback action based on the delayed response from the technology partner's server.", + Type: schema.TypeBool, + }, + "response_delay_threshold": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"500ms"}, false)), + Optional: true, + Description: "Specifies the maximum response delay that, if exceeded, triggers the fallback action.", + Type: schema.TypeString, + }, + "response_code_based": { + Optional: true, + Description: "Triggers a fallback action based on the response code from the technology partner's server.", + Type: schema.TypeBool, + }, + "response_codes": { + ValidateDiagFunc: validateRegexOrVariable("^(([0-9]{3})(,?))+$"), + Optional: true, + Description: "Specifies the codes in the partner's response that trigger the fallback action, either `408`, `500`, `502`, `504`, `SAME_AS_RECEIEVED`, or `SPECIFY_YOUR_OWN` for a custom code.", + Type: schema.TypeString, + }, + "fallback_action_response_code_based": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"RETURN_AKAMAI_COPY", "RETURN_ERROR"}, false)), + Optional: true, + Description: "Specifies the fallback action.", + Type: schema.TypeString, + }, + "return_error_response_code_based": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SAME_AS_RECEIVED", "408", "500", "502", "504", "SPECIFY_YOUR_OWN"}, false)), + Optional: true, + Description: "Specifies the error to include in the response to the client.", + Type: schema.TypeString, + }, + "specify_your_own_response_code_based": { + ValidateDiagFunc: validateRegexOrVariable("^\\d{3}$"), + Optional: true, + Description: "Defines a custom error response.", + Type: schema.TypeString, + }, + }, + }, + }, + "adaptive_acceleration": { + Optional: true, + Type: schema.TypeList, + Description: "Adaptive Acceleration uses HTTP/2 server push functionality with Ion properties to pre-position content and improve the performance of HTML page loading based on real user monitoring (RUM) timing data. It also helps browsers to preconnect to content that’s likely needed for upcoming requests. To use this behavior, make sure you enable the `http2` behavior. Use the `Adaptive Acceleration API` to report on the set of assets this feature optimizes. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "source": { + Optional: true, + Description: "The source Adaptive Acceleration uses to gather the real user monitoring timing data, either `mPulse` or `realUserMonitoring`. The recommended `mPulse` option supports all optimizations and requires the `mPulse` behavior added by default to new Ion properties. The classic `realUserMonitoring` method has been deprecated. If you set it as the data source, make sure you use it with the `realUserMonitoring` behavior.", + Type: schema.TypeString, + }, + "title_http2_server_push": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "enable_push": { + Optional: true, + Description: "Recognizes resources like JavaScript, CSS, and images based on gathered timing data and sends these resources to a browser as it's waiting for a response to the initial request for your website or app. See `Automatic Server Push` for more information.", + Type: schema.TypeBool, + }, + "title_preconnect": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "enable_preconnect": { + Optional: true, + Description: "Allows browsers to anticipate what connections your site needs, and establishes those connections ahead of time. See `Automatic Preconnect` for more information.", + Type: schema.TypeBool, + }, + "title_preload": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "preload_enable": { + Optional: true, + Description: "Allows browsers to preload necessary fonts before they fetch and process other resources. See `Automatic Font Preload` for more information.", + Type: schema.TypeBool, + }, + "ab_testing": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "ab_logic": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"DISABLED", "CLOUDLETS", "MANUAL"}, false)), + Optional: true, + Description: "Specifies whether to use Adaptive Acceleration in an A/B testing environment. To include Adaptive Acceleration data in your A/B testing, specify the mode you want to apply. Otherwise, `DISABLED` by default. See `Add A/B testing to A2` for details.", + Type: schema.TypeString, + }, + "cookie_name": { + Optional: true, + Description: "This specifies the name of the cookie file used for redirecting the requests in the A/B testing environment.", + Type: schema.TypeString, + }, + "compression": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "title_ro": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "enable_ro": { + Optional: true, + Description: "Enables the Resource Optimizer, which automates the compression and delivery of your `.css`, `.js`, and `.svg` content using a combination of Brotli and Zopfli compressions. The compression is performed offline, during a time to live that the feature automatically sets. See the `resourceOptimizer` and `resourceOptimizerExtendedCompatibility` behaviors for more details.", + Type: schema.TypeBool, + }, + "title_brotli": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "enable_brotli_compression": { + Optional: true, + Description: "Applies Brotli compression, converting your origin content to cache on edge servers.", + Type: schema.TypeBool, + }, + "enable_for_noncacheable": { + Optional: true, + Description: "Applies Brotli compression to non-cacheable content.", + Type: schema.TypeBool, + }, + }, + }, + }, + "adaptive_image_compression": { + Optional: true, + Type: schema.TypeList, + Description: "The Adaptive Image Compression feature compresses JPEG images depending on the requesting network's performance, thus improving response time. The behavior specifies three performance tiers based on round-trip tests: 1 for excellent, 2 for good, and 3 for poor. It assigns separate performance criteria for mobile (cellular) and non-mobile networks, which the `compressMobile` and `compressStandard` options enable independently. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "title_aic_mobile": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "compress_mobile": { + Optional: true, + Description: "Adapts images served over cellular mobile networks.", + Type: schema.TypeBool, + }, + "tier1_mobile_compression_method": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"COMPRESS", "BYPASS", "STRIP"}, false)), + Optional: true, + Description: "Specifies tier-1 behavior.", + Type: schema.TypeString, + }, + "tier1_mobile_compression_value": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(0, 100)), + Optional: true, + Description: "Specifies the compression percentage.", + Type: schema.TypeInt, + }, + "tier2_mobile_compression_method": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"COMPRESS", "BYPASS", "STRIP"}, false)), + Optional: true, + Description: "Specifies tier-2 cellular-network behavior.", + Type: schema.TypeString, + }, + "tier2_mobile_compression_value": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(0, 100)), + Optional: true, + Description: "Specifies the compression percentage.", + Type: schema.TypeInt, + }, + "tier3_mobile_compression_method": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"COMPRESS", "BYPASS", "STRIP"}, false)), + Optional: true, + Description: "Specifies tier-3 cellular-network behavior.", + Type: schema.TypeString, + }, + "tier3_mobile_compression_value": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(0, 100)), + Optional: true, + Description: "Specifies the compression percentage.", + Type: schema.TypeInt, + }, + "title_aic_nonmobile": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "compress_standard": { + Optional: true, + Description: "Adapts images served over non-cellular networks.", + Type: schema.TypeBool, + }, + "tier1_standard_compression_method": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"COMPRESS", "BYPASS", "STRIP"}, false)), + Optional: true, + Description: "Specifies tier-1 non-cellular network behavior.", + Type: schema.TypeString, + }, + "tier1_standard_compression_value": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(0, 100)), + Optional: true, + Description: "Specifies the compression percentage.", + Type: schema.TypeInt, + }, + "tier2_standard_compression_method": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"COMPRESS", "BYPASS", "STRIP"}, false)), + Optional: true, + Description: "Specifies tier-2 non-cellular network behavior.", + Type: schema.TypeString, + }, + "tier2_standard_compression_value": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(0, 100)), + Optional: true, + Description: "Specifies the compression percentage.", + Type: schema.TypeInt, + }, + "tier3_standard_compression_method": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"COMPRESS", "BYPASS", "STRIP"}, false)), + Optional: true, + Description: "Specifies tier-3 non-cellular network behavior.", + Type: schema.TypeString, + }, + "tier3_standard_compression_value": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(0, 100)), + Optional: true, + Description: "Specifies the compression percentage.", + Type: schema.TypeInt, + }, + }, + }, + }, + "advanced": { + Optional: true, + Type: schema.TypeList, + Description: "This specifies Akamai XML metadata. It can only be configured on your behalf by Akamai Professional Services. This behavior is for internal usage only. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "description": { + Optional: true, + Description: "Human-readable description of what the XML block does.", + Type: schema.TypeString, + }, + "xml": { + Optional: true, + Description: "Akamai XML metadata.", + Type: schema.TypeString, + }, + }, + }, + }, + "aggregated_reporting": { + Optional: true, + Type: schema.TypeList, + Description: "Configure a custom report that collects traffic data. The data is based on one to four variables, such as `sum`, `average`, `min`, and `max`. These aggregation attributes help compile traffic data summaries. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables aggregated reporting.", + Type: schema.TypeBool, + }, + "report_name": { + Optional: true, + Description: "The unique name of the aggregated report within the property. If you reconfigure any attributes or variables in the aggregated reporting behavior, update this field to a unique value to enable logging data in a new instance of the report.", + Type: schema.TypeString, + }, + "attributes_count": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(1, 4)), + Optional: true, + Description: "The number of attributes to include in the report, ranging from 1 to 4.", + Type: schema.TypeInt, + }, + "attribute1": { + Optional: true, + Description: "Specify a previously user-defined variable name as a report attribute. The values extracted for all attributes range from 0 to 20 characters.", + Type: schema.TypeString, + }, + "attribute2": { + Optional: true, + Description: "Specify a previously user-defined variable name as a report attribute. The values extracted for all attributes range from 0 to 20 characters.", + Type: schema.TypeString, + }, + "attribute3": { + Optional: true, + Description: "Specify a previously user-defined variable name as a report attribute. The values extracted for all attributes range from 0 to 20 characters.", + Type: schema.TypeString, + }, + "attribute4": { + Optional: true, + Description: "Specify a previously user-defined variable name as a report attribute. The values extracted for all attributes range from 0 to 20 characters.", + Type: schema.TypeString, + }, + }, + }, + }, + "akamaizer": { + Optional: true, + Type: schema.TypeList, + Description: "This allows you to run regular expression substitutions over web pages. To apply this behavior, you need to match on a `contentType`. Contact Akamai Professional Services for help configuring the Akamaizer. See also the `akamaizerTag` behavior. This behavior is for internal usage only. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the Akamaizer behavior.", + Type: schema.TypeBool, + }, + }, + }, + }, + "akamaizer_tag": { + Optional: true, + Type: schema.TypeList, + Description: "This specifies HTML tags and replacement rules for hostnames used in conjunction with the `akamaizer` behavior. Contact Akamai Professional Services for help configuring the Akamaizer. This behavior is for internal usage only. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "match_hostname": { + Optional: true, + Description: "Specifies the hostname to match on as a Perl-compatible regular expression.", + Type: schema.TypeString, + }, + "replacement_hostname": { + Optional: true, + Description: "Specifies the replacement hostname for the tag to use.", + Type: schema.TypeString, + }, + "scope": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ATTRIBUTE", "URL_ATTRIBUTE", "BLOCK", "PAGE"}, false)), + Optional: true, + Description: "Specifies the part of HTML content the `tagsAttribute` refers to.", + Type: schema.TypeString, + }, + "tags_attribute": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"A", "A_HREF", "IMG", "IMG_SRC", "SCRIPT", "SCRIPT_SRC", "LINK", "LINK_HREF", "TD", "TD_BACKGROUND", "TABLE", "TABLE_BACKGROUND", "IFRAME", "IFRAME_SRC", "AREA", "AREA_HREF", "BASE", "BASE_HREF", "FORM", "FORM_ACTION"}, false)), + Optional: true, + Description: "Specifies the tag or tag/attribute combination to operate on.", + Type: schema.TypeString, + }, + "replace_all": { + Optional: true, + Description: "Replaces all matches when enabled, otherwise replaces only the first match.", + Type: schema.TypeBool, + }, + "include_tags_attribute": { + Optional: true, + Description: "Whether to include the `tagsAttribute` value.", + Type: schema.TypeBool, + }, + }, + }, + }, + "all_http_in_cache_hierarchy": { + Optional: true, + Type: schema.TypeList, + Description: "Allow all HTTP request methods to be used for the edge's parent servers, useful to implement features such as `Site Shield`, `SureRoute`, and Tiered Distribution. (See the `siteShield`, `sureRoute`, and `tieredDistribution` behaviors.) This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables all HTTP requests for parent servers in the cache hierarchy.", + Type: schema.TypeBool, + }, + }, + }, + }, + "allow_cloudlets_origins": { + Optional: true, + Type: schema.TypeList, + Description: "Allows Cloudlets Origins to determine the criteria, separately from the Property Manager, under which alternate `origin` definitions are assigned. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Allows you to assign custom origin definitions referenced in sub-rules by `cloudletsOrigin` labels. If disabled, all sub-rules are ignored.", + Type: schema.TypeBool, + }, + "honor_base_directory": { + Optional: true, + Description: "Prefixes any Cloudlet-generated origin path with a path defined by an Origin Base Path behavior. If no path is defined, it has no effect. If another Cloudlet policy already prepends the same Origin Base Path, the path is not duplicated.", + Type: schema.TypeBool, + }, + "purge_origin_query_parameter": { + ValidateDiagFunc: validateRegexOrVariable("^[^:/?#\\[\\]@&]+$"), + Optional: true, + Description: "When purging content from a Cloudlets Origin, this specifies a query parameter name whose value is the specific named origin to purge. Note that this only applies to content purge requests, for example when using the `Content Control Utility API`.", + Type: schema.TypeString, + }, + }, + }, + }, + "allow_delete": { + Optional: true, + Type: schema.TypeList, + Description: "Allow HTTP requests using the DELETE method. By default, GET, HEAD, and OPTIONS requests are allowed, and all other methods result in a 501 error. Such content does not cache, and any DELETE requests pass to the origin. See also the `allowOptions`, `allowPatch`, `allowPost`, and `allowPut` behaviors. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Allows DELETE requests. Content does `not` cache.", + Type: schema.TypeBool, + }, + "allow_body": { + Optional: true, + Description: "Allows data in the body of the DELETE request.", + Type: schema.TypeBool, + }, + }, + }, + }, + "allow_https_cache_key_sharing": { + Optional: true, + Type: schema.TypeList, + Description: "HTTPS cache key sharing allows HTTP requests to be served from an HTTPS cache. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables HTTPS cache key sharing.", + Type: schema.TypeBool, + }, + }, + }, + }, + "allow_https_downgrade": { + Optional: true, + Type: schema.TypeList, + Description: "Passes HTTPS requests to origin as HTTP. This is useful when incorporating Standard TLS or Akamai's shared certificate delivery security with an origin that serves HTTP traffic. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Downgrades to HTTP protocol for the origin server.", + Type: schema.TypeBool, + }, + }, + }, + }, + "allow_options": { + Optional: true, + Type: schema.TypeList, + Description: "GET, HEAD, and OPTIONS requests are allowed by default. All other HTTP methods result in a 501 error. For full support of Cross-Origin Resource Sharing (CORS), you need to allow requests that use the OPTIONS method. If you're using the `corsSupport` behavior, do not disable OPTIONS requests. The response to an OPTIONS request is not cached, so the request always goes through the Akamai network to your origin, unless you use the `constructResponse` behavior to send responses directly from the Akamai network. See also the `allowDelete`, `allowPatch`, `allowPost`, and `allowPut` behaviors. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Set this to `true` to reflect the default policy where edge servers allow the OPTIONS method, without caching the response. Set this to `false` to deny OPTIONS requests and respond with a 501 error.", + Type: schema.TypeBool, + }, + }, + }, + }, + "allow_patch": { + Optional: true, + Type: schema.TypeList, + Description: "Allow HTTP requests using the PATCH method. By default, GET, HEAD, and OPTIONS requests are allowed, and all other methods result in a 501 error. Such content does not cache, and any PATCH requests pass to the origin. See also the `allowDelete`, `allowOptions`, `allowPost`, and `allowPut` behaviors. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Allows PATCH requests. Content does `not` cache.", + Type: schema.TypeBool, + }, + }, + }, + }, + "allow_post": { + Optional: true, + Type: schema.TypeList, + Description: "Allow HTTP requests using the POST method. By default, GET, HEAD, and OPTIONS requests are allowed, and POST requests are denied with 403 error. All other methods result in a 501 error. See also the `allowDelete`, `allowOptions`, `allowPatch`, and `allowPut` behaviors. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Allows POST requests.", + Type: schema.TypeBool, + }, + "allow_without_content_length": { + Optional: true, + Description: "By default, POST requests also require a `Content-Length` header, or they result in a 411 error. With this option enabled with no specified `Content-Length`, the edge server relies on a `Transfer-Encoding` header to chunk the data. If neither header is present, it assumes the request has no body, and it adds a header with a `0` value to the forward request.", + Type: schema.TypeBool, + }, + }, + }, + }, + "allow_put": { + Optional: true, + Type: schema.TypeList, + Description: "Allow HTTP requests using the PUT method. By default, GET, HEAD, and OPTIONS requests are allowed, and all other methods result in a 501 error. Such content does not cache, and any PUT requests pass to the origin. See also the `allowDelete`, `allowOptions`, `allowPatch`, and `allowPost` behaviors. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Allows PUT requests. Content does `not` cache.", + Type: schema.TypeBool, + }, + }, + }, + }, + "allow_transfer_encoding": { + Optional: true, + Type: schema.TypeList, + Description: "Controls whether to allow or deny Chunked Transfer Encoding (CTE) requests to pass to your origin. If your origin supports CTE, you should enable this behavior. This behavior also protects against a known issue when pairing `http2` and `webdav` behaviors within the same rule tree, in which case it's required. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Allows Chunked Transfer Encoding requests.", + Type: schema.TypeBool, + }, + }, + }, + }, + "alt_svc_header": { + Optional: true, + Type: schema.TypeList, + Description: "Sets the maximum age value for the Alternative Services (`Alt-Svc`) header. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "max_age": { + Optional: true, + Description: "Specifies the `max-age` value in seconds for the `Alt-Svc` header. The default `max-age` for an `Alt-Svc` header is 93600 seconds (26 hours).", + Type: schema.TypeInt, + }, + }, + }, + }, + "api_prioritization": { + Optional: true, + Type: schema.TypeList, + Description: "Enables the API Prioritization Cloudlet, which maintains continuity in user experience by serving an alternate static response when load is too high. You can configure rules using either the Cloudlets Policy Manager application or the `Cloudlets API`. Use this feature serve static API content, such as fallback JSON data. To serve non-API HTML content, use the `visitorPrioritization` behavior. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Activates the API Prioritization feature.", + Type: schema.TypeBool, + }, + "is_shared_policy": { + Optional: true, + Description: "Whether you want to apply the Cloudlet shared policy to an unlimited number of properties within your account. Learn more about shared policies and how to create them in `Cloudlets Policy Manager`.", + Type: schema.TypeBool, + }, + "cloudlet_policy": { + Optional: true, + Description: "Identifies the Cloudlet policy.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "name": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "cloudlet_shared_policy": { + Optional: true, + Description: "Identifies the Cloudlet shared policy to use with this behavior. Use the `Cloudlets API` to list available shared policies.", + Type: schema.TypeInt, + }, + "label": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-*\\.]+$"), + Optional: true, + Description: "A label to distinguish this API Prioritization policy from any others in the same property.", + Type: schema.TypeString, + }, + "use_throttled_cp_code": { + Optional: true, + Description: "Specifies whether to apply an alternative CP code for requests served the alternate response.", + Type: schema.TypeBool, + }, + "throttled_cp_code": { + Optional: true, + Description: "Specifies the CP code as an object. You only need to provide the initial `id`, stripping any `cpc_` prefix to pass the integer to the rule tree. Additional CP code details may reflect back in subsequent read-only data.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "name": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "created_date": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "description": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "products": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "cp_code_limits": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "current_capacity": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "limit": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "limit_type": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + }, + }, + }, + "use_throttled_status_code": { + Optional: true, + Description: "Allows you to assign a specific HTTP response code to a throttled request.", + Type: schema.TypeBool, + }, + "throttled_status_code": { + ValidateDiagFunc: validateRegexOrVariable("^\\d{3}$"), + Optional: true, + Description: "Specifies the HTTP response code for requests that receive the alternate response.", + Type: schema.TypeInt, + }, + "net_storage": { + Optional: true, + Description: "Specify the NetStorage domain that contains the alternate response.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cp_code": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "download_domain_name": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "g2o_token": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "net_storage_path": { + ValidateDiagFunc: validateRegexOrVariable("^[^#\\[\\]@]+$"), + Optional: true, + Description: "Specify the full NetStorage path for the alternate response, including trailing file name.", + Type: schema.TypeString, + }, + "alternate_response_cache_ttl": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(5, 30)), + Optional: true, + Description: "Specifies the alternate response's time to live in the cache, `5` minutes by default.", + Type: schema.TypeInt, + }, + }, + }, + }, + "application_load_balancer": { + Optional: true, + Type: schema.TypeList, + Description: "Enables the Application Load Balancer Cloudlet, which automates load balancing based on configurable criteria. To configure this behavior, use either the Cloudlets Policy Manager or the `Cloudlets API` to set up a policy. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Activates the Application Load Balancer Cloudlet.", + Type: schema.TypeBool, + }, + "cloudlet_policy": { + Optional: true, + Description: "Identifies the Cloudlet policy.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "name": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "label": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-*\\.]+$"), + Optional: true, + Description: "A label to distinguish this Application Load Balancer policy from any others within the same property.", + Type: schema.TypeString, + }, + "stickiness_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "stickiness_cookie_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"NONE", "NEVER", "ON_BROWSER_CLOSE", "FIXED_DATE", "DURATION", "ORIGIN_SESSION"}, false)), + Optional: true, + Description: "Determines how a cookie persistently associates the client with a load-balanced origin.", + Type: schema.TypeString, + }, + "stickiness_expiration_date": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+$"), + Optional: true, + Description: "Specifies when the cookie expires.", + Type: schema.TypeString, + }, + "stickiness_duration": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+[DdHhMmSs]$"), + Optional: true, + Description: "Sets how long it is before the cookie expires.", + Type: schema.TypeString, + }, + "stickiness_refresh": { + Optional: true, + Description: "Extends the duration of the cookie with each new request. When enabled, the `DURATION` thus specifies the latency between requests that would cause the cookie to expire.", + Type: schema.TypeBool, + }, + "origin_cookie_name": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-*\\.]+$"), + Optional: true, + Description: "Specifies the name for your session cookie.", + Type: schema.TypeString, + }, + "specify_stickiness_cookie_domain": { + Optional: true, + Description: "Specifies whether to use a cookie domain with the stickiness cookie, to tell the browser to which domain to send the cookie.", + Type: schema.TypeBool, + }, + "stickiness_cookie_domain": { + ValidateDiagFunc: validateRegexOrVariable("^([a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})(\\.[a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})+$"), + Optional: true, + Description: "Specifies the domain to track the stickiness cookie.", + Type: schema.TypeString, + }, + "stickiness_cookie_automatic_salt": { + Optional: true, + Description: "Sets whether to assign a `salt` value automatically to the cookie to prevent manipulation by the user. You should not enable this if sharing the population cookie across more than one property.", + Type: schema.TypeBool, + }, + "stickiness_cookie_salt": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-*\\.]+$"), + Optional: true, + Description: "Specifies the stickiness cookie's salt value. Use this option to share the cookie across many properties.", + Type: schema.TypeString, + }, + "stickiness_cookie_set_http_only_flag": { + Optional: true, + Description: "Ensures the cookie is transmitted only over HTTP.", + Type: schema.TypeBool, + }, + "all_down_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "all_down_net_storage": { + Optional: true, + Description: "Specifies a NetStorage account for a static maintenance page as a fallback when no origins are available.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cp_code": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "download_domain_name": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "g2o_token": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "all_down_net_storage_file": { + ValidateDiagFunc: validateRegexOrVariable("^[^#\\[\\]@]+$"), + Optional: true, + Description: "Specifies the fallback maintenance page's filename, expressed as a full path from the root of the NetStorage server.", + Type: schema.TypeString, + }, + "all_down_status_code": { + ValidateDiagFunc: validateRegexOrVariable("^\\d{3}$"), + Optional: true, + Description: "Specifies the HTTP response code when all load-balancing origins are unavailable.", + Type: schema.TypeString, + }, + "failover_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "failover_status_codes": { + Optional: true, + Description: "Specifies a set of HTTP status codes that signal a failure on the origin, in which case the cookie that binds the client to that origin is invalidated and the client is rerouted to another available origin.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "failover_mode": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"AUTOMATIC", "MANUAL", "DISABLED"}, false)), + Optional: true, + Description: "Determines what to do if an origin fails.", + Type: schema.TypeString, + }, + "failover_origin_map": { + Optional: true, + Description: "Specifies a fixed set of failover mapping rules.", + Type: schema.TypeList, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "from_origin_id": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-\\.]+$"), + Optional: true, + Description: "Specifies the origin whose failure triggers the mapping rule.", + Type: schema.TypeString, + }, + "to_origin_ids": { + Optional: true, + Description: "Requests stuck to the `fromOriginId` origin retry for each alternate origin `toOriginIds`, until one succeeds.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }, + }, + }, + "failover_attempts_threshold": { + Optional: true, + Description: "Sets the number of failed requests that would trigger the failover process.", + Type: schema.TypeInt, + }, + "cached_content_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "allow_cache_prefresh": { + Optional: true, + Description: "Allows the cache to prefresh. Only appropriate if all origins serve the same content for the same URL.", + Type: schema.TypeBool, + }, + }, + }, + }, + "audience_segmentation": { + Optional: true, + Type: schema.TypeList, + Description: "Allows you to divide your users into different segments based on a persistent cookie. You can configure rules using either the Cloudlets Policy Manager application or the `Cloudlets API`. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the Audience Segmentation cloudlet feature.", + Type: schema.TypeBool, + }, + "is_shared_policy": { + Optional: true, + Description: "Whether you want to use a shared policy for a Cloudlet. Learn more about shared policies and how to create them in `Cloudlets Policy Manager`.", + Type: schema.TypeBool, + }, + "cloudlet_policy": { + Optional: true, + Description: "Identifies the Cloudlet policy.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "name": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "cloudlet_shared_policy": { + Optional: true, + Description: "This identifies the Cloudlet shared policy to use with this behavior. You can list available shared policies with the `Cloudlets API`.", + Type: schema.TypeInt, + }, + "label": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-*\\.]+$"), + Optional: true, + Description: "Specifies a suffix to append to the cookie name. This helps distinguish this audience segmentation policy from any others within the same property.", + Type: schema.TypeString, + }, + "segment_tracking_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "segment_tracking_method": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IN_QUERY_PARAM", "IN_COOKIE_HEADER", "IN_CUSTOM_HEADER", "NONE"}, false)), + Optional: true, + Description: "Specifies the method to pass segment information to the origin. The Cloudlet passes the rule applied to a given request location.", + Type: schema.TypeString, + }, + "segment_tracking_query_param": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-*\\.]+$"), + Optional: true, + Description: "This query parameter specifies the name of the segmentation rule.", + Type: schema.TypeString, + }, + "segment_tracking_cookie_name": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-*\\.]+$"), + Optional: true, + Description: "This cookie name specifies the name of the segmentation rule.", + Type: schema.TypeString, + }, + "segment_tracking_custom_header": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-*\\.]+$"), + Optional: true, + Description: "This custom HTTP header specifies the name of the segmentation rule.", + Type: schema.TypeString, + }, + "population_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "population_cookie_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"NEVER", "ON_BROWSER_CLOSE", "DURATION"}, false)), + Optional: true, + Description: "Specifies when the segmentation cookie expires.", + Type: schema.TypeString, + }, + "population_duration": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+[DdHhMmSs]$"), + Optional: true, + Description: "Specifies the lifetime of the segmentation cookie.", + Type: schema.TypeString, + }, + "population_refresh": { + Optional: true, + Description: "If disabled, sets the expiration time only if the cookie is not yet present in the request.", + Type: schema.TypeBool, + }, + "specify_population_cookie_domain": { + Optional: true, + Description: "Whether to specify a cookie domain with the population cookie. It tells the browser to which domain to send the cookie.", + Type: schema.TypeBool, + }, + "population_cookie_domain": { + ValidateDiagFunc: validateRegexOrVariable("^([a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})(\\.[a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})+$"), + Optional: true, + Description: "Specifies the domain to track the population cookie.", + Type: schema.TypeString, + }, + "population_cookie_automatic_salt": { + Optional: true, + Description: "Whether to assign a `salt` value automatically to the cookie to prevent manipulation by the user. You should not enable if sharing the population cookie across more than one property.", + Type: schema.TypeBool, + }, + "population_cookie_salt": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-*\\.]+$"), + Optional: true, + Description: "Specifies the cookie's salt value. Use this option to share the cookie across many properties.", + Type: schema.TypeString, + }, + "population_cookie_include_rule_name": { + Optional: true, + Description: "When enabled, includes in the session cookie the name of the rule in which this behavior appears.", + Type: schema.TypeBool, + }, + }, + }, + }, + "auto_domain_validation": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior allows standard TLS domain validated certificates to renew automatically. Apply it after using the `Certificate Provisioning System` to request a certificate for a hostname. To provision certificates programmatically, see the `Certificate Provisioning System API`. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "autodv": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + "base_directory": { + Optional: true, + Type: schema.TypeList, + Description: "Prefix URLs sent to the origin with a base path. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "value": { + ValidateDiagFunc: validateRegexOrVariable("^/([^:#\\[\\]@/?]+/)*$"), + Optional: true, + Description: "Specifies the base path of content on your origin server. The value needs to begin and end with a slash (`/`) character, for example `/parent/child/`.", + Type: schema.TypeString, + }, + }, + }, + }, + "boss_beaconing": { + Optional: true, + Type: schema.TypeList, + Description: "Triggers diagnostic data beacons for use with BOSS, Akamai's monitoring and diagnostics system. This behavior is for internal usage only. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enable diagnostic data beacons.", + Type: schema.TypeBool, + }, + "cpcodes": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9 ]*$"), + Optional: true, + Description: "The space-separated list of CP codes that trigger the beacons. You need to specify the same set of CP codes within BOSS.", + Type: schema.TypeString, + }, + "request_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"EDGE", "EDGE_MIDGRESS"}, false)), + Optional: true, + Description: "Specify when to trigger a beacon.", + Type: schema.TypeString, + }, + "forward_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"MIDGRESS", "ORIGIN", "MIDGRESS_ORIGIN"}, false)), + Optional: true, + Description: "Specify when to trigger a beacon.", + Type: schema.TypeString, + }, + "sampling_frequency": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SAMPLING_FREQ_0_0", "SAMPLING_FREQ_0_1"}, false)), + Optional: true, + Description: "Specifies a sampling frequency or disables beacons.", + Type: schema.TypeString, + }, + "conditional_sampling_frequency": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"CONDITIONAL_SAMPLING_FREQ_0_0", "CONDITIONAL_SAMPLING_FREQ_0_1", "CONDITIONAL_SAMPLING_FREQ_0_2", "CONDITIONAL_SAMPLING_FREQ_0_3"}, false)), + Optional: true, + Description: "Specifies a conditional sampling frequency or disables beacons.", + Type: schema.TypeString, + }, + "conditional_http_status": { + Optional: true, + Description: "Specifies the set of response status codes or ranges that trigger the beacon.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "conditional_error_pattern": { + Optional: true, + Description: "A space-separated set of error patterns that trigger beacons to conditional feeds. Each pattern can include wildcards, where `?` matches a single character and `*` matches zero or more characters. For example, `*CONNECT* *DENIED*` matches two different words as substrings.", + Type: schema.TypeString, + }, + }, + }, + }, + "breadcrumbs": { + Optional: true, + Type: schema.TypeList, + Description: "Provides per-HTTP transaction visibility into a request for content, regardless of how deep the request goes into the Akamai platform. The `Akamai-Request-BC` response header includes various data, such as network health and the location in the Akamai network used to serve content, which simplifies log review for troubleshooting. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the Breadcrumbs feature.", + Type: schema.TypeBool, + }, + "opt_mode": { + Optional: true, + Description: "Specifies whether to include Breadcrumbs data in the response header. To bypass the current `optMode`, append the opposite `ak-bc` query string to each request from your player.", + Type: schema.TypeBool, + }, + "logging_enabled": { + Optional: true, + Description: "Whether to collect all Breadcrumbs data in logs, including the response headers sent a requesting client. This can also be helpful if you're using `DataStream 2` to retrieve log data. This way, all Breadcrumbs data is carried in the logs it uses.", + Type: schema.TypeBool, + }, + }, + }, + }, + "break_connection": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior simulates an origin connection problem, typically to test an accompanying `failAction` policy. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the break connection behavior.", + Type: schema.TypeBool, + }, + }, + }, + }, + "brotli": { + Optional: true, + Type: schema.TypeList, + Description: "Accesses Brotli-compressed assets from your origin and caches them on edge servers. This doesn't compress resources within the content delivery network in real time. You need to set up Brotli compression separately on your origin. If a requesting client doesn't support Brotli, edge servers deliver non-Brotli resources. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Fetches Brotli-compressed assets from your origin and caches them on edge servers.", + Type: schema.TypeBool, + }, + }, + }, + }, + "cache_error": { + Optional: true, + Type: schema.TypeList, + Description: "Caches the origin's error responses to decrease server load. Applies for 10 seconds by default to the following HTTP codes: `204`, `305`, `404`, `405`, `501`, `502`, `503`, `504`, and `505`. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Activates the error-caching behavior.", + Type: schema.TypeBool, + }, + "ttl": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+[DdHhMmSs]$"), + Optional: true, + Description: "Overrides the default caching duration of `10s`. Note that if set to `0`, it is equivalent to `no-cache`, which forces revalidation and may cause a traffic spike. This can be counterproductive when, for example, the origin is producing an error code of `500`.", + Type: schema.TypeString, + }, + "preserve_stale": { + Optional: true, + Description: "When enabled, the edge server preserves stale cached objects when the origin returns `500`, `502`, `503`, and `504` error codes. This avoids re-fetching and re-caching content after transient errors.", + Type: schema.TypeBool, + }, + }, + }, + }, + "cache_id": { + Optional: true, + Type: schema.TypeList, + Description: "Controls which query parameters, headers, and cookies are included in or excluded from the cache key identifier. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "rule": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"INCLUDE_QUERY_PARAMS", "INCLUDE_COOKIES", "INCLUDE_HEADERS", "EXCLUDE_QUERY_PARAMS", "INCLUDE_ALL_QUERY_PARAMS", "INCLUDE_VARIABLE", "INCLUDE_URL"}, false)), + Optional: true, + Description: "Specifies how to modify the cache ID.", + Type: schema.TypeString, + }, + "include_value": { + Optional: true, + Description: "Includes the value of the specified elements in the cache ID. Otherwise only their names are included.", + Type: schema.TypeBool, + }, + "optional": { + Optional: true, + Description: "Requires the behavior's specified elements to be present for content to cache. When disabled, requests that lack the specified elements are still cached.", + Type: schema.TypeBool, + }, + "elements": { + Optional: true, + Description: "Specifies the names of the query parameters, cookies, or headers to include or exclude from the cache ID.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "variable_name": { + Optional: true, + Description: "Specifies the name of the variable you want to include in the cache key.", + Type: schema.TypeString, + }, + }, + }, + }, + "cache_key_ignore_case": { + Optional: true, + Type: schema.TypeList, + Description: "By default, cache keys are generated under the assumption that path and filename components are case-sensitive, so that `File.html` and `file.html` use separate cache keys. Enabling this behavior forces URL components whose case varies to resolve to the same cache key. Enable this behavior if your origin server is already case-insensitive, such as those based on Microsoft IIS. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Ignores case when forming cache keys.", + Type: schema.TypeBool, + }, + }, + }, + }, + "cache_key_query_params": { + Optional: true, + Type: schema.TypeList, + Description: "By default, cache keys are formed as URLs with full query strings. This behavior allows you to consolidate cached objects based on specified sets of query parameters. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "behavior": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"INCLUDE_ALL_PRESERVE_ORDER", "INCLUDE_ALL_ALPHABETIZE_ORDER", "IGNORE_ALL", "INCLUDE", "IGNORE"}, false)), + Optional: true, + Description: "Configures how sets of query string parameters translate to cache keys. Be careful not to ignore any parameters that result in substantially different content, as it is `not` reflected in the cached object.", + Type: schema.TypeString, + }, + "parameters": { + Optional: true, + Description: "Specifies the set of parameter field names to include in or exclude from the cache key. By default, these match the field names as string prefixes.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "exact_match": { + Optional: true, + Description: "When enabled, `parameters` needs to match exactly. Keep disabled to match string prefixes.", + Type: schema.TypeBool, + }, + }, + }, + }, + "cache_key_rewrite": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior rewrites a default cache key's path. Contact Akamai Professional Services for help configuring it. This behavior is for internal usage only. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "purge_key": { + ValidateDiagFunc: validateRegexOrVariable("^[\\w-]+$"), + Optional: true, + Description: "Specifies the new cache key path as an alphanumeric value.", + Type: schema.TypeString, + }, + }, + }, + }, + "cache_post": { + Optional: true, + Type: schema.TypeList, + Description: "By default, POST requests are passed to the origin. This behavior overrides the default, and allows you to cache POST responses. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables caching of POST responses.", + Type: schema.TypeBool, + }, + "use_body": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IGNORE", "MD5", "QUERY"}, false)), + Optional: true, + Description: "Define how and whether to use the POST message body as a cache key.", + Type: schema.TypeString, + }, + }, + }, + }, + "cache_redirect": { + Optional: true, + Type: schema.TypeList, + Description: "Controls the caching of HTTP 302 and 307 temporary redirects. By default, Akamai edge servers don't cache them. Enabling this behavior instructs edge servers to allow these redirects to be cached the same as HTTP 200 responses. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the redirect caching behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + "cache_tag": { + Optional: true, + Type: schema.TypeList, + Description: "This adds a cache tag to the requested object. With cache tags, you can flexibly fast purge tagged segments of your cached content. You can either define these tags with an `Edge-Cache-Tag` header at the origin server level, or use this behavior to directly add a cache tag to the object as the edge server caches it. The `cacheTag` behavior can only take a single value, including a variable. If you want to specify more tags for an object, add a few instances of this behavior to your configuration. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "tag": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9\\&\\'\\^\\-\\$\\!\\`\\#\\%\\.\\+\\~\\_\\|\\/]+$"), + Optional: true, + Description: "Specifies the cache tag you want to add to your cached content. A cache tag is only added when the object is first added to cache. A single cache tag can't exceed 128 characters and can only include alphanumeric characters, plus this class of characters: ```[!#$%'+./^_`|~-]```", + Type: schema.TypeString, + }, + }, + }, + }, + "cache_tag_visible": { + Optional: true, + Type: schema.TypeList, + Description: "Cache tags are comma-separated string values you define within an `Edge-Cache-Tag` header. You can use them to flexibly fast purge tagged segments of your cached content. You can either define these headers at the origin server level, or use the `modifyOutgoingResponseHeader` behavior to configure them at the edge. Apply this behavior to confirm you're deploying the intended set of cache tags to your content. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "behavior": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"NEVER", "PRAGMA_HEADER", "ALWAYS"}, false)), + Optional: true, + Description: "Specifies when to include the `Edge-Cache-Tag` in responses.", + Type: schema.TypeString, + }, + }, + }, + }, + "caching": { + Optional: true, + Type: schema.TypeList, + Description: "Control content caching on edge servers: whether or not to cache, whether to honor the origin's caching headers, and for how long to cache. Note that any `NO_STORE` or `BYPASS_CACHE` HTTP headers set on the origin's content override this behavior. For more details on how caching works in Property Manager, see the `Learn about caching` section in the guide. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "behavior": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"MAX_AGE", "NO_STORE", "BYPASS_CACHE", "CACHE_CONTROL_AND_EXPIRES", "CACHE_CONTROL", "EXPIRES"}, false)), + Optional: true, + Description: "Specify the caching option.", + Type: schema.TypeString, + }, + "must_revalidate": { + Optional: true, + Description: "Determines what to do once the cached content has expired, by which time the Akamai platform should have re-fetched and validated content from the origin. If enabled, only allows the re-fetched content to be served. If disabled, may serve stale content if the origin is unavailable.", + Type: schema.TypeBool, + }, + "ttl": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+[DdHhMmSs]$"), + Optional: true, + Description: "The maximum time content may remain cached. Setting the value to `0` is the same as setting a `no-cache` header, which forces content to revalidate.", + Type: schema.TypeString, + }, + "default_ttl": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+[DdHhMmSs]$"), + Optional: true, + Description: "Set the `MAX_AGE` header for the cached content.", + Type: schema.TypeString, + }, + "cache_control_directives": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "enhanced_rfc_support": { + Optional: true, + Description: "This enables honoring particular `Cache-Control` header directives from the origin. Supports all official `RFC 7234` directives except for `no-transform`.", + Type: schema.TypeBool, + }, + "cacheability_settings": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "honor_no_store": { + Optional: true, + Description: "Instructs edge servers not to cache the response when the origin response includes the `no-store` directive.", + Type: schema.TypeBool, + }, + "honor_private": { + Optional: true, + Description: "Instructs edge servers not to cache the response when the origin response includes the `private` directive.", + Type: schema.TypeBool, + }, + "honor_no_cache": { + Optional: true, + Description: "With the `no-cache` directive present in the response, this instructs edge servers to validate or refetch the response for each request. Effectively, set the time to live `ttl` to zero seconds.", + Type: schema.TypeBool, + }, + "expiration_settings": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "honor_max_age": { + Optional: true, + Description: "This instructs edge servers to cache the object for a length of time set by the `max-age` directive in the response. When present in the origin response, this directive takes precedence over the `max-age` directive and the `defaultTtl` setting.", + Type: schema.TypeBool, + }, + "honor_s_maxage": { + Optional: true, + Description: "Instructs edge servers to cache the object for a length of time set by the `s-maxage` directive in the response. When present in the origin response, this directive takes precedence over the `max-age` directive and the `defaultTtl` setting.", + Type: schema.TypeBool, + }, + "revalidation_settings": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "honor_must_revalidate": { + Optional: true, + Description: "This instructs edge servers to successfully revalidate with the origin server before using stale objects in the cache to satisfy new requests.", + Type: schema.TypeBool, + }, + "honor_proxy_revalidate": { + Optional: true, + Description: "With the `proxy-revalidate` directive present in the response, this instructs edge servers to successfully revalidate with the origin server before using stale objects in the cache to satisfy new requests.", + Type: schema.TypeBool, + }, + }, + }, + }, + "central_authorization": { + Optional: true, + Type: schema.TypeList, + Description: "Forward client requests to the origin server for authorization, along with optional `Set-Cookie` headers, useful when you need to maintain tight access control. The edge server forwards an `If-Modified-Since` header, to which the origin needs to respond with a `304` (Not-Modified) HTTP status when authorization succeeds. If so, the edge server responds to the client with the cached object, since it does not need to be re-acquired from the origin. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the centralized authorization behavior.", + Type: schema.TypeBool, + }, + }, + }, + }, + "chase_redirects": { + Optional: true, + Type: schema.TypeList, + Description: "Controls whether the edge server chases any redirects served from the origin. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Allows edge servers to chase redirects.", + Type: schema.TypeBool, + }, + "limit": { + Optional: true, + Description: "Specifies, as a string, the maximum number of redirects to follow.", + Type: schema.TypeString, + }, + "serve404": { + Optional: true, + Description: "Once the redirect `limit` is reached, enabling this option serves an HTTP `404` (Not Found) error instead of the last redirect.", + Type: schema.TypeBool, + }, + }, + }, + }, + "client_certificate_auth": { + Optional: true, + Type: schema.TypeList, + Description: "Sends a `Client-To-Edge` header to your origin server with details from the mutual TLS certificate sent from the requesting client to the edge network. This establishes transitive trust between the client and your origin server. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enable": { + Optional: true, + Description: "Constructs the `Client-To-Edge` authentication header using information from the client to edge mTLS handshake and forwards it to your origin. You can configure your origin to acknowledge the header to enable transitive trust. Some form of the client x.509 certificate needs to be included in the header. You can include the full certificate or specific attributes.", + Type: schema.TypeBool, + }, + "enable_complete_client_certificate": { + Optional: true, + Description: "Whether to include the complete client certificate in the header, in its binary (DER) format. DER-formatted certificates leave out the `BEGIN CERTIFICATE/END CERTIFICATE` statements and most often use the `.der` extension. Alternatively, you can specify individual `clientCertificateAttributes` you want included in the request.", + Type: schema.TypeBool, + }, + "client_certificate_attributes": { + Optional: true, + Description: "Specify client certificate attributes to include in the `Client-To-Edge` authentication header that's sent to your origin server.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "enable_client_certificate_validation_status": { + Optional: true, + Description: "Whether to include the current validation status of the client certificate in the `Client-To-Edge` authentication header. This verifies the validation status of the certificate, regardless of the certificate attributes you're including in the header.", + Type: schema.TypeBool, + }, + }, + }, + }, + "client_characteristics": { + Optional: true, + Type: schema.TypeList, + Description: "Specifies characteristics of the client ecosystem. Akamai uses this information to optimize your metadata configuration, which may result in better end-user performance. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "country": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"GLOBAL", "GLOBAL_US_CENTRIC", "GLOBAL_EU_CENTRIC", "GLOBAL_ASIA_CENTRIC", "EUROPE", "NORTH_AMERICA", "SOUTH_AMERICA", "NORDICS", "ASIA_PACIFIC", "AUSTRALIA", "GERMANY", "INDIA", "ITALY", "JAPAN", "TAIWAN", "UNITED_KINGDOM", "OTHER", "UNKNOWN"}, false)), + Optional: true, + Description: "Specifies the client request's geographic region.", + Type: schema.TypeString, + }, + }, + }, + }, + "cloud_interconnects": { + Optional: true, + Type: schema.TypeList, + Description: "Cloud Interconnects forwards traffic from edge servers to your cloud origin through Private Network Interconnects (PNIs), helping to reduce the egress costs at the origin. Supports origins hosted by Google Cloud Provider (GCP). This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Channels the traffic to maximize the egress discount at the origin.", + Type: schema.TypeBool, + }, + "cloud_locations": { + Optional: true, + Description: "Specifies the geographical locations of your cloud origin. You should enable Cloud Interconnects only if your origin is in one of these locations, since GCP doesn't provide a discount for egress traffic for any other regions.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }, + }, + }, + "cloud_wrapper": { + Optional: true, + Type: schema.TypeList, + Description: "`Cloud Wrapper` maximizes origin offload for large libraries of video, game, and software downloads by optimizing data caches in regions nearest to your origin. You can't use this behavior in conjunction with `sureRoute` or `tieredDistribution`. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables Cloud Wrapper behavior.", + Type: schema.TypeBool, + }, + "location": { + Optional: true, + Description: "The location you want to distribute your Cloud Wrapper cache space to. This behavior allows all locations configured in your Cloud Wrapper configuration.", + Type: schema.TypeString, + }, + }, + }, + }, + "cloud_wrapper_advanced": { + Optional: true, + Type: schema.TypeList, + Description: "Your account representative uses this behavior to implement a customized failover configuration on your behalf. Use Cloud Wrapper Advanced with an enabled `cloudWrapper` behavior in the same rule. This behavior is for internal usage only. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables failover for Cloud Wrapper.", + Type: schema.TypeBool, + }, + "failover_map": { + Optional: true, + Description: "Specifies the failover map to handle Cloud Wrapper failures. Contact your account representative for more information.", + Type: schema.TypeString, + }, + "custom_failover_map": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z][a-zA-Z0-9-]*$"), + Optional: true, + Description: "Specifies the custom failover map to handle Cloud Wrapper failures. Contact your account representative for more information.", + Type: schema.TypeString, + }, + }, + }, + }, + "common_media_client_data": { + Optional: true, + Type: schema.TypeList, + Description: "Use this behavior to send expanded playback information as CMCD metadata in requests from a media player. Edge servers may use this metadata for segment prefetching to optimize your content's delivery, or for logging. For more details and additional property requirements, see the `Adaptive Media Delivery` documentation. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enable_cmcd_segment_prefetch": { + Optional: true, + Description: "Uses Common Media Client Data (CMCD) metadata to determine the segment URLs your origin server prefetches to speed up content delivery.", + Type: schema.TypeBool, + }, + }, + }, + }, + "conditional_origin": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "origin_id": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-\\.]+$"), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "construct_response": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior constructs an HTTP response, complete with HTTP status code and body, to serve from the edge independently of your origin. For example, you might want to send a customized response if the URL doesn't point to an object on the origin server, or if the end user is not authorized to view the requested content. You can use it with all request methods you allow for your property, including POST. For more details, see the `allowOptions`, `allowPatch`, `allowPost`, `allowPut`, and `allowDelete` behaviors. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Serves the custom response.", + Type: schema.TypeBool, + }, + "body": { + Optional: true, + Description: "HTML response of up to 2000 characters to send to the end-user client.", + Type: schema.TypeString, + }, + "response_code": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntInSlice([]int{200, 404, 401, 403, 405, 417, 500, 501, 502, 503, 504})), + Optional: true, + Description: "The HTTP response code to send to the end-user client.", + Type: schema.TypeInt, + }, + "force_eviction": { + Optional: true, + Description: "For GET requests from clients, this forces edge servers to evict the underlying object from cache. Defaults to `false`.", + Type: schema.TypeBool, + }, + "ignore_purge": { + Optional: true, + Description: "Whether to ignore the custom response when purging.", + Type: schema.TypeBool, + }, + }, + }, + }, + "content_characteristics": { + Optional: true, + Type: schema.TypeList, + Description: "Specifies characteristics of the delivered content. Akamai uses this information to optimize your metadata configuration, which may result in better origin offload and end-user performance. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "object_size": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"LESS_THAN_1MB", "ONE_MB_TO_TEN_MB", "TEN_MB_TO_100_MB", "OTHER", "UNKNOWN"}, false)), + Optional: true, + Description: "Optimize based on the size of the object retrieved from the origin.", + Type: schema.TypeString, + }, + "popularity_distribution": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"LONG_TAIL", "ALL_POPULAR", "OTHER", "UNKNOWN"}, false)), + Optional: true, + Description: "Optimize based on the content's expected popularity.", + Type: schema.TypeString, + }, + "catalog_size": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SMALL", "MEDIUM", "LARGE", "EXTRA_LARGE", "OTHER", "UNKNOWN"}, false)), + Optional: true, + Description: "Optimize based on the total size of the content library delivered.", + Type: schema.TypeString, + }, + "content_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"USER_GENERATED", "WEB_OBJECTS", "SOFTWARE", "IMAGES", "OTHER_OBJECTS", "UNKNOWN"}, false)), + Optional: true, + Description: "Optimize based on the type of content.", + Type: schema.TypeString, + }, + }, + }, + }, + "content_characteristics_amd": { + Optional: true, + Type: schema.TypeList, + Description: "Specifies characteristics of the delivered content. Akamai uses this information to optimize your metadata configuration, which may result in better origin offload and end-user performance. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "catalog_size": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SMALL", "MEDIUM", "LARGE", "EXTRA_LARGE", "OTHER", "UNKNOWN"}, false)), + Optional: true, + Description: "Optimize based on the total size of the content library delivered.", + Type: schema.TypeString, + }, + "content_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SD", "HD", "ULTRA_HD", "OTHER", "UNKNOWN"}, false)), + Optional: true, + Description: "Optimize based on the quality of media content.", + Type: schema.TypeString, + }, + "popularity_distribution": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"LONG_TAIL", "ALL_POPULAR", "OTHER", "UNKNOWN"}, false)), + Optional: true, + Description: "Optimize based on the content's expected popularity.", + Type: schema.TypeString, + }, + "hls": { + Optional: true, + Description: "Enable delivery of HLS media.", + Type: schema.TypeBool, + }, + "segment_duration_hls": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SEGMENT_DURATION_2S", "SEGMENT_DURATION_4S", "SEGMENT_DURATION_6S", "SEGMENT_DURATION_8S", "SEGMENT_DURATION_10S", "OTHER"}, false)), + Optional: true, + Description: "Specifies the duration of individual segments.", + Type: schema.TypeString, + }, + "segment_duration_hls_custom": { + Optional: true, + Description: "Customizes the number of seconds for the segment.", + Type: schema.TypeFloat, + }, + "segment_size_hls": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"LESS_THAN_1MB", "ONE_MB_TO_TEN_MB", "TEN_MB_TO_100_MB", "GREATER_THAN_100MB", "UNKNOWN", "OTHER"}, false)), + Optional: true, + Description: "Specifies the size of the media object retrieved from the origin.", + Type: schema.TypeString, + }, + "hds": { + Optional: true, + Description: "Enable delivery of HDS media.", + Type: schema.TypeBool, + }, + "segment_duration_hds": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SEGMENT_DURATION_2S", "SEGMENT_DURATION_4S", "SEGMENT_DURATION_6S", "SEGMENT_DURATION_8S", "SEGMENT_DURATION_10S", "OTHER"}, false)), + Optional: true, + Description: "Specifies the duration of individual fragments.", + Type: schema.TypeString, + }, + "segment_duration_hds_custom": { + Optional: true, + Description: "Customizes the number of seconds for the fragment.", + Type: schema.TypeInt, + }, + "segment_size_hds": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"LESS_THAN_1MB", "ONE_MB_TO_TEN_MB", "TEN_MB_TO_100_MB", "GREATER_THAN_100MB", "UNKNOWN", "OTHER"}, false)), + Optional: true, + Description: "Specifies the size of the media object retrieved from the origin.", + Type: schema.TypeString, + }, + "dash": { + Optional: true, + Description: "Enable delivery of DASH media.", + Type: schema.TypeBool, + }, + "segment_duration_dash": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SEGMENT_DURATION_2S", "SEGMENT_DURATION_4S", "SEGMENT_DURATION_6S", "SEGMENT_DURATION_8S", "SEGMENT_DURATION_10S", "OTHER"}, false)), + Optional: true, + Description: "Specifies the duration of individual segments.", + Type: schema.TypeString, + }, + "segment_duration_dash_custom": { + Optional: true, + Description: "Customizes the number of seconds for the segment.", + Type: schema.TypeInt, + }, + "segment_size_dash": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"LESS_THAN_1MB", "ONE_MB_TO_TEN_MB", "TEN_MB_TO_100_MB", "GREATER_THAN_100MB", "UNKNOWN", "OTHER"}, false)), + Optional: true, + Description: "Specifies the size of the media object retrieved from the origin.", + Type: schema.TypeString, + }, + "smooth": { + Optional: true, + Description: "Enable delivery of Smooth media.", + Type: schema.TypeBool, + }, + "segment_duration_smooth": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SEGMENT_DURATION_2S", "SEGMENT_DURATION_4S", "SEGMENT_DURATION_6S", "SEGMENT_DURATION_8S", "SEGMENT_DURATION_10S", "OTHER"}, false)), + Optional: true, + Description: "Specifies the duration of individual fragments.", + Type: schema.TypeString, + }, + "segment_duration_smooth_custom": { + Optional: true, + Description: "Customizes the number of seconds for the fragment.", + Type: schema.TypeFloat, + }, + "segment_size_smooth": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"LESS_THAN_1MB", "ONE_MB_TO_TEN_MB", "TEN_MB_TO_100_MB", "GREATER_THAN_100MB", "UNKNOWN", "OTHER"}, false)), + Optional: true, + Description: "Specifies the size of the media object retrieved from the origin.", + Type: schema.TypeString, + }, + }, + }, + }, + "content_characteristics_dd": { + Optional: true, + Type: schema.TypeList, + Description: "Specifies characteristics of the delivered content. Akamai uses this information to optimize your metadata configuration, which may result in better origin offload and end-user performance. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "object_size": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"LESS_THAN_1MB", "ONE_MB_TO_TEN_MB", "TEN_MB_TO_100_MB", "GREATER_THAN_100MB", "OTHER", "UNKNOWN"}, false)), + Optional: true, + Description: "Optimize based on the size of the object retrieved from the origin.", + Type: schema.TypeString, + }, + "popularity_distribution": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"LONG_TAIL", "ALL_POPULAR", "OTHER", "UNKNOWN"}, false)), + Optional: true, + Description: "Optimize based on the content's expected popularity.", + Type: schema.TypeString, + }, + "catalog_size": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SMALL", "MEDIUM", "LARGE", "EXTRA_LARGE", "OTHER", "UNKNOWN"}, false)), + Optional: true, + Description: "Optimize based on the total size of the content library delivered.", + Type: schema.TypeString, + }, + "content_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"VIDEO", "SOFTWARE", "SOFTWARE_PATCH", "GAME", "GAME_PATCH", "OTHER_DOWNLOADS", "UNKNOWN"}, false)), + Optional: true, + Description: "Optimize based on the type of content.", + Type: schema.TypeString, + }, + "optimize_option": { + Optional: true, + Description: "Optimizes the delivery throughput and download times for large files.", + Type: schema.TypeBool, + }, + }, + }, + }, + "content_characteristics_wsd_large_file": { + Optional: true, + Type: schema.TypeList, + Description: "Specifies characteristics of the delivered content, specifically targeted to delivering large files. Akamai uses this information to optimize your metadata configuration, which may result in better origin offload and end-user performance. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "object_size": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"LESS_THAN_1MB", "ONE_MB_TO_TEN_MB", "TEN_MB_TO_100_MB", "GREATER_THAN_100MB", "UNKNOWN"}, false)), + Optional: true, + Description: "Optimize based on the size of the object retrieved from the origin.", + Type: schema.TypeString, + }, + "popularity_distribution": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"LONG_TAIL", "ALL_POPULAR", "UNKNOWN"}, false)), + Optional: true, + Description: "Optimize based on the content's expected popularity.", + Type: schema.TypeString, + }, + "catalog_size": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SMALL", "MEDIUM", "LARGE", "EXTRA_LARGE", "UNKNOWN"}, false)), + Optional: true, + Description: "Optimize based on the total size of the content library delivered.", + Type: schema.TypeString, + }, + "content_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"VIDEO", "SOFTWARE", "SOFTWARE_PATCH", "GAME", "GAME_PATCH", "OTHER_DOWNLOADS", "UNKNOWN"}, false)), + Optional: true, + Description: "Optimize based on the type of content.", + Type: schema.TypeString, + }, + }, + }, + }, + "content_characteristics_wsd_live": { + Optional: true, + Type: schema.TypeList, + Description: "Specifies characteristics of the delivered content, specifically targeted to delivering live video. Akamai uses this information to optimize your metadata configuration, which may result in better origin offload and end-user performance. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "catalog_size": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SMALL", "MEDIUM", "LARGE", "EXTRA_LARGE", "UNKNOWN"}, false)), + Optional: true, + Description: "Optimize based on the total size of the content library delivered.", + Type: schema.TypeString, + }, + "content_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SD", "HD", "ULTRA_HD", "OTHER", "UNKNOWN"}, false)), + Optional: true, + Description: "Optimize based on the quality of media content.", + Type: schema.TypeString, + }, + "popularity_distribution": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"LONG_TAIL", "ALL_POPULAR", "UNKNOWN"}, false)), + Optional: true, + Description: "Optimize based on the content's expected popularity.", + Type: schema.TypeString, + }, + "hls": { + Optional: true, + Description: "Enable delivery of HLS media.", + Type: schema.TypeBool, + }, + "segment_duration_hls": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SEGMENT_DURATION_2S", "SEGMENT_DURATION_4S", "SEGMENT_DURATION_6S", "SEGMENT_DURATION_8S", "SEGMENT_DURATION_10S"}, false)), + Optional: true, + Description: "Specifies the duration of individual segments.", + Type: schema.TypeString, + }, + "segment_size_hls": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"LESS_THAN_1MB", "ONE_MB_TO_TEN_MB", "TEN_MB_TO_100_MB", "GREATER_THAN_100MB", "UNKNOWN", "OTHER"}, false)), + Optional: true, + Description: "Specifies the size of the media object retrieved from the origin.", + Type: schema.TypeString, + }, + "hds": { + Optional: true, + Description: "Enable delivery of HDS media.", + Type: schema.TypeBool, + }, + "segment_duration_hds": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SEGMENT_DURATION_2S", "SEGMENT_DURATION_4S", "SEGMENT_DURATION_6S", "SEGMENT_DURATION_8S", "SEGMENT_DURATION_10S"}, false)), + Optional: true, + Description: "Specifies the duration of individual fragments.", + Type: schema.TypeString, + }, + "segment_size_hds": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"LESS_THAN_1MB", "ONE_MB_TO_TEN_MB", "TEN_MB_TO_100_MB", "GREATER_THAN_100MB", "UNKNOWN", "OTHER"}, false)), + Optional: true, + Description: "Specifies the size of the media object retrieved from the origin.", + Type: schema.TypeString, + }, + "dash": { + Optional: true, + Description: "Enable delivery of DASH media.", + Type: schema.TypeBool, + }, + "segment_duration_dash": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SEGMENT_DURATION_2S", "SEGMENT_DURATION_4S", "SEGMENT_DURATION_6S", "SEGMENT_DURATION_8S", "SEGMENT_DURATION_10S"}, false)), + Optional: true, + Description: "Specifies the duration of individual segments.", + Type: schema.TypeString, + }, + "segment_size_dash": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"LESS_THAN_1MB", "ONE_MB_TO_TEN_MB", "TEN_MB_TO_100_MB", "GREATER_THAN_100MB", "UNKNOWN", "OTHER"}, false)), + Optional: true, + Description: "Specifies the size of the media object retrieved from the origin.", + Type: schema.TypeString, + }, + "smooth": { + Optional: true, + Description: "Enable delivery of Smooth media.", + Type: schema.TypeBool, + }, + "segment_duration_smooth": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SEGMENT_DURATION_2S", "SEGMENT_DURATION_4S", "SEGMENT_DURATION_6S", "SEGMENT_DURATION_8S", "SEGMENT_DURATION_10S"}, false)), + Optional: true, + Description: "Specifies the duration of individual fragments.", + Type: schema.TypeString, + }, + "segment_size_smooth": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"LESS_THAN_1MB", "ONE_MB_TO_TEN_MB", "TEN_MB_TO_100_MB", "GREATER_THAN_100MB", "UNKNOWN", "OTHER"}, false)), + Optional: true, + Description: "Specifies the size of the media object retrieved from the origin.", + Type: schema.TypeString, + }, + }, + }, + }, + "content_characteristics_wsd_vod": { + Optional: true, + Type: schema.TypeList, + Description: "Specifies characteristics of the delivered content, specifically targeted to delivering on-demand video. Akamai uses this information to optimize your metadata configuration, which may result in better origin offload and end-user performance. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "catalog_size": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SMALL", "MEDIUM", "LARGE", "EXTRA_LARGE", "UNKNOWN"}, false)), + Optional: true, + Description: "Optimize based on the total size of the content library delivered.", + Type: schema.TypeString, + }, + "content_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SD", "HD", "ULTRA_HD", "OTHER", "UNKNOWN"}, false)), + Optional: true, + Description: "Optimize based on the quality of media content.", + Type: schema.TypeString, + }, + "popularity_distribution": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"LONG_TAIL", "ALL_POPULAR", "UNKNOWN"}, false)), + Optional: true, + Description: "Optimize based on the content's expected popularity.", + Type: schema.TypeString, + }, + "hls": { + Optional: true, + Description: "Enable delivery of HLS media.", + Type: schema.TypeBool, + }, + "segment_duration_hls": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SEGMENT_DURATION_2S", "SEGMENT_DURATION_4S", "SEGMENT_DURATION_6S", "SEGMENT_DURATION_8S", "SEGMENT_DURATION_10S"}, false)), + Optional: true, + Description: "Specifies the duration of individual segments.", + Type: schema.TypeString, + }, + "segment_size_hls": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"LESS_THAN_1MB", "ONE_MB_TO_TEN_MB", "TEN_MB_TO_100_MB", "GREATER_THAN_100MB", "UNKNOWN", "OTHER"}, false)), + Optional: true, + Description: "Specifies the size of the media object retrieved from the origin.", + Type: schema.TypeString, + }, + "hds": { + Optional: true, + Description: "Enable delivery of HDS media.", + Type: schema.TypeBool, + }, + "segment_duration_hds": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SEGMENT_DURATION_2S", "SEGMENT_DURATION_4S", "SEGMENT_DURATION_6S", "SEGMENT_DURATION_8S", "SEGMENT_DURATION_10S"}, false)), + Optional: true, + Description: "Specifies the duration of individual fragments.", + Type: schema.TypeString, + }, + "segment_size_hds": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"LESS_THAN_1MB", "ONE_MB_TO_TEN_MB", "TEN_MB_TO_100_MB", "GREATER_THAN_100MB", "UNKNOWN", "OTHER"}, false)), + Optional: true, + Description: "Specifies the size of the media object retrieved from the origin.", + Type: schema.TypeString, + }, + "dash": { + Optional: true, + Description: "Enable delivery of DASH media.", + Type: schema.TypeBool, + }, + "segment_duration_dash": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SEGMENT_DURATION_2S", "SEGMENT_DURATION_4S", "SEGMENT_DURATION_6S", "SEGMENT_DURATION_8S", "SEGMENT_DURATION_10S"}, false)), + Optional: true, + Description: "Specifies the duration of individual segments.", + Type: schema.TypeString, + }, + "segment_size_dash": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"LESS_THAN_1MB", "ONE_MB_TO_TEN_MB", "TEN_MB_TO_100_MB", "GREATER_THAN_100MB", "UNKNOWN", "OTHER"}, false)), + Optional: true, + Description: "Specifies the size of the media object retrieved from the origin.", + Type: schema.TypeString, + }, + "smooth": { + Optional: true, + Description: "Enable delivery of Smooth media.", + Type: schema.TypeBool, + }, + "segment_duration_smooth": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SEGMENT_DURATION_2S", "SEGMENT_DURATION_4S", "SEGMENT_DURATION_6S", "SEGMENT_DURATION_8S", "SEGMENT_DURATION_10S"}, false)), + Optional: true, + Description: "Specifies the duration of individual fragments.", + Type: schema.TypeString, + }, + "segment_size_smooth": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"LESS_THAN_1MB", "ONE_MB_TO_TEN_MB", "TEN_MB_TO_100_MB", "GREATER_THAN_100MB", "UNKNOWN", "OTHER"}, false)), + Optional: true, + Description: "Specifies the size of the media object retrieved from the origin.", + Type: schema.TypeString, + }, + }, + }, + }, + "content_pre_position": { + Optional: true, + Type: schema.TypeList, + Description: "Content Preposition. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the Content PrePosition behavior.", + Type: schema.TypeBool, + }, + "source_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ORIGIN"}, false)), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "targets": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"CLOUDWRAPPER"}, false)), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "first_location": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "second_location": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "content_targeting_protection": { + Optional: true, + Type: schema.TypeList, + Description: "Content Targeting is based on `EdgeScape`, Akamai's location-based access control system. You can use it to allow or deny access to a set of geographic regions or IP addresses. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the Content Targeting feature.", + Type: schema.TypeBool, + }, + "geo_protection_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "enable_geo_protection": { + Optional: true, + Description: "When enabled, verifies IP addresses are unique to specific geographic regions.", + Type: schema.TypeBool, + }, + "geo_protection_mode": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ALLOW", "DENY"}, false)), + Optional: true, + Description: "Specifies how to handle requests.", + Type: schema.TypeString, + }, + "countries": { + Optional: true, + Description: "Specifies a set of two-character ISO 3166 country codes from which to allow or deny traffic. See `EdgeScape Data Codes` for a list.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "regions": { + Optional: true, + Description: "Specifies a set of ISO 3166-2 regional codes from which to allow or deny traffic. See `EdgeScape Data Codes` for a list.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "dmas": { + Optional: true, + Description: "Specifies the set of Designated Market Area codes from which to allow or deny traffic. See `EdgeScape Data Codes` for a list.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "override_ip_addresses": { + Optional: true, + Description: "Specify a set of IP addresses or CIDR blocks that exceptions to the set of included or excluded areas.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "enable_geo_redirect_on_deny": { + Optional: true, + Description: "When enabled, redirects denied requests rather than responding with an error code.", + Type: schema.TypeBool, + }, + "geo_redirect_url": { + Optional: true, + Description: "This specifies the full URL to the redirect page for denied requests.", + Type: schema.TypeString, + }, + "ip_protection_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "enable_ip_protection": { + Optional: true, + Description: "Allows you to control access to your content from specific sets of IP addresses and CIDR blocks.", + Type: schema.TypeBool, + }, + "ip_protection_mode": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ALLOW", "DENY"}, false)), + Optional: true, + Description: "Specifies how to handle requests.", + Type: schema.TypeString, + }, + "ip_addresses": { + Optional: true, + Description: "Specify a set of IP addresses or CIDR blocks to allow or deny.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "enable_ip_redirect_on_deny": { + Optional: true, + Description: "When enabled, redirects denied requests rather than responding with an error code.", + Type: schema.TypeBool, + }, + "ip_redirect_url": { + Optional: true, + Description: "This specifies the full URL to the redirect page for denied requests.", + Type: schema.TypeString, + }, + "referrer_protection_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "enable_referrer_protection": { + Optional: true, + Description: "Allows you allow traffic from certain referring websites, and disallow traffic from unauthorized sites that hijack those links.", + Type: schema.TypeBool, + }, + "referrer_protection_mode": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ALLOW", "DENY"}, false)), + Optional: true, + Description: "Specify the action to take.", + Type: schema.TypeString, + }, + "referrer_domains": { + Optional: true, + Description: "Specifies the set of domains from which to allow or deny traffic.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "enable_referrer_redirect_on_deny": { + Optional: true, + Description: "When enabled, redirects denied requests rather than responding with an error code.", + Type: schema.TypeBool, + }, + "referrer_redirect_url": { + Optional: true, + Description: "This specifies the full URL to the redirect page for denied requests.", + Type: schema.TypeString, + }, + }, + }, + }, + "cors_support": { + Optional: true, + Type: schema.TypeList, + Description: "Cross-origin resource sharing (CORS) allows web pages in one domain to access restricted resources from your domain. Specify external origin hostnames, methods, and headers that you want to accept via HTTP response headers. Full support of CORS requires allowing requests that use the OPTIONS method. See `allowOptions`. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables CORS feature.", + Type: schema.TypeBool, + }, + "allow_origins": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ANY", "SPECIFIED"}, false)), + Optional: true, + Description: "In responses to preflight requests, sets which origin hostnames to accept requests from.", + Type: schema.TypeString, + }, + "origins": { + Optional: true, + Description: "Defines the origin hostnames to accept requests from. The hostnames that you enter need to start with `http` or `https`. For detailed hostname syntax requirements, refer to RFC-952 and RFC-1123 specifications.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "allow_credentials": { + Optional: true, + Description: "Accepts requests made using credentials, like cookies or TLS client certificates.", + Type: schema.TypeBool, + }, + "allow_headers": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ANY", "SPECIFIED"}, false)), + Optional: true, + Description: "In responses to preflight requests, defines which headers to allow when making the actual request.", + Type: schema.TypeString, + }, + "headers": { + Optional: true, + Description: "Defines the supported request headers.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "methods": { + Optional: true, + Description: "Specifies any combination of the following methods: `DELETE`, `GET`, `PATCH`, `POST`, and `PUT` that are allowed when accessing the resource from an external domain.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "expose_headers": { + Optional: true, + Description: "In responses to preflight requests, lists names of headers that clients can access. By default, clients can access the following simple response headers: `Cache-Control`, `Content-Language`, `Content-Type`, `Expires`, `Last-Modified`, and `Pragma`. You can add other header names to make them accessible to clients.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "preflight_max_age": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+[DdHhMmSs]$"), + Optional: true, + Description: "Defines the number of seconds that the browser should cache the response to a preflight request.", + Type: schema.TypeString, + }, + }, + }, + }, + "cp_code": { + Optional: true, + Type: schema.TypeList, + Description: "Content Provider Codes (CP codes) allow you to distinguish various reporting and billing traffic segments, and you need them to access properties. You receive an initial CP code when purchasing Akamai, and you can run the `Create a new CP code` operation to generate more. This behavior applies any valid CP code, either as required as a default at the top of the rule tree, or subsequently to override the default. For a CP code to be valid, it needs to be assigned the same contract and product as the property, and the group needs access to it. For available values, run the `List CP codes` operation. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "value": { + Optional: true, + Description: "Specifies the CP code as an object. You only need to provide the initial `id`, stripping any `cpc_` prefix to pass the integer to the rule tree. Additional CP code details may reflect back in subsequent read-only data.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "name": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "created_date": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "description": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "products": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "cp_code_limits": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "current_capacity": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "limit": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "limit_type": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + "custom_behavior": { + Optional: true, + Type: schema.TypeList, + Description: "Allows you to insert a customized XML metadata behavior into any property's rule tree. Talk to your Akamai representative to implement the customized behavior. Once it's ready, run PAPI's `List custom behaviors` operation, then apply the relevant `behaviorId` value from the response within the current `customBehavior`. See `Custom behaviors and overrides` for guidance on custom metadata behaviors. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "behavior_id": { + Optional: true, + Description: "The unique identifier for the predefined custom behavior you want to insert into the current rule.", + Type: schema.TypeString, + }, + }, + }, + }, + "datastream": { + Optional: true, + Type: schema.TypeList, + Description: "The `DataStream` reporting service provides real-time logs on application activity, including aggregated metrics on complete request and response cycles and origin response times. Apply this behavior to report on this set of traffic. Use the `DataStream API` to aggregate the data. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "stream_type": { + ValidateDiagFunc: validateAny(validation.ToDiagFunc(validation.StringIsEmpty), validation.ToDiagFunc(validation.StringInSlice([]string{"BEACON", "LOG", "BEACON_AND_LOG"}, false))), + Optional: true, + Description: "Specify the DataStream type.", + Type: schema.TypeString, + }, + "beacon_stream_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables DataStream reporting.", + Type: schema.TypeBool, + }, + "datastream_ids": { + ValidateDiagFunc: validateAny(validation.ToDiagFunc(validation.StringIsEmpty), validateRegexOrVariable("^[0-9]+(-[0-9]+)*$")), + Optional: true, + Description: "A set of dash-separated DataStream ID values to limit the scope of reported data. By default, all active streams report. Use the DataStream application to gather stream ID values that apply to this property configuration. Specifying IDs for any streams that don't apply to this property has no effect, and results in no data reported.", + Type: schema.TypeString, + }, + "log_stream_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "log_enabled": { + Optional: true, + Description: "Enables log collection for the property by associating it with DataStream configurations.", + Type: schema.TypeBool, + }, + "log_stream_name": { + Optional: true, + Description: "Specifies the unique IDs of streams configured for the property. For properties created with the previous version of the rule format, this option contains a string instead of an array of strings. You can use the `List streams` operation to get stream IDs.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "sampling_percentage": { + Optional: true, + Description: "Specifies the percentage of log data you want to collect for this property.", + Type: schema.TypeInt, + }, + "collect_midgress_traffic": { + Optional: true, + Description: "If enabled, gathers midgress traffic data within the Akamai platform, such as between two edge servers, for all streams configured.", + Type: schema.TypeBool, + }, + }, + }, + }, + "dcp": { + Optional: true, + Type: schema.TypeList, + Description: "The `Internet of Things: Edge Connect` product allows connected users and devices to communicate on a publish-subscribe basis within reserved namespaces. (The `IoT Edge Connect API` allows programmatic access.) This behavior allows you to select previously reserved namespaces and set the protocols for users to publish and receive messages within these namespaces. Use the `verifyJsonWebTokenForDcp` behavior to control access. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables IoT Edge Connect.", + Type: schema.TypeBool, + }, + "namespace_id": { + Optional: true, + Description: "Specifies the globally reserved name for a specific configuration. It includes authorization rules over publishing and subscribing to logical categories known as `topics`. This provides a root path for all topics defined within a namespace configuration. You can use the `IoT Edge Connect API` to configure access control lists for your namespace configuration.", + Type: schema.TypeString, + }, + "tlsenabled": { + Optional: true, + Description: "When enabled, you can publish and receive messages over a secured MQTT connection on port 8883.", + Type: schema.TypeBool, + }, + "wsenabled": { + Optional: true, + Description: "When enabled, you can publish and receive messages through a secured MQTT connection over WebSockets on port 443.", + Type: schema.TypeBool, + }, + "gwenabled": { + Optional: true, + Description: "When enabled, you can publish and receive messages over a secured HTTP connection on port 443.", + Type: schema.TypeBool, + }, + "anonymous": { + Optional: true, + Description: "When enabled, you don't need to pass the JWT token with the mqtt request, and JWT validation is skipped.", + Type: schema.TypeBool, + }, + }, + }, + }, + "dcp_auth_hmac_transformation": { + Optional: true, + Type: schema.TypeList, + Description: "The `Internet of Things: Edge Connect` product allows connected users and devices to communicate on a publish-subscribe basis within reserved namespaces. In conjunction with `dcpAuthVariableExtractor`, this behavior affects how clients can authenticate themselves to edge servers, and which groups within namespaces are authorized to access topics. It transforms a source string value extracted from the client certificate and stored as a variable, then generates a hash value based on the selected algorithm, for use in authenticating the client request. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "hash_conversion_algorithm": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SHA256", "MD5", "SHA384"}, false)), + Optional: true, + Description: "Specifies the hash algorithm.", + Type: schema.TypeString, + }, + "hash_conversion_key": { + Optional: true, + Description: "Specifies the key to generate the hash, ideally a long random string to ensure adequate security.", + Type: schema.TypeString, + }, + }, + }, + }, + "dcp_auth_regex_transformation": { + Optional: true, + Type: schema.TypeList, + Description: "The `Internet of Things: Edge Connect` product allows connected users and devices to communicate on a publish-subscribe basis within reserved namespaces. In conjunction with `dcpAuthVariableExtractor`, this behavior affects how clients can authenticate themselves to edge servers, and which groups within namespaces are authorized to access topics. It transforms a source string value extracted from the client certificate and stored as a variable, then transforms the string based on a regular expression search pattern, for use in authenticating the client request. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "regex_pattern": { + ValidateDiagFunc: validateRegexOrVariable("^[^\\(\\)]*\\([^\\(\\)]+\\)[^\\(\\)]*$"), + Optional: true, + Description: "Specifies a Perl-compatible regular expression with a single grouping to capture the text. For example, a value of `^.(.{0,10})` omits the first character, but then captures up to 10 characters after that. If the regular expression does not capture a substring, authentication may fail.", + Type: schema.TypeString, + }, + }, + }, + }, + "dcp_auth_substring_transformation": { + Optional: true, + Type: schema.TypeList, + Description: "The `Internet of Things: Edge Connect` product allows connected users and devices to communicate on a publish-subscribe basis within reserved namespaces. In conjunction with `dcpAuthVariableExtractor`, this behavior affects how clients can authenticate themselves to edge servers, and which groups within namespaces are authorized to access topics. It transforms a source string value extracted from the client certificate and stored as a variable, then extracts a substring, for use in authenticating the client request. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "substring_start": { + ValidateDiagFunc: validateAny(validation.ToDiagFunc(validation.StringIsEmpty), validateRegexOrVariable("^[0-9]+$")), + Optional: true, + Description: "The zero-based index offset of the first character to extract. If the index is out of bound from the string's length, authentication may fail.", + Type: schema.TypeString, + }, + "substring_end": { + ValidateDiagFunc: validateAny(validation.ToDiagFunc(validation.StringIsEmpty), validateRegexOrVariable("^[0-9]+$")), + Optional: true, + Description: "The zero-based index offset of the last character to extract, where `-1` selects the remainder of the string. If the index is out of bound from the string's length, authentication may fail.", + Type: schema.TypeString, + }, + }, + }, + }, + "dcp_auth_variable_extractor": { + Optional: true, + Type: schema.TypeList, + Description: "The `Internet of Things: Edge Connect` product allows connected users and devices to communicate on a publish-subscribe basis within reserved namespaces. This behavior affects how clients can authenticate themselves to edge servers, and which groups within namespaces are authorized to access topics. When enabled, this behavior allows end users to authenticate their requests with valid x509 client certificates. Either a client identifier or access authorization groups are required to make the request valid. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "certificate_field": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SUBJECT_DN", "V3_SUBJECT_ALT_NAME", "SERIAL", "FINGERPRINT_DYN", "FINGERPRINT_MD5", "FINGERPRINT_SHA1", "V3_NETSCAPE_COMMENT"}, false)), + Optional: true, + Description: "Specifies the field in the client certificate to extract the variable from.", + Type: schema.TypeString, + }, + "dcp_mutual_auth_processing_variable_id": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"VAR_DCP_CLIENT_ID", "VAR_DCP_AUTH_GROUP"}, false)), + Optional: true, + Description: "Where to store the value.", + Type: schema.TypeString, + }, + }, + }, + }, + "dcp_default_authz_groups": { + Optional: true, + Type: schema.TypeList, + Description: "The `Internet of Things: Edge Connect` product allows connected users and devices to communicate on a publish-subscribe basis within reserved namespaces. This behavior defines a set of default authorization groups to add to each request the property configuration controls. These groups have access regardless of the authentication method you use, either JWT using the `verifyJsonWebTokenForDcp` behavior, or mutual authentication using the `dcpAuthVariableExtractor` behavior to control where authorization groups are extracted from within certificates. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "group_names": { + Optional: true, + Description: "Specifies the set of authorization groups to assign to all connecting devices.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }, + }, + }, + "dcp_dev_relations": { + Optional: true, + Type: schema.TypeList, + Description: "The `Internet of Things: Edge Connect` product allows connected users and devices to communicate on a publish-subscribe basis within reserved namespaces. This behavior allows Akamai-external clients to use developer test accounts in a shared environment. In conjunction with `verifyJsonWebTokenForDcp`, this behavior allows you to use your own JWTs in your requests, or those generated by Akamai. It lets you either enable the default JWT server for your test configuration by setting the authentication endpoint to a default path, or specify custom settings for your JWT server and the authentication endpoint. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the default JWT server and sets the authentication endpoint to a default path.", + Type: schema.TypeBool, + }, + "custom_values": { + Optional: true, + Description: "Allows you to specify custom JWT server connection values.", + Type: schema.TypeBool, + }, + "hostname": { + ValidateDiagFunc: validateRegexOrVariable("^(([a-zA-Z0-9]([a-zA-Z0-9_\\-]*[a-zA-Z0-9])?)\\.)+([a-zA-Z]+|xn--[a-zA-Z0-9]+)$"), + Optional: true, + Description: "Specifies the JWT server's hostname.", + Type: schema.TypeString, + }, + "path": { + Optional: true, + Description: "Specifies the path to your JWT server's authentication endpoint. This lets you generate JWTs to sign your requests.", + Type: schema.TypeString, + }, + }, + }, + }, + "dcp_real_time_auth": { + Optional: true, + Type: schema.TypeList, + Description: "INTERNAL ONLY: The `Internet of Things: Edge Connect` product allows connected users and devices to communicate on a publish-subscribe basis within reserved namespaces. This behavior lets you configure the real time authentication to edge servers. This behavior is for internal usage only. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "extract_namespace": { + Optional: true, + Description: "Extracts a namespace from JSON web tokens (JWT).", + Type: schema.TypeBool, + }, + "namespace_claim": { + Optional: true, + Description: "Specifies the claim in JWT to extract the namespace from.", + Type: schema.TypeString, + }, + "extract_jurisdiction": { + Optional: true, + Description: "Extracts a jurisdiction that defines a geographically distributed set of servers from JWT.", + Type: schema.TypeBool, + }, + "jurisdiction_claim": { + Optional: true, + Description: "Specifies the claim in JWT to extract the jurisdiction from.", + Type: schema.TypeString, + }, + "extract_hostname": { + Optional: true, + Description: "Extracts a hostname from JWT.", + Type: schema.TypeBool, + }, + "hostname_claim": { + Optional: true, + Description: "Specifies the claim in JWT to extract the hostname from.", + Type: schema.TypeString, + }, + }, + }, + }, + "delivery_receipt": { + Optional: true, + Type: schema.TypeList, + Description: "A static behavior that's required when specifying the Cloud Monitor module's (`edgeConnect` behavior. You can only apply this behavior if the property is marked as secure. See `Secure property requirements` for guidance. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + "deny_access": { + Optional: true, + Type: schema.TypeList, + Description: "Assuming a condition in the rule matches, this denies access to the requested content. For example, a `userLocation` match paired with this behavior would deny requests from a specified part of the world. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "reason": { + ValidateDiagFunc: validateRegexOrVariable("^[\\w-]+$"), + Optional: true, + Description: "Text message that keys why access is denied. Any subsequent `denyAccess` behaviors within the rule tree may refer to the same `reason` key to override the current behavior.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Denies access when enabled.", + Type: schema.TypeBool, + }, + }, + }, + }, + "deny_direct_failover_access": { + Optional: true, + Type: schema.TypeList, + Description: "A static behavior required for all properties that implement a failover under the Cloud Security Failover product. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + "device_characteristic_cache_id": { + Optional: true, + Type: schema.TypeList, + Description: "By default, source URLs serve as cache IDs on edge servers. Electronic Data Capture allows you to specify an additional set of device characteristics to generate separate cache keys. Use this in conjunction with the `deviceCharacteristicHeader` behavior. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "elements": { + Optional: true, + Description: "Specifies a set of information about the device with which to generate a separate cache key.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }, + }, + }, + "device_characteristic_header": { + Optional: true, + Type: schema.TypeList, + Description: "Sends selected information about requesting devices to the origin server, in the form of an `X-Akamai-Device-Characteristics` HTTP header. Use in conjunction with the `deviceCharacteristicCacheId` behavior. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "elements": { + Optional: true, + Description: "Specifies the set of information about the requesting device to send to the origin server.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }, + }, + }, + "dns_async_refresh": { + Optional: true, + Type: schema.TypeList, + Description: "Allow an edge server to use an expired DNS record when forwarding a request to your origin. The `type A` DNS record refreshes `after` content is served to the end user, so there is no wait for the DNS resolution. Avoid this behavior if you want to be able to disable a server immediately after its DNS record expires. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Allows edge servers to refresh an expired DNS record after serving content.", + Type: schema.TypeBool, + }, + "timeout": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+[DdHhMmSs]$"), + Optional: true, + Description: "Set the maximum allowed time an expired DNS record may be active.", + Type: schema.TypeString, + }, + }, + }, + }, + "dns_prefresh": { + Optional: true, + Type: schema.TypeList, + Description: "Allows edge servers to refresh your origin's DNS record independently from end-user requests. The `type A` DNS record refreshes before the origin's DNS record expires. This behavior is for internal usage only. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Allows edge servers to refresh DNS records before they expire.", + Type: schema.TypeBool, + }, + "delay": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+[DdHhMmSs]$"), + Optional: true, + Description: "Specifies the amount of time following a DNS record's expiration to asynchronously prefresh it.", + Type: schema.TypeString, + }, + "timeout": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+[DdHhMmSs]$"), + Optional: true, + Description: "Specifies the amount of time to prefresh a DNS entry if there have been no requests to the domain name.", + Type: schema.TypeString, + }, + }, + }, + }, + "downgrade_protocol": { + Optional: true, + Type: schema.TypeList, + Description: "Serve static objects to the end-user client over HTTPS, but fetch them from the origin via HTTP. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the protocol downgrading behavior.", + Type: schema.TypeBool, + }, + }, + }, + }, + "download_complete_marker": { + Optional: true, + Type: schema.TypeList, + Description: "The `Internet of Things: OTA Updates` product allows customers to securely distribute firmware to devices over cellular networks. Based on match criteria that executes a rule, this behavior logs requests to the OTA servers as completed in aggregated and individual reports. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + "download_notification": { + Optional: true, + Type: schema.TypeList, + Description: "The `Internet of Things: OTA Updates` product allows customers to securely distribute firmware to devices over cellular networks. Based on match criteria that executes a rule, this behavior allows requests to the `OTA Updates API` for a list of completed downloads to individual vehicles. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + "downstream_cache": { + Optional: true, + Type: schema.TypeList, + Description: "Specify the caching instructions the edge server sends to the end user's client or client proxies. By default, the cache's duration is whichever is less: the remaining lifetime of the edge cache, or what the origin's header specifies. If the origin is set to `no-store` or `bypass-cache`, edge servers send `cache-busting` headers downstream to prevent downstream caching. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "behavior": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ALLOW", "MUST_REVALIDATE", "BUST", "TUNNEL_ORIGIN", "NONE"}, false)), + Optional: true, + Description: "Specify the caching instructions the edge server sends to the end user's client.", + Type: schema.TypeString, + }, + "allow_behavior": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"LESSER", "GREATER", "REMAINING_LIFETIME", "FROM_MAX_AGE", "FROM_VALUE", "PASS_ORIGIN"}, false)), + Optional: true, + Description: "Specify how the edge server calculates the downstream cache by setting the value of the `Expires` header.", + Type: schema.TypeString, + }, + "ttl": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+[DdHhMmSs]$"), + Optional: true, + Description: "Sets the duration of the cache. Setting the value to `0` equates to a `no-cache` header that forces revalidation.", + Type: schema.TypeString, + }, + "send_headers": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"CACHE_CONTROL_AND_EXPIRES", "CACHE_CONTROL", "EXPIRES", "PASS_ORIGIN"}, false)), + Optional: true, + Description: "Specifies the HTTP headers to include in the response to the client.", + Type: schema.TypeString, + }, + "send_private": { + Optional: true, + Description: "Adds a `Cache-Control: private` header to prevent objects from being cached in a shared caching proxy.", + Type: schema.TypeBool, + }, + }, + }, + }, + "dynamic_throughtput_optimization": { + Optional: true, + Type: schema.TypeList, + Description: "Enables `quick retry`, which detects slow forward throughput while fetching an object, and attempts a different forward connection path to avoid congestion. By default, connections under 5 mbps trigger this behavior. When the transfer rate drops below this rate during a connection attempt, quick retry is enabled and a different forward connection path is used. Contact Akamai Professional Services to override this threshold. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the quick retry feature.", + Type: schema.TypeBool, + }, + }, + }, + }, + "dynamic_throughtput_optimization_override": { + Optional: true, + Type: schema.TypeList, + Description: "This overrides the default threshold of 5 Mbps that triggers the `dynamicThroughtputOptimization` behavior, which enables the quick retry feature. Quick retry detects slow forward throughput while fetching an object, and attempts a different forward connection path to avoid congestion. This behavior is for internal usage only. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "throughput": { + Optional: true, + Description: "Specifies the default target forward throughput in Mbps, ranging from 2 to 50 Mbps. If this time is exceeded during a connection attempt, quick retry is enabled and a different forward connection path is used.", + Type: schema.TypeString, + }, + }, + }, + }, + "dynamic_web_content": { + Optional: true, + Type: schema.TypeList, + Description: "In conjunction with the `subCustomer` behavior, this optional behavior allows you to control how dynamic web content behaves for your subcustomers using `Akamai Cloud Embed`. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "sure_route": { + Optional: true, + Description: "Optimizes how subcustomer traffic routes from origin to edge servers. See the `sureRoute` behavior for more information.", + Type: schema.TypeBool, + }, + "prefetch": { + Optional: true, + Description: "Allows subcustomer content to prefetch over HTTP/2.", + Type: schema.TypeBool, + }, + "real_user_monitoring": { + Optional: true, + Description: "Allows Real User Monitoring (RUM) to collect performance data for subcustomer content. See the `realUserMonitoring` behavior for more information.", + Type: schema.TypeBool, + }, + "image_compression": { + Optional: true, + Description: "Enables image compression for subcustomer content.", + Type: schema.TypeBool, + }, + }, + }, + }, + "ecms_bulk_upload": { + Optional: true, + Type: schema.TypeList, + Description: "Uploads a ZIP archive with objects to an existing data set. The target data set stores objects as key-value pairs. The path to an object in the ZIP archive is a key, and the content of an object is a value. For an overview, see `ecmsDatabase`. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables sending a compressed archive file with objects. Sends the archive file to the default path of the target data set: `/bulk//`.", + Type: schema.TypeBool, + }, + }, + }, + }, + "ecms_database": { + Optional: true, + Type: schema.TypeList, + Description: "Edge Connect Message Store is available for `Internet of Things: Edge Connect` users. It lets you create databases and data sets within these databases. You can use this object store to save files smaller than 2 GB. `ecmsDatabase` specifies a default database for requests to this property, unless indicated otherwise in the URL. To access objects in the default database, you can skip its name in the URLs. To access objects in a different database, pass its name in the header, query parameter, or a regular expression matching a URL segment. You can also configure the `ecmsDataset` behavior to specify a default data set for requests. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "database": { + Optional: true, + Description: "Specifies a default database for this property. If you don't configure a default data set in the `ecmsDataset` behavior, requests to objects in this database follow the pattern: `/datastore//`.", + Type: schema.TypeString, + }, + "extract_location": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"CLIENT_REQUEST_HEADER", "QUERY_STRING", "REGEX"}, false)), + Optional: true, + Description: "Specifies where to pass a database name in requests. If the specified location doesn't include the database name or the name doesn't match the regular expression, the default database is used.", + Type: schema.TypeString, + }, + "header_name": { + Optional: true, + Description: "Specifies the request header that passed the database name. By default, it points to `X-KV-Database`.", + Type: schema.TypeString, + }, + "query_parameter_name": { + Optional: true, + Description: "Specifies the query string parameter that passed the database name. By default, it points to `database`.", + Type: schema.TypeString, + }, + "regex_pattern": { + ValidateDiagFunc: validateRegexOrVariable("^[^\\(\\)]*\\([^\\(\\)]+\\)[^\\(\\)]*$"), + Optional: true, + Description: "Specifies the regular expression that matches the database name in the URL.", + Type: schema.TypeString, + }, + }, + }, + }, + "ecms_dataset": { + Optional: true, + Type: schema.TypeList, + Description: "Specifies a default data set for requests to this property unless indicated otherwise in the URL. To access objects in this data set, you can skip the data set name in the URLs. To access objects in a different data set within a database, pass the data set name in the header, query parameter, or a regular expression pattern matching a URL segment. You can also configure the `ecmsDatabase` behavior to specify a default database for requests. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "dataset": { + Optional: true, + Description: "Specifies a default data set for this property. If you don't configure a default database in the `ecmsDatabase` behavior, requests to objects in this data set follow the pattern: `/datastore//`.", + Type: schema.TypeString, + }, + "extract_location": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"CLIENT_REQUEST_HEADER", "QUERY_STRING", "REGEX"}, false)), + Optional: true, + Description: "Specifies where to pass a data set name in requests. If the specified location doesn't include the data set name or the name doesn't match the regular expression pattern, the default data set is used.", + Type: schema.TypeString, + }, + "header_name": { + Optional: true, + Description: "Specifies the request header that passed the data set name. By default, it points to `X-KV-Dataset`.", + Type: schema.TypeString, + }, + "query_parameter_name": { + Optional: true, + Description: "Specifies the query string parameter that passed the data set name. By default, it points to `dataset`.", + Type: schema.TypeString, + }, + "regex_pattern": { + ValidateDiagFunc: validateRegexOrVariable("^[^\\(\\)]*\\([^\\(\\)]+\\)[^\\(\\)]*$"), + Optional: true, + Description: "Specifies the regular expression that matches the data set name in the URL.", + Type: schema.TypeString, + }, + }, + }, + }, + "ecms_object_key": { + Optional: true, + Type: schema.TypeList, + Description: "Defines a regular expression to match object keys in custom URLs and to access objects in a data set. You can point custom URLs to access proper values in the target data set. For an overview, see `ecmsDatabase`. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "regex": { + ValidateDiagFunc: validateRegexOrVariable("^[^\\(\\)]*\\([^\\(\\)]+\\)[^\\(\\)]*$"), + Optional: true, + Description: "Enables sending a compressed archive file with objects to the default path of the target data set: `/bulk//`.", + Type: schema.TypeString, + }, + }, + }, + }, + "edge_connect": { + Optional: true, + Type: schema.TypeList, + Description: "Configures traffic logs for the Cloud Monitor push API. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables Cloud Monitor's log-publishing behavior.", + Type: schema.TypeBool, + }, + "api_connector": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"DEFAULT", "SIEM_JSON", "BMC_APM"}, false)), + Optional: true, + Description: "Describes the API connector type.", + Type: schema.TypeString, + }, + "api_data_elements": { + Optional: true, + Description: "Specifies the data set to log.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "destination_hostname": { + ValidateDiagFunc: validateRegexOrVariable("^([a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})(\\.[a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})+$"), + Optional: true, + Description: "Specifies the target hostname accepting push API requests.", + Type: schema.TypeString, + }, + "destination_path": { + ValidateDiagFunc: validateRegexOrVariable("^[^#\\[\\]@]+$"), + Optional: true, + Description: "Specifies the push API's endpoint.", + Type: schema.TypeString, + }, + "override_aggregate_settings": { + Optional: true, + Description: "When enabled, overrides default log settings.", + Type: schema.TypeBool, + }, + "aggregate_time": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+[DdHhMmSs]$"), + Optional: true, + Description: "Specifies how often logs are generated.", + Type: schema.TypeString, + }, + "aggregate_lines": { + ValidateDiagFunc: validateRegexOrVariable("^[1-9]\\d*$"), + Optional: true, + Description: "Specifies the maximum number of lines to include in each log.", + Type: schema.TypeString, + }, + "aggregate_size": { + ValidateDiagFunc: validateRegexOrVariable("^\\d+[K,M,G,T]B$"), + Optional: true, + Description: "Specifies the log's maximum size.", + Type: schema.TypeString, + }, + }, + }, + }, + "edge_load_balancing_advanced": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior implements customized Edge Load Balancing features. Contact Akamai Professional Services for help configuring it. This behavior is for internal usage only. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "description": { + Optional: true, + Description: "A description of what the `xml` block does.", + Type: schema.TypeString, + }, + "xml": { + Optional: true, + Description: "A block of Akamai XML metadata.", + Type: schema.TypeString, + }, + }, + }, + }, + "edge_load_balancing_data_center": { + Optional: true, + Type: schema.TypeList, + Description: "The Edge Load Balancing module allows you to specify groups of data centers that implement load balancing, session persistence, and real-time dynamic failover. Enabling ELB routes requests contextually based on location, device, or network, along with optional rules you specify. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "origin_id": { + Optional: true, + Description: "Corresponds to the `id` specified by the `edgeLoadBalancingOrigin` behavior associated with this data center.", + Type: schema.TypeString, + }, + "description": { + Optional: true, + Description: "Provides a description for the ELB data center, for your own reference.", + Type: schema.TypeString, + }, + "hostname": { + ValidateDiagFunc: validateAny(validateRegexOrVariable("^([a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})(\\.[a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})+$"), validateRegexOrVariable("^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$")), + Optional: true, + Description: "Specifies the data center's hostname.", + Type: schema.TypeString, + }, + "cookie_name": { + ValidateDiagFunc: validateAny(validation.ToDiagFunc(validation.StringIsEmpty), validateRegexOrVariable("^[^\\s;]+$")), + Optional: true, + Description: "If using session persistence, this specifies the value of the cookie named in the corresponding `edgeLoadBalancingOrigin` behavior's `cookie_name` option.", + Type: schema.TypeString, + }, + "failover_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "enable_failover": { + Optional: true, + Description: "Allows you to specify failover rules.", + Type: schema.TypeBool, + }, + "ip": { + ValidateDiagFunc: validateRegexOrVariable("^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$"), + Optional: true, + Description: "Specifies this data center's IP address.", + Type: schema.TypeString, + }, + "failover_rules": { + Optional: true, + Description: "Provides up to four failover rules to apply in the specified order.", + Type: schema.TypeList, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "failover_hostname": { + ValidateDiagFunc: validateRegexOrVariable("^([a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})(\\.[a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})+$"), + Optional: true, + Description: "The hostname of the data center to fail over to.", + Type: schema.TypeString, + }, + "modify_request": { + Optional: true, + Description: "Allows you to modify the request's hostname or path.", + Type: schema.TypeBool, + }, + "override_hostname": { + Optional: true, + Description: "Overrides the request's hostname with the `failover_hostname`.", + Type: schema.TypeBool, + }, + "context_root": { + ValidateDiagFunc: validateRegexOrVariable("^[^#\\[\\]@]+$"), + Optional: true, + Description: "Specifies the path to use in the forwarding request, typically the root (`/`) when failing over to a different data center, or a full path such as `/static/error.html` when failing over to an error page.", + Type: schema.TypeString, + }, + "absolute_path": { + Optional: true, + Description: "When enabled, interprets the path specified by `context_root` as an absolute server path, for example to reference a site-down page. Otherwise when disabled, the path is appended to the request.", + Type: schema.TypeBool, + }, + }, + }, + }, + }, + }, + }, + "edge_load_balancing_origin": { + Optional: true, + Type: schema.TypeList, + Description: "The Edge Load Balancing module allows you to implement groups of data centers featuring load balancing, session persistence, and real-time dynamic failover. Enabling ELB routes requests contextually based on location, device, or network, along with optional rules you specify. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "id": { + Optional: true, + Description: "Specifies a unique descriptive string for this ELB origin. The value needs to match the `origin_id` specified by the `edgeLoadBalancingDataCenter` behavior associated with this origin.", + Type: schema.TypeString, + }, + "description": { + Optional: true, + Description: "Provides a description for the ELB origin, for your own reference.", + Type: schema.TypeString, + }, + "hostname": { + ValidateDiagFunc: validateRegexOrVariable("^([a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})(\\.[a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})+$"), + Optional: true, + Description: "Specifies the hostname associated with the ELB rule.", + Type: schema.TypeString, + }, + "session_persistence_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "enable_session_persistence": { + Optional: true, + Description: "Allows you to specify a cookie to pin the user's browser session to one data center. When disabled, ELB's default load balancing may send users to various data centers within the same session.", + Type: schema.TypeBool, + }, + "cookie_name": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-*\\.]+$"), + Optional: true, + Description: "This specifies the name of the cookie that marks users' persistent sessions. The accompanying `edgeLoadBalancingDataCenter` behavior's `description` option specifies the cookie's value.", + Type: schema.TypeString, + }, + }, + }, + }, + "edge_origin_authorization": { + Optional: true, + Type: schema.TypeList, + Description: "Allows the origin server to use a cookie to ensure requests from Akamai servers are genuine. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the cookie-authorization behavior.", + Type: schema.TypeBool, + }, + "cookie_name": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-*\\.]+$"), + Optional: true, + Description: "Specifies the name of the cookie to use for authorization.", + Type: schema.TypeString, + }, + "value": { + ValidateDiagFunc: validateRegexOrVariable("^[^\\s;]+$"), + Optional: true, + Description: "Specifies the value of the authorization cookie.", + Type: schema.TypeString, + }, + "domain": { + ValidateDiagFunc: validateRegexOrVariable("^([a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})(\\.[a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})+$"), + Optional: true, + Description: "Specify the cookie's domain, which needs to match the top-level domain of the `Host` header the origin server receives.", + Type: schema.TypeString, + }, + }, + }, + }, + "edge_redirector": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior enables the `Edge Redirector Cloudlet` application, which helps you manage large numbers of redirects. With Cloudlets available on your contract, choose `Your services` > `Edge logic Cloudlets` to control the Edge Redirector within `Control Center`. Otherwise use the `Cloudlets API` to configure it programmatically. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the Edge Redirector Cloudlet.", + Type: schema.TypeBool, + }, + "is_shared_policy": { + Optional: true, + Description: "Whether you want to apply the Cloudlet shared policy to an unlimited number of properties within your account. Learn more about shared policies and how to create them in `Cloudlets Policy Manager`.", + Type: schema.TypeBool, + }, + "cloudlet_policy": { + Optional: true, + Description: "Specifies the Cloudlet policy as an object.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "name": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "cloudlet_shared_policy": { + Optional: true, + Description: "Identifies the Cloudlet shared policy to use with this behavior. Use the `Cloudlets API` to list available shared policies.", + Type: schema.TypeInt, + }, + }, + }, + }, + "edge_scape": { + Optional: true, + Type: schema.TypeList, + Description: "`EdgeScape` allows you to customize content based on the end user's geographic location or connection speed. When enabled, the edge server sends a special `X-Akamai-Edgescape` header to the origin server encoding relevant details about the end-user client as key-value pairs. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "When enabled, sends the `X-Akamai-Edgescape` request header to the origin.", + Type: schema.TypeBool, + }, + }, + }, + }, + "edge_side_includes": { + Optional: true, + Type: schema.TypeList, + Description: "Allows edge servers to process edge side include (ESI) code to generate dynamic content. To apply this behavior, you need to match on a `contentType`, `path`, or `filename`. Since this behavior requires more parsing time, you should not apply it to pages that lack ESI code, or to any non-HTML content. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables ESI processing.", + Type: schema.TypeBool, + }, + "enable_via_http": { + Optional: true, + Description: "Enable ESI only for content featuring the `Edge-control: dca=esi` HTTP response header.", + Type: schema.TypeBool, + }, + "pass_set_cookie": { + Optional: true, + Description: "Allows edge servers to pass your origin server's cookies to the ESI processor.", + Type: schema.TypeBool, + }, + "pass_client_ip": { + Optional: true, + Description: "Allows edge servers to pass the client IP header to the ESI processor.", + Type: schema.TypeBool, + }, + "i18n_status": { + Optional: true, + Description: "Provides internationalization support for ESI.", + Type: schema.TypeBool, + }, + "i18n_charset": { + Optional: true, + Description: "Specifies the character sets to use when transcoding the ESI language, `UTF-8` and `ISO-8859-1` for example.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "detect_injection": { + Optional: true, + Description: "Denies attempts to inject ESI code.", + Type: schema.TypeBool, + }, + }, + }, + }, + "edge_worker": { + Optional: true, + Type: schema.TypeList, + Description: "`EdgeWorkers` are JavaScript applications that allow you to manipulate your web traffic on edge servers outside of Property Manager behaviors, and deployed independently from your configuration's logic. This behavior applies an EdgeWorker to a set of edge requests. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "When enabled, applies specified EdgeWorker functionality to this rule's web traffic.", + Type: schema.TypeBool, + }, + "create_edge_worker": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "edge_worker_id": { + Optional: true, + Description: "Identifies the EdgeWorker application to apply to this rule's web traffic. You can use the `EdgeWorkers API` to get this value.", + Type: schema.TypeString, + }, + "resource_tier": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "m_pulse": { + Optional: true, + Description: "Enables mPulse reports that include data about EdgeWorkers errors generated due to JavaScript errors. For more details, see `Integrate mPulse reports with EdgeWorkers`.", + Type: schema.TypeBool, + }, + "m_pulse_information": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + "enforce_mtls_settings": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior repeats mTLS validation checks between a requesting client and the edge network. If the checks fail, you can deny the request or apply custom error handling. To use this behavior, you need to add either the `hostname` or `clientCertificate` criteria to the same rule. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enable_auth_set": { + Optional: true, + Description: "Whether to require a specific mutual transport layer security (mTLS) certificate authority (CA) set in a request from a client to the edge network.", + Type: schema.TypeBool, + }, + "certificate_authority_set": { + Optional: true, + Description: "Specify the client certificate authority (CA) sets you want to support in client requests. Run the `List CA Sets` operation in the mTLS Edge TrustStore API to get the `setId` value and pass it in this option as a string. If a request includes a set not defined here, it will be denied. The preset list items you can select are contingent on the CA sets you've created using the mTLS Edge Truststore, and then associated with a certificate in the `Certificate Provisioning System`.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "enable_ocsp_status": { + Optional: true, + Description: "Whether the mutual transport layer security requests from a client should use the online certificate support protocol (OCSP). OCSP can determine the x.509 certificate revocation status during the TLS handshake.", + Type: schema.TypeBool, + }, + "enable_deny_request": { + Optional: true, + Description: "This denies a request from a client that doesn't match what you've set for the options in this behavior. When disabled, non-matching requests are allowed, but you can incorporate a custom handling operation, such as reviewing generated log entries to see the discrepancies, enable the `Client-To-Edge` authentication header, or issue a custom message.", + Type: schema.TypeBool, + }, + }, + }, + }, + "enhanced_akamai_protocol": { + Optional: true, + Type: schema.TypeList, + Description: "Enables the Enhanced Akamai Protocol, a suite of advanced routing and transport optimizations that increase your website's performance and reliability. It is only available to specific applications, and requires a special routing from edge to origin. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "display": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + "enhanced_proxy_detection": { + Optional: true, + Type: schema.TypeList, + Description: "Enhanced Proxy Detection (EPD) leverages the GeoGuard service provided by GeoComply to add proxy detection and location spoofing protection. It identifies requests for your content that have been redirected from an unwanted source through a proxy. You can then allow, deny, or redirect these requests. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Applies GeoGuard proxy detection.", + Type: schema.TypeBool, + }, + "forward_header_enrichment": { + Optional: true, + Description: "Whether the Enhanced Proxy Detection (Akamai-EPD) header is included in the forward request to mark a connecting IP address as an anonymous proxy, with a two-letter designation. See the `epdForwardHeaderEnrichment` behavior for details.", + Type: schema.TypeBool, + }, + "enable_configuration_mode": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"BEST_PRACTICE", "ADVANCED"}, false)), + Optional: true, + Description: "Specifies how to field the proxy request.", + Type: schema.TypeString, + }, + "best_practice_action": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ALLOW", "DENY", "REDIRECT"}, false)), + Optional: true, + Description: "Specifies how to field the proxy request.", + Type: schema.TypeString, + }, + "best_practice_redirecturl": { + ValidateDiagFunc: validateRegexOrVariable("(http|https)://(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(/|/([\\w#!:.?+=&%@!\\-/]))?"), + Optional: true, + Description: "This specifies the URL to which to redirect requests.", + Type: schema.TypeString, + }, + "anonymous_vpn": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "detect_anonymous_vpn": { + Optional: true, + Description: "This enables detection of requests from anonymous VPNs.", + Type: schema.TypeBool, + }, + "detect_anonymous_vpn_action": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ALLOW", "DENY", "REDIRECT"}, false)), + Optional: true, + Description: "Specifies how to field anonymous VPN requests.", + Type: schema.TypeString, + }, + "detect_anonymous_vpn_redirecturl": { + ValidateDiagFunc: validateRegexOrVariable("(http|https)://(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(/|/([\\w#!:.?+=&%@!\\-/]))?"), + Optional: true, + Description: "This specifies the URL to which to redirect anonymous VPN requests.", + Type: schema.TypeString, + }, + "public_proxy": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "detect_public_proxy": { + Optional: true, + Description: "This enables detection of requests from public proxies.", + Type: schema.TypeBool, + }, + "detect_public_proxy_action": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ALLOW", "DENY", "REDIRECT"}, false)), + Optional: true, + Description: "Specifies how to field public proxy requests.", + Type: schema.TypeString, + }, + "detect_public_proxy_redirecturl": { + ValidateDiagFunc: validateRegexOrVariable("(http|https)://(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(/|/([\\w#!:.?+=&%@!\\-/]))?"), + Optional: true, + Description: "This specifies the URL to which to redirect public proxy requests.", + Type: schema.TypeString, + }, + "tor_exit_node": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "detect_tor_exit_node": { + Optional: true, + Description: "This enables detection of requests from Tor exit nodes.", + Type: schema.TypeBool, + }, + "detect_tor_exit_node_action": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ALLOW", "DENY", "REDIRECT"}, false)), + Optional: true, + Description: "This specifies whether to `DENY`, `ALLOW`, or `REDIRECT` requests from Tor exit nodes.", + Type: schema.TypeString, + }, + "detect_tor_exit_node_redirecturl": { + ValidateDiagFunc: validateRegexOrVariable("(http|https)://(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(/|/([\\w#!:.?+=&%@!\\-/]))?"), + Optional: true, + Description: "This specifies the URL to which to redirect requests from Tor exit nodes.", + Type: schema.TypeString, + }, + "smart_dns_proxy": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "detect_smart_dns_proxy": { + Optional: true, + Description: "This enables detection of requests from smart DNS proxies.", + Type: schema.TypeBool, + }, + "detect_smart_dns_proxy_action": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ALLOW", "DENY", "REDIRECT"}, false)), + Optional: true, + Description: "Specifies whether to `DENY`, `ALLOW`, or `REDIRECT` smart DNS proxy requests.", + Type: schema.TypeString, + }, + "detect_smart_dns_proxy_redirecturl": { + ValidateDiagFunc: validateRegexOrVariable("(http|https)://(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(/|/([\\w#!:.?+=&%@!\\-/]))?"), + Optional: true, + Description: "This specifies the URL to which to redirect DNS proxy requests.", + Type: schema.TypeString, + }, + "hosting_provider": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "detect_hosting_provider": { + Optional: true, + Description: "This detects requests from a hosting provider.", + Type: schema.TypeBool, + }, + "detect_hosting_provider_action": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ALLOW", "DENY", "REDIRECT"}, false)), + Optional: true, + Description: "This specifies whether to `DENY`, `ALLOW`, or `REDIRECT` requests from hosting providers.", + Type: schema.TypeString, + }, + "detect_hosting_provider_redirecturl": { + ValidateDiagFunc: validateRegexOrVariable("(http|https)://(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(/|/([\\w#!:.?+=&%@!\\-/]))?"), + Optional: true, + Description: "This specifies the absolute URL to which to redirect requests from hosting providers.", + Type: schema.TypeString, + }, + "vpn_data_center": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "detect_vpn_data_center": { + Optional: true, + Description: "This enables detection of requests from VPN data centers.", + Type: schema.TypeBool, + }, + "detect_vpn_data_center_action": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ALLOW", "DENY", "REDIRECT"}, false)), + Optional: true, + Description: "This specifies whether to `DENY`, `ALLOW`, or `REDIRECT` requests from VPN data centers.", + Type: schema.TypeString, + }, + "detect_vpn_data_center_redirecturl": { + ValidateDiagFunc: validateRegexOrVariable("(http|https)://(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(/|/([\\w#!:.?+=&%@!\\-/]))?"), + Optional: true, + Description: "This specifies the URL to which to redirect requests from VPN data centers.", + Type: schema.TypeString, + }, + "residential_proxy": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "detect_residential_proxy": { + Optional: true, + Description: "This enables detection of requests from a residential proxy. See `Enhanced Proxy Detection with GeoGuard` and learn more about this GeoGuard category before enabling it.", + Type: schema.TypeBool, + }, + "detect_residential_proxy_action": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ALLOW", "DENY", "REDIRECT"}, false)), + Optional: true, + Description: "This specifies whether to `DENY`, `ALLOW`, or `REDIRECT` requests from residential proxies.", + Type: schema.TypeString, + }, + "detect_residential_proxy_redirecturl": { + ValidateDiagFunc: validateRegexOrVariable("(http|https)://(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(/|/([\\w#!:.?+=&%@!\\-/]))?"), + Optional: true, + Description: "This specifies the URL to which to redirect requests.", + Type: schema.TypeString, + }, + }, + }, + }, + "epd_forward_header_enrichment": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior identifies unwanted requests from an anonymous proxy. This and the `enhancedProxyDetection` behavior work together and need to be included either in the same rule, or in the default one. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Sends the Enhanced Proxy Detection (`Akamai-EPD`) header in the forward request to determine whether the connecting IP address is an anonymous proxy. The header can contain one or more two-letter codes that indicate the IP address type detected by edge servers:", + Type: schema.TypeBool, + }, + }, + }, + }, + "fail_action": { + Optional: true, + Type: schema.TypeList, + Description: "Specifies how to respond when the origin is not available: by serving stale content, by serving an error page, or by redirecting. To apply this behavior, you should match on an `originTimeout` or `matchResponseCode`. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "When enabled in case of a failure to contact the origin, the current behavior applies.", + Type: schema.TypeBool, + }, + "action_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SERVE_STALE", "REDIRECT", "RECREATED_CO", "RECREATED_CEX", "RECREATED_NS", "DYNAMIC"}, false)), + Optional: true, + Description: "Specifies the basic action to take when there is a failure to contact the origin.", + Type: schema.TypeString, + }, + "saas_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"HOSTNAME", "PATH", "QUERY_STRING", "COOKIE"}, false)), + Optional: true, + Description: "Identifies the component of the request that identifies the SaaS dynamic fail action.", + Type: schema.TypeString, + }, + "saas_cname_enabled": { + Optional: true, + Description: "Specifies whether to use a CNAME chain to determine the hostname for the SaaS dynamic failaction.", + Type: schema.TypeBool, + }, + "saas_cname_level": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+$"), + Optional: true, + Description: "Specifies the number of elements in the CNAME chain backwards from the edge hostname that determines the hostname for the SaaS dynamic failaction.", + Type: schema.TypeInt, + }, + "saas_cookie": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-*\\.]+$"), + Optional: true, + Description: "Specifies the name of the cookie that identifies this SaaS dynamic failaction.", + Type: schema.TypeString, + }, + "saas_query_string": { + ValidateDiagFunc: validateRegexOrVariable("^[^:/?#\\[\\]@&]+$"), + Optional: true, + Description: "Specifies the name of the query parameter that identifies this SaaS dynamic failaction.", + Type: schema.TypeString, + }, + "saas_regex": { + ValidateDiagFunc: validateRegexOrVariable("^([a-zA-Z0-9\\:\\[\\]\\{\\}\\(\\)\\.\\?_\\-\\*\\+\\^\\$\\\\\\/\\|&=!]{1,250})$"), + Optional: true, + Description: "Specifies the substitution pattern (a Perl-compatible regular expression) that defines the SaaS dynamic failaction.", + Type: schema.TypeString, + }, + "saas_replace": { + ValidateDiagFunc: validateRegexOrVariable("^(([a-zA-Z0-9]|\\$[1-9])(([a-zA-Z0-9\\._\\-]|\\$[1-9]){0,250}([a-zA-Z0-9]|\\$[1-9]))?){1,10}$"), + Optional: true, + Description: "Specifies the replacement pattern that defines the SaaS dynamic failaction.", + Type: schema.TypeString, + }, + "saas_suffix": { + ValidateDiagFunc: validateRegexOrVariable("^([a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})\\.(com|net|org|info|biz|us|co\\.uk|ac\\.uk|org\\.uk|me\\.uk|ca|eu|com\\.au|co|co\\.za|ru|es|me|tv|pro|in|ie|de|it|nl|fr|co\\.il|ch|se|co\\.nz|pl|jp|name|mobi|cc|ws|be|com\\.mx|at|nu|asia|co\\.nz|net\\.nz|org\\.nz|com\\.au|net\\.au|org\\.au|tools)$"), + Optional: true, + Description: "Specifies the static portion of the SaaS dynamic failaction.", + Type: schema.TypeString, + }, + "dynamic_method": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SERVE_301", "SERVE_302", "SERVE_ALTERNATE"}, false)), + Optional: true, + Description: "Specifies the redirect method.", + Type: schema.TypeString, + }, + "dynamic_custom_path": { + Optional: true, + Description: "Allows you to modify the original requested path.", + Type: schema.TypeBool, + }, + "dynamic_path": { + ValidateDiagFunc: validateRegexOrVariable("^[^#\\[\\]@]+$"), + Optional: true, + Description: "Specifies the new path.", + Type: schema.TypeString, + }, + "redirect_hostname_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ORIGINAL", "ALTERNATE"}, false)), + Optional: true, + Description: "Whether to preserve or customize the hostname.", + Type: schema.TypeString, + }, + "redirect_hostname": { + ValidateDiagFunc: validateRegexOrVariable("^([a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})(\\.[a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})+$"), + Optional: true, + Description: "When the `actionType` is `REDIRECT` and the `redirectHostnameType` is `ALTERNATE`, this specifies the hostname for the redirect.", + Type: schema.TypeString, + }, + "redirect_custom_path": { + Optional: true, + Description: "Uses the `redirectPath` to customize a new path.", + Type: schema.TypeBool, + }, + "redirect_path": { + ValidateDiagFunc: validateRegexOrVariable("^[^#\\[\\]@]+$"), + Optional: true, + Description: "Specifies a new path.", + Type: schema.TypeString, + }, + "redirect_method": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntInSlice([]int{302, 301})), + Optional: true, + Description: "Specifies the HTTP response code.", + Type: schema.TypeInt, + }, + "content_hostname": { + ValidateDiagFunc: validateRegexOrVariable("^([a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})(\\.[a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})+$"), + Optional: true, + Description: "Specifies the static hostname for the alternate redirect.", + Type: schema.TypeString, + }, + "content_custom_path": { + Optional: true, + Description: "Specifies a custom redirect path.", + Type: schema.TypeBool, + }, + "content_path": { + ValidateDiagFunc: validateRegexOrVariable("^[^#\\[\\]@]+$"), + Optional: true, + Description: "Specifies a custom redirect path.", + Type: schema.TypeString, + }, + "net_storage_hostname": { + Optional: true, + Description: "When the `actionType` is `RECREATED_NS`, specifies the `NetStorage` origin to serve the alternate content. Contact Akamai Professional Services for your NetStorage origin's `id`.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cp_code": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "download_domain_name": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "g2o_token": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "net_storage_path": { + ValidateDiagFunc: validateRegexOrVariable("^[^#\\[\\]@]+$"), + Optional: true, + Description: "When the `actionType` is `RECREATED_NS`, specifies the path for the `NetStorage` request.", + Type: schema.TypeString, + }, + "cex_hostname": { + ValidateDiagFunc: validateRegexOrVariable("^([a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})(\\.[a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})+$"), + Optional: true, + Description: "Specifies a hostname.", + Type: schema.TypeString, + }, + "cex_custom_path": { + Optional: true, + Description: "Specifies a custom path.", + Type: schema.TypeBool, + }, + "cex_path": { + ValidateDiagFunc: validateRegexOrVariable("^[^#\\[\\]@]+$"), + Optional: true, + Description: "Specifies a custom path.", + Type: schema.TypeString, + }, + "cp_code": { + Optional: true, + Description: "Specifies a CP code for which to log errors for the NetStorage location. You only need to provide the initial `id`, stripping any `cpc_` prefix to pass the integer to the rule tree. Additional CP code details may reflect back in subsequent read-only data.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "name": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "created_date": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "description": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "products": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "cp_code_limits": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "current_capacity": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "limit": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "limit_type": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + }, + }, + }, + "status_code": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntInSlice([]int{200, 404, 500, 100, 101, 102, 103, 122, 201, 202, 203, 204, 205, 206, 207, 226, 400, 401, 402, 403, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 422, 423, 424, 425, 426, 428, 429, 431, 444, 449, 450, 499, 501, 502, 503, 504, 505, 506, 507, 509, 510, 511, 598, 599})), + Optional: true, + Description: "Assigns a new HTTP status code to the failure response.", + Type: schema.TypeInt, + }, + "preserve_query_string": { + Optional: true, + Description: "When using either `contentCustomPath`, `cexCustomPath`, `dynamicCustomPath`, or `redirectCustomPath` to specify a custom path, enabling this passes in the original request's query string as part of the path.", + Type: schema.TypeBool, + }, + "modify_protocol": { + Optional: true, + Description: "Modifies the redirect's protocol using the value of the `protocol` field.", + Type: schema.TypeBool, + }, + "protocol": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"HTTP", "HTTPS"}, false)), + Optional: true, + Description: "When the `actionType` is `REDIRECT` and `modifyProtocol` is enabled, this specifies the redirect's protocol.", + Type: schema.TypeString, + }, + "allow_fcm_parent_override": { + Optional: true, + Description: "", + Type: schema.TypeBool, + }, + }, + }, + }, + "failover_bot_manager_feature_compatibility": { + Optional: true, + Type: schema.TypeList, + Description: "Ensures that functionality such as challenge authentication and reset protocol work with a failover product property you use to create an alternate hostname. Apply it to any properties that implement a failover under the Cloud Security Failover product. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "compatibility": { + Optional: true, + Description: "This behavior does not include any options. Specifying the behavior itself enables it.", + Type: schema.TypeBool, + }, + }, + }, + }, + "fast_invalidate": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior is deprecated, but you should not disable or remove it if present. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "When enabled, forces a validation test for all edge content to which the behavior applies.", + Type: schema.TypeBool, + }, + }, + }, + }, + "fips": { + Optional: true, + Type: schema.TypeList, + Description: "Ensures `Federal Information Process Standards (FIPS) 140-2` compliance for a connection to an origin server. For this behavior to work properly, verify that your origin's secure certificate supports Enhanced TLS and is FIPS-compliant. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enable": { + Optional: true, + Description: "When enabled, supports the use of FIPS-validated ciphers in the connection between this delivery configuration and your origin server.", + Type: schema.TypeBool, + }, + }, + }, + }, + "first_party_marketing": { + Optional: true, + Type: schema.TypeList, + Description: "Enables the Cloud Marketing Cloudlet, which helps MediaMath customers collect usage data and place corresponding tags for use in online advertising. You can configure tags using either the Cloudlets Policy Manager application or the `Cloudlets API`. See also the `firstPartyMarketingPlus` behavior, which integrates better with both MediaMath and its partners. Both behaviors support the same set of options. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the Cloud Marketing Cloudlet.", + Type: schema.TypeBool, + }, + "java_script_insertion_rule": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"NEVER", "POLICY", "ALWAYS"}, false)), + Optional: true, + Description: "Select how to insert the MediaMath JavaScript reference script.", + Type: schema.TypeString, + }, + "cloudlet_policy": { + Optional: true, + Description: "Identifies the Cloudlet policy.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "name": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "media_math_prefix": { + ValidateDiagFunc: validateRegexOrVariable("^[^#\\[\\]@]+$"), + Optional: true, + Description: "Specify the URL path prefix that distinguishes Cloud Marketing requests from your other web traffic. Include the leading slash character, but no trailing slash. For example, if the path prefix is `/mmath`, and the request is for `www.example.com/dir`, the new URL is `www.example.com/mmath/dir`.", + Type: schema.TypeString, + }, + }, + }, + }, + "first_party_marketing_plus": { + Optional: true, + Type: schema.TypeList, + Description: "Enables the Cloud Marketing Plus Cloudlet, which helps MediaMath customers collect usage data and place corresponding tags for use in online advertising. You can configure tags using either the Cloudlets Policy Manager application or the `Cloudlets API`. See also the `firstPartyMarketing` behavior, which integrates with MediaMath but not its partners. Both behaviors support the same set of options. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the Cloud Marketing Plus Cloudlet.", + Type: schema.TypeBool, + }, + "java_script_insertion_rule": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"NEVER", "POLICY", "ALWAYS"}, false)), + Optional: true, + Description: "Select how to insert the MediaMath JavaScript reference script.", + Type: schema.TypeString, + }, + "cloudlet_policy": { + Optional: true, + Description: "Identifies the Cloudlet policy.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "name": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "media_math_prefix": { + ValidateDiagFunc: validateRegexOrVariable("^[^#\\[\\]@]+$"), + Optional: true, + Description: "Specify the URL path prefix that distinguishes Cloud Marketing requests from your other web traffic. Include the leading slash character, but no trailing slash. For example, if the path prefix is `/mmath`, and the request is for `www.example.com/dir`, the new URL is `www.example.com/mmath/dir`.", + Type: schema.TypeString, + }, + }, + }, + }, + "forward_rewrite": { + Optional: true, + Type: schema.TypeList, + Description: "The Forward Rewrite Cloudlet allows you to conditionally modify the forward path in edge content without affecting the URL that displays in the user's address bar. If Cloudlets are available on your contract, choose `Your services` > `Edge logic Cloudlets` to control how this feature works within `Control Center`, or use the `Cloudlets API` to configure it programmatically. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the Forward Rewrite Cloudlet behavior.", + Type: schema.TypeBool, + }, + "is_shared_policy": { + Optional: true, + Description: "Whether you want to use a shared policy for a Cloudlet. Learn more about shared policies and how to create them in `Cloudlets Policy Manager`.", + Type: schema.TypeBool, + }, + "cloudlet_policy": { + Optional: true, + Description: "Identifies the Cloudlet policy.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "name": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "cloudlet_shared_policy": { + Optional: true, + Description: "This identifies the Cloudlet shared policy to use with this behavior. You can list available shared policies with the `Cloudlets API`.", + Type: schema.TypeInt, + }, + }, + }, + }, + "g2oheader": { + Optional: true, + Type: schema.TypeList, + Description: "The `signature header authentication` (g2o) security feature provides header-based verification of outgoing origin requests. Edge servers encrypt request data in a pre-defined header, which the origin uses to verify that the edge server processed the request. This behavior configures the request data, header names, encryption algorithm, and shared secret to use for verification. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the g2o verification behavior.", + Type: schema.TypeBool, + }, + "data_header": { + ValidateDiagFunc: validateRegexOrVariable("^[^()<>@,;:\\\"/\\[\\]?{}\\s]+$"), + Optional: true, + Description: "Specifies the name of the header that contains the request data that needs to be encrypted.", + Type: schema.TypeString, + }, + "signed_header": { + ValidateDiagFunc: validateRegexOrVariable("^[^()<>@,;:\\\"/\\[\\]?{}\\s]+$"), + Optional: true, + Description: "Specifies the name of the header containing encrypted request data.", + Type: schema.TypeString, + }, + "encoding_version": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntInSlice([]int{1, 2, 3, 4, 5})), + Optional: true, + Description: "Specifies the version of the encryption algorithm as an integer from `1` through `5`.", + Type: schema.TypeInt, + }, + "use_custom_sign_string": { + Optional: true, + Description: "When disabled, the encrypted string is based on the forwarded URL. If enabled, you can use `customSignString` to customize the set of data to encrypt.", + Type: schema.TypeBool, + }, + "custom_sign_string": { + Optional: true, + Description: "Specifies the set of data to be encrypted as a combination of concatenated strings.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "secret_key": { + ValidateDiagFunc: validateAny(validation.ToDiagFunc(validation.StringIsEmpty), validateRegexOrVariable("^[0-9a-zA-Z]{24}$")), + Optional: true, + Description: "Specifies the shared secret key.", + Type: schema.TypeString, + }, + "nonce": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9a-zA-Z]{1,8}$"), + Optional: true, + Description: "Specifies the cryptographic `nonce` string.", + Type: schema.TypeString, + }, + }, + }, + }, + "global_request_number": { + Optional: true, + Type: schema.TypeList, + Description: "Generates a unique identifier for each request on the Akamai edge network, for use in logging and debugging. GRN identifiers follow the same format as Akamai's error reference strings, for example: `0.05313217.1567801841.1457a3`. You can use the Edge Diagnostics API's `Translate error string` operation to get low-level details about any request. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "output_option": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"RESPONSE_HEADER", "REQUEST_HEADER", "BOTH_HEADERS", "ASSIGN_VARIABLE"}, false)), + Optional: true, + Description: "Specifies how to report the GRN value.", + Type: schema.TypeString, + }, + "header_name": { + ValidateDiagFunc: validateRegexOrVariable("^[^()<>@,;:\\\"/\\[\\]?{}\\s]+$"), + Optional: true, + Description: "With `outputOption` set to specify any set of headers, this specifies the name of the header to report the GRN value.", + Type: schema.TypeString, + }, + "variable_name": { + Optional: true, + Description: "This specifies the name of the variable to assign the GRN value to. You need to pre-declare any `variable` you specify within the rule tree.", + Type: schema.TypeString, + }, + }, + }, + }, + "graphql_caching": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior configures how to cache GraphQL-based API traffic. Enable `caching` for your GraphQL API traffic, along with `allowPost` to cache POST responses. To configure REST API traffic, use the `rapid` behavior. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables GraphQL caching.", + Type: schema.TypeBool, + }, + "cache_responses_with_errors": { + Optional: true, + Description: "When enabled, caches responses that include an `error` field at the top of the response body object. Disable this if your GraphQL server yields temporary errors with success codes in the 2xx range.", + Type: schema.TypeBool, + }, + "advanced": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "post_request_processing_error_handling": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"APPLY_CACHING_BEHAVIOR", "NO_STORE"}, false)), + Optional: true, + Description: "Specify what happens if GraphQL query processing fails on POST requests.", + Type: schema.TypeString, + }, + "operations_url_query_parameter_name": { + Optional: true, + Description: "Specifies the name of a query parameter that identifies requests as GraphQL queries.", + Type: schema.TypeString, + }, + "operations_json_body_parameter_name": { + Optional: true, + Description: "The name of the JSON body parameter that identifies GraphQL POST requests.", + Type: schema.TypeString, + }, + }, + }, + }, + "gzip_response": { + Optional: true, + Type: schema.TypeList, + Description: "Apply `gzip` compression to speed transfer time. This behavior applies best to text-based content such as HTML, CSS, and JavaScript, especially once files exceed about 10KB. Do not apply it to already compressed image formats, or to small files that would add more time to uncompress. To apply this behavior, you should match on `contentType` or the content's `cacheability`. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "behavior": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ORIGIN_RESPONSE", "ALWAYS", "NEVER"}, false)), + Optional: true, + Description: "Specify when to compress responses.", + Type: schema.TypeString, + }, + }, + }, + }, + "hd_data_advanced": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior specifies Akamai XML metadata that can only be configured on your behalf by Akamai Professional Services. Unlike the `advanced` behavior, this may apply a different set of overriding metadata that executes in a post-processing phase. This behavior is for internal usage only. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "description": { + Optional: true, + Description: "Human-readable description of what the XML block does.", + Type: schema.TypeString, + }, + "xml": { + Optional: true, + Description: "A block of Akamai XML metadata.", + Type: schema.TypeString, + }, + }, + }, + }, + "health_detection": { + Optional: true, + Type: schema.TypeList, + Description: "Monitors the health of your origin server by tracking unsuccessful attempts to contact it. Use this behavior to keep end users from having to wait several seconds before a forwarded request times out, or to reduce requests on the origin server when it is unavailable. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "retry_count": { + Optional: true, + Description: "The number of consecutive connection failures that mark an IP address as faulty.", + Type: schema.TypeInt, + }, + "retry_interval": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+[DdHhMmSs]$"), + Optional: true, + Description: "Specifies the amount of time the edge server will wait before trying to reconnect to an IP address it has already identified as faulty.", + Type: schema.TypeString, + }, + "maximum_reconnects": { + Optional: true, + Description: "Specifies the maximum number of times the edge server will contact your origin server. If your origin is associated with several IP addresses, `maximumReconnects` effectively overrides the value of `retryCount`.", + Type: schema.TypeInt, + }, + }, + }, + }, + "hsaf_eip_binding": { + Optional: true, + Type: schema.TypeList, + Description: "Edge IP Binding works with a limited set of static IP addresses to distribute your content, which can be limiting in large footprint environments. This behavior sets Hash Serial and Forward (HSAF) for Edge IP Binding to deal with larger footprints. It can only be configured on your behalf by Akamai Professional Services. This behavior is for internal usage only. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables HSAF for Edge IP Binding customers with a large footprint.", + Type: schema.TypeBool, + }, + "custom_extracted_serial": { + Optional: true, + Description: "Whether to pull the serial number from the variable value set in the `advanced` behavior. Work with your Akamai Services team to add the `advanced` behavior earlier in your property to extract and apply the `AKA_PM_EIP_HSAF_SERIAL` variable.", + Type: schema.TypeBool, + }, + "hash_min_value": { + Optional: true, + Description: "Specifies the minimum value for the HSAF hash range, from 2 through 2045. This needs to be lower than `hashMaxValue`.", + Type: schema.TypeInt, + }, + "hash_max_value": { + Optional: true, + Description: "Specifies the maximum value for the hash range, from 3 through 2046. This needs to be higher than `hashMinValue`.", + Type: schema.TypeInt, + }, + "tier": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"EDGE", "PARENT", "BOTH"}, false)), + Optional: true, + Description: "Specifies where the behavior is applied.", + Type: schema.TypeString, + }, + }, + }, + }, + "http2": { + Optional: true, + Type: schema.TypeList, + Description: "Enables the HTTP/2 protocol, which reduces latency and improves efficiency. You can only apply this behavior if the property is marked as secure. See `Secure property requirements` for guidance. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + "http3": { + Optional: true, + Type: schema.TypeList, + Description: "This enables the HTTP/3 protocol that uses QUIC. The behavior allows for improved performance and faster connection setup. You can only apply this behavior if the property is marked as secure. See `Secure property requirements` and the `Property Manager documentation` for guidance. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enable": { + Optional: true, + Description: "This enables HTTP/3 connections between requesting clients and Akamai edge servers. You also need to enable QUIC and TLS 1.3 in your certificate deployment settings. See the `Property Manager documentation` for more details.", + Type: schema.TypeBool, + }, + }, + }, + }, + "http_strict_transport_security": { + Optional: true, + Type: schema.TypeList, + Description: "Applies HTTP Strict Transport Security (HSTS), disallowing insecure HTTP traffic. Apply this to hostnames managed with Standard TLS or Enhanced TLS certificates. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enable": { + Optional: true, + Description: "Applies HSTS to this set of requests.", + Type: schema.TypeBool, + }, + "max_age": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ZERO_MINS", "TEN_MINS", "ONE_DAY", "ONE_MONTH", "THREE_MONTHS", "SIX_MONTHS", "ONE_YEAR"}, false)), + Optional: true, + Description: "Specifies the duration for which to apply HSTS for new browser connections.", + Type: schema.TypeString, + }, + "include_sub_domains": { + Optional: true, + Description: "When enabled, applies HSTS to all subdomains.", + Type: schema.TypeBool, + }, + "preload": { + Optional: true, + Description: "When enabled, adds this domain to the browser's preload list. You still need to declare the domain at `hstspreload.org`.", + Type: schema.TypeBool, + }, + "redirect": { + Optional: true, + Description: "When enabled, redirects all HTTP requests to HTTPS.", + Type: schema.TypeBool, + }, + "redirect_status_code": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntInSlice([]int{301, 302})), + Optional: true, + Description: "Specifies a response code.", + Type: schema.TypeInt, + }, + }, + }, + }, + "http_to_https_upgrade": { + Optional: true, + Type: schema.TypeList, + Description: "Upgrades an HTTP edge request to HTTPS for the remainder of the request flow. Enable this behavior only if your origin supports HTTPS, and if your `origin` behavior is configured with `originCertsToHonor` to verify SSL certificates. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "upgrade": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + "im_override": { + Optional: true, + Type: schema.TypeList, + Description: "This specifies common query parameters that affect how `imageManager` transforms images, potentially overriding policy, width, format, or density request parameters. This also allows you to assign the value of one of the property's `rule tree variables` to one of Image and Video Manager's own policy variables. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "override": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"POLICY", "POLICY_VARIABLE", "WIDTH", "FORMAT", "DPR", "EXCLUDE_QUERY"}, false)), + Optional: true, + Description: "Selects the type of query parameter you want to set.", + Type: schema.TypeString, + }, + "typesel": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"VALUE", "VARIABLE"}, false)), + Optional: true, + Description: "Specifies how to set a query parameter.", + Type: schema.TypeString, + }, + "formatvar": { + Optional: true, + Description: "This selects the variable with the name of the browser you want to optimize images for. The variable specifies the same type of data as the `format` option below.", + Type: schema.TypeString, + }, + "format": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"CHROME", "IE", "SAFARI", "GENERIC", "AVIF_WEBP_JPEG_PNG_GIF", "JP2_WEBP_JPEG_PNG_GIF", "WEBP_JPEG_PNG_GIF", "JPEG_PNG_GIF"}, false)), + Optional: true, + Description: "Specifies the type of the browser, or the encodings passed in the `Accept` header, that you want to optimize images for.", + Type: schema.TypeString, + }, + "dprvar": { + Optional: true, + Description: "This selects the variable with the desired pixel density. The variable specifies the same type of data as the `dpr` option below.", + Type: schema.TypeString, + }, + "dpr": { + Optional: true, + Description: "Directly specifies the pixel density. The numeric value is a scaling factor of 1, representing normal density.", + Type: schema.TypeFloat, + }, + "widthvar": { + Optional: true, + Description: "Selects the variable with the desired width. If the Image and Video Manager policy doesn't define that width, it serves the next largest width.", + Type: schema.TypeString, + }, + "width": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+$"), + Optional: true, + Description: "Sets the image's desired pixel width directly. If the Image Manager policy doesn't define that width, it serves the next largest width.", + Type: schema.TypeFloat, + }, + "policyvar": { + Optional: true, + Description: "This selects the variable with the desired Image and Video Manager policy name to apply to image requests. If there is no policy by that name, Image and Video Manager serves the image unmodified.", + Type: schema.TypeString, + }, + "policy": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_-]{1,32}$"), + Optional: true, + Description: "This selects the desired Image and Video Manager policy name directly. If there is no policy by that name, Image and Video Manager serves the image unmodified.", + Type: schema.TypeString, + }, + "policyvar_name": { + Optional: true, + Description: "This selects the name of one of the variables defined in an Image and Video Manager policy that you want to replace with the property's rule tree variable.", + Type: schema.TypeString, + }, + "policyvar_i_mvar": { + Optional: true, + Description: "This selects one of the property's rule tree variables to assign to the `policyvarName` variable within Image and Video Manager.", + Type: schema.TypeString, + }, + "exclude_all_query_parameters": { + Optional: true, + Description: "Whether to exclude all query parameters from the Image and Video Manager cache key.", + Type: schema.TypeBool, + }, + "excluded_query_parameters": { + Optional: true, + Description: "Specifies individual query parameters to exclude from the Image and Video Manager cache key.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }, + }, + }, + "image_and_video_manager": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "policy_set_type": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "", + Type: schema.TypeBool, + }, + "resize": { + Optional: true, + Description: "", + Type: schema.TypeBool, + }, + "apply_best_file_type": { + Optional: true, + Description: "", + Type: schema.TypeBool, + }, + "cp_code_original": { + Optional: true, + Description: "", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "name": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "created_date": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "description": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "products": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "cp_code_limits": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "current_capacity": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "limit": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "limit_type": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + }, + }, + }, + "cp_code_transformed": { + Optional: true, + Description: "", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "name": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "created_date": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "description": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "products": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "cp_code_limits": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "current_capacity": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "limit": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "limit_type": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + }, + }, + }, + "image_set": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_-]+([^-].|[^v])$"), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "video_set": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_-]+-v$"), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "image_manager": { + Optional: true, + Type: schema.TypeList, + Description: "Optimizes images' size or file type for the requesting device. You can also use this behavior to generate API tokens to apply your own policies to matching images using the `Image and Video Manager API`. To apply this behavior, you need to match on a `fileExtension`. Once you apply Image and Video Manager to traffic, you can add the `advancedImMatch` to ensure the behavior applies to the requests from the Image and Video Manager backend. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "settings_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enable image management capabilities and generate a corresponding API token.", + Type: schema.TypeBool, + }, + "resize": { + Optional: true, + Description: "Specify whether to scale down images to the maximum screen resolution, as determined by the rendering device's user agent. Note that enabling this may affect screen layout in unexpected ways.", + Type: schema.TypeBool, + }, + "apply_best_file_type": { + Optional: true, + Description: "Specify whether to convert images to the best file type for the requesting device, based on its user agent and the initial image file. This produces the smallest file size possible that retains image quality.", + Type: schema.TypeBool, + }, + "super_cache_region": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"US", "ASIA", "AUSTRALIA", "EMEA", "JAPAN", "CHINA"}, false)), + Optional: true, + Description: "Specifies a location for your site's heaviest traffic, for use in caching derivatives on edge servers.", + Type: schema.TypeString, + }, + "traffic_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "cp_code_original": { + Optional: true, + Description: "Assigns a CP code to track traffic and billing for original images that the Image and Video Manager has not modified. You only need to provide the initial `id`, stripping any `cpc_` prefix to pass the integer to the rule tree. Additional CP code details may reflect back in subsequent read-only data.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "name": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "created_date": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "description": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "products": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "cp_code_limits": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "current_capacity": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "limit": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "limit_type": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + }, + }, + }, + "cp_code_transformed": { + Optional: true, + Description: "Assigns a separate CP code to track traffic and billing for derived images. You only need to provide the initial `id`, stripping any `cpc_` prefix to pass the integer to the rule tree. Additional CP code details may reflect back in subsequent read-only data.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "name": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "created_date": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "description": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "products": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "cp_code_limits": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "current_capacity": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "limit": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "limit_type": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + }, + }, + }, + "api_reference_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "use_existing_policy_set": { + Optional: true, + Description: "Whether to use a previously created policy set that may be referenced in other properties, or create a new policy set to use with this property. A policy set can be shared across multiple properties belonging to the same contract. The behavior populates any changes to the policy set across all properties that reference that set.", + Type: schema.TypeBool, + }, + "policy_set": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_-]+([^-].|[^v])$"), + Optional: true, + Description: "Identifies the existing policy set configured with `Image and Video Manager API`.", + Type: schema.TypeString, + }, + "advanced": { + Optional: true, + Description: "Generates a custom `Image and Video Manager API` token to apply a corresponding policy to this set of images. The token consists of a descriptive label (the `policyToken`) concatenated with a property-specific identifier that's generated when you save the property. The API registers the token when you activate the property.", + Type: schema.TypeBool, + }, + "policy_token": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_-]{1,64}$"), + Optional: true, + Description: "Assign a prefix label to help match the policy token to this set of images, limited to 32 alphanumeric or underscore characters. If you don't specify a label, `default` becomes the prefix.", + Type: schema.TypeString, + }, + "policy_token_default": { + Optional: true, + Description: "Specify the default policy identifier, which is registered with the `Image and Video Manager API` once you activate this property. The `advanced` option needs to be inactive.", + Type: schema.TypeString, + }, + }, + }, + }, + "image_manager_video": { + Optional: true, + Type: schema.TypeList, + Description: "Optimizes videos managed by Image and Video Manager for the requesting device. You can also use this behavior to generate API tokens to apply your own policies to matching videos using the `Image and Video Manager API`. To apply this behavior, you need to match on a `fileExtension`. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "settings_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Applies Image and Video Manager's video optimization to the current content.", + Type: schema.TypeBool, + }, + "resize": { + Optional: true, + Description: "When enabled, scales down video for smaller mobile screens, based on the device's `User-Agent` header.", + Type: schema.TypeBool, + }, + "apply_best_file_type": { + Optional: true, + Description: "When enabled, automatically converts videos to the best file type for the requesting device. This produces the smallest file size that retains image quality, based on the user agent and the initial image file.", + Type: schema.TypeBool, + }, + "super_cache_region": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"US", "ASIA", "AUSTRALIA", "EMEA", "JAPAN", "CHINA"}, false)), + Optional: true, + Description: "To optimize caching, assign a region close to your site's heaviest traffic.", + Type: schema.TypeString, + }, + "traffic_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "cp_code_original": { + Optional: true, + Description: "Specifies the CP code for which to track Image and Video Manager video traffic. Use this along with `cpCodeTransformed` to track traffic to derivative video content. You only need to provide the initial `id`, stripping any `cpc_` prefix to pass the integer to the rule tree. Additional CP code details may reflect back in subsequent read-only data.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "name": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "created_date": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "description": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "products": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "cp_code_limits": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "current_capacity": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "limit": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "limit_type": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + }, + }, + }, + "cp_code_transformed": { + Optional: true, + Description: "Specifies the CP code to identify derivative transformed video content. You only need to provide the initial `id`, stripping any `cpc_` prefix to pass the integer to the rule tree. Additional CP code details may reflect back in subsequent read-only data.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "name": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "created_date": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "description": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "products": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "cp_code_limits": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "current_capacity": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "limit": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "limit_type": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + }, + }, + }, + "api_reference_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "use_existing_policy_set": { + Optional: true, + Description: "Whether to use a previously created policy set that may be referenced in other properties, or create a new policy set to use with this property. A policy set can be shared across multiple properties belonging to the same contract. The behavior populates any changes to the policy set across all properties that reference that set.", + Type: schema.TypeBool, + }, + "policy_set": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_-]+-v$"), + Optional: true, + Description: "Identifies the existing policy set configured with `Image and Video Manager API`.", + Type: schema.TypeString, + }, + "advanced": { + Optional: true, + Description: "When disabled, applies a single standard policy based on your property name. Allows you to reference a rule-specific `policyToken` for videos with different match criteria.", + Type: schema.TypeBool, + }, + "policy_token": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_-]{1,64}$"), + Optional: true, + Description: "Specifies a custom policy defined in the Image and Video Manager Policy Manager or the `Image and Video Manager API`. The policy name can include up to 64 alphanumeric, dash, or underscore characters.", + Type: schema.TypeString, + }, + "policy_token_default": { + Optional: true, + Description: "Specifies the default policy identifier, which is registered with the `Image and Video Manager API` once you activate this property.", + Type: schema.TypeString, + }, + }, + }, + }, + "include": { + Optional: true, + Type: schema.TypeList, + Description: "Includes let you reuse chunks of a property configuration that you can manage separately from the rest of the property rule tree. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "id": { + Optional: true, + Description: "Identifies the include you want to add to your rule tree. You can get the include ID using `PAPI`. This option only accepts digits, without the `inc_` ID prefix.", + Type: schema.TypeString, + }, + }, + }, + }, + "instant": { + Optional: true, + Type: schema.TypeList, + Description: "The Instant feature allows you to prefetch content to the edge cache by adding link relation attributes to markup. For example: This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "prefetch_cacheable": { + Optional: true, + Description: "When enabled, applies prefetching only to objects already set to be cacheable, for example using the `caching` behavior. Only applies to content with the `tieredDistribution` behavior enabled.", + Type: schema.TypeBool, + }, + "prefetch_no_store": { + Optional: true, + Description: "Allows otherwise non-cacheable `no-store` content to prefetch if the URL path ends with `/` to indicate a request for a default file, or if the extension matches the value of the `prefetchNoStoreExtensions` option. Only applies to content with the `sureRoute` behavior enabled.", + Type: schema.TypeBool, + }, + "prefetch_no_store_extensions": { + Optional: true, + Description: "Specifies a set of file extensions for which the `prefetchNoStore` option is allowed.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "prefetch_html": { + Optional: true, + Description: "Allows edge servers to prefetch additional HTML pages while pages that link to them are being delivered. This only applies to links from `` or `` tags with the appropriate link relation attribute.", + Type: schema.TypeBool, + }, + "custom_link_relations": { + Optional: true, + Description: "Specify link relation values that activate the prefetching behavior. For example, specifying `fetch` allows you to use shorter `rel=\"fetch\"` markup.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }, + }, + }, + "instant_config": { + Optional: true, + Type: schema.TypeList, + Description: "Multi-Domain Configuration, also known as `InstantConfig`, allows you to apply property settings to all incoming hostnames based on a DNS lookup, without explicitly listing them among the property's hostnames. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the InstantConfig behavior.", + Type: schema.TypeBool, + }, + }, + }, + }, + "large_file_optimization": { + Optional: true, + Type: schema.TypeList, + Description: "The `Large File Optimization` (LFO) feature improves performance and reliability when delivering large files. You need this behavior for objects larger than 1.8GB, and you should apply it to anything over 100MB. You should apply it only to the specific content to be optimized, such as a download directory's `.gz` files, and enable the `useVersioning` option while enforcing your own filename versioning policy. Make sure you meet all the `requirements and best practices` for the LFO delivery. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the file optimization behavior.", + Type: schema.TypeBool, + }, + "enable_partial_object_caching": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"PARTIAL_OBJECT_CACHING", "NON_PARTIAL_OBJECT_CACHING"}, false)), + Optional: true, + Description: "Specifies whether to cache partial objects.", + Type: schema.TypeString, + }, + "minimum_size": { + ValidateDiagFunc: validateRegexOrVariable("^\\d+[K,M,G,T]B$"), + Optional: true, + Description: "Optimization only applies to files larger than this, expressed as a number suffixed with a unit string such as `MB` or `GB`.", + Type: schema.TypeString, + }, + "maximum_size": { + ValidateDiagFunc: validateRegexOrVariable("^\\d+[K,M,G,T]B$"), + Optional: true, + Description: "Optimization does not apply to files larger than this, expressed as a number suffixed with a unit string such as `MB` or `GB`. The size of a file can't be greater than 323 GB. If you need to optimize a larger file, contact Akamai Professional Services for help. This option is for internal usage only.", + Type: schema.TypeString, + }, + "use_versioning": { + Optional: true, + Description: "When `enablePartialObjectCaching` is set to `PARTIAL_OBJECT_CACHING`, enabling this option signals your intention to vary filenames by version, strongly recommended to avoid serving corrupt content when chunks come from different versions of the same file.", + Type: schema.TypeBool, + }, + }, + }, + }, + "large_file_optimization_advanced": { + Optional: true, + Type: schema.TypeList, + Description: "The `Large File Optimization` feature improves performance and reliability when delivering large files. You need this behavior for objects larger than 1.8GB, and it's recommended for anything over 100MB. You should apply it only to the specific content to be optimized, such as a download directory's `.gz` files. Note that it is best to use `NetStorage` for objects larger than 1.8GB. This behavior is for internal usage only. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the file optimization behavior.", + Type: schema.TypeBool, + }, + "object_size": { + ValidateDiagFunc: validateRegexOrVariable("^\\d+[K,M,G,T]B$"), + Optional: true, + Description: "Specifies the size of the file at which point to apply partial object (POC) caching. Append a numeric value with a `MB` or `GB` suffix.", + Type: schema.TypeString, + }, + "fragment_size": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"HALF_MB", "ONE_MB", "TWO_MB", "FOUR_MB"}, false)), + Optional: true, + Description: "Specifies the size of each fragment used for partial object caching.", + Type: schema.TypeString, + }, + "prefetch_during_request": { + Optional: true, + Description: "The number of POC fragments to prefetch during the request.", + Type: schema.TypeInt, + }, + "prefetch_after_request": { + Optional: true, + Description: "The number of POC fragments to prefetch after the request.", + Type: schema.TypeInt, + }, + }, + }, + }, + "limit_bit_rate": { + Optional: true, + Type: schema.TypeList, + Description: "Control the rate at which content serves out to end users, optionally varying the speed depending on the file size or elapsed download time. Each bit rate specified in the `bitrateTable` array corresponds to a `thresholdTable` entry that activates it. You can use this behavior to prevent media downloads from progressing faster than they are viewed, for example, or to differentiate various tiers of end-user experience. To apply this behavior, you should match on a `contentType`, `path`, or `filename`. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "When enabled, activates the bit rate limiting behavior.", + Type: schema.TypeBool, + }, + "bitrate_table": { + Optional: true, + Description: "Specifies a download rate that corresponds to a `thresholdTable` entry. The bit rate appears as a two-member object consisting of a numeric `bitrateValue` and a `bitrateUnit` string, with allowed values of `Kbps`, `Mbps`, and `Gbps`.", + Type: schema.TypeList, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "bitrate_value": { + Optional: true, + Description: "The numeric indicator of the download rate.", + Type: schema.TypeFloat, + }, + "bitrate_unit": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"KBPS", "MBPS", "GBPS"}, false)), + Optional: true, + Description: "The unit of measurement, either `KBPS`, `MBPS`, or `GBPS`.", + Type: schema.TypeString, + }, + }, + }, + }, + "threshold_table": { + Optional: true, + Description: "Specifies the minimum size of the file or the amount of elapsed download time before applying the bit rate limit from the corresponding `bitrateTable` entry. The threshold appears as a two-member object consisting of a numeric `thresholdValue` and `thresholdUnit` string, with allowed values of `SECONDS` or `BYTES`.", + Type: schema.TypeList, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "threshold_value": { + Optional: true, + Description: "The numeric indicator of the minimum file size or elapsed download time.", + Type: schema.TypeInt, + }, + "threshold_unit": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"BYTES", "SECONDS"}, false)), + Optional: true, + Description: "The unit of measurement, either `SECONDS` of the elapsed download time, or `BYTES` of the file size.", + Type: schema.TypeString, + }, + }, + }, + }, + }, + }, + }, + "log_custom": { + Optional: true, + Type: schema.TypeList, + Description: "Logs custom details from the origin response in the `Log Delivery Service` report. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "log_custom_log_field": { + Optional: true, + Description: "Whether to append additional custom data to each log line.", + Type: schema.TypeBool, + }, + "custom_log_field": { + Optional: true, + Description: "Specifies an additional data field to append to each log line, maximum 1000 bytes, typically based on a dynamically generated built-in system variable. For example, `round-trip: {{builtin.AK_CLIENT_TURNAROUND_TIME}}ms` logs the total time to complete the response. See `Support for variables` for more information. Since this option can specify both a request and response, it overrides any `customLogField` settings in the `report` behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + "m_pulse": { + Optional: true, + Type: schema.TypeList, + Description: "`mPulse` provides high-level performance analytics and predictive recommendations based on real end user data. See the `mPulse Quick Start` to set up mPulse on your website. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Applies performance monitoring to this behavior's set of content.", + Type: schema.TypeBool, + }, + "require_pci": { + Optional: true, + Description: "Suppresses gathering metrics for potentially sensitive end-user interactions. Enabling this omits data from some older browsers.", + Type: schema.TypeBool, + }, + "loader_version": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"V10", "V12", "LATEST", "BETA"}, false)), + Optional: true, + Description: "Specifies the version of the Boomerang JavaScript loader snippet. See `mPulse Loader Snippets` for more information.", + Type: schema.TypeString, + }, + "title_optional": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "api_key": { + ValidateDiagFunc: validateAny(validation.ToDiagFunc(validation.StringIsEmpty), validateRegexOrVariable("^$|^[a-zA-Z2-9]{5}-[a-zA-Z2-9]{5}-[a-zA-Z2-9]{5}-[a-zA-Z2-9]{5}-[a-zA-Z2-9]{5}$")), + Optional: true, + Description: "This generated value uniquely identifies sections of your website for you to analyze independently. To access this value, see `Enable mPulse in Property Manager`.", + Type: schema.TypeString, + }, + "buffer_size": { + ValidateDiagFunc: validateAny(validation.ToDiagFunc(validation.StringIsEmpty), validateRegexOrVariable("^(1[5-9][0-9]|1[0-9]{3}|[2-9][0-9]{2,3})$")), + Optional: true, + Description: "Allows you to override the browser's default (150) maximum number of reported performance timeline entries.", + Type: schema.TypeString, + }, + "config_override": { + Optional: true, + Description: "A JSON string representing a configuration object passed to the JavaScript library under which mPulse runs. It corresponds at run-time to the `window.BOOMR_config` object. For example, this turns on monitoring of Single Page App frameworks: `\"{\\\"history\\\": {\\\"enabled\\\": true, \\\"auto\\\": true}}\"`. See `Configuration Overrides` for more information.", + Type: schema.TypeString, + }, + }, + }, + }, + "manifest_personalization": { + Optional: true, + Type: schema.TypeList, + Description: "Allows customers who use the Adaptive Media Delivery product to enhance content based on the capabilities of each end user's device. This behavior configures a `manifest` for both HLS Live and on-demand streaming. For more information, see `Adaptive Media Delivery`. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the Manifest Personalization feature.", + Type: schema.TypeBool, + }, + "hls_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "hls_enabled": { + Optional: true, + Description: "Allows you to customize the HLS master manifest that's sent to the requesting client.", + Type: schema.TypeBool, + }, + "hls_mode": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"BEST_PRACTICE", "CUSTOM"}, false)), + Optional: true, + Description: "Applies with `hlsEnabled` on.", + Type: schema.TypeString, + }, + "hls_preferred_bitrate": { + ValidateDiagFunc: validateAny(validation.ToDiagFunc(validation.StringIsEmpty), validateRegexOrVariable("^\\d+$")), + Optional: true, + Description: "Sets the preferred bit rate in Kbps. This causes the media playlist specified in the `#EXT-X-STREAM-INF` tag that most closely matches the value to list first. All other playlists maintain their current position in the manifest.", + Type: schema.TypeString, + }, + "hls_filter_in_bitrates": { + ValidateDiagFunc: validateAny(validation.ToDiagFunc(validation.StringIsEmpty), validateRegexOrVariable("^\\d+(,\\d+)*$")), + Optional: true, + Description: "Specifies a comma-delimited set of preferred bit rates, such as `100,200,400`. Playlists specified in the `#EXT-X-STREAM-INF` tag with bit rates outside of any of those values by up to 100 Kbps are excluded from the manifest.", + Type: schema.TypeString, + }, + "hls_filter_in_bitrate_ranges": { + Optional: true, + Description: "Specifies a comma-delimited set of bit rate ranges, such as `100-400,1000-4000`. Playlists specified in the `#EXT-X-STREAM-INF` tag with bit rates outside of any of those ranges are excluded from the manifest.", + Type: schema.TypeString, + }, + "hls_query_param_enabled": { + Optional: true, + Description: "Specifies query parameters for the HLS master manifest to customize the manifest's content. Any settings specified in the query string override those already configured in Property Manager.", + Type: schema.TypeBool, + }, + "hls_query_param_secret_key": { + ValidateDiagFunc: validateAny(validation.ToDiagFunc(validation.StringIsEmpty), validateRegexOrVariable("^(0x)?[0-9a-fA-F]{32}$")), + Optional: true, + Description: "Specifies a primary key as a token to accompany the request.", + Type: schema.TypeString, + }, + "hls_query_param_transition_key": { + ValidateDiagFunc: validateAny(validation.ToDiagFunc(validation.StringIsEmpty), validateRegexOrVariable("^(0x)?[0-9a-fA-F]{32}$")), + Optional: true, + Description: "Specifies a transition key as a token to accompany the request.", + Type: schema.TypeString, + }, + "hls_show_advanced": { + Optional: true, + Description: "Allows you to configure advanced settings.", + Type: schema.TypeBool, + }, + "hls_enable_debug_headers": { + Optional: true, + Description: "Includes additional `Akamai-Manifest-Personalization` and `Akamai-Manifest-Personalization-Config-Source` debugging headers.", + Type: schema.TypeBool, + }, + }, + }, + }, + "manifest_rerouting": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior works with `adScalerCircuitBreaker`. It delegates parts of the media delivery workflow, like ad insertion, to other technology partners. Akamai reroutes manifest file requests to partner platforms for processing prior to being delivered. Rerouting simplifies the workflow and improves the media streaming experience. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "partner": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"adobe_primetime"}, false)), + Optional: true, + Description: "Set this value to `adobe_primetime`, which is an external technology partner that provides value added offerings, like advertisement integration, to the requested media objects.", + Type: schema.TypeString, + }, + "username": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9A-Za-z!@.,;:'\"?-]{1,50}$"), + Optional: true, + Description: "The user name for your Adobe Primetime account.", + Type: schema.TypeString, + }, + }, + }, + }, + "manual_server_push": { + Optional: true, + Type: schema.TypeList, + Description: "With the `http2` behavior enabled, this loads a specified set of objects into the client browser's cache. To apply this behavior, you should match on a `path` or `filename`. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "serverpushlist": { + Optional: true, + Description: "Specifies the set of objects to load into the client browser's cache over HTTP2. Each value in the array represents a hostname and full path to the object, such as `www.example.com/js/site.js`.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }, + }, + }, + "media_acceleration": { + Optional: true, + Type: schema.TypeList, + Description: "Enables Accelerated Media Delivery for this set of requests. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables Media Acceleration.", + Type: schema.TypeBool, + }, + }, + }, + }, + "media_acceleration_quic_optout": { + Optional: true, + Type: schema.TypeList, + Description: "When enabled, disables use of QUIC protocol for this set of accelerated media content. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "optout": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + "media_client": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior is deprecated, but you should not disable or remove it if present. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables client-side download analytics.", + Type: schema.TypeBool, + }, + "beacon_id": { + Optional: true, + Description: "Specifies the ID of data source's beacon.", + Type: schema.TypeString, + }, + "use_hybrid_http_udp": { + Optional: true, + Description: "Enables the hybrid HTTP/UDP protocol.", + Type: schema.TypeBool, + }, + }, + }, + }, + "media_file_retrieval_optimization": { + Optional: true, + Type: schema.TypeList, + Description: "Media File Retrieval Optimization (MFRO) speeds the delivery of large media files by relying on caches of partial objects. You should use it for files larger than 100 MB. It's required for files larger than 1.8 GB, and works best with `NetStorage`. To apply this behavior, you should match on a `fileExtension`. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the partial-object caching behavior.", + Type: schema.TypeBool, + }, + }, + }, + }, + "media_origin_failover": { + Optional: true, + Type: schema.TypeList, + Description: "Specifies how edge servers respond when the origin is unresponsive, or suffers from server or content errors. You can specify how many times to retry, switch to a backup origin hostname, or configure a redirect. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "detect_origin_unresponsive_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "detect_origin_unresponsive": { + Optional: true, + Description: "Allows you to configure what happens when the origin is unresponsive.", + Type: schema.TypeBool, + }, + "origin_unresponsive_detection_level": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"AGGRESSIVE", "CONSERVATIVE", "MODERATE"}, false)), + Optional: true, + Description: "Specify the level of response to slow origin connections.", + Type: schema.TypeString, + }, + "origin_unresponsive_blacklist_origin_ip": { + Optional: true, + Description: "Enabling this blacklists the origin's IP address.", + Type: schema.TypeBool, + }, + "origin_unresponsive_blacklist_window": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"TEN_S", "THIRTY_S"}, false)), + Optional: true, + Description: "This sets the delay before blacklisting an IP address.", + Type: schema.TypeString, + }, + "origin_unresponsive_recovery": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"RETRY_X_TIMES", "SWITCH_TO_BACKUP_ORIGIN", "REDIRECT_TO_DIFFERENT_ORIGIN_LOCATION"}, false)), + Optional: true, + Description: "This sets the recovery option.", + Type: schema.TypeString, + }, + "origin_unresponsive_retry_limit": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ONE", "TWO", "THREE"}, false)), + Optional: true, + Description: "Sets how many times to retry.", + Type: schema.TypeString, + }, + "origin_unresponsive_backup_host": { + ValidateDiagFunc: validateRegexOrVariable("^([a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})(\\.[a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})+$"), + Optional: true, + Description: "This specifies the origin hostname.", + Type: schema.TypeString, + }, + "origin_unresponsive_alternate_host": { + ValidateDiagFunc: validateRegexOrVariable("^([a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})(\\.[a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})+$"), + Optional: true, + Description: "This specifies the redirect's destination hostname.", + Type: schema.TypeString, + }, + "origin_unresponsive_modify_request_path": { + Optional: true, + Description: "Modifies the request path.", + Type: schema.TypeBool, + }, + "origin_unresponsive_modified_path": { + ValidateDiagFunc: validateRegexOrVariable("^[^#\\[\\]@]+$"), + Optional: true, + Description: "This specifies the path to form the new URL.", + Type: schema.TypeString, + }, + "origin_unresponsive_include_query_string": { + Optional: true, + Description: "Enabling this includes the original set of query parameters.", + Type: schema.TypeBool, + }, + "origin_unresponsive_redirect_method": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntInSlice([]int{301, 302})), + Optional: true, + Description: "Specifies the redirect response code.", + Type: schema.TypeInt, + }, + "origin_unresponsive_change_protocol": { + Optional: true, + Description: "This allows you to change the request protocol.", + Type: schema.TypeBool, + }, + "origin_unresponsive_protocol": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"HTTP", "HTTPS"}, false)), + Optional: true, + Description: "Specifies which protocol to use.", + Type: schema.TypeString, + }, + "detect_origin_unavailable_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "detect_origin_unavailable": { + Optional: true, + Description: "Allows you to configure failover settings when the origin server responds with errors.", + Type: schema.TypeBool, + }, + "origin_unavailable_detection_level": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"RESPONSE_CODES"}, false)), + Optional: true, + Description: "Specify `RESPONSE_CODES`, the only available option.", + Type: schema.TypeString, + }, + "origin_unavailable_response_codes": { + Optional: true, + Description: "Specifies the set of response codes identifying when the origin responds with errors.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "origin_unavailable_blacklist_origin_ip": { + Optional: true, + Description: "Enabling this blacklists the origin's IP address.", + Type: schema.TypeBool, + }, + "origin_unavailable_blacklist_window": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"TEN_S", "THIRTY_S"}, false)), + Optional: true, + Description: "This sets the delay before blacklisting an IP address.", + Type: schema.TypeString, + }, + "origin_unavailable_recovery": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"RETRY_X_TIMES", "SWITCH_TO_BACKUP_ORIGIN", "REDIRECT_TO_DIFFERENT_ORIGIN_LOCATION"}, false)), + Optional: true, + Description: "This sets the recovery option.", + Type: schema.TypeString, + }, + "origin_unavailable_retry_limit": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ONE", "TWO", "THREE"}, false)), + Optional: true, + Description: "Sets how many times to retry.", + Type: schema.TypeString, + }, + "origin_unavailable_backup_host": { + ValidateDiagFunc: validateRegexOrVariable("^([a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})(\\.[a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})+$"), + Optional: true, + Description: "This specifies the origin hostname.", + Type: schema.TypeString, + }, + "origin_unavailable_alternate_host": { + ValidateDiagFunc: validateRegexOrVariable("^([a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})(\\.[a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})+$"), + Optional: true, + Description: "This specifies the redirect's destination hostname.", + Type: schema.TypeString, + }, + "origin_unavailable_modify_request_path": { + Optional: true, + Description: "Modifies the request path.", + Type: schema.TypeBool, + }, + "origin_unavailable_modified_path": { + ValidateDiagFunc: validateRegexOrVariable("^[^#\\[\\]@]+$"), + Optional: true, + Description: "This specifies the path to form the new URL.", + Type: schema.TypeString, + }, + "origin_unavailable_include_query_string": { + Optional: true, + Description: "Enabling this includes the original set of query parameters.", + Type: schema.TypeBool, + }, + "origin_unavailable_redirect_method": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntInSlice([]int{301, 302})), + Optional: true, + Description: "Specifies either a redirect response code.", + Type: schema.TypeInt, + }, + "origin_unavailable_change_protocol": { + Optional: true, + Description: "Modifies the request protocol.", + Type: schema.TypeBool, + }, + "origin_unavailable_protocol": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"HTTP", "HTTPS"}, false)), + Optional: true, + Description: "Specifies either the `HTTP` or `HTTPS` protocol.", + Type: schema.TypeString, + }, + "detect_object_unavailable_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "detect_object_unavailable": { + Optional: true, + Description: "Allows you to configure failover settings when the origin has content errors.", + Type: schema.TypeBool, + }, + "object_unavailable_detection_level": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"RESPONSE_CODES"}, false)), + Optional: true, + Description: "Specify `RESPONSE_CODES`, the only available option.", + Type: schema.TypeString, + }, + "object_unavailable_response_codes": { + Optional: true, + Description: "Specifies the set of response codes identifying when there are content errors.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "object_unavailable_blacklist_origin_ip": { + Optional: true, + Description: "Enabling this blacklists the origin's IP address.", + Type: schema.TypeBool, + }, + "object_unavailable_blacklist_window": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"TEN_S", "THIRTY_S"}, false)), + Optional: true, + Description: "This sets the delay before blacklisting an IP address.", + Type: schema.TypeString, + }, + "object_unavailable_recovery": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"RETRY_X_TIMES", "SWITCH_TO_BACKUP_ORIGIN", "REDIRECT_TO_DIFFERENT_ORIGIN_LOCATION"}, false)), + Optional: true, + Description: "This sets the recovery option.", + Type: schema.TypeString, + }, + "object_unavailable_retry_limit": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ONE", "TWO", "THREE"}, false)), + Optional: true, + Description: "Sets how many times to retry.", + Type: schema.TypeString, + }, + "object_unavailable_backup_host": { + ValidateDiagFunc: validateRegexOrVariable("^([a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})(\\.[a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})+$"), + Optional: true, + Description: "This specifies the origin hostname.", + Type: schema.TypeString, + }, + "object_unavailable_alternate_host": { + ValidateDiagFunc: validateRegexOrVariable("^([a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})(\\.[a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})+$"), + Optional: true, + Description: "This specifies the redirect's destination hostname.", + Type: schema.TypeString, + }, + "object_unavailable_modify_request_path": { + Optional: true, + Description: "Enabling this allows you to modify the request path.", + Type: schema.TypeBool, + }, + "object_unavailable_modified_path": { + ValidateDiagFunc: validateRegexOrVariable("^[^#\\[\\]@]+$"), + Optional: true, + Description: "This specifies the path to form the new URL.", + Type: schema.TypeString, + }, + "object_unavailable_include_query_string": { + Optional: true, + Description: "Enabling this includes the original set of query parameters.", + Type: schema.TypeBool, + }, + "object_unavailable_redirect_method": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntInSlice([]int{301, 302})), + Optional: true, + Description: "Specifies a redirect response code.", + Type: schema.TypeInt, + }, + "object_unavailable_change_protocol": { + Optional: true, + Description: "Changes the request protocol.", + Type: schema.TypeBool, + }, + "object_unavailable_protocol": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"HTTP", "HTTPS"}, false)), + Optional: true, + Description: "Specifies either the `HTTP` or `HTTPS` protocol.", + Type: schema.TypeString, + }, + "other_options": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "client_response_code": { + Optional: true, + Description: "Specifies the response code served to the client.", + Type: schema.TypeString, + }, + "cache_error_response": { + Optional: true, + Description: "When enabled, caches the error response.", + Type: schema.TypeBool, + }, + "cache_window": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ONE_S", "TEN_S", "THIRTY_S"}, false)), + Optional: true, + Description: "This sets error response's TTL.", + Type: schema.TypeString, + }, + }, + }, + }, + "metadata_caching": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior reduces time spent waiting for the initial response, also known as time to first byte, during peak traffic events. Contact Akamai Professional Services for help configuring it. This behavior is for internal usage only. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables metadata caching.", + Type: schema.TypeBool, + }, + }, + }, + }, + "mobile_sdk_performance": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior is deprecated, but you should not disable or remove it if present. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the Mobile App Performance SDK.", + Type: schema.TypeBool, + }, + "secondary_multipath_to_origin": { + Optional: true, + Description: "When enabled, sends secondary multi-path requests to the origin server.", + Type: schema.TypeBool, + }, + }, + }, + }, + "modify_incoming_request_header": { + Optional: true, + Type: schema.TypeList, + Description: "Modify, add, remove, or pass along specific request headers coming upstream from the client. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "action": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ADD", "DELETE", "MODIFY", "PASS"}, false)), + Optional: true, + Description: "Either `ADD`, `DELETE`, `MODIFY`, or `PASS` incoming HTTP request headers.", + Type: schema.TypeString, + }, + "standard_add_header_name": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ACCEPT_ENCODING", "ACCEPT_LANGUAGE", "OTHER"}, false)), + Optional: true, + Description: "If the value of `action` is `ADD`, this specifies the name of the field to add.", + Type: schema.TypeString, + }, + "standard_delete_header_name": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IF_MODIFIED_SINCE", "VIA", "OTHER"}, false)), + Optional: true, + Description: "If the value of `action` is `DELETE`, this specifies the name of the field to remove.", + Type: schema.TypeString, + }, + "standard_modify_header_name": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ACCEPT_ENCODING", "ACCEPT_LANGUAGE", "OTHER"}, false)), + Optional: true, + Description: "If the value of `action` is `MODIFY`, this specifies the name of the field to modify.", + Type: schema.TypeString, + }, + "standard_pass_header_name": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ACCEPT_ENCODING", "ACCEPT_LANGUAGE", "OTHER"}, false)), + Optional: true, + Description: "If the value of `action` is `PASS`, this specifies the name of the field to pass through.", + Type: schema.TypeString, + }, + "custom_header_name": { + ValidateDiagFunc: validateRegexOrVariable("^[^()<>@,;:\\\"/\\[\\]?{}\\s]+$"), + Optional: true, + Description: "Specifies a custom field name that applies when the relevant `standard` header name is set to `OTHER`.", + Type: schema.TypeString, + }, + "header_value": { + Optional: true, + Description: "Specifies the new header value.", + Type: schema.TypeString, + }, + "new_header_value": { + Optional: true, + Description: "Supplies an HTTP header replacement value.", + Type: schema.TypeString, + }, + "avoid_duplicate_headers": { + Optional: true, + Description: "When enabled with the `action` set to `MODIFY`, prevents creation of more than one instance of a header.", + Type: schema.TypeBool, + }, + }, + }, + }, + "modify_incoming_response_header": { + Optional: true, + Type: schema.TypeList, + Description: "Modify, add, remove, or pass along specific response headers coming downstream from the origin. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "action": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ADD", "DELETE", "MODIFY", "PASS"}, false)), + Optional: true, + Description: "Either `ADD`, `DELETE`, `MODIFY`, or `PASS` incoming HTTP response headers.", + Type: schema.TypeString, + }, + "standard_add_header_name": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"CACHE_CONTROL", "CONTENT_TYPE", "EDGE_CONTROL", "EXPIRES", "LAST_MODIFIED", "OTHER"}, false)), + Optional: true, + Description: "If the value of `action` is `ADD`, this specifies the name of the field to add.", + Type: schema.TypeString, + }, + "standard_delete_header_name": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"CACHE_CONTROL", "CONTENT_TYPE", "VARY", "OTHER"}, false)), + Optional: true, + Description: "If the value of `action` is `DELETE`, this specifies the name of the field to remove.", + Type: schema.TypeString, + }, + "standard_modify_header_name": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"CACHE_CONTROL", "CONTENT_TYPE", "EDGE_CONTROL", "OTHER"}, false)), + Optional: true, + Description: "If the value of `action` is `MODIFY`, this specifies the name of the field to modify.", + Type: schema.TypeString, + }, + "standard_pass_header_name": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"CACHE_CONTROL", "EXPIRES", "PRAGMA", "OTHER"}, false)), + Optional: true, + Description: "If the value of `action` is `PASS`, this specifies the name of the field to pass through.", + Type: schema.TypeString, + }, + "custom_header_name": { + ValidateDiagFunc: validateRegexOrVariable("^[^()<>@,;:\\\"/\\[\\]?{}\\s]+$"), + Optional: true, + Description: "Specifies a custom field name that applies when the relevant `standard` header name is set to `OTHER`.", + Type: schema.TypeString, + }, + "header_value": { + Optional: true, + Description: "Specifies the header's new value.", + Type: schema.TypeString, + }, + "new_header_value": { + Optional: true, + Description: "Specifies an HTTP header replacement value.", + Type: schema.TypeString, + }, + "avoid_duplicate_headers": { + Optional: true, + Description: "When enabled with the `action` set to `MODIFY`, prevents creation of more than one instance of a header.", + Type: schema.TypeBool, + }, + }, + }, + }, + "modify_outgoing_request_header": { + Optional: true, + Type: schema.TypeList, + Description: "Modify, add, remove, or pass along specific request headers going upstream towards the origin. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "action": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ADD", "DELETE", "MODIFY", "REGEX"}, false)), + Optional: true, + Description: "Either `ADD` or `DELETE` outgoing HTTP request headers, `MODIFY` their fixed values, or specify a `REGEX` pattern to transform them.", + Type: schema.TypeString, + }, + "standard_add_header_name": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"USER_AGENT", "OTHER"}, false)), + Optional: true, + Description: "If the value of `action` is `ADD`, this specifies the name of the field to add.", + Type: schema.TypeString, + }, + "standard_delete_header_name": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"PRAGMA", "USER_AGENT", "VIA", "OTHER"}, false)), + Optional: true, + Description: "If the value of `action` is `DELETE`, this specifies the name of the field to remove.", + Type: schema.TypeString, + }, + "standard_modify_header_name": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"USER_AGENT", "OTHER"}, false)), + Optional: true, + Description: "If the value of `action` is `MODIFY` or `REGEX`, this specifies the name of the field to modify.", + Type: schema.TypeString, + }, + "custom_header_name": { + ValidateDiagFunc: validateRegexOrVariable("^[^()<>@,;:\\\"/\\[\\]?{}\\s]+$"), + Optional: true, + Description: "Specifies a custom field name that applies when the relevant `standard` header name is set to `OTHER`.", + Type: schema.TypeString, + }, + "header_value": { + Optional: true, + Description: "Specifies the new header value.", + Type: schema.TypeString, + }, + "new_header_value": { + Optional: true, + Description: "Specifies an HTTP header replacement value.", + Type: schema.TypeString, + }, + "regex_header_match": { + Optional: true, + Description: "Specifies a Perl-compatible regular expression to match within the header value.", + Type: schema.TypeString, + }, + "regex_header_replace": { + Optional: true, + Description: "Specifies text that replaces the `regexHeaderMatch` pattern within the header value.", + Type: schema.TypeString, + }, + "match_multiple": { + Optional: true, + Description: "When enabled with the `action` set to `REGEX`, replaces all occurrences of the matched regular expression, otherwise only the first match if disabled.", + Type: schema.TypeBool, + }, + "avoid_duplicate_headers": { + Optional: true, + Description: "When enabled with the `action` set to `MODIFY`, prevents creation of more than one instance of a header.", + Type: schema.TypeBool, + }, + }, + }, + }, + "modify_outgoing_response_header": { + Optional: true, + Type: schema.TypeList, + Description: "Modify, add, remove, or pass along specific response headers going downstream towards the client. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "action": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ADD", "DELETE", "MODIFY", "REGEX"}, false)), + Optional: true, + Description: "Either `ADD` or `DELETE` outgoing HTTP response headers, `MODIFY` their fixed values, or specify a `REGEX` pattern to transform them.", + Type: schema.TypeString, + }, + "standard_add_header_name": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"CACHE_CONTROL", "CONTENT_DISPOSITION", "CONTENT_TYPE", "EDGE_CONTROL", "P3P", "PRAGMA", "ACCESS_CONTROL_ALLOW_ORIGIN", "ACCESS_CONTROL_ALLOW_METHODS", "ACCESS_CONTROL_ALLOW_HEADERS", "ACCESS_CONTROL_EXPOSE_HEADERS", "ACCESS_CONTROL_ALLOW_CREDENTIALS", "ACCESS_CONTROL_MAX_AGE", "OTHER"}, false)), + Optional: true, + Description: "If the value of `action` is `ADD`, this specifies the name of the field to add.", + Type: schema.TypeString, + }, + "standard_delete_header_name": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"CACHE_CONTROL", "CONTENT_DISPOSITION", "CONTENT_TYPE", "EXPIRES", "P3P", "PRAGMA", "ACCESS_CONTROL_ALLOW_ORIGIN", "ACCESS_CONTROL_ALLOW_METHODS", "ACCESS_CONTROL_ALLOW_HEADERS", "ACCESS_CONTROL_EXPOSE_HEADERS", "ACCESS_CONTROL_ALLOW_CREDENTIALS", "ACCESS_CONTROL_MAX_AGE", "OTHER"}, false)), + Optional: true, + Description: "If the value of `action` is `DELETE`, this specifies the name of the field to remove.", + Type: schema.TypeString, + }, + "standard_modify_header_name": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"CACHE_CONTROL", "CONTENT_DISPOSITION", "CONTENT_TYPE", "P3P", "PRAGMA", "ACCESS_CONTROL_ALLOW_ORIGIN", "ACCESS_CONTROL_ALLOW_METHODS", "ACCESS_CONTROL_ALLOW_HEADERS", "ACCESS_CONTROL_EXPOSE_HEADERS", "ACCESS_CONTROL_ALLOW_CREDENTIALS", "ACCESS_CONTROL_MAX_AGE", "OTHER"}, false)), + Optional: true, + Description: "If the value of `action` is `MODIFY` or `REGEX`, this specifies the name of the field to modify.", + Type: schema.TypeString, + }, + "custom_header_name": { + ValidateDiagFunc: validateRegexOrVariable("^[^()<>@,;:\\\"/\\[\\]?{}\\s]+$"), + Optional: true, + Description: "Specifies a custom field name that applies when the relevant `standard` header name is set to `OTHER`.", + Type: schema.TypeString, + }, + "header_value": { + Optional: true, + Description: "Specifies the existing value of the header to match.", + Type: schema.TypeString, + }, + "new_header_value": { + Optional: true, + Description: "Specifies the new HTTP header replacement value.", + Type: schema.TypeString, + }, + "regex_header_match": { + Optional: true, + Description: "Specifies a Perl-compatible regular expression to match within the header value.", + Type: schema.TypeString, + }, + "regex_header_replace": { + Optional: true, + Description: "Specifies text that replaces the `regexHeaderMatch` pattern within the header value.", + Type: schema.TypeString, + }, + "match_multiple": { + Optional: true, + Description: "When enabled with the `action` set to `REGEX`, replaces all occurrences of the matched regular expression, otherwise only the first match if disabled.", + Type: schema.TypeBool, + }, + "avoid_duplicate_headers": { + Optional: true, + Description: "When enabled with the `action` set to `MODIFY`, prevents creation of more than one instance of a header. The last header clobbers others with the same name. This option affects the entire set of outgoing headers, and is not confined to the subset of regular expression matches.", + Type: schema.TypeBool, + }, + }, + }, + }, + "modify_via_header": { + Optional: true, + Type: schema.TypeList, + Description: "Removes or renames the HTTP `Via` headers used to inform the server of proxies through which the request was sent to the origin. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables `Via` header modifications.", + Type: schema.TypeBool, + }, + "modification_option": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"REMOVE_HEADER", "RENAME_HEADER"}, false)), + Optional: true, + Description: "Specify how you want to handle the header.", + Type: schema.TypeString, + }, + "rename_header_to": { + ValidateDiagFunc: validateRegexOrVariable("^[^()<>@,;:\\\"\\[\\]?{}\\s]+$"), + Optional: true, + Description: "Specifies a new name to replace the existing `Via` header.", + Type: schema.TypeString, + }, + }, + }, + }, + "origin": { + Optional: true, + Type: schema.TypeList, + Description: "Specify the hostname and settings used to contact the origin once service begins. You can use your own origin, `NetStorage`, an Edge Load Balancing origin, or a SaaS dynamic origin. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "origin_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"CUSTOMER", "NET_STORAGE", "MEDIA_SERVICE_LIVE", "EDGE_LOAD_BALANCING_ORIGIN_GROUP", "SAAS_DYNAMIC_ORIGIN"}, false)), + Optional: true, + Description: "Choose where your content is retrieved from.", + Type: schema.TypeString, + }, + "net_storage": { + Optional: true, + Description: "Specifies the details of the NetStorage server.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cp_code": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "download_domain_name": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "g2o_token": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "origin_id": { + Optional: true, + Description: "Identifies the Edge Load Balancing origin. This needs to correspond to an `edgeLoadBalancingOrigin` behavior's `id` attribute within the same property.", + Type: schema.TypeString, + }, + "hostname": { + Optional: true, + Description: "Specifies the hostname or IPv4 address of your origin server, from which edge servers can retrieve your content.", + Type: schema.TypeString, + }, + "second_hostname_enabled": { + Optional: true, + Description: "Available only for certain products. This specifies whether you want to use an additional origin server address.", + Type: schema.TypeBool, + }, + "second_hostname": { + Optional: true, + Description: "Specifies the origin server's hostname, IPv4 address, or IPv6 address. Edge servers retrieve your content from this origin server.", + Type: schema.TypeString, + }, + "mslorigin": { + Optional: true, + Description: "This specifies the media's origin server.", + Type: schema.TypeString, + }, + "saas_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"HOSTNAME", "PATH", "QUERY_STRING", "COOKIE"}, false)), + Optional: true, + Description: "Specifies the part of the request that identifies this SaaS dynamic origin.", + Type: schema.TypeString, + }, + "saas_cname_enabled": { + Optional: true, + Description: "Enabling this allows you to use a `CNAME chain` to determine the hostname for this SaaS dynamic origin.", + Type: schema.TypeBool, + }, + "saas_cname_level": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+$"), + Optional: true, + Description: "Specifies the desired number of hostnames to use in the `CNAME chain`, starting backwards from the edge server.", + Type: schema.TypeInt, + }, + "saas_cookie": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-*\\.]+$"), + Optional: true, + Description: "Specifies the name of the cookie that identifies this SaaS dynamic origin.", + Type: schema.TypeString, + }, + "saas_query_string": { + ValidateDiagFunc: validateRegexOrVariable("^[^:/?#\\[\\]@&]+$"), + Optional: true, + Description: "Specifies the name of the query parameter that identifies this SaaS dynamic origin.", + Type: schema.TypeString, + }, + "saas_regex": { + ValidateDiagFunc: validateRegexOrVariable("^([a-zA-Z0-9\\:\\[\\]\\{\\}\\(\\)\\.\\?_\\-\\*\\+\\^\\$\\\\\\/\\|&=!]{1,250})$"), + Optional: true, + Description: "Specifies the Perl-compatible regular expression match that identifies this SaaS dynamic origin.", + Type: schema.TypeString, + }, + "saas_replace": { + ValidateDiagFunc: validateRegexOrVariable("^(([a-zA-Z0-9]|\\$[1-9])(([a-zA-Z0-9\\._\\-]|\\$[1-9]){0,250}([a-zA-Z0-9]|\\$[1-9]))?){1,10}$"), + Optional: true, + Description: "Specifies replacement text for what `saasRegex` matches.", + Type: schema.TypeString, + }, + "saas_suffix": { + ValidateDiagFunc: validateRegexOrVariable("^([a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})\\.(com|net|org|info|biz|us|co\\.uk|ac\\.uk|org\\.uk|me\\.uk|ca|eu|com\\.au|co|co\\.za|ru|es|me|tv|pro|in|ie|de|it|nl|fr|co\\.il|ch|se|co\\.nz|pl|jp|name|mobi|cc|ws|be|com\\.mx|at|nu|asia|co\\.nz|net\\.nz|org\\.nz|com\\.au|net\\.au|org\\.au|tools)$"), + Optional: true, + Description: "Specifies the static part of the SaaS dynamic origin.", + Type: schema.TypeString, + }, + "forward_host_header": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"REQUEST_HOST_HEADER", "ORIGIN_HOSTNAME", "CUSTOM"}, false)), + Optional: true, + Description: "When the `originType` is set to either `CUSTOMER` or `SAAS_DYNAMIC_ORIGIN`, this specifies which `Host` header to pass to the origin.", + Type: schema.TypeString, + }, + "custom_forward_host_header": { + Optional: true, + Description: "This specifies the name of the custom host header the edge server should pass to the origin.", + Type: schema.TypeString, + }, + "cache_key_hostname": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"REQUEST_HOST_HEADER", "ORIGIN_HOSTNAME"}, false)), + Optional: true, + Description: "Specifies the hostname to use when forming a cache key.", + Type: schema.TypeString, + }, + "ip_version": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IPV4", "DUALSTACK", "IPV6"}, false)), + Optional: true, + Description: "Specifies which IP version to use when getting content from the origin.", + Type: schema.TypeString, + }, + "use_unique_cache_key": { + Optional: true, + Description: "With a shared `hostname` such as provided by Amazon AWS, sets a unique cache key for your content.", + Type: schema.TypeBool, + }, + "compress": { + Optional: true, + Description: "Enables `gzip` compression for non-NetStorage origins.", + Type: schema.TypeBool, + }, + "enable_true_client_ip": { + Optional: true, + Description: "When enabled on non-NetStorage origins, allows you to send a custom header (the `trueClientIpHeader`) identifying the IP address of the immediate client connecting to the edge server. This may provide more useful information than the standard `X-Forward-For` header, which proxies may modify.", + Type: schema.TypeBool, + }, + "true_client_ip_header": { + ValidateDiagFunc: validateRegexOrVariable("^[^()<>@,;:\\\"/\\[\\]?{}\\s]+$"), + Optional: true, + Description: "This specifies the name of the field that identifies the end client's IP address, for example `True-Client-IP`.", + Type: schema.TypeString, + }, + "true_client_ip_client_setting": { + Optional: true, + Description: "If a client sets the `True-Client-IP` header, the edge server allows it and passes the value to the origin. Otherwise the edge server removes it and sets the value itself.", + Type: schema.TypeBool, + }, + "origin_certificate": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "verification_mode": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"PLATFORM_SETTINGS", "CUSTOM", "THIRD_PARTY"}, false)), + Optional: true, + Description: "For non-NetStorage origins, maximize security by controlling which certificates edge servers should trust.", + Type: schema.TypeString, + }, + "origin_sni": { + Optional: true, + Description: "For non-NetStorage origins, enabling this adds a Server Name Indication (SNI) header in the SSL request sent to the origin, with the origin hostname as the value. See the `verification settings in the Origin Server behavior` or contact your Akamai representative for more information.", + Type: schema.TypeBool, + }, + "custom_valid_cn_values": { + Optional: true, + Description: "Specifies values to look for in the origin certificate's `Subject Alternate Name` or `Common Name` fields. Specify `{{Origin Hostname}}` and `{{Forward Host Header}}` within the text in the order you want them to be evaluated. (Note that these two template items are not the same as in-line `variables`, which use the same curly-brace syntax.)", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "origin_certs_to_honor": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"COMBO", "STANDARD_CERTIFICATE_AUTHORITIES", "CUSTOM_CERTIFICATE_AUTHORITIES", "CUSTOM_CERTIFICATES"}, false)), + Optional: true, + Description: "Specifies which certificate to trust.", + Type: schema.TypeString, + }, + "standard_certificate_authorities": { + Optional: true, + Description: "", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "custom_certificate_authorities": { + Optional: true, + Description: "Specifies an array of certification objects. See the `verification settings in the Origin Server behavior` or contact your Akamai representative for details on this object's requirements.", + Type: schema.TypeList, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "subject_cn": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "subject_alternative_names": { + Optional: true, + Description: "", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "subject_rdns": { + Optional: true, + Description: "", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "c": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "ou": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "o": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "cn": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "issuer_rdns": { + Optional: true, + Description: "", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "c": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "ou": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "o": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "cn": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "not_before": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "not_after": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "sig_alg_name": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "public_key": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "public_key_algorithm": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "public_key_format": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "serial_number": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "version": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "sha1_fingerprint": { + ValidateDiagFunc: validateRegexOrVariable("^[a-f0-9]{40}$"), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "pem_encoded_cert": { + ValidateDiagFunc: validateRegexOrVariable("^-----BEGIN CERTIFICATE-----(.|\\s)*-----END CERTIFICATE-----\\s*$"), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "can_be_leaf": { + Optional: true, + Description: "", + Type: schema.TypeBool, + }, + "can_be_ca": { + Optional: true, + Description: "", + Type: schema.TypeBool, + }, + "self_signed": { + Optional: true, + Description: "", + Type: schema.TypeBool, + }, + }, + }, + }, + "custom_certificates": { + Optional: true, + Description: "Specifies an array of certification objects. See the `verification settings in the Origin Server behavior` or contact your Akamai representative for details on this object's requirements.", + Type: schema.TypeList, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "subject_cn": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "subject_alternative_names": { + Optional: true, + Description: "", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "subject_rdns": { + Optional: true, + Description: "", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "c": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "ou": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "o": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "cn": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "issuer_rdns": { + Optional: true, + Description: "", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "c": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "ou": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "o": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "cn": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "not_before": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "not_after": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "sig_alg_name": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "public_key": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "public_key_algorithm": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "public_key_format": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "serial_number": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "version": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "sha1_fingerprint": { + ValidateDiagFunc: validateRegexOrVariable("^[a-f0-9]{40}$"), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "pem_encoded_cert": { + ValidateDiagFunc: validateRegexOrVariable("^-----BEGIN CERTIFICATE-----(.|\\s)*-----END CERTIFICATE-----\\s*$"), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "can_be_leaf": { + Optional: true, + Description: "", + Type: schema.TypeBool, + }, + "can_be_ca": { + Optional: true, + Description: "", + Type: schema.TypeBool, + }, + "self_signed": { + Optional: true, + Description: "", + Type: schema.TypeBool, + }, + }, + }, + }, + "ports": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "http_port": { + Optional: true, + Description: "Specifies the port on your origin server to which edge servers should connect for HTTP requests, customarily `80`.", + Type: schema.TypeInt, + }, + "https_port": { + Optional: true, + Description: "Specifies the port on your origin server to which edge servers should connect for secure HTTPS requests, customarily `443`. This option only applies if the property is marked as secure. See `Secure property requirements` for guidance.", + Type: schema.TypeInt, + }, + "tls_version_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "tls13_support": { + Optional: true, + Description: "Enables transport layer security (TLS) version 1.3 for connections to your origin server.", + Type: schema.TypeBool, + }, + "min_tls_version": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"DYNAMIC", "TLSV1_1", "TLSV1_2", "TLSV1_3"}, false)), + Optional: true, + Description: "Specifies the minimum TLS version to use for connections to your origin server.", + Type: schema.TypeString, + }, + "max_tls_version": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"DYNAMIC", "TLSV1_1", "TLSV1_2", "TLSV1_3"}, false)), + Optional: true, + Description: "Specifies the maximum TLS version to use for connections to your origin server. As best practice, use `DYNAMIC` to automatically apply the latest supported version.", + Type: schema.TypeString, + }, + }, + }, + }, + "origin_characteristics": { + Optional: true, + Type: schema.TypeList, + Description: "Specifies characteristics of the origin. Akamai uses this information to optimize your metadata configuration, which may result in better origin offload and end-user performance. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "authentication_method_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "authentication_method": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"AUTOMATIC", "SIGNATURE_HEADER_AUTHENTICATION", "MSL_AUTHENTICATION", "AWS", "GCS_HMAC_AUTHENTICATION", "AWS_STS"}, false)), + Optional: true, + Description: "Specifies the authentication method.", + Type: schema.TypeString, + }, + "encoding_version": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntInSlice([]int{1, 2, 3, 4, 5})), + Optional: true, + Description: "Specifies the version of the encryption algorithm, an integer from `1` to `5`.", + Type: schema.TypeInt, + }, + "use_custom_sign_string": { + Optional: true, + Description: "Specifies whether to customize your signed string.", + Type: schema.TypeBool, + }, + "custom_sign_string": { + Optional: true, + Description: "Specifies the data to be encrypted as a series of enumerated variable names. See `Built-in system variables` for guidance on each.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "secret_key": { + ValidateDiagFunc: validateAny(validation.ToDiagFunc(validation.StringIsEmpty), validateRegexOrVariable("^[0-9a-zA-Z]{24}$")), + Optional: true, + Description: "Specifies the shared secret key.", + Type: schema.TypeString, + }, + "nonce": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9a-zA-Z]{1,8}$"), + Optional: true, + Description: "Specifies the nonce.", + Type: schema.TypeString, + }, + "mslkey": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9a-zA-Z]{10,}$"), + Optional: true, + Description: "Specifies the access key provided by the hosting service.", + Type: schema.TypeString, + }, + "mslname": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9a-zA-Z]{1,8}$"), + Optional: true, + Description: "Specifies the origin name provided by the hosting service.", + Type: schema.TypeString, + }, + "access_key_encrypted_storage": { + Optional: true, + Description: "Enables secure use of access keys defined in Cloud Access Manager. Access keys store encrypted authentication details required to sign requests to cloud origins. If you disable this option, you'll need to store the authentication details unencrypted.", + Type: schema.TypeBool, + }, + "gcs_access_key_version_guid": { + Optional: true, + Description: "Identifies the unique `gcsAccessKeyVersionGuid` access key `created` in Cloud Access Manager to sign your requests to Google Cloud Storage in interoperability mode.", + Type: schema.TypeString, + }, + "gcs_hmac_key_access_id": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9]{1,128}$"), + Optional: true, + Description: "Specifies the active access ID linked to your Google account.", + Type: schema.TypeString, + }, + "gcs_hmac_key_secret": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9+/=_-]{1,40}$"), + Optional: true, + Description: "Specifies the secret linked to the access ID that you want to use to sign requests to Google Cloud Storage.", + Type: schema.TypeString, + }, + "aws_access_key_version_guid": { + Optional: true, + Description: "Identifies the unique `awsAccessKeyVersionGuid` access key `created` in Cloud Access Manager to sign your requests to AWS S3.", + Type: schema.TypeString, + }, + "aws_access_key_id": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9]{1,128}$"), + Optional: true, + Description: "Specifies active access key ID linked to your AWS account.", + Type: schema.TypeString, + }, + "aws_secret_access_key": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9+/=_-]{1,1024}$"), + Optional: true, + Description: "Specifies the secret linked to the access key identifier that you want to use to sign requests to AWS.", + Type: schema.TypeString, + }, + "aws_region": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9-]+$"), + Optional: true, + Description: "This specifies the AWS region code of the location where your bucket resides.", + Type: schema.TypeString, + }, + "aws_host": { + ValidateDiagFunc: validateAny(validation.ToDiagFunc(validation.StringIsEmpty), validateRegexOrVariable("^(([a-zA-Z0-9]([a-zA-Z0-9_\\-]*[a-zA-Z0-9])?)\\.)+([a-zA-Z]+|xn--[a-zA-Z0-9]+)$")), + Optional: true, + Description: "This specifies the AWS hostname, without `http://` or `https://` prefixes. If you leave this option empty, it inherits the hostname from the `origin` behavior.", + Type: schema.TypeString, + }, + "aws_service": { + Optional: true, + Description: "This specifies the subdomain of your AWS service. It precedes `amazonaws.com` or the region code in the AWS hostname. For example, `s3.amazonaws.com`.", + Type: schema.TypeString, + }, + "property_id_tag": { + Optional: true, + Description: "", + Type: schema.TypeBool, + }, + "hostname_tag": { + Optional: true, + Description: "", + Type: schema.TypeBool, + }, + "role_arn": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9][a-zA-Z0-9_\\+=,.@\\-:/]{0,2047}$"), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "aws_ar_region": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9][a-zA-Z0-9\\-]{0,63}$"), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "end_point_service": { + ValidateDiagFunc: validateAny(validation.ToDiagFunc(validation.StringIsEmpty), validateRegexOrVariable("^[a-zA-Z0-9][a-zA-Z0-9\\-]{0,63}$")), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "origin_location_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "country": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"EUROPE", "NORTH_AMERICA", "LATIN_AMERICA", "SOUTH_AMERICA", "NORDICS", "ASIA_PACIFIC", "OTHER_AMERICAS", "OTHER_APJ", "OTHER_EMEA", "AUSTRALIA", "GERMANY", "INDIA", "ITALY", "JAPAN", "MEXICO", "TAIWAN", "UNITED_KINGDOM", "US_EAST", "US_CENTRAL", "US_WEST", "GLOBAL_MULTI_GEO", "OTHER", "UNKNOWN", "ADC"}, false)), + Optional: true, + Description: "Specifies the origin's geographic region.", + Type: schema.TypeString, + }, + "adc_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "direct_connect_geo": { + Optional: true, + Description: "Provides a region used by Akamai Direct Connection.", + Type: schema.TypeString, + }, + }, + }, + }, + "origin_characteristics_wsd": { + Optional: true, + Type: schema.TypeList, + Description: "Specifies characteristics of the origin, for use in Akamai's Wholesale Delivery product. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "origintype": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"AZURE", "UNKNOWN"}, false)), + Optional: true, + Description: "Specifies an origin type.", + Type: schema.TypeString, + }, + }, + }, + }, + "origin_failure_recovery_method": { + Optional: true, + Type: schema.TypeList, + Description: "Origin Failover requires that you set up a separate rule containing origin failure recovery methods. You also need to set up the Origin Failure Recovery Policy behavior in a separate rule with a desired match criteria, and select the desired failover method. You can do this using Property Manager. Learn more about this process in `Adaptive Media Delivery Implementation Guide`. You can use the `originFailureRecoveryPolicy` member to edit existing instances of the Origin Failure Recover Policy behavior. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "recovery_method": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"RETRY_ALTERNATE_ORIGIN", "RESPOND_CUSTOM_STATUS"}, false)), + Optional: true, + Description: "Specifies the recovery method.", + Type: schema.TypeString, + }, + "custom_status_code": { + Optional: true, + Description: "Specifies the custom status code to be sent to the client.", + Type: schema.TypeString, + }, + }, + }, + }, + "origin_failure_recovery_policy": { + Optional: true, + Type: schema.TypeList, + Description: "Configures how to detect an origin failure, in which case the `originFailureRecoveryMethod` behavior applies. You can also define up to three sets of criteria to detect origin failure based on specific response codes. Use it to apply specific retry or recovery actions. You can do this using Property Manager. Learn more about this process in `Adaptive Media Delivery Implementation Guide`. You can use the `originFailureRecoveryMethod` member to edit existing instances of the Origin Failure Recover Method behavior. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Activates and configures a recovery policy.", + Type: schema.TypeBool, + }, + "tuning_parameters": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "enable_ip_avoidance": { + Optional: true, + Description: "Temporarily blocks an origin IP address that experienced a certain number of failures. When an IP address is blocked, the `configName` established for `originResponsivenessRecoveryConfigName` is applied.", + Type: schema.TypeBool, + }, + "ip_avoidance_error_threshold": { + Optional: true, + Description: "Defines the number of failures that need to occur to an origin address before it's blocked.", + Type: schema.TypeInt, + }, + "ip_avoidance_retry_interval": { + Optional: true, + Description: "Defines the number of seconds after which the IP address is removed from the blocklist.", + Type: schema.TypeInt, + }, + "binary_equivalent_content": { + Optional: true, + Description: "Synchronizes content between the primary and backup origins, byte for byte.", + Type: schema.TypeBool, + }, + "origin_responsiveness_monitoring": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "monitor_origin_responsiveness": { + Optional: true, + Description: "Enables continuous monitoring of connectivity to the origin. If necessary, applies retry or recovery actions.", + Type: schema.TypeBool, + }, + "origin_responsiveness_timeout": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"AGGRESSIVE", "MODERATE", "CONSERVATIVE", "USER_SPECIFIED"}, false)), + Optional: true, + Description: "The timeout threshold that triggers a retry or recovery action.", + Type: schema.TypeString, + }, + "origin_responsiveness_custom_timeout": { + Optional: true, + Description: "Specify a custom timeout, from 1 to 10 seconds.", + Type: schema.TypeInt, + }, + "origin_responsiveness_enable_retry": { + Optional: true, + Description: "If a specific failure condition applies, attempts a retry on the same origin before executing the recovery method.", + Type: schema.TypeBool, + }, + "origin_responsiveness_enable_recovery": { + Optional: true, + Description: "Enables a recovery action for a specific failure condition.", + Type: schema.TypeBool, + }, + "origin_responsiveness_recovery_config_name": { + Optional: true, + Description: "Specifies a recovery configuration using the `configName` you defined in the `recoveryConfig` match criteria. Specify 3 to 20 alphanumeric characters or dashes. Ensure that you use the `recoveryConfig` match criteria to apply this option.", + Type: schema.TypeString, + }, + "status_code_monitoring1": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "monitor_status_codes1": { + Optional: true, + Description: "Enables continuous monitoring for the specific origin status codes that trigger retry or recovery actions.", + Type: schema.TypeBool, + }, + "monitor_response_codes1": { + Optional: true, + Description: "Defines the origin response codes that trigger a subsequent retry or recovery action. Specify a single code entry (`501`) or a range (`501:504`). If you configure other `monitorStatusCodes*` and `monitorResponseCodes*` options, you can't use the same codes here.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "monitor_status_codes1_enable_retry": { + Optional: true, + Description: "When the defined response codes apply, attempts a retry on the same origin before executing the recovery method.", + Type: schema.TypeBool, + }, + "monitor_status_codes1_enable_recovery": { + Optional: true, + Description: "Enables the recovery action for the response codes you define.", + Type: schema.TypeBool, + }, + "monitor_status_codes1_recovery_config_name": { + Optional: true, + Description: "Specifies a recovery configuration using the `configName` you defined in the `recoveryConfig` match criteria. Specify 3 to 20 alphanumeric characters or dashes. Ensure that you use the `recoveryConfig` match criteria to apply this option.", + Type: schema.TypeString, + }, + "status_code_monitoring2": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "monitor_status_codes2": { + Optional: true, + Description: "Enables continuous monitoring for the specific origin status codes that trigger retry or recovery actions.", + Type: schema.TypeBool, + }, + "monitor_response_codes2": { + Optional: true, + Description: "Defines the origin response codes that trigger a subsequent retry or recovery action. Specify a single code entry (`501`) or a range (`501:504`). If you configure other `monitorStatusCodes*` and `monitorResponseCodes*` options, you can't use the same codes here.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "monitor_status_codes2_enable_retry": { + Optional: true, + Description: "When the defined response codes apply, attempts a retry on the same origin before executing the recovery method.", + Type: schema.TypeBool, + }, + "monitor_status_codes2_enable_recovery": { + Optional: true, + Description: "Enables the recovery action for the response codes you define.", + Type: schema.TypeBool, + }, + "monitor_status_codes2_recovery_config_name": { + Optional: true, + Description: "Specifies a recovery configuration using the `configName` you defined in the `recoveryConfig` match criteria. Specify 3 to 20 alphanumeric characters or dashes. Ensure that you use the `recoveryConfig` match criteria to apply this option.", + Type: schema.TypeString, + }, + "status_code_monitoring3": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "monitor_status_codes3": { + Optional: true, + Description: "Enables continuous monitoring for the specific origin status codes that trigger retry or recovery actions.", + Type: schema.TypeBool, + }, + "monitor_response_codes3": { + Optional: true, + Description: "Defines the origin response codes that trigger a subsequent retry or recovery action. Specify a single code entry (`501`) or a range (`501:504`). If you configure other `monitorStatusCodes*` and `monitorResponseCodes*` options, you can't use the same codes here..", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "monitor_status_codes3_enable_retry": { + Optional: true, + Description: "When the defined response codes apply, attempts a retry on the same origin before executing the recovery method.", + Type: schema.TypeBool, + }, + "monitor_status_codes3_enable_recovery": { + Optional: true, + Description: "Enables the recovery action for the response codes you define.", + Type: schema.TypeBool, + }, + "monitor_status_codes3_recovery_config_name": { + Optional: true, + Description: "Specifies a recovery configuration using the `configName` you defined in the `recoveryConfig` match criteria. Specify 3 to 20 alphanumeric characters or dashes. Ensure that you use the `recoveryConfig` match criteria to apply this option.", + Type: schema.TypeString, + }, + }, + }, + }, + "origin_ip_acl": { + Optional: true, + Type: schema.TypeList, + Description: "Origin IP Access Control List limits the traffic to your origin. It only allows requests from specific edge servers that are configured as part of a supernet defined by CIDR blocks. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enable": { + Optional: true, + Description: "Enables the Origin IP Access Control List behavior.", + Type: schema.TypeBool, + }, + }, + }, + }, + "permissions_policy": { + Optional: true, + Type: schema.TypeList, + Description: "Manages whether your page and its embedded iframes can access various browser features that affect end-user privacy, security, and performance. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "permissions_policy_directive": { + Optional: true, + Description: "Each directive represents a browser feature. Specify the ones you want enabled in a client browser that accesses your content. You can add custom entries or provide pre-set values from the list. For more details on each value, see the `guide section` for this behavior.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "allow_list": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-*:%\\[\\]@.\\s]+$"), + Optional: true, + Description: "The features you've set in `permissionsPolicyDirective` are enabled for domains you specify here. They'll remain disabled for all other domains. Separate multiple domains with a single space. To block the specified directives from all domains, set this to `none`. This generates an empty value in the `Permissions-Policy` header.", + Type: schema.TypeString, + }, + }, + }, + }, + "persistent_client_connection": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior activates `persistent connections` between edge servers and clients, which allow for better performance and more efficient use of resources. Compare with the `persistentConnection` behavior, which configures persistent connections for the entire journey from origin to edge to client. Contact Akamai Professional Services for help configuring either. This behavior is for internal usage only. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the persistent connections behavior.", + Type: schema.TypeBool, + }, + "timeout": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+[DdHhMmSs]$"), + Optional: true, + Description: "Specifies the timeout period after which edge server closes the persistent connection with the client, 500 seconds by default.", + Type: schema.TypeString, + }, + }, + }, + }, + "persistent_connection": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior enables more efficient `persistent connections` from origin to edge server to client. Compare with the `persistentClientConnection` behavior, which customizes persistent connections from edge to client. Contact Akamai Professional Services for help configuring either. This behavior is for internal usage only. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables persistent connections.", + Type: schema.TypeBool, + }, + "timeout": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+[DdHhMmSs]$"), + Optional: true, + Description: "Specifies the timeout period after which edge server closes a persistent connection.", + Type: schema.TypeString, + }, + }, + }, + }, + "personally_identifiable_information": { + Optional: true, + Type: schema.TypeList, + Description: "Marks content covered by the current rule as sensitive `personally identifiable information` that needs to be treated as secure and private. That includes anything involving personal information: name, social security number, date and place of birth, mother's maiden name, biometric data, or any other data linked to an individual. If you attempt to save a property with such a rule that also caches or logs sensitive content, the added behavior results in a validation error. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "When enabled, marks content as personally identifiable information (PII).", + Type: schema.TypeBool, + }, + }, + }, + }, + "phased_release": { + Optional: true, + Type: schema.TypeList, + Description: "The Phased Release Cloudlet provides gradual and granular traffic management to an alternate origin in near real time. Use the `Cloudlets API` or the Cloudlets Policy Manager application within `Control Center` to set up your Cloudlets policies. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the Phased Release Cloudlet.", + Type: schema.TypeBool, + }, + "is_shared_policy": { + Optional: true, + Description: "Whether you want to apply the Cloudlet shared policy to an unlimited number of properties within your account. Learn more about shared policies and how to create them in `Cloudlets Policy Manager`.", + Type: schema.TypeBool, + }, + "cloudlet_policy": { + Optional: true, + Description: "Specifies the Cloudlet policy as an object.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "name": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "cloudlet_shared_policy": { + Optional: true, + Description: "Identifies the Cloudlet shared policy to use with this behavior. Use the `Cloudlets API` to list available shared policies.", + Type: schema.TypeInt, + }, + "label": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-*\\.]+$"), + Optional: true, + Description: "A label to distinguish this Phased Release policy from any others within the same property.", + Type: schema.TypeString, + }, + "population_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "population_cookie_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"NONE", "NEVER", "ON_BROWSER_CLOSE", "FIXED_DATE", "DURATION"}, false)), + Optional: true, + Description: "Select when to assign a cookie to the population of users the Cloudlet defines. If you select the Cloudlet's `random` membership option, it overrides this option's value so that it is effectively `NONE`.", + Type: schema.TypeString, + }, + "population_expiration_date": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+$"), + Optional: true, + Description: "Specifies the date and time when membership expires, and the browser no longer sends the cookie. Subsequent requests re-evaluate based on current membership settings.", + Type: schema.TypeString, + }, + "population_duration": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+[DdHhMmSs]$"), + Optional: true, + Description: "Sets the lifetime of the cookie from the initial request. Subsequent requests re-evaluate based on current membership settings.", + Type: schema.TypeString, + }, + "population_refresh": { + Optional: true, + Description: "Enabling this option resets the original duration of the cookie if the browser refreshes before the cookie expires.", + Type: schema.TypeBool, + }, + "failover_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "failover_enabled": { + Optional: true, + Description: "Allows failure responses at the origin defined by the Cloudlet to fail over to the prevailing origin defined by the property.", + Type: schema.TypeBool, + }, + "failover_response_code": { + Optional: true, + Description: "Defines the set of failure codes that initiate the failover response.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "failover_duration": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(0, 300)), + Optional: true, + Description: "Specifies the number of seconds to wait until the client tries to access the failover origin after the initial failure is detected. Set the value to `0` to immediately request the alternate origin upon failure.", + Type: schema.TypeInt, + }, + }, + }, + }, + "preconnect": { + Optional: true, + Type: schema.TypeList, + Description: "With the `http2` behavior enabled, this requests a specified set of domains that relate to your property hostname, and keeps the connection open for faster loading of content from those domains. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "preconnectlist": { + Optional: true, + Description: "Specifies the set of hostnames to which to preconnect over HTTP2.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }, + }, + }, + "predictive_content_delivery": { + Optional: true, + Type: schema.TypeList, + Description: "Improves user experience and reduces the cost of downloads by enabling mobile devices to predictively fetch and cache content from catalogs managed by Akamai servers. You can't use this feature if in the `segmentedMediaOptimization` behavior, the value for `behavior` is set to `LIVE`. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the predictive content delivery behavior.", + Type: schema.TypeBool, + }, + }, + }, + }, + "predictive_prefetching": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior potentially reduces the client's page load time by pre-caching objects based on historical data for the page, not just its current set of referenced objects. It also detects second-level dependencies, such as objects retrieved by JavaScript. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the predictive prefetching behavior.", + Type: schema.TypeBool, + }, + "accuracy_target": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"LOW", "MEDIUM", "HIGH"}, false)), + Optional: true, + Description: "The level of prefetching. A higher level results in better client performance, but potentially greater load on the origin.", + Type: schema.TypeString, + }, + }, + }, + }, + "prefetch": { + Optional: true, + Type: schema.TypeList, + Description: "Instructs edge servers to retrieve content linked from requested pages as they load, rather than waiting for separate requests for the linked content. This behavior applies depending on the rule's set of matching conditions. Use in conjunction with the `prefetchable` behavior, which specifies the set of objects to prefetch. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Applies prefetching behavior when enabled.", + Type: schema.TypeBool, + }, + }, + }, + }, + "prefetchable": { + Optional: true, + Type: schema.TypeList, + Description: "Allow matching objects to prefetch into the edge cache as the parent page that links to them loads, rather than waiting for a direct request. This behavior applies depending on the rule's set of matching conditions. Use `prefetch` to enable the overall behavior for parent pages that contain links to the object. To apply this behavior, you need to match on a `filename` or `fileExtension`. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Allows matching content to prefetch when referenced on a requested parent page.", + Type: schema.TypeBool, + }, + }, + }, + }, + "prefresh_cache": { + Optional: true, + Type: schema.TypeList, + Description: "Refresh cached content before its time-to-live (TTL) expires, to keep end users from having to wait for the origin to provide fresh content. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the cache prefreshing behavior.", + Type: schema.TypeBool, + }, + "prefreshval": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(0, 99)), + Optional: true, + Description: "Specifies when the prefresh occurs as a percentage of the TTL. For example, for an object whose cache has 10 minutes left to live, and an origin response that is routinely less than 30 seconds, a percentage of `95` prefreshes the content without unnecessarily increasing load on the origin.", + Type: schema.TypeInt, + }, + }, + }, + }, + "quality": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "origin_settings": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "country": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"EUROPE", "NORTH_AMERICA", "LATIN_AMERICA", "SOUTH_AMERICA", "NORDICS", "ASIA_PACIFIC", "OTHER_AMERICAS", "OTHER_APJ", "OTHER_EMEA", "AUSTRALIA", "GERMANY", "INDIA", "ITALY", "JAPAN", "MEXICO", "TAIWAN", "UNITED_KINGDOM", "US_EAST", "US_CENTRAL", "US_WEST"}, false)), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "audience_settings": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "end_user_location": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"GLOBAL", "GLOBAL_US_CENTRIC", "GLOBAL_EU_CENTRIC", "GLOBAL_ASIA_CENTRIC", "EUROPE", "NORTH_AMERICA", "SOUTH_AMERICA", "NORDICS", "ASIA_PACIFIC", "AUSTRALIA", "GERMANY", "INDIA", "ITALY", "JAPAN", "TAIWAN", "UNITED_KINGDOM"}, false)), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "maximum_concurrent_users": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"NONE", "LESS_THAN_10K", "10K_TO_50K", "50K_TO_100K", "GREATER_THAN_100K"}, false)), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "content_settings": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "content_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"NONE", "SITE", "IMAGES", "CONFIG", "OTHERS", "AUDIO", "SD_VIDEO", "HD_VIDEO", "SUPER_HD_VIDEO", "LARGE_OBJECTS"}, false)), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "object_size": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"LESS_THAN_1MB", "1_TO_10MB", "10_TO_100MB", "GREATER_THAN_100MB"}, false)), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "download_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"FOREGROUND", "BACKGROUND"}, false)), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "popularity_distribution": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"TYPICAL", "LONG_TAIL", "ALL_POPULAR", "ALL_UNPOPULAR"}, false)), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "delivery_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ON_DEMAND", "LIVE"}, false)), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "delivery_format": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"DASH", "HDS", "HLS", "SILVER_LIGHT", "OTHER"}, false)), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "segment_duration": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntInSlice([]int{2, 4, 6, 8, 10})), + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "catalog_size": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SMALL", "MEDIUM", "LARGE", "EXTRA_LARGE"}, false)), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "refresh_rate": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"NONE", "HOURLY", "DAILY", "MONTHLY", "YEARLY"}, false)), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "optimize_for": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"NONE", "ORIGIN", "STARTUP"}, false)), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "quic_beta": { + Optional: true, + Type: schema.TypeList, + Description: "For a share of responses, includes an `Alt-Svc` header for compatible clients to initiate subsequent sessions using the QUIC protocol. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables QUIC support.", + Type: schema.TypeBool, + }, + "quic_offer_percentage": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(1, 50)), + Optional: true, + Description: "The percentage of responses for which to allow QUIC sessions.", + Type: schema.TypeInt, + }, + }, + }, + }, + "random_seek": { + Optional: true, + Type: schema.TypeList, + Description: "Optimizes `.flv` and `.mp4` files to allow random jump-point navigation. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "flv": { + Optional: true, + Description: "Enables random seek optimization in FLV files.", + Type: schema.TypeBool, + }, + "mp4": { + Optional: true, + Description: "Enables random seek optimization in MP4 files.", + Type: schema.TypeBool, + }, + "maximum_size": { + ValidateDiagFunc: validateRegexOrVariable("^\\d+[K,M,G,T]B$"), + Optional: true, + Description: "Sets the maximum size of the MP4 file to optimize, expressed as a number suffixed with a unit string such as `MB` or `GB`.", + Type: schema.TypeString, + }, + }, + }, + }, + "rapid": { + Optional: true, + Type: schema.TypeList, + Description: "The `Akamai API Gateway` allows you to configure API traffic delivered over the Akamai network. Apply this behavior to a set of API assets, then use Akamai's `API Endpoints API` to configure how the traffic responds. Use the `API Keys and Traffic Management API` to control access to your APIs. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables API Gateway for the current set of content.", + Type: schema.TypeBool, + }, + }, + }, + }, + "read_timeout": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior specifies how long the edge server should wait for a response from the requesting forward server after a connection has already been established. Any failure to read aborts the request and sends a `504` Gateway Timeout error to the client. Contact Akamai Professional Services for help configuring this behavior. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "value": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+[DdHhMmSs]$"), + Optional: true, + Description: "Specifies the read timeout necessary before failing with a `504` error. This value should never be zero.", + Type: schema.TypeString, + }, + }, + }, + }, + "real_time_reporting": { + Optional: true, + Type: schema.TypeList, + Description: "This enables `Real-Time Reporting` for Akamai Cloud Embed customers. The behavior can only be configured on your behalf by Akamai Professional Services. This behavior is for internal usage only. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables reports on delivery of cloud hosted content at near real-time latencies.", + Type: schema.TypeBool, + }, + "advanced": { + Optional: true, + Description: "Enables advanced options.", + Type: schema.TypeBool, + }, + "beacon_sampling_percentage": { + Optional: true, + Description: "Specifies the percentage for sampling.", + Type: schema.TypeFloat, + }, + }, + }, + }, + "real_user_monitoring": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior is deprecated, but you should not disable or remove it if present. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "When enabled, activates real-use monitoring.", + Type: schema.TypeBool, + }, + }, + }, + }, + "redirect": { + Optional: true, + Type: schema.TypeList, + Description: "Respond to the client request with a redirect without contacting the origin. Specify the redirect as a path expression starting with a `/` character relative to the current root, or as a fully qualified URL. This behavior relies primarily on `destinationHostname` and `destinationPath` to manipulate the hostname and path independently. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "mobile_default_choice": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"DEFAULT", "MOBILE"}, false)), + Optional: true, + Description: "Either specify a default response for mobile browsers, or customize your own.", + Type: schema.TypeString, + }, + "destination_protocol": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SAME_AS_REQUEST", "HTTP", "HTTPS"}, false)), + Optional: true, + Description: "Choose the protocol for the redirect URL.", + Type: schema.TypeString, + }, + "destination_hostname": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SAME_AS_REQUEST", "SUBDOMAIN", "SIBLING", "OTHER"}, false)), + Optional: true, + Description: "Specify how to change the requested hostname, independently from the pathname.", + Type: schema.TypeString, + }, + "destination_hostname_subdomain": { + Optional: true, + Description: "Specifies a subdomain to prepend to the current hostname. For example, a value of `m` changes `www.example.com` to `m.www.example.com`.", + Type: schema.TypeString, + }, + "destination_hostname_sibling": { + Optional: true, + Description: "Specifies the subdomain with which to replace to the current hostname's leftmost subdomain. For example, a value of `m` changes `www.example.com` to `m.example.com`.", + Type: schema.TypeString, + }, + "destination_hostname_other": { + ValidateDiagFunc: validateRegexOrVariable("^([a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})(\\.[a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})+$"), + Optional: true, + Description: "Specifies the full hostname with which to replace the current hostname.", + Type: schema.TypeString, + }, + "destination_path": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SAME_AS_REQUEST", "PREFIX_REQUEST", "OTHER"}, false)), + Optional: true, + Description: "Specify how to change the requested pathname, independently from the hostname.", + Type: schema.TypeString, + }, + "destination_path_prefix": { + ValidateDiagFunc: validateRegexOrVariable("^[^#\\[\\]@]+$"), + Optional: true, + Description: "When `destinationPath` is set to `PREFIX_REQUEST`, this prepends the current path. For example, a value of `/prefix/path` changes `/example/index.html` to `/prefix/path/example/index.html`.", + Type: schema.TypeString, + }, + "destination_path_suffix_status": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"NO_SUFFIX", "SUFFIX"}, false)), + Optional: true, + Description: "When `destinationPath` is set to `PREFIX_REQUEST`, this gives you the option of adding a suffix.", + Type: schema.TypeString, + }, + "destination_path_suffix": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9\\[\\]/?#!=&_\\-\\.]+$"), + Optional: true, + Description: "When `destinationPath` is set to `PREFIX_REQUEST` and `destinationPathSuffixStatus` is set to `SUFFIX`, this specifies the suffix to append to the path.", + Type: schema.TypeString, + }, + "destination_path_other": { + ValidateDiagFunc: validateRegexOrVariable("^/"), + Optional: true, + Description: "When `destinationPath` is set to `PREFIX_REQUEST`, this replaces the current path.", + Type: schema.TypeString, + }, + "query_string": { + Optional: true, + Description: "When set to `APPEND`, passes incoming query string parameters as part of the redirect URL. Otherwise set this to `IGNORE`.", + Type: schema.TypeString, + }, + "response_code": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntInSlice([]int{301, 302, 303, 307})), + Optional: true, + Description: "Specify the redirect's response code.", + Type: schema.TypeInt, + }, + }, + }, + }, + "redirectplus": { + Optional: true, + Type: schema.TypeList, + Description: "Respond to the client request with a redirect without contacting the origin. This behavior fills the same need as `redirect`, but allows you to use `variables` to express the redirect `destination`'s component values more concisely. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the redirect feature.", + Type: schema.TypeBool, + }, + "destination": { + Optional: true, + Description: "Specifies the redirect as a path expression starting with a `/` character relative to the current root, or as a fully qualified URL. Optionally inject variables, as in this example that refers to the original request's filename: `/path/to/{{builtin.AK_FILENAME}}`.", + Type: schema.TypeString, + }, + "response_code": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntInSlice([]int{301, 302, 303, 307})), + Optional: true, + Description: "Assigns the status code for the redirect response.", + Type: schema.TypeInt, + }, + }, + }, + }, + "referer_checking": { + Optional: true, + Type: schema.TypeList, + Description: "Limits allowed requests to a set of domains you specify. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the referer-checking behavior.", + Type: schema.TypeBool, + }, + "strict": { + Optional: true, + Description: "When enabled, excludes requests whose `Referer` header include a relative path, or that are missing a `Referer`. When disabled, only excludes requests whose `Referer` hostname is not part of the `domains` set.", + Type: schema.TypeBool, + }, + "domains": { + Optional: true, + Description: "Specifies the set of allowed domains. With `allowChildren` disabled, prefixing values with `*.` specifies domains for which subdomains are allowed.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "allow_children": { + Optional: true, + Description: "Allows all subdomains for the `domains` set, just like adding a `*.` prefix to each.", + Type: schema.TypeBool, + }, + }, + }, + }, + "remove_query_parameter": { + Optional: true, + Type: schema.TypeList, + Description: "Remove named query parameters before forwarding the request to the origin. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "parameters": { + Optional: true, + Description: "Specifies parameters to remove from the request.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }, + }, + }, + "remove_vary": { + Optional: true, + Type: schema.TypeList, + Description: "By default, responses that feature a `Vary` header value of anything other than `Accept-Encoding` and a corresponding `Content-Encoding: gzip` header aren't cached on edge servers. `Vary` headers indicate when a URL's content varies depending on some variable, such as which `User-Agent` requests it. This behavior simply removes the `Vary` header to make responses cacheable. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "When enabled, removes the `Vary` header to ensure objects can be cached.", + Type: schema.TypeBool, + }, + }, + }, + }, + "report": { + Optional: true, + Type: schema.TypeList, + Description: "Specify the HTTP request headers or cookie names to log in your Log Delivery Service reports. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "log_host": { + Optional: true, + Description: "Log the `Host` header.", + Type: schema.TypeBool, + }, + "log_referer": { + Optional: true, + Description: "Log the `Referer` header.", + Type: schema.TypeBool, + }, + "log_user_agent": { + Optional: true, + Description: "Log the `User-Agent` header.", + Type: schema.TypeBool, + }, + "log_accept_language": { + Optional: true, + Description: "Log the `Accept-Language` header.", + Type: schema.TypeBool, + }, + "log_cookies": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"OFF", "ALL", "SOME"}, false)), + Optional: true, + Description: "Specifies the set of cookies to log.", + Type: schema.TypeString, + }, + "cookies": { + Optional: true, + Description: "This specifies the set of cookies names whose values you want to log.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "log_custom_log_field": { + Optional: true, + Description: "Whether to append additional custom data to each log line.", + Type: schema.TypeBool, + }, + "custom_log_field": { + Optional: true, + Description: "Specifies an additional data field to append to each log line, maximum 1000 bytes, typically based on a dynamically generated built-in system variable. For example, `round-trip: {{builtin.AK_CLIENT_TURNAROUND_TIME}}ms` logs the total time to complete the response. See `Support for variables` for more information. If you enable the `logCustom` behavior, it overrides the `customLogField` option.", + Type: schema.TypeString, + }, + "log_edge_ip": { + Optional: true, + Description: "Whether to log the IP address of the Akamai edge server that served the response to the client.", + Type: schema.TypeBool, + }, + "log_x_forwarded_for": { + Optional: true, + Description: "Log any `X-Forwarded-For` request header.", + Type: schema.TypeBool, + }, + }, + }, + }, + "request_client_hints": { + Optional: true, + Type: schema.TypeList, + Description: "Client hints are HTTP request header fields that determine which resources the browser should include in the response. This behavior configures and prioritizes the client hints you want to send to request specific client and device information. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "accept_ch": { + Optional: true, + Description: "The client hint data objects you want to receive from the browser. You can add custom entries or provide pre-set values from the list. For more details on each value, see the `guide section` for this behavior. If you've configured your origin server to pass along data objects, they merge with the ones you set in this array, before the list is sent to the client.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "accept_critical_ch": { + Optional: true, + Description: "The critical client hint data objects you want to receive from the browser. The original request from the browser needs to include these objects. Otherwise, a new response header is sent back to the client, asking for all of these client hint data objects. You can add custom entries or provide pre-set values from the list. For more details on each value, see the `guide section` for this behavior.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "reset": { + Optional: true, + Description: "This sends an empty instance of the `Accept-CH` response header to clear other `Accept-CH` values currently stored in the client browser. This empty header doesn't get merged with other objects sent from your origin server.", + Type: schema.TypeBool, + }, + }, + }, + }, + "request_control": { + Optional: true, + Type: schema.TypeList, + Description: "The Request Control Cloudlet allows you to control access to your web content based on the incoming request's IP or geographic location. With Cloudlets available on your contract, choose `Your services` > `Edge logic Cloudlets` to control how the feature works within `Control Center`, or use the `Cloudlets API` to configure it programmatically. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the Request Control Cloudlet.", + Type: schema.TypeBool, + }, + "is_shared_policy": { + Optional: true, + Description: "Whether you want to apply the Cloudlet shared policy to an unlimited number of properties within your account. Learn more about shared policies and how to create them in `Cloudlets Policy Manager`.", + Type: schema.TypeBool, + }, + "cloudlet_policy": { + Optional: true, + Description: "Identifies the Cloudlet policy.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "name": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "cloudlet_shared_policy": { + Optional: true, + Description: "Identifies the Cloudlet shared policy to use with this behavior. Use the `Cloudlets API` to list available shared policies.", + Type: schema.TypeInt, + }, + "enable_branded403": { + Optional: true, + Description: "If enabled, serves a branded 403 page for this Cloudlet instance.", + Type: schema.TypeBool, + }, + "branded403_status_code": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntInSlice([]int{200, 302, 403, 503})), + Optional: true, + Description: "Specifies the response status code for the branded deny action.", + Type: schema.TypeInt, + }, + "net_storage": { + Optional: true, + Description: "Specifies the NetStorage domain that contains the branded 403 page.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cp_code": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "download_domain_name": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "g2o_token": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "branded403_file": { + ValidateDiagFunc: validateRegexOrVariable("^[^#\\[\\]@]+$"), + Optional: true, + Description: "Specifies the full path of the branded 403 page, including the filename, but excluding the NetStorage CP code path component.", + Type: schema.TypeString, + }, + "branded403_url": { + ValidateDiagFunc: validateRegexOrVariable("^[^\\s]+$"), + Optional: true, + Description: "Specifies the redirect URL for the branded deny action.", + Type: schema.TypeString, + }, + "branded_deny_cache_ttl": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(5, 30)), + Optional: true, + Description: "Specifies the branded response page's time to live in the cache, `5` minutes by default.", + Type: schema.TypeInt, + }, + }, + }, + }, + "request_type_marker": { + Optional: true, + Type: schema.TypeList, + Description: "The `Internet of Things: OTA Updates` product allows customers to securely distribute firmware to devices over cellular networks. When using the `downloadCompleteMarker` behavior to log successful downloads, this related behavior identifies download or campaign server types in aggregated and individual reports. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "request_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"DOWNLOAD", "CAMPAIGN_SERVER"}, false)), + Optional: true, + Description: "Specifies the type of request.", + Type: schema.TypeString, + }, + }, + }, + }, + "resource_optimizer": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior is deprecated, but you should not disable or remove it if present. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the Resource Optimizer feature.", + Type: schema.TypeBool, + }, + }, + }, + }, + "resource_optimizer_extended_compatibility": { + Optional: true, + Type: schema.TypeList, + Description: "This enhances the standard version of the `resourceOptimizer` behavior to support the compression of additional file formats and address some compatibility issues. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the Resource Optimizer feature.", + Type: schema.TypeBool, + }, + "enable_all_features": { + Optional: true, + Description: "Enables `additional support` and error handling.", + Type: schema.TypeBool, + }, + }, + }, + }, + "response_code": { + Optional: true, + Type: schema.TypeList, + Description: "Change the existing response code. For example, if your origin sends a `301` permanent redirect, this behavior can change it on the edge to a temporary `302` redirect. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "status_code": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntInSlice([]int{200, 301, 302, 303, 404, 500, 100, 101, 102, 103, 122, 201, 202, 203, 204, 205, 206, 207, 226, 300, 304, 305, 306, 307, 308, 400, 401, 402, 403, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 422, 423, 424, 425, 426, 428, 429, 431, 444, 449, 450, 499, 501, 502, 503, 504, 505, 506, 507, 509, 510, 511, 598, 599})), + Optional: true, + Description: "The HTTP status code to replace the existing one.", + Type: schema.TypeInt, + }, + "override206": { + Optional: true, + Description: "Allows any specified `200` success code to override a `206` partial-content code, in which case the response's content length matches the requested range length.", + Type: schema.TypeBool, + }, + }, + }, + }, + "response_cookie": { + Optional: true, + Type: schema.TypeList, + Description: "Set a cookie to send downstream to the client with either a fixed value or a unique stamp. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "cookie_name": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-*\\.]+$"), + Optional: true, + Description: "Specifies the name of the cookie, which serves as a key to determine if the cookie is set.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Allows you to set a response cookie.", + Type: schema.TypeBool, + }, + "type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"FIXED", "UNIQUE"}, false)), + Optional: true, + Description: "What type of value to assign.", + Type: schema.TypeString, + }, + "value": { + ValidateDiagFunc: validateRegexOrVariable("^[^\\s;]+$"), + Optional: true, + Description: "If the cookie `type` is `FIXED`, this specifies the cookie value.", + Type: schema.TypeString, + }, + "format": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"AKAMAI", "APACHE"}, false)), + Optional: true, + Description: "When the `type` of cookie is set to `UNIQUE`, this sets the date format.", + Type: schema.TypeString, + }, + "default_domain": { + Optional: true, + Description: "When enabled, uses the default domain value, otherwise the set specified in the `domain` field.", + Type: schema.TypeBool, + }, + "default_path": { + Optional: true, + Description: "When enabled, uses the default path value, otherwise the set specified in the `path` field.", + Type: schema.TypeBool, + }, + "domain": { + ValidateDiagFunc: validateRegexOrVariable("^([a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})(\\.[a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})+$"), + Optional: true, + Description: "If the `defaultDomain` is disabled, this sets the domain for which the cookie is valid. For example, `example.com` makes the cookie valid for that hostname and all subdomains.", + Type: schema.TypeString, + }, + "path": { + ValidateDiagFunc: validateRegexOrVariable("^[^#\\[\\]@]+$"), + Optional: true, + Description: "If the `defaultPath` is disabled, sets the path component for which the cookie is valid.", + Type: schema.TypeString, + }, + "expires": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ON_BROWSER_CLOSE", "FIXED_DATE", "DURATION", "NEVER"}, false)), + Optional: true, + Description: "Sets various ways to specify when the cookie expires.", + Type: schema.TypeString, + }, + "expiration_date": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+$"), + Optional: true, + Description: "If `expires` is set to `FIXED_DATE`, this sets when the cookie expires as a UTC date and time.", + Type: schema.TypeString, + }, + "duration": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+[DdHhMmSs]$"), + Optional: true, + Description: "If `expires` is set to `DURATION`, this sets the cookie's lifetime.", + Type: schema.TypeString, + }, + "same_site": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"DEFAULT", "NONE", "LAX", "STRICT"}, false)), + Optional: true, + Description: "This option controls the `SameSite` cookie attribute that reduces the risk of cross-site request forgery attacks.", + Type: schema.TypeString, + }, + "secure": { + Optional: true, + Description: "When enabled, sets the cookie's `Secure` flag to transmit it with `HTTPS`.", + Type: schema.TypeBool, + }, + "http_only": { + Optional: true, + Description: "When enabled, includes the `HttpOnly` attribute in the `Set-Cookie` response header to mitigate the risk of client-side scripts accessing the protected cookie, if the browser supports it.", + Type: schema.TypeBool, + }, + }, + }, + }, + "restrict_object_caching": { + Optional: true, + Type: schema.TypeList, + Description: "You need this behavior to deploy the Object Caching product. It disables serving HTML content and limits the maximum object size to 100MB. Contact Akamai Professional Services for help configuring it. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "maximum_size": { + Optional: true, + Description: "Specifies a fixed maximum size of non-HTML content to cache.", + Type: schema.TypeString, + }, + }, + }, + }, + "return_cache_status": { + Optional: true, + Type: schema.TypeList, + Description: "Generates a response header with information about cache status. Among other things, this can tell you whether the response came from the Akamai cache, or from the origin. Status values report with either of these forms of syntax, depending for example on whether you're deploying traffic using `sureRoute` or `tieredDistribution`: This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "response_header_name": { + ValidateDiagFunc: validateRegexOrVariable("^[^()<>@,;:\\\"/\\[\\]?{}\\s]+$"), + Optional: true, + Description: "Specifies the name of the HTTP header in which to report the cache status value.", + Type: schema.TypeString, + }, + }, + }, + }, + "rewrite_url": { + Optional: true, + Type: schema.TypeList, + Description: "Modifies the path of incoming requests to forward to the origin. This helps you offload URL-rewriting tasks to the edge to increase the origin server's performance, allows you to redirect links to different targets without changing markup, and hides your original directory structure. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "behavior": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"REPLACE", "REMOVE", "REWRITE", "PREPEND", "REGEX_REPLACE"}, false)), + Optional: true, + Description: "The action to perform on the path.", + Type: schema.TypeString, + }, + "match": { + ValidateDiagFunc: validateRegexOrVariable("^/([^:#\\[\\]@/?]+/)*$"), + Optional: true, + Description: "When `behavior` is `REMOVE` or `REPLACE`, specifies the part of the incoming path you'd like to remove or modify.", + Type: schema.TypeString, + }, + "match_regex": { + Optional: true, + Description: "When `behavior` is set to `REGEX_REPLACE`, specifies the Perl-compatible regular expression to replace with `targetRegex`.", + Type: schema.TypeString, + }, + "target_regex": { + Optional: true, + Description: "When `behavior` is set to `REGEX_REPLACE`, this replaces whatever the `matchRegex` field matches, along with any captured sequences from `\\$1` through `\\$9`.", + Type: schema.TypeString, + }, + "target_path": { + ValidateDiagFunc: validateRegexOrVariable("^/([^:#\\[\\]@/?]+/)*$"), + Optional: true, + Description: "When `behavior` is set to `REPLACE`, this path replaces whatever the `match` field matches in the incoming request's path.", + Type: schema.TypeString, + }, + "target_path_prepend": { + ValidateDiagFunc: validateRegexOrVariable("^/([^:#\\[\\]@/?]+/)*$"), + Optional: true, + Description: "When `behavior` is set to `PREPEND`, specifies a path to prepend to the incoming request's URL.", + Type: schema.TypeString, + }, + "target_url": { + ValidateDiagFunc: validateRegexOrVariable("(/\\S*)?$"), + Optional: true, + Description: "When `behavior` is set to `REWRITE`, specifies the full path to request from the origin.", + Type: schema.TypeString, + }, + "match_multiple": { + Optional: true, + Description: "When enabled, replaces all potential matches rather than only the first.", + Type: schema.TypeBool, + }, + "keep_query_string": { + Optional: true, + Description: "When enabled, retains the original path's query parameters.", + Type: schema.TypeBool, + }, + }, + }, + }, + "rum_custom": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior is deprecated, but you should not disable or remove it if present. This behavior is for internal usage only. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "rum_sample_rate": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(0, 100)), + Optional: true, + Description: "Specifies the percentage of web traffic to include in your RUM report.", + Type: schema.TypeInt, + }, + "rum_group_name": { + ValidateDiagFunc: validateAny(validation.ToDiagFunc(validation.StringIsEmpty), validateRegexOrVariable("^[0-9a-zA-Z]*$")), + Optional: true, + Description: "A deprecated option to specify an alternate name under which to batch this set of web traffic in your report. Do not use it.", + Type: schema.TypeString, + }, + }, + }, + }, + "saas_definitions": { + Optional: true, + Type: schema.TypeList, + Description: "Configures how the Software as a Service feature identifies `customers`, `applications`, and `users`. A different set of options is available for each type of targeted request, each enabled with the `action`-suffixed option. In each case, you can use `PATH`, `COOKIE`, `QUERY_STRING`, or `HOSTNAME` components as identifiers, or `disable` the SaaS behavior for certain targets. If you rely on a `HOSTNAME`, you also have the option of specifying a `CNAME chain` rather than an individual hostname. The various options suffixed `regex` and `replace` subsequently remove the identifier from the request. This behavior requires a sibling `origin` behavior whose `originType` option is set to `SAAS_DYNAMIC_ORIGIN`. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "customer_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "customer_action": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"DISABLED", "HOSTNAME", "PATH", "QUERY_STRING", "COOKIE"}, false)), + Optional: true, + Description: "Specifies the request component that identifies a SaaS customer.", + Type: schema.TypeString, + }, + "customer_cname_enabled": { + Optional: true, + Description: "Enabling this allows you to identify customers using a `CNAME chain` rather than a single hostname.", + Type: schema.TypeBool, + }, + "customer_cname_level": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+$"), + Optional: true, + Description: "Specifies the number of CNAMEs to use in the chain.", + Type: schema.TypeInt, + }, + "customer_cookie": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-*\\.]+$"), + Optional: true, + Description: "This specifies the name of the cookie that identifies the customer.", + Type: schema.TypeString, + }, + "customer_query_string": { + ValidateDiagFunc: validateRegexOrVariable("^[^:/?#\\[\\]@&]+$"), + Optional: true, + Description: "This names the query parameter that identifies the customer.", + Type: schema.TypeString, + }, + "customer_regex": { + ValidateDiagFunc: validateRegexOrVariable("^([a-zA-Z0-9\\:\\[\\]\\{\\}\\(\\)\\.\\?_\\-\\*\\+\\^\\$\\\\\\/\\|&=!]{1,250})$"), + Optional: true, + Description: "Specifies a Perl-compatible regular expression with which to substitute the request's customer ID.", + Type: schema.TypeString, + }, + "customer_replace": { + ValidateDiagFunc: validateRegexOrVariable("^(([a-zA-Z0-9_\\-]|\\$[1-9]){1,250})$"), + Optional: true, + Description: "Specifies a string to replace the request's customer ID matched by `customerRegex`.", + Type: schema.TypeString, + }, + "application_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "application_action": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"DISABLED", "HOSTNAME", "PATH", "QUERY_STRING", "COOKIE"}, false)), + Optional: true, + Description: "Specifies the request component that identifies a SaaS application.", + Type: schema.TypeString, + }, + "application_cname_enabled": { + Optional: true, + Description: "Enabling this allows you to identify applications using a `CNAME chain` rather than a single hostname.", + Type: schema.TypeBool, + }, + "application_cname_level": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+$"), + Optional: true, + Description: "Specifies the number of CNAMEs to use in the chain.", + Type: schema.TypeInt, + }, + "application_cookie": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-*\\.]+$"), + Optional: true, + Description: "This specifies the name of the cookie that identifies the application.", + Type: schema.TypeString, + }, + "application_query_string": { + ValidateDiagFunc: validateRegexOrVariable("^[^:/?#\\[\\]@&]+$"), + Optional: true, + Description: "This names the query parameter that identifies the application.", + Type: schema.TypeString, + }, + "application_regex": { + ValidateDiagFunc: validateRegexOrVariable("^([a-zA-Z0-9\\:\\[\\]\\{\\}\\(\\)\\.\\?_\\-\\*\\+\\^\\$\\\\\\/\\|&=!]{1,250})$"), + Optional: true, + Description: "Specifies a Perl-compatible regular expression with which to substitute the request's application ID.", + Type: schema.TypeString, + }, + "application_replace": { + ValidateDiagFunc: validateRegexOrVariable("^(([a-zA-Z0-9_\\-]|\\$[1-9]){1,250})$"), + Optional: true, + Description: "Specifies a string to replace the request's application ID matched by `applicationRegex`.", + Type: schema.TypeString, + }, + "users_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "users_action": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"DISABLED", "HOSTNAME", "PATH", "QUERY_STRING", "COOKIE"}, false)), + Optional: true, + Description: "Specifies the request component that identifies a SaaS user.", + Type: schema.TypeString, + }, + "users_cname_enabled": { + Optional: true, + Description: "Enabling this allows you to identify users using a `CNAME chain` rather than a single hostname.", + Type: schema.TypeBool, + }, + "users_cname_level": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+$"), + Optional: true, + Description: "Specifies the number of CNAMEs to use in the chain.", + Type: schema.TypeInt, + }, + "users_cookie": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-*\\.]+$"), + Optional: true, + Description: "This specifies the name of the cookie that identifies the user.", + Type: schema.TypeString, + }, + "users_query_string": { + ValidateDiagFunc: validateRegexOrVariable("^[^:/?#\\[\\]@&]+$"), + Optional: true, + Description: "This names the query parameter that identifies the user.", + Type: schema.TypeString, + }, + "users_regex": { + ValidateDiagFunc: validateRegexOrVariable("^([a-zA-Z0-9\\:\\[\\]\\{\\}\\(\\)\\.\\?_\\-\\*\\+\\^\\$\\\\\\/\\|&=!]{1,250})$"), + Optional: true, + Description: "Specifies a Perl-compatible regular expression with which to substitute the request's user ID.", + Type: schema.TypeString, + }, + "users_replace": { + ValidateDiagFunc: validateRegexOrVariable("^(([a-zA-Z0-9_\\-]|\\$[1-9]){1,250})$"), + Optional: true, + Description: "Specifies a string to replace the request's user ID matched by `usersRegex`.", + Type: schema.TypeString, + }, + }, + }, + }, + "sales_force_commerce_cloud_client": { + Optional: true, + Type: schema.TypeList, + Description: "If you use the Salesforce Commerce Cloud platform for your origin content, this behavior allows your edge content managed by Akamai to contact directly to origin. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the Akamai Connector for Salesforce Commerce Cloud.", + Type: schema.TypeBool, + }, + "connector_id": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\.]+\\-[a-zA-Z0-9_\\.]+\\-[a-zA-Z0-9\\-_\\.]+$|^door2.dw.com$"), + Optional: true, + Description: "An ID value that helps distinguish different types of traffic sent from Akamai to the Salesforce Commerce Cloud. Form the value as `instance-realm-customer`, where `instance` is either `production` or `development`, `realm` is your Salesforce Commerce Cloud service `$REALM` value, and `customer` is the name for your organization in Salesforce Commerce Cloud. You can use alphanumeric characters, underscores, or dot characters within dash-delimited segment values.", + Type: schema.TypeString, + }, + "origin_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"DEFAULT", "CUSTOMER"}, false)), + Optional: true, + Description: "Specifies where the origin is.", + Type: schema.TypeString, + }, + "sf3c_origin_host": { + Optional: true, + Description: "This specifies the hostname or IP address of the custom Salesforce origin.", + Type: schema.TypeString, + }, + "origin_host_header": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"DEFAULT", "CUSTOMER"}, false)), + Optional: true, + Description: "Specifies where the `Host` header is defined.", + Type: schema.TypeString, + }, + "sf3c_origin_host_header": { + Optional: true, + Description: "This specifies the hostname or IP address of the custom Salesforce host header.", + Type: schema.TypeString, + }, + "allow_override_origin_cache_key": { + Optional: true, + Description: "When enabled, overrides the forwarding origin's cache key.", + Type: schema.TypeBool, + }, + }, + }, + }, + "sales_force_commerce_cloud_provider": { + Optional: true, + Type: schema.TypeList, + Description: "This manages traffic between mutual customers and the Salesforce Commerce Cloud platform. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables Akamai Provider for Salesforce Commerce Cloud.", + Type: schema.TypeBool, + }, + }, + }, + }, + "sales_force_commerce_cloud_provider_host_header": { + Optional: true, + Type: schema.TypeList, + Description: "Manages host header values sent to the Salesforce Commerce Cloud platform. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "host_header_source": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"PROPERTY", "CUSTOMER"}, false)), + Optional: true, + Description: "Specify where the host header derives from.", + Type: schema.TypeString, + }, + }, + }, + }, + "save_post_dca_processing": { + Optional: true, + Type: schema.TypeList, + Description: "Used in conjunction with the `cachePost` behavior, this behavior allows the body of POST requests to be processed through Dynamic Content Assembly. Contact Akamai Professional Services for help configuring it. This behavior is for internal usage only. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables processing of POST requests.", + Type: schema.TypeBool, + }, + }, + }, + }, + "schedule_invalidation": { + Optional: true, + Type: schema.TypeList, + Description: "Specifies when cached content that satisfies a rule's criteria expires, optionally at repeating intervals. In addition to periodic cache flushes, you can use this behavior to minimize potential conflicts when related objects expire at different times. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "start": { + Optional: true, + Description: "The UTC date and time when matching cached content is to expire.", + Type: schema.TypeString, + }, + "repeat": { + Optional: true, + Description: "When enabled, invalidation recurs periodically from the `start` time based on the `repeatInterval` time.", + Type: schema.TypeBool, + }, + "repeat_interval": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+[DdHhMmSs]$"), + Optional: true, + Description: "Specifies how often to invalidate content from the `start` time, expressed in seconds. For example, an expiration set to midnight and an interval of `86400` seconds invalidates content once a day. Repeating intervals of less than 5 minutes are not allowed for `NetStorage` origins.", + Type: schema.TypeString, + }, + "refresh_method": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"INVALIDATE", "PURGE"}, false)), + Optional: true, + Description: "Specifies how to invalidate the content.", + Type: schema.TypeString, + }, + }, + }, + }, + "script_management": { + Optional: true, + Type: schema.TypeList, + Description: "Ensures unresponsive linked JavaScript files do not prevent HTML pages from loading. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the Script Management feature.", + Type: schema.TypeBool, + }, + "serviceworker": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"YES_SERVICE_WORKER", "NO_SERVICE_WORKER"}, false)), + Optional: true, + Description: "Script Management uses a JavaScript service worker called `akam-sw.js`. It applies a policy that helps you manage scripts.", + Type: schema.TypeString, + }, + "timestamp": { + Optional: true, + Description: "A read-only epoch timestamp that represents the last time a Script Management policy was synchronized with its Ion property.", + Type: schema.TypeInt, + }, + }, + }, + }, + "segmented_content_protection": { + Optional: true, + Type: schema.TypeList, + Description: "Validates authorization tokens at the edge server to prevent unauthorized link sharing. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "token_authentication_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the segmented content protection behavior.", + Type: schema.TypeBool, + }, + "key": { + ValidateDiagFunc: validateRegexOrVariable("^(0x)?[0-9a-fA-F]{32}$"), + Optional: true, + Description: "Specifies the encryption key to use as a shared secret to validate tokens.", + Type: schema.TypeString, + }, + "use_advanced": { + Optional: true, + Description: "Allows you to specify advanced `transitionKey` and `salt` options.", + Type: schema.TypeBool, + }, + "transition_key": { + ValidateDiagFunc: validateAny(validation.ToDiagFunc(validation.StringIsEmpty), validateRegexOrVariable("^(0x)?[0-9a-fA-F]{32}$")), + Optional: true, + Description: "An alternate encryption key to match along with the `key` field, allowing you to rotate keys with no down time.", + Type: schema.TypeString, + }, + "salt": { + ValidateDiagFunc: validateAny(validation.ToDiagFunc(validation.StringIsEmpty), validation.ToDiagFunc(validation.StringLenBetween(16, 16))), + Optional: true, + Description: "Specifies a salt as input into the token for added security. This value needs to match the salt used in the token generation code.", + Type: schema.TypeString, + }, + "header_for_salt": { + Optional: true, + Description: "This allows you to include additional salt properties specific to each end user to strengthen the relationship between the session token and playback session. This specifies the set of request headers whose values generate the salt value, typically `User-Agent`, `X-Playback-Session-Id`, and `Origin`. Any specified header needs to appear in the player's request.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "field_carry_over": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "session_id": { + Optional: true, + Description: "Enabling this option carries the `session_id` value from the access token over to the session token, for use in tracking and counting unique playback sessions.", + Type: schema.TypeBool, + }, + "data_payload": { + Optional: true, + Description: "Enabling this option carries the `data/payload` field from the access token over to the session token, allowing access to opaque data for log analysis for a URL protected by a session token.", + Type: schema.TypeBool, + }, + "ip": { + Optional: true, + Description: "Enabling this restricts content access to a specific IP address, only appropriate if it does not change during the playback session.", + Type: schema.TypeBool, + }, + "acl": { + Optional: true, + Description: "Enabling this option carries the `ACL` field from the access token over to the session token, to limit the requesting client's access to the specific URL or path set in the `ACL` field. Playback may fail if the base path of the master playlist (and variant playlist, plus segments) varies from that of the `ACL` field.", + Type: schema.TypeBool, + }, + "token_auth_hls_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "enable_token_in_uri": { + Optional: true, + Description: "When enabled, passes tokens in HLS variant manifest URLs and HLS segment URLs, as an alternative to cookies.", + Type: schema.TypeBool, + }, + "hls_master_manifest_files": { + Optional: true, + Description: "Specifies the set of filenames that form HLS master manifest URLs. You can use `*` wildcard character that matches zero or more characters. Make sure to specify master manifest filenames uniquely, to distinguish them from variant manifest files.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "token_revocation_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "token_revocation_enabled": { + Optional: true, + Description: "Enable this to deny requests from playback URLs that contain a `TokenAuth` token that uses specific token identifiers.", + Type: schema.TypeBool, + }, + "revoked_list_id": { + Optional: true, + Description: "Identifies the `TokenAuth` tokens to block from accessing your content.", + Type: schema.TypeInt, + }, + "media_encryption_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "hls_media_encryption": { + Optional: true, + Description: "Enables HLS Segment Encryption.", + Type: schema.TypeBool, + }, + "dash_media_encryption": { + Optional: true, + Description: "Whether to enable DASH Media Encryption.", + Type: schema.TypeBool, + }, + }, + }, + }, + "segmented_media_optimization": { + Optional: true, + Type: schema.TypeList, + Description: "Optimizes segmented media for live or streaming delivery contexts. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "behavior": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ON_DEMAND", "LIVE"}, false)), + Optional: true, + Description: "Sets the type of media content to optimize.", + Type: schema.TypeString, + }, + "enable_ull_streaming": { + Optional: true, + Description: "Enables ultra low latency (ULL) streaming. ULL reduces latency and decreases overall transfer time of live streams.", + Type: schema.TypeBool, + }, + "show_advanced": { + Optional: true, + Description: "Allows you to configure advanced media options.", + Type: schema.TypeBool, + }, + "live_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"CONTINUOUS", "EVENT"}, false)), + Optional: true, + Description: "The type of live media.", + Type: schema.TypeString, + }, + "start_time": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+$"), + Optional: true, + Description: "This specifies when the live media event begins.", + Type: schema.TypeString, + }, + "end_time": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+$"), + Optional: true, + Description: "This specifies when the live media event ends.", + Type: schema.TypeString, + }, + "dvr_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"CONFIGURABLE", "UNKNOWN"}, false)), + Optional: true, + Description: "The type of DVR.", + Type: schema.TypeString, + }, + "dvr_window": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+[DdHhMmSs]$"), + Optional: true, + Description: "Set the duration for your media, or `0m` if a DVR is not required.", + Type: schema.TypeString, + }, + }, + }, + }, + "segmented_media_streaming_prefetch": { + Optional: true, + Type: schema.TypeList, + Description: "Prefetches HLS and DASH media stream manifest and segment files, accelerating delivery to end users. For prefetching to work, your origin media's response needs to specify `CDN-Origin-Assist-Prefetch-Path` headers with each URL to prefetch, expressed as either a relative or absolute path. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables media stream prefetching.", + Type: schema.TypeBool, + }, + }, + }, + }, + "set_variable": { + Optional: true, + Type: schema.TypeList, + Description: "Modify a variable to insert into subsequent fields within the rule tree. Use this behavior to specify the predeclared `variableName` and determine from where to derive its new value. Based on this `valueSource`, you can either generate the value, extract it from some part of the incoming request, assign it from another variable (including a set of built-in system variables), or directly specify its text. Optionally choose a `transform` function to modify the value once. See `Support for variables` for more information. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "variable_name": { + Optional: true, + Description: "Specifies the predeclared root name of the variable to modify. When you declare a variable name such as `VAR`, its name is preprended with `PMUSER_` and accessible in a `user` namespace, so that you invoke it in subsequent text fields within the rule tree as `{{user.PMUSER_VAR}}`. In deployed `XML metadata`, it appears as `%(PMUSER_VAR)`.", + Type: schema.TypeString, + }, + "value_source": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"EXPRESSION", "EXTRACT", "GENERATE"}, false)), + Optional: true, + Description: "Determines how you want to set the value.", + Type: schema.TypeString, + }, + "variable_value": { + Optional: true, + Description: "This directly specifies the value to assign to the variable. The expression may include a mix of static text and other variables, such as `new_filename.{{builtin.AK_EXTENSION}}` to embed a system variable.", + Type: schema.TypeString, + }, + "extract_location": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"CLIENT_CERTIFICATE", "CLIENT_REQUEST_HEADER", "COOKIE", "EDGESCAPE", "PATH_COMPONENT_OFFSET", "QUERY_STRING", "DEVICE_PROFILE", "RESPONSE_HEADER", "SET_COOKIE"}, false)), + Optional: true, + Description: "This specifies from where to get the value.", + Type: schema.TypeString, + }, + "certificate_field_name": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"VERSION", "SERIAL", "FINGERPRINT_MD5", "FINGERPRINT_SHA1", "FINGERPRINT_DYN", "ISSUER_DN", "SUBJECT_DN", "NOT_BEFORE", "NOT_AFTER", "SIGNATURE_ALGORITHM", "SIGNATURE", "CONTENTS_DER", "CONTENTS_PEM", "CONTENTS_PEM_NO_LABELS", "COUNT", "STATUS_MSG", "KEY_LENGTH"}, false)), + Optional: true, + Description: "Specifies the certificate's content.", + Type: schema.TypeString, + }, + "header_name": { + Optional: true, + Description: "Specifies the case-insensitive name of the HTTP header to extract.", + Type: schema.TypeString, + }, + "response_header_name": { + Optional: true, + Description: "Specifies the case-insensitive name of the HTTP header to extract.", + Type: schema.TypeString, + }, + "set_cookie_name": { + Optional: true, + Description: "Specifies the name of the origin's `Set-Cookie` response header.", + Type: schema.TypeString, + }, + "cookie_name": { + Optional: true, + Description: "Specifies the name of the cookie to extract.", + Type: schema.TypeString, + }, + "location_id": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"GEOREGION", "COUNTRY_CODE", "REGION_CODE", "CITY", "DMA", "PMSA", "MSA", "AREACODE", "COUNTY", "FIPS", "LAT", "LONG", "TIMEZONE", "ZIP", "CONTINENT", "NETWORK", "NETWORK_TYPE", "ASNUM", "THROUGHPUT", "BW"}, false)), + Optional: true, + Description: "Specifies the `X-Akamai-Edgescape` header's field name. Possible values specify basic geolocation, various geographic standards, and information about the client's network. For details on EdgeScape header fields, see the `EdgeScape User Guide`.", + Type: schema.TypeString, + }, + "path_component_offset": { + Optional: true, + Description: "This specifies a portion of the path. The indexing starts from `1`, so a value of `/path/to/nested/filename.html` and an offset of `1` yields `path`, and `3` yields `nested`. Negative indexes offset from the right, so `-2` also yields `nested`.", + Type: schema.TypeString, + }, + "query_parameter_name": { + Optional: true, + Description: "Specifies the name of the query parameter from which to extract the value.", + Type: schema.TypeString, + }, + "generator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"HEXRAND", "RAND"}, false)), + Optional: true, + Description: "This specifies the type of value to generate.", + Type: schema.TypeString, + }, + "number_of_bytes": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(1, 16)), + Optional: true, + Description: "Specifies the number of random hex bytes to generate.", + Type: schema.TypeInt, + }, + "min_random_number": { + Optional: true, + Description: "Specifies the lower bound of the random number.", + Type: schema.TypeInt, + }, + "max_random_number": { + Optional: true, + Description: "Specifies the upper bound of the random number.", + Type: schema.TypeInt, + }, + "transform": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"NONE", "ADD", "BASE_64_DECODE", "BASE_64_ENCODE", "BASE_32_DECODE", "BASE_32_ENCODE", "BITWISE_AND", "BITWISE_NOT", "BITWISE_OR", "BITWISE_XOR", "DECIMAL_TO_HEX", "DECRYPT", "DIVIDE", "ENCRYPT", "EPOCH_TO_STRING", "EXTRACT_PARAM", "HASH", "JSON_EXTRACT", "HEX_TO_DECIMAL", "HEX_DECODE", "HEX_ENCODE", "HMAC", "LOWER", "MD5", "MINUS", "MODULO", "MULTIPLY", "NORMALIZE_PATH_WIN", "REMOVE_WHITESPACE", "COMPRESS_WHITESPACE", "SHA_1", "SHA_256", "STRING_INDEX", "STRING_LENGTH", "STRING_TO_EPOCH", "SUBSTITUTE", "SUBSTRING", "SUBTRACT", "TRIM", "UPPER", "BASE_64_URL_DECODE", "BASE_64_URL_ENCODE", "URL_DECODE", "URL_ENCODE", "URL_DECODE_UNI", "UTC_SECONDS", "XML_DECODE", "XML_ENCODE"}, false)), + Optional: true, + Description: "Specifies a function to transform the value. For more details on each transform function, see `Set Variable: Operations`.", + Type: schema.TypeString, + }, + "operand_one": { + Optional: true, + Description: "Specifies an additional operand when the `transform` function is set to various arithmetic functions (`ADD`, `SUBTRACT`, `MULTIPLY`, `DIVIDE`, or `MODULO`) or bitwise functions (`BITWISE_AND`, `BITWISE_OR`, or `BITWISE_XOR`).", + Type: schema.TypeString, + }, + "algorithm": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ALG_3DES", "ALG_AES128", "ALG_AES256"}, false)), + Optional: true, + Description: "Specifies the algorithm to apply.", + Type: schema.TypeString, + }, + "encryption_key": { + ValidateDiagFunc: validateRegexOrVariable("^(0x)?[0-9a-fA-F]+$"), + Optional: true, + Description: "Specifies the encryption hex key. For `ALG_3DES` it needs to be 48 characters long, 32 characters for `ALG_AES128`, and 64 characters for `ALG_AES256`.", + Type: schema.TypeString, + }, + "initialization_vector": { + ValidateDiagFunc: validateRegexOrVariable("^(0x)?[0-9a-fA-F]+$"), + Optional: true, + Description: "Specifies a one-time number as an initialization vector. It needs to be 15 characters long for `ALG_3DES`, and 32 characters for both `ALG_AES128` and `ALG_AES256`.", + Type: schema.TypeString, + }, + "encryption_mode": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"CBC", "ECB"}, false)), + Optional: true, + Description: "Specifies the encryption mode.", + Type: schema.TypeString, + }, + "nonce": { + Optional: true, + Description: "Specifies the one-time number used for encryption.", + Type: schema.TypeString, + }, + "prepend_bytes": { + Optional: true, + Description: "Specifies a number of random bytes to prepend to the key.", + Type: schema.TypeBool, + }, + "format_string": { + Optional: true, + Description: "Specifies an optional format string for the conversion, using format codes such as `%m/%d/%y` as specified by `strftime`. A blank value defaults to RFC-2616 format.", + Type: schema.TypeString, + }, + "param_name": { + Optional: true, + Description: "Extracts the value for the specified parameter name from a string that contains key/value pairs. (Use `separator` below to parse them.)", + Type: schema.TypeString, + }, + "separator": { + Optional: true, + Description: "Specifies the character that separates pairs of values within the string.", + Type: schema.TypeString, + }, + "min": { + Optional: true, + Description: "Specifies a minimum value for the generated integer.", + Type: schema.TypeInt, + }, + "max": { + Optional: true, + Description: "Specifies a maximum value for the generated integer.", + Type: schema.TypeInt, + }, + "hmac_key": { + Optional: true, + Description: "Specifies the secret to use in generating the base64-encoded digest.", + Type: schema.TypeString, + }, + "hmac_algorithm": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SHA1", "SHA256", "MD5"}, false)), + Optional: true, + Description: "Specifies the algorithm to use to generate the base64-encoded digest.", + Type: schema.TypeString, + }, + "ip_version": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IPV4", "IPV6"}, false)), + Optional: true, + Description: "Specifies the IP version under which a subnet mask generates.", + Type: schema.TypeString, + }, + "ipv6_prefix": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(0, 128)), + Optional: true, + Description: "Specifies the prefix of the IPV6 address, a value between 0 and 128.", + Type: schema.TypeInt, + }, + "ipv4_prefix": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(0, 32)), + Optional: true, + Description: "Specifies the prefix of the IPV4 address, a value between 0 and 32.", + Type: schema.TypeInt, + }, + "sub_string": { + Optional: true, + Description: "Specifies a substring for which the returned value represents a zero-based offset of where it appears in the original string, or `-1` if there's no match.", + Type: schema.TypeString, + }, + "regex": { + Optional: true, + Description: "Specifies the regular expression pattern (PCRE) to match the value.", + Type: schema.TypeString, + }, + "replacement": { + Optional: true, + Description: "Specifies the replacement string. Reinsert grouped items from the match into the replacement using `$1`, `$2` ... `$n`.", + Type: schema.TypeString, + }, + "case_sensitive": { + Optional: true, + Description: "Enabling this makes all matches case sensitive.", + Type: schema.TypeBool, + }, + "global_substitution": { + Optional: true, + Description: "Replaces all matches in the string, not just the first.", + Type: schema.TypeBool, + }, + "start_index": { + Optional: true, + Description: "Specifies the zero-based character offset at the start of the substring. Negative indexes specify the offset from the end of the string.", + Type: schema.TypeInt, + }, + "end_index": { + Optional: true, + Description: "Specifies the zero-based character offset at the end of the substring, without including the character at that index position. Negative indexes specify the offset from the end of the string.", + Type: schema.TypeInt, + }, + "except_chars": { + Optional: true, + Description: "Specifies characters `not` to encode, possibly overriding the default set.", + Type: schema.TypeString, + }, + "force_chars": { + Optional: true, + Description: "Specifies characters to encode, possibly overriding the default set.", + Type: schema.TypeString, + }, + "device_profile": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS_MOBILE", "IS_TABLET", "IS_WIRELESS_DEVICE", "PHYSICAL_SCREEN_HEIGHT", "PHYSICAL_SCREEN_WIDTH", "RESOLUTION_HEIGHT", "RESOLUTION_WIDTH", "VIEWPORT_WIDTH", "BRAND_NAME", "DEVICE_OS", "DEVICE_OS_VERSION", "DUAL_ORIENTATION", "MAX_IMAGE_HEIGHT", "MAX_IMAGE_WIDTH", "MOBILE_BROWSER", "MOBILE_BROWSER_VERSION", "PDF_SUPPORT", "COOKIE_SUPPORT"}, false)), + Optional: true, + Description: "Specifies the client device attribute. Possible values specify information about the client device, including device type, size and browser. For details on fields, see `Device Characterization`.", + Type: schema.TypeString, + }, + }, + }, + }, + "simulate_error_code": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior simulates various error response codes. Contact Akamai Professional Services for help configuring it. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "error_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ERR_DNS_TIMEOUT", "ERR_SUREROUTE_DNS_FAIL", "ERR_DNS_FAIL", "ERR_CONNECT_TIMEOUT", "ERR_NO_GOOD_FWD_IP", "ERR_DNS_IN_REGION", "ERR_CONNECT_FAIL", "ERR_READ_TIMEOUT", "ERR_READ_ERROR", "ERR_WRITE_ERROR"}, false)), + Optional: true, + Description: "Specifies the type of error.", + Type: schema.TypeString, + }, + "timeout": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+[DdHhMmSs]$"), + Optional: true, + Description: "When the `errorType` is `ERR_CONNECT_TIMEOUT`, `ERR_DNS_TIMEOUT`, `ERR_SUREROUTE_DNS_FAIL`, or `ERR_READ_TIMEOUT`, generates an error after the specified amount of time from the initial request.", + Type: schema.TypeString, + }, + }, + }, + }, + "site_shield": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior implements the `Site Shield` feature, which helps prevent non-Akamai machines from contacting your origin. You get an email with a list of Akamai servers allowed to contact your origin, with which you establish an Access Control List on your firewall to prevent any other requests. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "ssmap": { + Optional: true, + Description: "Identifies the hostname for the Site Shield map. See `Create a Site Shield map` for more details. Form an object with a `value` key that references the hostname, for example: `\"ssmap\":{\"value\":\"ss.akamai.net\"}`.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "value": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "srmap": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "china_cdn_map": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "has_mixed_hosts": { + Optional: true, + Description: "", + Type: schema.TypeBool, + }, + "src": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"FALLBACK", "PROTECTED_HOST_MATCH", "ORIGIN_MATCH", "PREVIOUS_MAP", "PROPERTY_MATCH"}, false)), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "nossmap": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + "standard_tls_migration": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior is deprecated, but you should not disable or remove it if present. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Allows migration to Standard TLS.", + Type: schema.TypeBool, + }, + "migration_from": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SHARED_CERT", "NON_SECURE", "ENHANCED_SECURE"}, false)), + Optional: true, + Description: "What kind of traffic you're migrating from.", + Type: schema.TypeString, + }, + "allow_https_upgrade": { + Optional: true, + Description: "Allows temporary upgrade of HTTP traffic to HTTPS.", + Type: schema.TypeBool, + }, + "allow_https_downgrade": { + Optional: true, + Description: "Allow temporary downgrade of HTTPS traffic to HTTP. This removes various `Origin`, `Referer`, `Cookie`, `Cookie2`, `sec-*` and `proxy-*` headers from the request to origin.", + Type: schema.TypeBool, + }, + "migration_start_time": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+$"), + Optional: true, + Description: "Specifies when to start migrating the cache.", + Type: schema.TypeString, + }, + "migration_duration": { + ValidateDiagFunc: validateRegexOrVariable("^[1-9]$|^[1-2]\\d$|^30$"), + Optional: true, + Description: "Specifies the number of days to migrate the cache.", + Type: schema.TypeInt, + }, + "cache_sharing_start_time": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+$"), + Optional: true, + Description: "Specifies when to start cache sharing.", + Type: schema.TypeString, + }, + "cache_sharing_duration": { + ValidateDiagFunc: validateRegexOrVariable("^[1-9]$|^[1-2]\\d$|^30$"), + Optional: true, + Description: "Specifies the number cache sharing days.", + Type: schema.TypeInt, + }, + "is_certificate_sni_only": { + Optional: true, + Description: "Sets whether your new certificate is SNI-only.", + Type: schema.TypeBool, + }, + "is_tiered_distribution_used": { + Optional: true, + Description: "Allows you to align traffic to various `tieredDistribution` areas.", + Type: schema.TypeBool, + }, + "td_location": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"GLOBAL", "APAC", "EUROPE", "US_EAST", "US_CENTRAL", "US_WEST", "AUSTRALIA", "GLOBAL_LEGACY"}, false)), + Optional: true, + Description: "Specifies the `tieredDistribution` location.", + Type: schema.TypeString, + }, + }, + }, + }, + "standard_tls_migration_override": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior is deprecated, but you should not disable or remove it if present. This behavior is for internal usage only. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "info": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + "strict_header_parsing": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior specifies how the edge servers should handle requests containing improperly formatted or invalid headers that don’t comply with `RFC 9110`. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "valid_mode": { + Optional: true, + Description: "Rejects requests made with non-RFC-compliant headers that contain invalid characters in the header name or value or which contain invalidly-folded header lines. When disabled, the edge servers allow such requests, passing the invalid headers to the origin server unchanged.", + Type: schema.TypeBool, + }, + "strict_mode": { + Optional: true, + Description: "Rejects requests made with non-RFC-compliant, improperly formatted headers, where the header line starts with a colon, misses a colon or doesn’t end with CR LF. When disabled, the edge servers allow such requests, but correct the violation by removing or rewriting the header line before passing the headers to the origin server.", + Type: schema.TypeBool, + }, + }, + }, + }, + "sub_customer": { + Optional: true, + Type: schema.TypeList, + Description: "When positioned in a property's top-level default rule, enables various `Cloud Embed` features that allow you to leverage Akamai's CDN architecture for your own subcustomers. This behavior's options allow you to use Cloud Embed to configure your subcustomers' content. Once enabled, you can use the `Akamai Cloud Embed API` (ACE) to assign subcustomers to this base configuration, and to customize policies for them. See also the `dynamicWebContent` behavior to configure subcustomers' dynamic web content. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Allows Cloud Embed to dynamically modify your subcustomers' content.", + Type: schema.TypeBool, + }, + "origin": { + Optional: true, + Description: "Allows you to assign origin hostnames for customers.", + Type: schema.TypeBool, + }, + "partner_domain_suffix": { + Optional: true, + Description: "This specifies the appropriate domain suffix, which you should typically match with your property hostname. It identifies the domain as trustworthy on the Akamai network, despite being defined within Cloud Embed, outside of your base property configuration. Include this domain suffix if you want to purge subcustomer URLs. For example, if you provide a value of `suffix.example.com`, then to purge `subcustomer.com/some/path`, specify `subcustomer.com.suffix.example.com/some/path` as the purge request's URL.", + Type: schema.TypeString, + }, + "caching": { + Optional: true, + Description: "Modifies content caching rules.", + Type: schema.TypeBool, + }, + "referrer": { + Optional: true, + Description: "Sets subcustomers' referrer whitelists or blacklist.", + Type: schema.TypeBool, + }, + "ip": { + Optional: true, + Description: "Sets subcustomers' IP whitelists or blacklists.", + Type: schema.TypeBool, + }, + "geo_location": { + Optional: true, + Description: "Sets subcustomers' location-based whitelists or blacklists.", + Type: schema.TypeBool, + }, + "refresh_content": { + Optional: true, + Description: "Allows you to reschedule when content validates for subcustomers.", + Type: schema.TypeBool, + }, + "modify_path": { + Optional: true, + Description: "Modifies a subcustomer's request path.", + Type: schema.TypeBool, + }, + "cache_key": { + Optional: true, + Description: "Allows you to set which query parameters are included in the cache key.", + Type: schema.TypeBool, + }, + "token_authorization": { + Optional: true, + Description: "When enabled, this allows you to configure edge servers to use tokens to control access to subcustomer content. Use Cloud Embed to configure the token to appear in a cookie, header, or query parameter.", + Type: schema.TypeBool, + }, + "site_failover": { + Optional: true, + Description: "Allows you to configure unique failover sites for each subcustomer's policy.", + Type: schema.TypeBool, + }, + "content_compressor": { + Optional: true, + Description: "Allows compression of subcustomer content.", + Type: schema.TypeBool, + }, + "access_control": { + Optional: true, + Description: "When enabled, this allows you to deny requests to a subcustomer's content based on specific match conditions, which you use Cloud Embed to configure in each subcustomer's policy.", + Type: schema.TypeBool, + }, + "dynamic_web_content": { + Optional: true, + Description: "Allows you to apply the `dynamicWebContent` behavior to further modify how dynamic content behaves for subcustomers.", + Type: schema.TypeBool, + }, + "on_demand_video_delivery": { + Optional: true, + Description: "Enables delivery of media assets to subcustomers.", + Type: schema.TypeBool, + }, + "large_file_delivery": { + Optional: true, + Description: "Enables large file delivery for subcustomers.", + Type: schema.TypeBool, + }, + "live_video_delivery": { + Optional: true, + Description: "", + Type: schema.TypeBool, + }, + "web_application_firewall": { + Optional: true, + Description: "Web application firewall (WAF) filters, monitors, and blocks certain HTTP traffic. Use `Akamai Cloud Embed` to add a specific behavior to a subcustomer policy and configure how WAF protection is applied.", + Type: schema.TypeBool, + }, + }, + }, + }, + "sure_route": { + Optional: true, + Type: schema.TypeList, + Description: "The `SureRoute` feature continually tests different routes between origin and edge servers to identify the optimal path. By default, it conducts `races` to identify alternative paths to use in case of a transmission failure. These races increase origin traffic slightly. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the SureRoute behavior, to optimize delivery of non-cached content.", + Type: schema.TypeBool, + }, + "type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"PERFORMANCE", "CUSTOM_MAP"}, false)), + Optional: true, + Description: "Specifies the set of edge servers used to test routes.", + Type: schema.TypeString, + }, + "custom_map": { + Optional: true, + Description: "If `type` is `CUSTOM_MAP`, this specifies the map string provided to you by Akamai Professional Services, or included as part of the `Site Shield` product.", + Type: schema.TypeString, + }, + "test_object_url": { + ValidateDiagFunc: validateRegexOrVariable("^[^#\\[\\]@]+$"), + Optional: true, + Description: "Specifies the path and filename for your origin's test object to use in races to test routes.", + Type: schema.TypeString, + }, + "sr_download_link_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "to_host_status": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"INCOMING_HH", "OTHER"}, false)), + Optional: true, + Description: "Specifies which hostname to use.", + Type: schema.TypeString, + }, + "to_host": { + Optional: true, + Description: "If `toHostStatus` is `OTHER`, this specifies the custom `Host` header to use when requesting the SureRoute test object.", + Type: schema.TypeString, + }, + "race_stat_ttl": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+[DdHhMmSs]$"), + Optional: true, + Description: "Specifies the time-to-live to preserve SureRoute race results, typically `30m`. If traffic exceeds a certain threshold after TTL expires, the overflow is routed directly to the origin, not necessarily optimally. If traffic remains under the threshold, the route is determined by the winner of the most recent race.", + Type: schema.TypeString, + }, + "force_ssl_forward": { + Optional: true, + Description: "Forces SureRoute to use SSL when requesting the origin's test object, appropriate if your origin does not respond to HTTP requests, or responds with a redirect to HTTPS.", + Type: schema.TypeBool, + }, + "allow_fcm_parent_override": { + Optional: true, + Description: "", + Type: schema.TypeBool, + }, + "enable_custom_key": { + Optional: true, + Description: "When disabled, caches race results under the race destination's hostname. If enabled, use `customStatKey` to specify a custom hostname.", + Type: schema.TypeBool, + }, + "custom_stat_key": { + ValidateDiagFunc: validateRegexOrVariable("^([a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})(\\.[a-zA-Z0-9][a-zA-Z0-9\\-]{0,62})+$"), + Optional: true, + Description: "This specifies a hostname under which to cache race results. This may be useful when a property corresponds to many origin hostnames. By default, SureRoute would launch races for each origin, but consolidating under a single hostname runs only one race.", + Type: schema.TypeString, + }, + }, + }, + }, + "tcp_optimization": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior is deprecated, but you should not disable or remove it if present. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "display": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + "tea_leaf": { + Optional: true, + Type: schema.TypeList, + Description: "Allows IBM Tealeaf Customer Experience on Cloud to record HTTPS requests and responses for Akamai-enabled properties. Recorded data becomes available in your IBM Tealeaf account. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "When enabled, capture HTTPS requests and responses, and send the data to your IBM Tealeaf account.", + Type: schema.TypeBool, + }, + "limit_to_dynamic": { + Optional: true, + Description: "Limit traffic to dynamic, uncached (`No-Store`) content.", + Type: schema.TypeBool, + }, + "ibm_customer_id": { + Optional: true, + Description: "The integer identifier for the IBM Tealeaf Connector account.", + Type: schema.TypeInt, + }, + }, + }, + }, + "tiered_distribution": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior allows Akamai edge servers to retrieve cached content from other Akamai servers, rather than directly from the origin. These interim `parent` servers in the `cache hierarchy` (`CH`) are positioned close to the origin, and fall along the path from the origin to the edge server. Tiered Distribution typically reduces the origin server's load, and reduces the time it takes for edge servers to refresh content. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "When enabled, activates tiered distribution.", + Type: schema.TypeBool, + }, + "tiered_distribution_map": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"CH2", "CHAPAC", "CHEU2", "CHEUS2", "CHCUS2", "CHWUS2", "CHAUS", "CH"}, false)), + Optional: true, + Description: "Optionally map the tiered parent server's location close to your origin. A narrower local map minimizes the origin server's load, and increases the likelihood the requested object is cached. A wider global map reduces end-user latency, but decreases the likelihood the requested object is in any given parent server's cache. This option cannot apply if the property is marked as secure. See `Secure property requirements` for guidance.", + Type: schema.TypeString, + }, + }, + }, + }, + "tiered_distribution_advanced": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior allows Akamai edge servers to retrieve cached content from other Akamai servers, rather than directly from the origin. These interim `parent` servers in the `cache hierarchy` (`CH`) are positioned close to the origin, and fall along the path from the origin to the edge server. Tiered Distribution typically reduces the origin server's load, and reduces the time it takes for edge servers to refresh content. This advanced behavior provides a wider set of options than `tieredDistribution`. This behavior is for internal usage only. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "When enabled, activates tiered distribution.", + Type: schema.TypeBool, + }, + "method": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SERIAL_PREPEND", "DOMAIN_LOOKUP"}, false)), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "policy": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"PERFORMANCE", "TIERED_DISTRIBUTION", "FAIL_OVER", "SITE_SHIELD", "SITE_SHIELD_PERFORMANCE"}, false)), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "tiered_distribution_map": { + Optional: true, + Description: "Optionally map the tiered parent server's location close to your origin: `CHEU2` for Europe; `CHAUS` for Australia; `CHAPAC` for China and the Asian Pacific area; `CHWUS2`, `CHCUS2`, and `CHEUS2` for different parts of the United States. Choose `CH` or `CH2` for a more global map. A narrower local map minimizes the origin server's load, and increases the likelihood the requested object is cached. A wider global map reduces end-user latency, but decreases the likelihood the requested object is in any given parent server's cache. This option cannot apply if the property is marked as secure. See `Secure property requirements` for guidance.", + Type: schema.TypeString, + }, + "allowall": { + Optional: true, + Description: "", + Type: schema.TypeBool, + }, + }, + }, + }, + "tiered_distribution_customization": { + Optional: true, + Type: schema.TypeList, + Description: "With Tiered Distribution, Akamai edge servers retrieve cached content from other Akamai servers, rather than directly from the origin. This behavior sets custom Tiered Distribution maps (TD0) and migrates TD1 maps configured with `advanced features` to Cloud Wrapper. You need to enable `cloudWrapper` within the same rule. This behavior is for internal usage only. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "tier1_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "custom_map_enabled": { + Optional: true, + Description: "Enables custom maps.", + Type: schema.TypeBool, + }, + "custom_map_name": { + ValidateDiagFunc: validateRegexOrVariable("^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)+(akamai|akamaiedge)\\.net$"), + Optional: true, + Description: "Specifies the custom map name.", + Type: schema.TypeString, + }, + "serial_start": { + Optional: true, + Description: "Specifies a numeric serial start value.", + Type: schema.TypeString, + }, + "serial_end": { + Optional: true, + Description: "Specifies a numeric serial end value. Akamai uses serial numbers to group machines and share objects in their cache with other machines in the same region.", + Type: schema.TypeString, + }, + "hash_algorithm": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"GCC", "JENKINS"}, false)), + Optional: true, + Description: "Specifies the hash algorithm.", + Type: schema.TypeString, + }, + "cloudwrapper_map_migration_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "map_migration_enabled": { + Optional: true, + Description: "Enables migration of the custom map to Cloud Wrapper.", + Type: schema.TypeBool, + }, + "migration_within_cw_maps_enabled": { + Optional: true, + Description: "Enables migration within Cloud Wrapper maps.", + Type: schema.TypeBool, + }, + "location": { + Optional: true, + Description: "Location from which Cloud Wrapper migration is performed. User should choose the existing Cloud Wrapper location. The new Cloud Wrapper location (to which migration has to happen) is expected to be updated as part of the main \"Cloud Wrapper\" behavior.", + Type: schema.TypeString, + }, + "migration_start_date": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+$"), + Optional: true, + Description: "Specifies when to start migrating the map.", + Type: schema.TypeString, + }, + "migration_end_date": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+$"), + Optional: true, + Description: "Specifies when the map migration should end.", + Type: schema.TypeString, + }, + }, + }, + }, + "timeout": { + Optional: true, + Type: schema.TypeList, + Description: "Sets the HTTP connect timeout. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "value": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+[DdHhMmSs]$"), + Optional: true, + Description: "Specifies the timeout, for example `10s`.", + Type: schema.TypeString, + }, + }, + }, + }, + "uid_configuration": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior allows you to extract unique identifier (UID) values from live traffic, for use in OTA applications. Note that you are responsible for maintaining the security of any data that may identify individual users. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "legal_text": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Allows you to extract UIDs from client requests.", + Type: schema.TypeBool, + }, + "extract_location": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"CLIENT_REQUEST_HEADER", "QUERY_STRING", "VARIABLE"}, false)), + Optional: true, + Description: "Where to extract the UID value from.", + Type: schema.TypeString, + }, + "header_name": { + Optional: true, + Description: "This specifies the name of the HTTP header from which to extract the UID value.", + Type: schema.TypeString, + }, + "query_parameter_name": { + Optional: true, + Description: "This specifies the name of the query parameter from which to extract the UID value.", + Type: schema.TypeString, + }, + "variable_name": { + Optional: true, + Description: "This specifies the name of the rule tree variable from which to extract the UID value.", + Type: schema.TypeString, + }, + }, + }, + }, + "validate_entity_tag": { + Optional: true, + Type: schema.TypeList, + Description: "Instructs edge servers to compare the request's `ETag` header with that of the cached object. If they differ, the edge server sends a new copy of the object. This validation occurs in addition to the default validation of `Last-Modified` and `If-Modified-Since` headers. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the ETag validation behavior.", + Type: schema.TypeBool, + }, + }, + }, + }, + "verify_json_web_token": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior allows you to use JSON Web Tokens (JWT) to verify requests. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "extract_location": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"CLIENT_REQUEST_HEADER", "QUERY_STRING"}, false)), + Optional: true, + Description: "Specify from where to extract the JWT value.", + Type: schema.TypeString, + }, + "header_name": { + Optional: true, + Description: "This specifies the name of the header from which to extract the JWT value.", + Type: schema.TypeString, + }, + "query_parameter_name": { + Optional: true, + Description: "This specifies the name of the query parameter from which to extract the JWT value.", + Type: schema.TypeString, + }, + "jwt": { + Optional: true, + Description: "An identifier for the JWT keys collection.", + Type: schema.TypeString, + }, + "enable_rs256": { + Optional: true, + Description: "Verifies JWTs signed with the RS256 algorithm. This signature helps ensure that the token hasn't been tampered with.", + Type: schema.TypeBool, + }, + "enable_es256": { + Optional: true, + Description: "Verifies JWTs signed with the ES256 algorithm. This signature helps ensure that the token hasn't been tampered with.", + Type: schema.TypeBool, + }, + }, + }, + }, + "verify_json_web_token_for_dcp": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior allows you to use JSON web tokens (JWT) to verify requests for use in implementing `IoT Edge Connect`, which you use the `dcp` behavior to configure. You can specify the location in a request to pass a JSON web token (JWT), collections of public keys to verify the integrity of this token, and specific claims to extract from it. Use the `verifyJsonWebToken` behavior for other JWT validation. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "extract_location": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"CLIENT_REQUEST_HEADER", "QUERY_STRING", "CLIENT_REQUEST_HEADER_AND_QUERY_STRING"}, false)), + Optional: true, + Description: "Specifies where to get the JWT value from.", + Type: schema.TypeString, + }, + "primary_location": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"CLIENT_REQUEST_HEADER", "QUERY_STRING"}, false)), + Optional: true, + Description: "Specifies the primary location to extract the JWT value from. If the specified option doesn't include the JWTs, the system checks the secondary one.", + Type: schema.TypeString, + }, + "custom_header": { + Optional: true, + Description: "The JWT value comes from the `X-Akamai-DCP-Token` header by default. Enabling this option allows you to extract it from another header name that you specify.", + Type: schema.TypeBool, + }, + "header_name": { + Optional: true, + Description: "This specifies the name of the header to extract the JWT value from.", + Type: schema.TypeString, + }, + "query_parameter_name": { + Optional: true, + Description: "Specifies the name of the query parameter from which to extract the JWT value.", + Type: schema.TypeString, + }, + "jwt": { + Optional: true, + Description: "An identifier for the JWT keys collection.", + Type: schema.TypeString, + }, + "extract_client_id": { + Optional: true, + Description: "Allows you to extract the client ID claim name stored in JWT.", + Type: schema.TypeBool, + }, + "client_id": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_-]{1,20}$"), + Optional: true, + Description: "This specifies the claim name.", + Type: schema.TypeString, + }, + "extract_authorizations": { + Optional: true, + Description: "Allows you to extract the authorization groups stored in the JWT.", + Type: schema.TypeBool, + }, + "authorizations": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_-]{1,20}$"), + Optional: true, + Description: "This specifies the authorization group name.", + Type: schema.TypeString, + }, + "extract_user_name": { + Optional: true, + Description: "Allows you to extract the user name stored in the JWT.", + Type: schema.TypeBool, + }, + "user_name": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_-]{1,20}$"), + Optional: true, + Description: "This specifies the user name.", + Type: schema.TypeString, + }, + "enable_rs256": { + Optional: true, + Description: "Verifies JWTs signed with the RS256 algorithm. This signature helps to ensure that the token hasn't been tampered with.", + Type: schema.TypeBool, + }, + "enable_es256": { + Optional: true, + Description: "Verifies JWTs signed with the ES256 algorithm. This signature helps to ensure that the token hasn't been tampered with.", + Type: schema.TypeBool, + }, + }, + }, + }, + "verify_token_authorization": { + Optional: true, + Type: schema.TypeList, + Description: "Verifies Auth 2.0 tokens. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "use_advanced": { + Optional: true, + Description: "If enabled, allows you to specify advanced options such as `algorithm`, `escapeHmacInputs`, `ignoreQueryString`, `transitionKey`, and `salt`.", + Type: schema.TypeBool, + }, + "location": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"COOKIE", "QUERY_STRING", "CLIENT_REQUEST_HEADER"}, false)), + Optional: true, + Description: "Specifies where to find the token in the incoming request.", + Type: schema.TypeString, + }, + "location_id": { + Optional: true, + Description: "When `location` is `CLIENT_REQUEST_HEADER`, specifies the name of the incoming request's header where to find the token.", + Type: schema.TypeString, + }, + "algorithm": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"SHA256", "SHA1", "MD5"}, false)), + Optional: true, + Description: "Specifies the algorithm that generates the token. It needs to match the method chosen in the token generation code.", + Type: schema.TypeString, + }, + "escape_hmac_inputs": { + Optional: true, + Description: "URL-escapes HMAC inputs passed in as query parameters.", + Type: schema.TypeBool, + }, + "ignore_query_string": { + Optional: true, + Description: "Enabling this removes the query string from the URL used to form an encryption key.", + Type: schema.TypeBool, + }, + "key": { + ValidateDiagFunc: validateRegexOrVariable("^(0x)?[0-9a-fA-F]{64}$"), + Optional: true, + Description: "The shared secret used to validate tokens, which needs to match the key used in the token generation code.", + Type: schema.TypeString, + }, + "transition_key": { + ValidateDiagFunc: validateAny(validation.ToDiagFunc(validation.StringIsEmpty), validateRegexOrVariable("^(0x)?[0-9a-fA-F]{64}$")), + Optional: true, + Description: "Specifies a transition key as a hex value.", + Type: schema.TypeString, + }, + "salt": { + ValidateDiagFunc: validateAny(validation.ToDiagFunc(validation.StringIsEmpty), validation.ToDiagFunc(validation.StringLenBetween(16, 16))), + Optional: true, + Description: "Specifies a salt string for input when generating the token, which needs to match the salt value used in the token generation code.", + Type: schema.TypeString, + }, + "failure_response": { + Optional: true, + Description: "When enabled, sends an HTTP error when an authentication test fails.", + Type: schema.TypeBool, + }, + }, + }, + }, + "virtual_waiting_room": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior helps you maintain business continuity for dynamic applications in high-demand situations such as flash sales. It decreases abandonment by providing a user-friendly waiting room experience. FIFO (First-in First-out) is a request processing mechanism that prioritizes the first requests that enter the waiting room to send them first to the origin. Users can see both their estimated arrival time and position in the line. With Cloudlets available on your contract, choose `Your services` > `Edge logic Cloudlets` to control Virtual Waitig Room within `Control Center`. Otherwise use the `Cloudlets API` to configure it programmatically. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "cloudlet_shared_policy": { + Optional: true, + Description: "This identifies the Visitor Waiting Room Cloudlet shared policy to use with this behavior. You can list available shared policies with the `Cloudlets API`.", + Type: schema.TypeInt, + }, + "domain_config": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"HOST_HEADER", "CUSTOM"}, false)), + Optional: true, + Description: "This specifies the domain used to establish a session with the visitor.", + Type: schema.TypeString, + }, + "custom_cookie_domain": { + ValidateDiagFunc: validateRegexOrVariable("^(\\.)?(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)+([A-Za-z]|[A-Za-z][A-Za-z0-9\\-]*[A-Za-z0-9])$"), + Optional: true, + Description: "This specifies a domain for all session cookies. In case you configure many property hostnames, this may be their common domain. Make sure the user agent accepts the custom domain for any request matching the `virtualWaitingRoom` behavior. Don't use top level domains (TLDs).", + Type: schema.TypeString, + }, + "waiting_room_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "waiting_room_path": { + Optional: true, + Description: "This specifies the path to the waiting room main page on the origin server, for example `/vp/waiting-room.html`. When the request is marked as Waiting Room Main Page and blocked, the visitor enters the waiting room. The behavior sets the outgoing request path to the `waitingRoomPath` and modifies the cache key accordingly. See the `virtualWaitingRoomRequest` match criteria to further customize these requests.", + Type: schema.TypeString, + }, + "waiting_room_assets_paths": { + Optional: true, + Description: "This specifies the base paths to static resources such as JavaScript, CSS, or image files for the Waiting Room Main Page requests. The option supports the `*` wildcard that matches zero or more characters. Requests matching any of these paths aren't blocked, but marked as Waiting Room Assets and passed through to the origin. See the `virtualWaitingRoomRequest` match criteria to further customize these requests.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "access_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "session_duration": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(0, 86400)), + Optional: true, + Description: "Specifies the number of seconds users remain in the waiting room queue.", + Type: schema.TypeInt, + }, + "session_auto_prolong": { + Optional: true, + Description: "Whether the queue session should prolong automatically when the `sessionDuration` expires and the visitor remains active.", + Type: schema.TypeBool, + }, + }, + }, + }, + "virtual_waiting_room_with_edge_workers": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior allows you to configure the `virtualWaitingRoom` behavior with EdgeWorkers for extended scalability and customization. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + }, + }, + }, + "visitor_prioritization": { + Optional: true, + Type: schema.TypeList, + Description: "The `Visitor Prioritization Cloudlet` decreases abandonment by providing a user-friendly waiting room experience. With Cloudlets available on your contract, choose `Your services` > `Edge logic Cloudlets` to control Visitor Prioritization within `Control Center`. Otherwise use the `Cloudlets API` to configure it programmatically. To serve non-HTML API content such as JSON blocks, see the `apiPrioritization` behavior. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the Visitor Prioritization behavior.", + Type: schema.TypeBool, + }, + "cloudlet_policy": { + Optional: true, + Description: "Identifies the Cloudlet policy.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "name": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "user_identification_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "user_identification_by_cookie": { + Optional: true, + Description: "When enabled, identifies users by the value of a cookie.", + Type: schema.TypeBool, + }, + "user_identification_key_cookie": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-*\\.]+$"), + Optional: true, + Description: "Specifies the name of the cookie whose value identifies users. To match a user, the value of the cookie needs to remain constant across all requests.", + Type: schema.TypeString, + }, + "user_identification_by_headers": { + Optional: true, + Description: "When enabled, identifies users by the values of GET or POST request headers.", + Type: schema.TypeBool, + }, + "user_identification_key_headers": { + Optional: true, + Description: "Specifies names of request headers whose values identify users. To match a user, values for all the specified headers need to remain constant across all requests.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "user_identification_by_ip": { + Optional: true, + Description: "Allows IP addresses to identify users.", + Type: schema.TypeBool, + }, + "user_identification_by_params": { + Optional: true, + Description: "When enabled, identifies users by the values of GET or POST request parameters.", + Type: schema.TypeBool, + }, + "user_identification_key_params": { + Optional: true, + Description: "Specifies names of request parameters whose values identify users. To match a user, values for all the specified parameters need to remain constant across all requests. Parameters that are absent or blank may also identify users.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "allowed_user_cookie_management_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "allowed_user_cookie_enabled": { + Optional: true, + Description: "Sets a cookie for users who have been allowed through to the site.", + Type: schema.TypeBool, + }, + "allowed_user_cookie_label": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-*\\.]+$"), + Optional: true, + Description: "Specifies a label to distinguish this cookie for an allowed user from others. The value appends to the cookie's name, and helps you to maintain the same user assignment across behaviors within a property, and across properties.", + Type: schema.TypeString, + }, + "allowed_user_cookie_duration": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(0, 600)), + Optional: true, + Description: "Sets the number of seconds for the allowed user's session once allowed through to the site.", + Type: schema.TypeInt, + }, + "allowed_user_cookie_refresh": { + Optional: true, + Description: "Resets the duration of an allowed cookie with each request, so that it only expires if the user doesn't make any requests for the specified duration. Do not enable this option if you want to set a fixed time for all users.", + Type: schema.TypeBool, + }, + "allowed_user_cookie_advanced": { + Optional: true, + Description: "Sets advanced configuration options for the allowed user's cookie.", + Type: schema.TypeBool, + }, + "allowed_user_cookie_automatic_salt": { + Optional: true, + Description: "Sets an automatic `salt` value to verify the integrity of the cookie for an allowed user. Disable this if you want to share the cookie across properties.", + Type: schema.TypeBool, + }, + "allowed_user_cookie_salt": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-*\\.]+$"), + Optional: true, + Description: "Specifies a fixed `salt` value, which is incorporated into the cookie's value to prevent users from manipulating it. You can use the same salt string across different behaviors or properties to apply a single cookie to all allowed users.", + Type: schema.TypeString, + }, + "allowed_user_cookie_domain_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"DYNAMIC", "CUSTOMER"}, false)), + Optional: true, + Description: "Specify with `allowedUserCookieAdvanced` enabled.", + Type: schema.TypeString, + }, + "allowed_user_cookie_domain": { + ValidateDiagFunc: validateRegexOrVariable("^(\\.)?(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)+([A-Za-z]|[A-Za-z][A-Za-z0-9\\-]*[A-Za-z0-9])$"), + Optional: true, + Description: "Specifies a domain for an allowed user cookie.", + Type: schema.TypeString, + }, + "allowed_user_cookie_http_only": { + Optional: true, + Description: "Applies the `HttpOnly` flag to the allowed user's cookie to ensure it's accessed over HTTP and not manipulated by the client.", + Type: schema.TypeBool, + }, + "waiting_room_cookie_management_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "waiting_room_cookie_enabled": { + Optional: true, + Description: "Enables a cookie to track a waiting room assignment.", + Type: schema.TypeBool, + }, + "waiting_room_cookie_share_label": { + Optional: true, + Description: "Enabling this option shares the same `allowedUserCookieLabel` string. If disabled, specify a different `waitingRoomCookieLabel`.", + Type: schema.TypeBool, + }, + "waiting_room_cookie_label": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-*\\.]+$"), + Optional: true, + Description: "Specifies a label to distinguish this waiting room cookie from others. The value appends to the cookie's name, and helps you to maintain the same waiting room assignment across behaviors within a property, and across properties.", + Type: schema.TypeString, + }, + "waiting_room_cookie_duration": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(0, 120)), + Optional: true, + Description: "Sets the number of seconds for which users remain in the waiting room. During this time, users who refresh the waiting room page remain there.", + Type: schema.TypeInt, + }, + "waiting_room_cookie_advanced": { + Optional: true, + Description: "When enabled along with `waitingRoomCookieEnabled`, sets advanced configuration options for the waiting room cookie.", + Type: schema.TypeBool, + }, + "waiting_room_cookie_automatic_salt": { + Optional: true, + Description: "Sets an automatic `salt` value to verify the integrity of the waiting room cookie. Disable this if you want to share the cookie across properties.", + Type: schema.TypeBool, + }, + "waiting_room_cookie_salt": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-*\\.]+$"), + Optional: true, + Description: "Specifies a fixed `salt` value, which is incorporated into the cookie's value to prevent users from manipulating it. You can use the same salt string across different behaviors or properties to apply a single cookie for the waiting room session.", + Type: schema.TypeString, + }, + "waiting_room_cookie_domain_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"DYNAMIC", "CUSTOMER"}, false)), + Optional: true, + Description: "Specify with `waitingRoomCookieAdvanced` enabled, selects whether to use the `DYNAMIC` incoming host header, or a `CUSTOMER`-defined cookie domain.", + Type: schema.TypeString, + }, + "waiting_room_cookie_domain": { + ValidateDiagFunc: validateRegexOrVariable("^(\\.)?(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)+([A-Za-z]|[A-Za-z][A-Za-z0-9\\-]*[A-Za-z0-9])$"), + Optional: true, + Description: "Specifies a domain for the waiting room cookie.", + Type: schema.TypeString, + }, + "waiting_room_cookie_http_only": { + Optional: true, + Description: "Applies the `HttpOnly` flag to the waiting room cookie to ensure it's accessed over HTTP and not manipulated by the client.", + Type: schema.TypeBool, + }, + "waiting_room_management_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "waiting_room_status_code": { + ValidateDiagFunc: validateRegexOrVariable("[2|4|5][0-9][0-9]"), + Optional: true, + Description: "Specifies the response code for requests sent to the waiting room.", + Type: schema.TypeInt, + }, + "waiting_room_use_cp_code": { + Optional: true, + Description: "Allows you to assign a different CP code that tracks any requests that are sent to the waiting room.", + Type: schema.TypeBool, + }, + "waiting_room_cp_code": { + Optional: true, + Description: "Specifies a CP code for requests sent to the waiting room. You only need to provide the initial `id`, stripping any `cpc_` prefix to pass the integer to the rule tree. Additional CP code details may reflect back in subsequent read-only data.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "name": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "created_date": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "description": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "products": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "cp_code_limits": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "current_capacity": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "limit": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "limit_type": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + }, + }, + }, + "waiting_room_net_storage": { + Optional: true, + Description: "Specifies the NetStorage domain for the waiting room page.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cp_code": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "download_domain_name": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "g2o_token": { + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "waiting_room_directory": { + ValidateDiagFunc: validateRegexOrVariable("^[^#\\[\\]@]+$"), + Optional: true, + Description: "Specifies the NetStorage directory that contains the static waiting room page, with no trailing slash character.", + Type: schema.TypeString, + }, + "waiting_room_cache_ttl": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(5, 30)), + Optional: true, + Description: "Specifies the waiting room page's time to live in the cache, `5` minutes by default.", + Type: schema.TypeInt, + }, + }, + }, + }, + "visitor_prioritization_fifo": { + Optional: true, + Type: schema.TypeList, + Description: "(**BETA**) The `Visitor Prioritization Cloudlet (FIFO)` decreases abandonment by providing a user-friendly waiting room experience. FIFO (First-in First-out) is a fair request processing mechanism, which prioritizes the first requests that enter the waiting room to send them first to the origin. Users can see both their estimated arrival time and position in the line. With Cloudlets available on your contract, choose `Your services` > `Edge logic Cloudlets` to control Visitor Prioritization (FIFO) within `Control Center`. Otherwise use the `Cloudlets API` to configure it programmatically. To serve non-HTML API content such as JSON blocks, see the `apiPrioritization` behavior. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "cloudlet_shared_policy": { + Optional: true, + Description: "This identifies the Visitor Prioritization FIFO shared policy to use with this behavior. You can list available shared policies with the `Cloudlets API`.", + Type: schema.TypeInt, + }, + "domain_config": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"HOST_HEADER", "CUSTOM"}, false)), + Optional: true, + Description: "This specifies how to set the domain used to establish a session with the visitor.", + Type: schema.TypeString, + }, + "custom_cookie_domain": { + ValidateDiagFunc: validateRegexOrVariable("^(\\.)?(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)+([A-Za-z]|[A-Za-z][A-Za-z0-9\\-]*[A-Za-z0-9])$"), + Optional: true, + Description: "This specifies a domain for all session cookies. In case you configure many property hostnames, this may be their common domain. Make sure the user agent accepts the custom domain for any request matching the `visitorPrioritizationFifo` behavior. Don't use top level domains (TLDs).", + Type: schema.TypeString, + }, + "waiting_room_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "waiting_room_path": { + Optional: true, + Description: "This specifies the path to the waiting room main page on the origin server, for example `/vp/waiting-room.html`. When the request is marked as `Waiting Room Main Page` and blocked, the visitor enters the waiting room. The behavior sets the outgoing request path to the `waitingRoomPath` and modifies the cache key accordingly. See the `visitorPrioritizationRequest` match criteria to further customize these requests.", + Type: schema.TypeString, + }, + "waiting_room_assets_paths": { + Optional: true, + Description: "This specifies the base paths to static resources such as `JavaScript`, `CSS`, or image files for the `Waiting Room Main Page` requests. The option supports the `*` wildcard wildcard that matches zero or more characters. Requests matching any of these paths aren't blocked, but marked as Waiting Room Assets and passed through to the origin. See the `visitorPrioritizationRequest` match criteria to further customize these requests.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "access_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "session_duration": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(0, 86400)), + Optional: true, + Description: "Specifies the number of seconds users remain in the waiting room queue.", + Type: schema.TypeInt, + }, + "session_auto_prolong": { + Optional: true, + Description: "Whether the queue session should prolong automatically when the `sessionDuration` expires and the visitor remains active.", + Type: schema.TypeBool, + }, + }, + }, + }, + "visitor_prioritization_fifo_standalone": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + }, + }, + }, + "watermarking": { + Optional: true, + Type: schema.TypeList, + Description: "Adds watermarking for each valid user's content. Content segments are delivered from different sources using a pattern unique to each user, based on a watermarking token included in each request. If your content is pirated or redistributed, you can forensically analyze the segments to extract the pattern, and identify the user who leaked the content. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enable": { + Optional: true, + Description: "Enables the watermarking behavior.", + Type: schema.TypeBool, + }, + "token_signing_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "signature_verification_enable": { + Optional: true, + Description: "When enabled, you can verify the signature in your watermarking token.", + Type: schema.TypeBool, + }, + "verification_key_id1": { + Optional: true, + Description: "Specifies a unique identifier for the first public key.", + Type: schema.TypeString, + }, + "verification_public_key1": { + Optional: true, + Description: "Specifies the first public key in its entirety.", + Type: schema.TypeString, + }, + "verification_key_id2": { + Optional: true, + Description: "Specifies a unique identifier for the optional second public key.", + Type: schema.TypeString, + }, + "verification_public_key2": { + Optional: true, + Description: "Specifies the optional second public key in its entirety. Specify a second key to enable rotation.", + Type: schema.TypeString, + }, + "pattern_encryption_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "pattern_decryption_enable": { + Optional: true, + Description: "If patterns in your watermarking tokens have been encrypted, enabling this allows you to provide values to decrypt them.", + Type: schema.TypeBool, + }, + "decryption_password_id1": { + Optional: true, + Description: "Specifies a label that corresponds to the primary password.", + Type: schema.TypeString, + }, + "decryption_password1": { + Optional: true, + Description: "Provides the primary password used to encrypt patterns in your watermarking tokens.", + Type: schema.TypeString, + }, + "decryption_password_id2": { + Optional: true, + Description: "Specifies a label for the secondary password, used in rotation scenarios to identify which password to use for decryption.", + Type: schema.TypeString, + }, + "decryption_password2": { + Optional: true, + Description: "Provides the secondary password you can use to rotate passwords.", + Type: schema.TypeString, + }, + "miscellaneous_settings_title": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "use_original_as_a": { + Optional: true, + Description: "When you work with your watermarking vendor, you can apply several preprocessing methods to your content. See the `AMD help` for more information. With the standard `filename-prefix AB naming` preprocessing method, the watermarking vendor creates two variants of the original segment content and labels them as an `A` and `B` segment in the filename. If you selected the `unlabeled A variant` preprocessing method, enabling this option tells your configuration to use the original filename segment content as your `A` variant.", + Type: schema.TypeBool, + }, + "ab_variant_location": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"FILENAME_PREFIX", "PARENT_DIRECTORY_PREFIX"}, false)), + Optional: true, + Description: "When you work with your watermarking vendor, you can apply several preprocessing methods to your content. See the `AMD help` for more information. Use this option to specify the location of the `A` and `B` variant segments.", + Type: schema.TypeString, + }, + }, + }, + }, + "web_application_firewall": { + Optional: true, + Type: schema.TypeList, + Description: "This behavior implements a suite of security features that blocks threatening HTTP and HTTPS requests. Use it as your primary firewall, or in addition to existing security measures. Only one referenced configuration is allowed per property, so this behavior typically belongs as part of its default rule. This behavior cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "firewall_configuration": { + Optional: true, + Description: "An object featuring details about your firewall configuration.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "config_id": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "production_status": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior", + Type: schema.TypeString, + }, + "staging_status": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior", + Type: schema.TypeString, + }, + "production_version": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior", + Type: schema.TypeInt, + }, + "staging_version": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior", + Type: schema.TypeInt, + }, + "file_name": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior", + Type: schema.TypeString, + }, + }, + }, + }, + }, + }, + }, + "web_sockets": { + Optional: true, + Type: schema.TypeList, + Description: "The WebSocket protocol allows web applications real-time bidirectional communication between clients and servers. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables WebSocket traffic.", + Type: schema.TypeBool, + }, + }, + }, + }, + "webdav": { + Optional: true, + Type: schema.TypeList, + Description: "Web-based Distributed Authoring and Versioning (WebDAV) is a set of extensions to the HTTP protocol that allows users to collaboratively edit and manage files on remote web servers. This behavior enables WebDAV, and provides support for the following additional request methods: PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, and UNLOCK. To apply this behavior, you need to match on a `requestMethod`. This behavior can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "enabled": { + Optional: true, + Description: "Enables the WebDAV behavior.", + Type: schema.TypeBool, + }, + }, + }, + }, + } +} + +func getCriteriaSchemaV20240212() map[string]*schema.Schema { + return map[string]*schema.Schema{ + "advanced_im_match": { + Optional: true, + Type: schema.TypeList, + Description: "Matches whether the `imageManager` behavior already applies to the current set of requests. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS", "IS_NOT"}, false)), + Optional: true, + Description: "Specifies the match's logic.", + Type: schema.TypeString, + }, + "match_on": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ANY_IM", "PRISTINE"}, false)), + Optional: true, + Description: "Specifies the match's scope.", + Type: schema.TypeString, + }, + }, + }, + }, + "bucket": { + Optional: true, + Type: schema.TypeList, + Description: "This matches a specified percentage of requests when used with the accompanying behavior. Contact Akamai Professional Services for help configuring it. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "percentage": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(0, 100)), + Optional: true, + Description: "Specifies the percentage of requests to match.", + Type: schema.TypeInt, + }, + }, + }, + }, + "cacheability": { + Optional: true, + Type: schema.TypeList, + Description: "Matches the current cache state. Note that any `NO_STORE` or `BYPASS_CACHE` HTTP headers set on the origin's content overrides properties' `caching` instructions, in which case this criteria does not apply. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS", "IS_NOT"}, false)), + Optional: true, + Description: "Specifies the match's logic.", + Type: schema.TypeString, + }, + "value": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"NO_STORE", "BYPASS_CACHE", "CACHEABLE"}, false)), + Optional: true, + Description: "Content's cache is enabled (`CACHEABLE`) or not (`NO_STORE`), or else is ignored (`BYPASS_CACHE`).", + Type: schema.TypeString, + }, + }, + }, + }, + "china_cdn_region": { + Optional: true, + Type: schema.TypeList, + Description: "Identifies traffic deployed over Akamai's regional ChinaCDN infrastructure. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS", "IS_NOT"}, false)), + Optional: true, + Description: "Specify whether the request `IS` or `IS_NOT` deployed over ChinaCDN.", + Type: schema.TypeString, + }, + }, + }, + }, + "client_certificate": { + Optional: true, + Type: schema.TypeList, + Description: "Matches whether you have configured a client certificate to authenticate requests to edge servers. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "is_certificate_present": { + Optional: true, + Description: "Executes rule behaviors only if a client certificate authenticates requests.", + Type: schema.TypeBool, + }, + "is_certificate_valid": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"VALID", "INVALID", "IGNORE"}, false)), + Optional: true, + Description: "Matches whether the certificate is `VALID` or `INVALID`. You can also `IGNORE` the certificate's validity.", + Type: schema.TypeString, + }, + "enforce_mtls": { + Optional: true, + Description: "Specifies custom handling of requests if any of the checks in the `enforceMtlsSettings` behavior fail. Enable this and use with behaviors such as `logCustom` so that they execute if the check fails. You need to add the `enforceMtlsSettings` behavior to a parent rule, with its own unique match condition and `enableDenyRequest` option disabled.", + Type: schema.TypeBool, + }, + }, + }, + }, + "client_ip": { + Optional: true, + Type: schema.TypeList, + Description: "Matches the IP number of the requesting client. To use this condition to match end-user IP addresses, apply it together with the `requestType` matching on the `CLIENT_REQ` value. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS_ONE_OF", "IS_NOT_ONE_OF"}, false)), + Optional: true, + Description: "Matches the contents of `values` if set to `IS_ONE_OF`, otherwise `IS_NOT_ONE_OF` reverses the match.", + Type: schema.TypeString, + }, + "values": { + Optional: true, + Description: "IP or CIDR block, for example: `71.92.0.0/14`.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "use_headers": { + Optional: true, + Description: "When connecting via a proxy server as determined by the `X-Forwarded-For` header, enabling this option matches the connecting client's IP address rather than the original end client specified in the header.", + Type: schema.TypeBool, + }, + }, + }, + }, + "client_ip_version": { + Optional: true, + Type: schema.TypeList, + Description: "Matches the version of the IP protocol used by the requesting client. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "value": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IPV4", "IPV6"}, false)), + Optional: true, + Description: "The IP version of the client request, either `IPV4` or `IPV6`.", + Type: schema.TypeString, + }, + "use_x_forwarded_for": { + Optional: true, + Description: "When connecting via a proxy server as determined by the `X-Forwarded-For` header, enabling this option matches the connecting client's IP address rather than the original end client specified in the header.", + Type: schema.TypeBool, + }, + }, + }, + }, + "cloudlets_origin": { + Optional: true, + Type: schema.TypeList, + Description: "Allows Cloudlets Origins, referenced by label, to define their own criteria to assign custom origin definitions. The criteria may match, for example, for a specified percentage of requests defined by the cloudlet to use an alternative version of a website. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "origin_id": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-\\.]+$"), + Optional: true, + Description: "The Cloudlets Origins identifier, limited to alphanumeric and underscore characters.", + Type: schema.TypeString, + }, + }, + }, + }, + "content_delivery_network": { + Optional: true, + Type: schema.TypeList, + Description: "Specifies the type of Akamai network handling the request. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS", "IS_NOT"}, false)), + Optional: true, + Description: "Matches the specified `network` if set to `IS`, otherwise `IS_NOT` reverses the match.", + Type: schema.TypeString, + }, + "network": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"STAGING", "PRODUCTION"}, false)), + Optional: true, + Description: "Match the network.", + Type: schema.TypeString, + }, + }, + }, + }, + "content_type": { + Optional: true, + Type: schema.TypeList, + Description: "Matches the HTTP response header's `Content-Type`. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS_ONE_OF", "IS_NOT_ONE_OF"}, false)), + Optional: true, + Description: "Matches any `Content-Type` among specified `values` when set to `IS_ONE_OF`, otherwise `IS_NOT_ONE_OF` reverses the match.", + Type: schema.TypeString, + }, + "values": { + Optional: true, + Description: "`Content-Type` response header value, for example `text/html`.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "match_wildcard": { + Optional: true, + Description: "Allows wildcards in the `value` field, where `?` matches a single character and `*` matches zero or more characters. Specifying `text/*` matches both `text/html` and `text/css`.", + Type: schema.TypeBool, + }, + "match_case_sensitive": { + Optional: true, + Description: "Sets a case-sensitive match for all `values`.", + Type: schema.TypeBool, + }, + }, + }, + }, + "device_characteristic": { + Optional: true, + Type: schema.TypeList, + Description: "Match various aspects of the device or browser making the request. Based on the value of the `characteristic` option, the expected value is either a boolean, a number, or a string, possibly representing a version number. Each type of value requires a different field. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "characteristic": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"BRAND_NAME", "MODEL_NAME", "MARKETING_NAME", "IS_WIRELESS_DEVICE", "IS_TABLET", "DEVICE_OS", "DEVICE_OS_VERSION", "MOBILE_BROWSER", "MOBILE_BROWSER_VERSION", "RESOLUTION_WIDTH", "RESOLUTION_HEIGHT", "PHYSICAL_SCREEN_HEIGHT", "PHYSICAL_SCREEN_WIDTH", "COOKIE_SUPPORT", "AJAX_SUPPORT_JAVASCRIPT", "FULL_FLASH_SUPPORT", "ACCEPT_THIRD_PARTY_COOKIE", "XHTML_SUPPORT_LEVEL", "IS_MOBILE"}, false)), + Optional: true, + Description: "Aspect of the device or browser to match.", + Type: schema.TypeString, + }, + "string_match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"MATCHES_ONE_OF", "DOES_NOT_MATCH_ONE_OF"}, false)), + Optional: true, + Description: "When the `characteristic` expects a string value, set this to `MATCHES_ONE_OF` to match against the `stringValue` set, otherwise set to `DOES_NOT_MATCH_ONE_OF` to exclude that set of values.", + Type: schema.TypeString, + }, + "numeric_match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS", "IS_NOT", "IS_LESS_THAN", "IS_LESS_THAN_OR_EQUAL", "IS_MORE_THAN", "IS_MORE_THAN_OR_EQUAL"}, false)), + Optional: true, + Description: "When the `characteristic` expects a numeric value, compares the specified `numericValue` against the matched client.", + Type: schema.TypeString, + }, + "version_match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS", "IS_NOT", "IS_LESS_THAN", "IS_LESS_THAN_OR_EQUAL", "IS_MORE_THAN", "IS_MORE_THAN_OR_EQUAL"}, false)), + Optional: true, + Description: "When the `characteristic` expects a version string value, compares the specified `versionValue` against the matched client, using the following operators: `IS`, `IS_MORE_THAN_OR_EQUAL`, `IS_MORE_THAN`, `IS_LESS_THAN_OR_EQUAL`, `IS_LESS_THAN`, `IS_NOT`.", + Type: schema.TypeString, + }, + "boolean_value": { + Optional: true, + Description: "When the `characteristic` expects a boolean value, this specifies the value.", + Type: schema.TypeBool, + }, + "string_value": { + Optional: true, + Description: "When the `characteristic` expects a string, this specifies the set of values.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "numeric_value": { + Optional: true, + Description: "When the `characteristic` expects a numeric value, this specifies the number.", + Type: schema.TypeInt, + }, + "version_value": { + Optional: true, + Description: "When the `characteristic` expects a version number, this specifies it as a string.", + Type: schema.TypeString, + }, + "match_case_sensitive": { + Optional: true, + Description: "Sets a case-sensitive match for the `stringValue` field.", + Type: schema.TypeBool, + }, + "match_wildcard": { + Optional: true, + Description: "Allows wildcards in the `stringValue` field, where `?` matches a single character and `*` matches zero or more characters.", + Type: schema.TypeBool, + }, + }, + }, + }, + "ecmd_auth_groups": { + Optional: true, + Type: schema.TypeList, + Description: "This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"CONTAINS", "DOES_NOT_CONTAIN"}, false)), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "value": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_-]{1,255}$"), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "ecmd_auth_scheme": { + Optional: true, + Type: schema.TypeList, + Description: "This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "auth_scheme": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ANONYMOUS", "JWT", "MUTUAL"}, false)), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "ecmd_is_authenticated": { + Optional: true, + Type: schema.TypeList, + Description: "This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS_AUTHENTICATED", "IS_NOT_AUTHENTICATED"}, false)), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "ecmd_username": { + Optional: true, + Type: schema.TypeList, + Description: "This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"CONTAINS", "DOES_NOT_CONTAIN", "STARTS_WITH", "DOES_NOT_START_WITH", "ENDS_WITH", "DOES_NOT_END_WITH", "LENGTH_EQUALS", "LENGTH_GREATER_THAN", "LENGTH_SMALLER_THAN"}, false)), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "value": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_-]{1,255}$"), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + "length": { + ValidateDiagFunc: validateRegexOrVariable("^[1-9]\\d*$"), + Optional: true, + Description: "", + Type: schema.TypeString, + }, + }, + }, + }, + "edge_workers_failure": { + Optional: true, + Type: schema.TypeList, + Description: "Checks the EdgeWorkers execution status and detects whether a customer's JavaScript failed on edge servers. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "exec_status": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"FAILURE", "SUCCESS"}, false)), + Optional: true, + Description: "Specify execution status.", + Type: schema.TypeString, + }, + }, + }, + }, + "file_extension": { + Optional: true, + Type: schema.TypeList, + Description: "Matches the requested filename's extension, if present. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS_ONE_OF", "IS_NOT_ONE_OF"}, false)), + Optional: true, + Description: "Matches the contents of `values` if set to `IS_ONE_OF`, otherwise `IS_NOT_ONE_OF` reverses the match.", + Type: schema.TypeString, + }, + "values": { + Optional: true, + Description: "An array of file extension strings, with no leading dot characters, for example `png`, `jpg`, `jpeg`, and `gif`.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "match_case_sensitive": { + Optional: true, + Description: "Sets a case-sensitive match.", + Type: schema.TypeBool, + }, + }, + }, + }, + "filename": { + Optional: true, + Type: schema.TypeList, + Description: "Matches the requested filename, or test whether it is present. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS_ONE_OF", "IS_NOT_ONE_OF", "IS_EMPTY", "IS_NOT_EMPTY"}, false)), + Optional: true, + Description: "If set to `IS_ONE_OF` or `IS_NOT_ONE_OF`, matches whether the filename matches one of the `values`. If set to `IS_EMPTY` or `IS_NOT_EMPTY`, matches whether the specified filename is part of the path.", + Type: schema.TypeString, + }, + "values": { + Optional: true, + Description: "Matches the filename component of the request URL. Allows wildcards, where `?` matches a single character and `*` matches zero or more characters. For example, specify `filename.*` to accept any extension.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "match_case_sensitive": { + Optional: true, + Description: "Sets a case-sensitive match for the `values` field.", + Type: schema.TypeBool, + }, + }, + }, + }, + "hostname": { + Optional: true, + Type: schema.TypeList, + Description: "Matches the requested hostname. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS_ONE_OF", "IS_NOT_ONE_OF"}, false)), + Optional: true, + Description: "Matches the contents of `values` when set to `IS_ONE_OF`, otherwise `IS_NOT_ONE_OF` reverses the match.", + Type: schema.TypeString, + }, + "values": { + Optional: true, + Description: "A list of hostnames. Allows wildcards, where `?` matches a single character and `*` matches zero or more characters. Specifying `*.example.com` matches both `m.example.com` and `www.example.com`.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }, + }, + }, + "match_advanced": { + Optional: true, + Type: schema.TypeList, + Description: "This specifies match criteria using Akamai XML metadata. It can only be configured on your behalf by Akamai Professional Services. This criterion is for internal usage only. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "description": { + Optional: true, + Description: "A human-readable description of what the XML block does.", + Type: schema.TypeString, + }, + "open_xml": { + Optional: true, + Description: "An XML string that opens the relevant block.", + Type: schema.TypeString, + }, + "close_xml": { + Optional: true, + Description: "An XML string that closes the relevant block.", + Type: schema.TypeString, + }, + }, + }, + }, + "match_cp_code": { + Optional: true, + Type: schema.TypeList, + Description: "Match the assigned content provider code. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "value": { + Optional: true, + Description: "Specifies the CP code as an object. You only need to provide the initial `id` to match the CP code, stripping any `cpc_` prefix to pass the integer to the rule tree. Additional CP code details may reflect back in subsequent read-only data.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Optional: true, + Description: "", + Type: schema.TypeInt, + }, + "name": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "created_date": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "description": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + "products": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "cp_code_limits": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeList, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "current_capacity": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "limit": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeInt, + }, + "limit_type": { + Optional: true, + Description: "This field is only intended for export compatibility purposes, and modifying it will not impact your use of the behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + "match_response_code": { + Optional: true, + Type: schema.TypeList, + Description: "Match a set or range of HTTP response codes. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS_ONE_OF", "IS_NOT_ONE_OF", "IS_BETWEEN", "IS_NOT_BETWEEN"}, false)), + Optional: true, + Description: "Matches numeric range or a specified set of `values`.", + Type: schema.TypeString, + }, + "values": { + Optional: true, + Description: "A set of response codes to match, for example `[\"404\",\"500\"]`.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "lower_bound": { + ValidateDiagFunc: validateRegexOrVariable("^\\d{3}$"), + Optional: true, + Description: "Specifies the start of a range of responses. For example, `400` to match anything from `400` to `500`.", + Type: schema.TypeInt, + }, + "upper_bound": { + ValidateDiagFunc: validateRegexOrVariable("^\\d{3}$"), + Optional: true, + Description: "Specifies the end of a range of responses. For example, `500` to match anything from `400` to `500`.", + Type: schema.TypeInt, + }, + }, + }, + }, + "match_variable": { + Optional: true, + Type: schema.TypeList, + Description: "Matches a built-in variable, or a custom variable pre-declared within the rule tree by the `setVariable` behavior. See `Support for variables` for more information on this feature. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "variable_name": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z_][a-zA-Z0-9_]{0,31}$"), + Optional: true, + Description: "The name of the variable to match.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS", "IS_NOT", "IS_ONE_OF", "IS_NOT_ONE_OF", "IS_EMPTY", "IS_NOT_EMPTY", "IS_BETWEEN", "IS_NOT_BETWEEN", "IS_GREATER_THAN", "IS_GREATER_THAN_OR_EQUAL_TO", "IS_LESS_THAN", "IS_LESS_THAN_OR_EQUAL_TO"}, false)), + Optional: true, + Description: "The type of match, based on which you use different options to specify the match criteria.", + Type: schema.TypeString, + }, + "variable_values": { + Optional: true, + Description: "Specifies an array of matching strings.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "variable_expression": { + Optional: true, + Description: "Specifies a single matching string.", + Type: schema.TypeString, + }, + "lower_bound": { + ValidateDiagFunc: validateRegexOrVariable("^[1-9]\\d*$"), + Optional: true, + Description: "Specifies the range's numeric minimum value.", + Type: schema.TypeString, + }, + "upper_bound": { + ValidateDiagFunc: validateRegexOrVariable("^[1-9]\\d*$"), + Optional: true, + Description: "Specifies the range's numeric maximum value.", + Type: schema.TypeString, + }, + "match_wildcard": { + Optional: true, + Description: "When matching string expressions, enabling this allows wildcards, where `?` matches a single character and `*` matches zero or more characters.", + Type: schema.TypeBool, + }, + "match_case_sensitive": { + Optional: true, + Description: "When matching string expressions, enabling this performs a case-sensitive match.", + Type: schema.TypeBool, + }, + }, + }, + }, + "metadata_stage": { + Optional: true, + Type: schema.TypeList, + Description: "Matches how the current rule corresponds to low-level syntax elements in translated XML metadata, indicating progressive stages as each edge server handles the request and response. To use this match, you need to be thoroughly familiar with how Akamai edge servers process requests. Contact your Akamai Technical representative if you need help, and test thoroughly on staging before activating on production. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS", "IS_NOT"}, false)), + Optional: true, + Description: "Compares the current rule with the specified metadata stage.", + Type: schema.TypeString, + }, + "value": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"cache-hit", "client-done", "client-request", "client-request-body", "client-response", "content-policy", "forward-request", "forward-response", "forward-start", "ipa-response"}, false)), + Optional: true, + Description: "Specifies the metadata stage.", + Type: schema.TypeString, + }, + }, + }, + }, + "origin_timeout": { + Optional: true, + Type: schema.TypeList, + Description: "Matches when the origin responds with a timeout error. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ORIGIN_TIMED_OUT"}, false)), + Optional: true, + Description: "Specifies a single required `ORIGIN_TIMED_OUT` value.", + Type: schema.TypeString, + }, + }, + }, + }, + "path": { + Optional: true, + Type: schema.TypeList, + Description: "Matches the URL's non-hostname path component. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"MATCHES_ONE_OF", "DOES_NOT_MATCH_ONE_OF"}, false)), + Optional: true, + Description: "Matches the contents of the `values` array.", + Type: schema.TypeString, + }, + "values": { + Optional: true, + Description: "Matches the URL path, excluding leading hostname and trailing query parameters. The path is relative to the server root, for example `/blog`. This field allows wildcards, where `?` matches a single character and `*` matches zero or more characters. For example, `/blog/*/2014` matches paths with two fixed segments and other varying segments between them.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "match_case_sensitive": { + Optional: true, + Description: "Sets a case-sensitive match.", + Type: schema.TypeBool, + }, + "normalize": { + Optional: true, + Description: "Transforms URLs before comparing them with the provided value. URLs are decoded, and any directory syntax such as `../..` or `//` is stripped as a security measure. This protects URL paths from being accessed by unauthorized users.", + Type: schema.TypeBool, + }, + }, + }, + }, + "query_string_parameter": { + Optional: true, + Type: schema.TypeList, + Description: "Matches query string field names or values. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "parameter_name": { + ValidateDiagFunc: validateRegexOrVariable("^[^:/?#\\[\\]@&]+$"), + Optional: true, + Description: "The name of the query field, for example, `q` in `?q=string`.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS_ONE_OF", "IS_NOT_ONE_OF", "EXISTS", "DOES_NOT_EXIST", "IS_LESS_THAN", "IS_MORE_THAN", "IS_BETWEEN"}, false)), + Optional: true, + Description: "Narrows the match criteria.", + Type: schema.TypeString, + }, + "values": { + Optional: true, + Description: "The value of the query field, for example, `string` in `?q=string`.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "lower_bound": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+$"), + Optional: true, + Description: "Specifies the match's minimum value.", + Type: schema.TypeInt, + }, + "upper_bound": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+$"), + Optional: true, + Description: "When the `value` is numeric, this field specifies the match's maximum value.", + Type: schema.TypeInt, + }, + "match_wildcard_name": { + Optional: true, + Description: "Allows wildcards in the `parameterName` field, where `?` matches a single character and `*` matches zero or more characters.", + Type: schema.TypeBool, + }, + "match_case_sensitive_name": { + Optional: true, + Description: "Sets a case-sensitive match for the `parameterName` field.", + Type: schema.TypeBool, + }, + "match_wildcard_value": { + Optional: true, + Description: "Allows wildcards in the `value` field, where `?` matches a single character and `*` matches zero or more characters.", + Type: schema.TypeBool, + }, + "match_case_sensitive_value": { + Optional: true, + Description: "Sets a case-sensitive match for the `value` field.", + Type: schema.TypeBool, + }, + "escape_value": { + Optional: true, + Description: "Matches when the `value` is URL-escaped.", + Type: schema.TypeBool, + }, + }, + }, + }, + "random": { + Optional: true, + Type: schema.TypeList, + Description: "Matches a specified percentage of requests. Use this match to apply behaviors to a percentage of your incoming requests that differ from the remainder, useful for A/b testing, or to offload traffic onto different servers. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "bucket": { + ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(0, 100)), + Optional: true, + Description: "Specify a percentage of random requests to which to apply a behavior. Any remainders do not match.", + Type: schema.TypeInt, + }, + }, + }, + }, + "recovery_config": { + Optional: true, + Type: schema.TypeList, + Description: "Matches on specified origin recovery scenarios. The `originFailureRecoveryPolicy` behavior defines the scenarios that trigger the recovery or retry methods you set in the `originFailureRecoveryMethod` rule. If the origin fails, the system checks the name of the recovery method applied to your policy. It then either redirects the requesting client to a backup origin or returns predefined HTTP response codes. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "config_name": { + ValidateDiagFunc: validateRegexOrVariable("^[A-Z0-9-]+$"), + Optional: true, + Description: "A unique identifier used for origin failure recovery configurations. This is the recovery method configuration name you apply when setting origin failure recovery methods and scenarios in `originFailureRecoveryMethod` and `originFailureRecoveryPolicy` behaviors. The value can contain alphanumeric characters and dashes.", + Type: schema.TypeString, + }, + }, + }, + }, + "regular_expression": { + Optional: true, + Type: schema.TypeList, + Description: "Matches a regular expression against a string, especially to apply behaviors flexibly based on the contents of dynamic `variables`. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "match_string": { + Optional: true, + Description: "The string to match, typically the contents of a dynamic variable.", + Type: schema.TypeString, + }, + "regex": { + Optional: true, + Description: "The regular expression (PCRE) to match against the string.", + Type: schema.TypeString, + }, + "case_sensitive": { + Optional: true, + Description: "Sets a case-sensitive regular expression match.", + Type: schema.TypeBool, + }, + }, + }, + }, + "request_cookie": { + Optional: true, + Type: schema.TypeList, + Description: "Match the cookie name or value passed with the request. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "cookie_name": { + ValidateDiagFunc: validateRegexOrVariable("^[a-zA-Z0-9_\\-*\\.]+$"), + Optional: true, + Description: "The name of the cookie, for example, `visitor` in `visitor:anon`.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS", "IS_NOT", "EXISTS", "DOES_NOT_EXIST", "IS_BETWEEN"}, false)), + Optional: true, + Description: "Narrows the match criteria.", + Type: schema.TypeString, + }, + "value": { + ValidateDiagFunc: validateRegexOrVariable("^[^\\s;]+$"), + Optional: true, + Description: "The cookie's value, for example, `anon` in `visitor:anon`.", + Type: schema.TypeString, + }, + "lower_bound": { + ValidateDiagFunc: validateRegexOrVariable("^[1-9]\\d*$"), + Optional: true, + Description: "When the `value` is numeric, this field specifies the match's minimum value.", + Type: schema.TypeInt, + }, + "upper_bound": { + ValidateDiagFunc: validateRegexOrVariable("^[1-9]\\d*$"), + Optional: true, + Description: "When the `value` is numeric, this field specifies the match's maximum value.", + Type: schema.TypeInt, + }, + "match_wildcard_name": { + Optional: true, + Description: "Allows wildcards in the `cookieName` field, where `?` matches a single character and `*` matches zero or more characters.", + Type: schema.TypeBool, + }, + "match_case_sensitive_name": { + Optional: true, + Description: "Sets a case-sensitive match for the `cookieName` field.", + Type: schema.TypeBool, + }, + "match_wildcard_value": { + Optional: true, + Description: "Allows wildcards in the `value` field, where `?` matches a single character and `*` matches zero or more characters.", + Type: schema.TypeBool, + }, + "match_case_sensitive_value": { + Optional: true, + Description: "Sets a case-sensitive match for the `value` field.", + Type: schema.TypeBool, + }, + }, + }, + }, + "request_header": { + Optional: true, + Type: schema.TypeList, + Description: "Match HTTP header names or values. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "header_name": { + ValidateDiagFunc: validateRegexOrVariable("^[^()<>@,;:\\\"/\\[\\]?{}\\s]+$"), + Optional: true, + Description: "The name of the request header, for example `Accept-Language`.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS_ONE_OF", "IS_NOT_ONE_OF", "EXISTS", "DOES_NOT_EXIST"}, false)), + Optional: true, + Description: "Narrows the match criteria.", + Type: schema.TypeString, + }, + "values": { + Optional: true, + Description: "The request header's value, for example `en-US` when the header `headerName` is `Accept-Language`.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "match_wildcard_name": { + Optional: true, + Description: "Allows wildcards in the `headerName` field, where `?` matches a single character and `*` matches zero or more characters.", + Type: schema.TypeBool, + }, + "match_wildcard_value": { + Optional: true, + Description: "Allows wildcards in the `value` field, where `?` matches a single character and `*` matches zero or more characters.", + Type: schema.TypeBool, + }, + "match_case_sensitive_value": { + Optional: true, + Description: "Sets a case-sensitive match for the `value` field.", + Type: schema.TypeBool, + }, + }, + }, + }, + "request_method": { + Optional: true, + Type: schema.TypeList, + Description: "Specify the request's HTTP verb. Also supports WebDAV methods and common Akamai operations. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS", "IS_NOT"}, false)), + Optional: true, + Description: "Matches the `value` when set to `IS`, otherwise `IS_NOT` reverses the match.", + Type: schema.TypeString, + }, + "value": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"GET", "POST", "HEAD", "PUT", "PATCH", "HTTP_DELETE", "AKAMAI_TRANSLATE", "AKAMAI_PURGE", "OPTIONS", "DAV_ACL", "DAV_CHECKOUT", "DAV_COPY", "DAV_DMCREATE", "DAV_DMINDEX", "DAV_DMMKPATH", "DAV_DMMKPATHS", "DAV_DMOVERLAY", "DAV_DMPATCHPATHS", "DAV_LOCK", "DAV_MKCALENDAR", "DAV_MKCOL", "DAV_MOVE", "DAV_PROPFIND", "DAV_PROPPATCH", "DAV_REPORT", "DAV_SETPROCESS", "DAV_SETREDIRECT", "DAV_TRUTHGET", "DAV_UNLOCK"}, false)), + Optional: true, + Description: "Any of these HTTP methods, WebDAV methods, or Akamai operations.", + Type: schema.TypeString, + }, + }, + }, + }, + "request_protocol": { + Optional: true, + Type: schema.TypeList, + Description: "Matches whether the request uses the HTTP or HTTPS protocol. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "value": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"HTTP", "HTTPS"}, false)), + Optional: true, + Description: "Specifies the protocol.", + Type: schema.TypeString, + }, + }, + }, + }, + "request_type": { + Optional: true, + Type: schema.TypeList, + Description: "Matches the basic type of request. To use this match, you need to be thoroughly familiar with how Akamai edge servers process requests. Contact your Akamai Technical representative if you need help, and test thoroughly on staging before activating on production. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS", "IS_NOT"}, false)), + Optional: true, + Description: "Specifies whether the request `IS` or `IS_NOT` the type of specified `value`.", + Type: schema.TypeString, + }, + "value": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"CLIENT_REQ", "ESI_FRAGMENT", "EW_SUBREQUEST"}, false)), + Optional: true, + Description: "Specifies the type of request, either a standard `CLIENT_REQ`, an `ESI_FRAGMENT`, or an `EW_SUBREQUEST`.", + Type: schema.TypeString, + }, + }, + }, + }, + "response_header": { + Optional: true, + Type: schema.TypeList, + Description: "Match HTTP header names or values. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "header_name": { + ValidateDiagFunc: validateRegexOrVariable("^[^()<>@,;:\\\"/\\[\\]?{}\\s]+$"), + Optional: true, + Description: "The name of the response header, for example `Content-Type`.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS_ONE_OF", "IS_NOT_ONE_OF", "EXISTS", "DOES_NOT_EXIST", "IS_LESS_THAN", "IS_MORE_THAN", "IS_BETWEEN"}, false)), + Optional: true, + Description: "Narrows the match according to various criteria.", + Type: schema.TypeString, + }, + "values": { + Optional: true, + Description: "The response header's value, for example `application/x-www-form-urlencoded` when the header `headerName` is `Content-Type`.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "lower_bound": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+$"), + Optional: true, + Description: "When the `value` is numeric, this field specifies the match's minimum value.", + Type: schema.TypeInt, + }, + "upper_bound": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+$"), + Optional: true, + Description: "When the `value` is numeric, this field specifies the match's maximum value.", + Type: schema.TypeInt, + }, + "match_wildcard_name": { + Optional: true, + Description: "Allows wildcards in the `headerName` field, where `?` matches a single character and `*` matches zero or more characters.", + Type: schema.TypeBool, + }, + "match_wildcard_value": { + Optional: true, + Description: "Allows wildcards in the `value` field, where `?` matches a single character and `*` matches zero or more characters.", + Type: schema.TypeBool, + }, + "match_case_sensitive_value": { + Optional: true, + Description: "When enabled, the match is case-sensitive for the `value` field.", + Type: schema.TypeBool, + }, + }, + }, + }, + "server_location": { + Optional: true, + Type: schema.TypeList, + Description: "The location of the Akamai server handling the request. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "location_type": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"COUNTRY", "CONTINENT", "REGION"}, false)), + Optional: true, + Description: "Indicates the geographic scope.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS_ONE_OF", "IS_NOT_ONE_OF"}, false)), + Optional: true, + Description: "Matches the specified set of values when set to `IS_ONE_OF`, otherwise `IS_NOT_ONE_OF` reverses the match.", + Type: schema.TypeString, + }, + "countries": { + Optional: true, + Description: "ISO 3166-1 country codes, such as `US` or `CN`.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "continents": { + Optional: true, + Description: "Continent codes.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "regions": { + Optional: true, + Description: "ISO 3166 country and region codes, for example `US:MA` for Massachusetts or `JP:13` for Tokyo.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }, + }, + }, + "time": { + Optional: true, + Type: schema.TypeList, + Description: "Specifies ranges of times during which the request occurred. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"BEGINNING", "BETWEEN", "LASTING", "REPEATING"}, false)), + Optional: true, + Description: "Specifies how to define the range of time.", + Type: schema.TypeString, + }, + "repeat_interval": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+[DdHhMmSs]$"), + Optional: true, + Description: "Sets the time between each repeating time period's starting points.", + Type: schema.TypeString, + }, + "repeat_duration": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+[DdHhMmSs]$"), + Optional: true, + Description: "Sets the duration of each repeating time period.", + Type: schema.TypeString, + }, + "lasting_duration": { + ValidateDiagFunc: validateRegexOrVariable("^[0-9]+[DdHhMmSs]$"), + Optional: true, + Description: "Specifies the end of a time period as a duration relative to the `lastingDate`.", + Type: schema.TypeString, + }, + "lasting_date": { + Optional: true, + Description: "Sets the start of a fixed time period.", + Type: schema.TypeString, + }, + "repeat_begin_date": { + Optional: true, + Description: "Sets the start of the initial time period.", + Type: schema.TypeString, + }, + "apply_daylight_savings_time": { + Optional: true, + Description: "Adjusts the start time plus repeat interval to account for daylight saving time. Applies when the current time and the start time use different systems, daylight and standard, and the two values are in conflict.", + Type: schema.TypeBool, + }, + "begin_date": { + Optional: true, + Description: "Sets the start of a time period.", + Type: schema.TypeString, + }, + "end_date": { + Optional: true, + Description: "Sets the end of a fixed time period.", + Type: schema.TypeString, + }, + }, + }, + }, + "token_authorization": { + Optional: true, + Type: schema.TypeList, + Description: "Match on Auth Token 2.0 verification results. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS_SUCCESS", "IS_CUSTOM_FAILURE", "IS_ANY_FAILURE"}, false)), + Optional: true, + Description: "Error match scope.", + Type: schema.TypeString, + }, + "status_list": { + Optional: true, + Description: "", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }, + }, + }, + "user_agent": { + Optional: true, + Type: schema.TypeList, + Description: "Matches the user agent string that helps identify the client browser and device. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS_ONE_OF", "IS_NOT_ONE_OF"}, false)), + Optional: true, + Description: "Matches the specified set of `values` when set to `IS_ONE_OF`, otherwise `IS_NOT_ONE_OF` reverses the match.", + Type: schema.TypeString, + }, + "values": { + Optional: true, + Description: "The `User-Agent` header's value. For example, `Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)`.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "match_wildcard": { + Optional: true, + Description: "Allows wildcards in the `value` field, where `?` matches a single character and `*` matches zero or more characters. For example, `*Android*`, `*iPhone5*`, `*Firefox*`, or `*Chrome*` allow substring matches.", + Type: schema.TypeBool, + }, + "match_case_sensitive": { + Optional: true, + Description: "Sets a case-sensitive match for the `value` field.", + Type: schema.TypeBool, + }, + }, + }, + }, + "user_location": { + Optional: true, + Type: schema.TypeList, + Description: "The client browser's approximate geographic location, determined by looking up the IP address in a database. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "field": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"COUNTRY", "CONTINENT", "REGION"}, false)), + Optional: true, + Description: "Indicates the geographic scope.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS_ONE_OF", "IS_NOT_ONE_OF"}, false)), + Optional: true, + Description: "Matches the specified set of values when set to `IS_ONE_OF`, otherwise `IS_NOT_ONE_OF` reverses the match.", + Type: schema.TypeString, + }, + "country_values": { + Optional: true, + Description: "ISO 3166-1 country codes, such as `US` or `CN`.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "continent_values": { + Optional: true, + Description: "Continent codes.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "region_values": { + Optional: true, + Description: "ISO 3166 country and region codes, for example `US:MA` for Massachusetts or `JP:13` for Tokyo.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "check_ips": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"BOTH", "CONNECTING", "HEADERS"}, false)), + Optional: true, + Description: "Specifies which IP addresses determine the user's location.", + Type: schema.TypeString, + }, + "use_only_first_x_forwarded_for_ip": { + Optional: true, + Description: "When connecting via a proxy server as determined by the `X-Forwarded-For` header, enabling this option matches the end client specified in the header. Disabling it matches the connecting client's IP address.", + Type: schema.TypeBool, + }, + }, + }, + }, + "user_network": { + Optional: true, + Type: schema.TypeList, + Description: "Matches details of the network over which the request was made, determined by looking up the IP address in a database. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "field": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"NETWORK", "NETWORK_TYPE", "BANDWIDTH"}, false)), + Optional: true, + Description: "The type of information to match.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS_ONE_OF", "IS_NOT_ONE_OF"}, false)), + Optional: true, + Description: "Matches the specified set of values when set to `IS_ONE_OF`, otherwise `IS_NOT_ONE_OF` reverses the match.", + Type: schema.TypeString, + }, + "network_type_values": { + Optional: true, + Description: "", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "network_values": { + Optional: true, + Description: "Any set of specific networks.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "bandwidth_values": { + Optional: true, + Description: "Bandwidth range in bits per second, either `1`, `57`, `257`, `1000`, `2000`, or `5000`.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "check_ips": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"BOTH", "CONNECTING", "HEADERS"}, false)), + Optional: true, + Description: "Specifies which IP addresses determine the user's network.", + Type: schema.TypeString, + }, + "use_only_first_x_forwarded_for_ip": { + Optional: true, + Description: "When connecting via a proxy server as determined by the `X-Forwarded-For` header, enabling this option matches the end client specified in the header. Disabling it matches the connecting client's IP address.", + Type: schema.TypeBool, + }, + }, + }, + }, + "variable_error": { + Optional: true, + Type: schema.TypeList, + Description: "Matches any runtime errors that occur on edge servers based on the configuration of a `setVariable` behavior. See `Support for variables` section for more information on this feature. This criterion can be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "result": { + Optional: true, + Description: "Matches errors for the specified set of `variableNames`, otherwise matches errors from variables outside that set.", + Type: schema.TypeBool, + }, + "variable_names": { + Optional: true, + Description: "The name of the variable whose error triggers the match, or a space- or comma-delimited list of more than one variable name. Note that if you define a variable named `VAR`, the name in this field needs to appear with its added prefix as `PMUSER_VAR`. When such a variable is inserted into other fields, it appears with an additional namespace as `{{user.PMUSER_VAR}}`. See the `setVariable` behavior for details on variable names.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }, + }, + }, + "virtual_waiting_room_request": { + Optional: true, + Type: schema.TypeList, + Description: "Helps to customize the requests identified by the `virtualWaitingRoom` behavior. Use this match criteria to define the `originServer` behavior for the waiting room. This criterion cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS", "IS_NOT"}, false)), + Optional: true, + Description: "Specifies the match's logic.", + Type: schema.TypeString, + }, + "match_on": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"WR_ANY", "WR_MAIN_PAGE", "WR_ASSETS"}, false)), + Optional: true, + Description: "Specifies the type of request identified by the `virtualWaitingRoom` behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + "visitor_prioritization_request": { + Optional: true, + Type: schema.TypeList, + Description: "Helps to customize the requests identified by the `visitorPrioritizationFifo` behavior. The basic use case for this match criteria is to define the `originServer` behavior for the waiting room. This criterion cannot be used in includes.", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "locked": { + Optional: true, + Description: "Indicates that your Akamai representative has locked this behavior or criteria so that you can't modify it. This option is for internal usage only.", + Type: schema.TypeBool, + }, + "uuid": { + ValidateDiagFunc: validateRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), + Optional: true, + Description: "A uuid member indicates that at least one of its component behaviors or criteria is advanced and read-only. You need to preserve this uuid as well when modifying the rule tree. This option is for internal usage only.", + Type: schema.TypeString, + }, + "template_uuid": { + Optional: true, + Description: "This option is for internal usage only.", + Type: schema.TypeString, + }, + "match_operator": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"IS", "IS_NOT"}, false)), + Optional: true, + Description: "Specifies the match's logic.", + Type: schema.TypeString, + }, + "match_on": { + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"WR_ANY", "WR_MAIN_PAGE", "WR_ASSETS"}, false)), + Optional: true, + Description: "Specifies the type of request identified by the `visitorPrioritizationFifo` behavior.", + Type: schema.TypeString, + }, + }, + }, + }, + } +} diff --git a/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/content_compression_v2024_02_12.json b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/content_compression_v2024_02_12.json new file mode 100755 index 000000000..f4fa3ca3c --- /dev/null +++ b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/content_compression_v2024_02_12.json @@ -0,0 +1,68 @@ +{ + "_ruleFormat_": "rules_v2024_02_12", + "rules": { + "behaviors": [ + { + "name": "cpCode", + "options": { + "value": { + "cpCodeLimits": { + "currentCapacity": -143, + "limit": 100, + "limitType": "global" + }, + "createdDate": 1678276597000, + "description": "papi.declarativ.test.ipqa", + "id": 1048126, + "name": "papi.declarativ.test.ipqa", + "products": [ + "Fresca" + ] + } + } + }, + { + "name": "gzipResponse", + "options": { + "behavior": "ALWAYS" + } + } + ], + "criteria": [ + { + "name": "contentType", + "options": { + "matchCaseSensitive": false, + "matchOperator": "IS_ONE_OF", + "matchWildcard": true, + "values": [ + "text/*", + "application/javascript", + "application/x-javascript", + "application/x-javascript*", + "application/json", + "application/x-json", + "application/*+json", + "application/*+xml", + "application/text", + "application/vnd.microsoft.icon", + "application/vnd-ms-fontobject", + "application/x-font-ttf", + "application/x-font-opentype", + "application/x-font-truetype", + "application/xmlfont/eot", + "application/xml", + "font/opentype", + "font/otf", + "font/eot", + "image/svg+xml", + "image/vnd.microsoft.icon" + ] + } + } + ], + "name": "Content Compression", + "options": {}, + "criteriaMustSatisfy": "all" + } +} \ No newline at end of file diff --git a/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/default_v2024_02_12.json b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/default_v2024_02_12.json new file mode 100755 index 000000000..a24d2ff29 --- /dev/null +++ b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/default_v2024_02_12.json @@ -0,0 +1,373 @@ +{ + "_ruleFormat_": "rules_v2024_02_12", + "rules": { + "advancedOverride": "test", + "behaviors": [ + { + "name": "contentCharacteristicsAMD", + "options": { + "catalogSize": "SMALL", + "contentType": "ULTRA_HD", + "dash": true, + "hds": true, + "hls": true, + "popularityDistribution": "UNKNOWN", + "segmentDurationDASH": "SEGMENT_DURATION_10S", + "segmentDurationDASHCustom": 100, + "segmentDurationHDS": "SEGMENT_DURATION_2S", + "segmentDurationHDSCustom": 100, + "segmentDurationHLS": "SEGMENT_DURATION_4S", + "segmentDurationHLSCustom": 3.14, + "segmentDurationSmooth": "SEGMENT_DURATION_8S", + "segmentDurationSmoothCustom": 3.14, + "segmentSizeDASH": "GREATER_THAN_100MB", + "segmentSizeHDS": "TEN_MB_TO_100_MB", + "segmentSizeHLS": "GREATER_THAN_100MB", + "segmentSizeSmooth": "UNKNOWN", + "smooth": true + } + }, + { + "name": "origin", + "options": { + "cacheKeyHostname": "ORIGIN_HOSTNAME", + "compress": true, + "customCertificates": [ + { + "canBeCA": false, + "canBeLeaf": true, + "issuerRDNs": { + "C": "US", + "CN": "DigiCert TLS RSA SHA256 2020 CA1", + "O": "DigiCert Inc" + } + } + ], + "enableTrueClientIp": true, + "forwardHostHeader": "REQUEST_HOST_HEADER", + "httpPort": 80, + "httpsPort": 443, + "originSni": true, + "originType": "CUSTOMER", + "trueClientIpClientSetting": false, + "trueClientIpHeader": "True-Client-IP", + "useUniqueCacheKey": false, + "verificationMode": "PLATFORM_SETTINGS" + } + }, + { + "name": "adScalerCircuitBreaker", + "options": { + "returnErrorResponseCodeBased": 502 + } + }, + { + "name": "applicationLoadBalancer", + "options": { + "allDownNetStorage": { + "cpCode": 123, + "downloadDomainName": "test" + }, + "failoverOriginMap": [ + { + "fromOriginId": "123" + } + ] + } + }, + { + "name": "apiPrioritization", + "options": { + "cloudletPolicy": { + "id": 1337, + "name": "test" + } + } + }, + { + "name": "caching", + "options": { + "behavior": "NO_STORE" + } + }, + { + "name": "sureRoute", + "options": { + "enabled": true, + "forceSslForward": false, + "raceStatTtl": "30m", + "toHostStatus": "INCOMING_HH", + "type": "PERFORMANCE" + } + }, + { + "name": "tieredDistribution", + "options": { + "enabled": true, + "tieredDistributionMap": "CH2" + } + }, + { + "name": "prefetch", + "options": { + "enabled": true + } + }, + { + "name": "allowPost", + "options": { + "allowWithoutContentLength": false, + "enabled": true + } + }, + { + "name": "cpCode", + "options": { + "value": { + "createdDate": 1678276597000, + "description": "papi.declarativ.test.ipqa", + "id": 1048126, + "name": "papi.declarativ.test.ipqa", + "products": [ + "Fresca" + ] + } + } + }, + { + "name": "report", + "options": { + "logAcceptLanguage": false, + "logCookies": "OFF", + "logCustomLogField": false, + "logEdgeIP": false, + "logHost": false, + "logReferer": false, + "logUserAgent": true, + "logXForwardedFor": false + } + }, + { + "name": "mPulse", + "options": { + "apiKey": "", + "bufferSize": "", + "configOverride": "\n", + "enabled": true, + "loaderVersion": "V12", + "requirePci": false + } + } + ], + "children": [ + { + "behaviors": [ + { + "name": "cpCode", + "options": { + "value": { + "cpCodeLimits": { + "currentCapacity": -143, + "limit": 100, + "limitType": "global" + }, + "createdDate": 1678276597000, + "description": "papi.declarativ.test.ipqa", + "id": 1048126, + "name": "papi.declarativ.test.ipqa", + "products": [ + "Fresca" + ] + } + } + }, + { + "name": "gzipResponse", + "options": { + "behavior": "ALWAYS" + } + } + ], + "criteria": [ + { + "name": "contentType", + "options": { + "matchCaseSensitive": false, + "matchOperator": "IS_ONE_OF", + "matchWildcard": true, + "values": [ + "text/*", + "application/javascript", + "application/x-javascript", + "application/x-javascript*", + "application/json", + "application/x-json", + "application/*+json", + "application/*+xml", + "application/text", + "application/vnd.microsoft.icon", + "application/vnd-ms-fontobject", + "application/x-font-ttf", + "application/x-font-opentype", + "application/x-font-truetype", + "application/xmlfont/eot", + "application/xml", + "font/opentype", + "font/otf", + "font/eot", + "image/svg+xml", + "image/vnd.microsoft.icon" + ] + } + } + ], + "name": "Content Compression", + "options": {}, + "criteriaMustSatisfy": "all" + }, + { + "behaviors": [ + { + "name": "caching", + "options": { + "behavior": "MAX_AGE", + "mustRevalidate": false, + "ttl": "1d" + } + }, + { + "name": "prefetch", + "options": { + "enabled": false + } + }, + { + "name": "prefetchable", + "options": { + "enabled": true + } + } + ], + "criteria": [ + { + "name": "fileExtension", + "options": { + "matchCaseSensitive": false, + "matchOperator": "IS_ONE_OF", + "values": [ + "aif", + "aiff", + "au", + "avi", + "bin", + "bmp", + "cab", + "carb", + "cct", + "cdf", + "class", + "css", + "doc", + "dcr", + "dtd", + "exe", + "flv", + "gcf", + "gff", + "gif", + "grv", + "hdml", + "hqx", + "ico", + "ini", + "jpeg", + "jpg", + "js", + "mov", + "mp3", + "nc", + "pct", + "pdf", + "png", + "ppc", + "pws", + "swa", + "swf", + "txt", + "vbs", + "w32", + "wav", + "wbmp", + "wml", + "wmlc", + "wmls", + "wmlsc", + "xsd", + "zip", + "webp", + "jxr", + "hdp", + "wdp", + "pict", + "tif", + "tiff", + "mid", + "midi", + "ttf", + "eot", + "woff", + "woff2", + "otf", + "svg", + "svgz", + "webp", + "jxr", + "jar", + "jp2" + ] + } + } + ], + "name": "Static Content", + "options": {}, + "criteriaMustSatisfy": "all" + }, + { + "behaviors": [ + { + "name": "downstreamCache", + "options": { + "behavior": "TUNNEL_ORIGIN" + } + }, + { + "name": "restrictObjectCaching", + "options": {} + } + ], + "criteria": [ + { + "name": "cacheability", + "options": { + "matchOperator": "IS_NOT", + "value": "CACHEABLE" + } + } + ], + "name": "Dynamic Content", + "options": {}, + "criteriaMustSatisfy": "all" + } + ], + "comments": "test", + "customOverride": { + "name": "test", + "overrideId": "test" + }, + "name": "default", + "options": {}, + "uuid": "test", + "templateUuid": "test", + "templateLink": "test" + } +} \ No newline at end of file diff --git a/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/dynamic_content_v2024_02_12.json b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/dynamic_content_v2024_02_12.json new file mode 100755 index 000000000..cacf135e3 --- /dev/null +++ b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/dynamic_content_v2024_02_12.json @@ -0,0 +1,29 @@ +{ + "_ruleFormat_": "rules_v2024_02_12", + "rules": { + "behaviors": [ + { + "name": "downstreamCache", + "options": { + "behavior": "TUNNEL_ORIGIN" + } + }, + { + "name": "restrictObjectCaching", + "options": {} + } + ], + "criteria": [ + { + "name": "cacheability", + "options": { + "matchOperator": "IS_NOT", + "value": "CACHEABLE" + } + } + ], + "name": "Dynamic Content", + "options": {}, + "criteriaMustSatisfy": "all" + } +} \ No newline at end of file diff --git a/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2024_02_12.tf b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2024_02_12.tf new file mode 100644 index 000000000..c7dadb233 --- /dev/null +++ b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/rules_v2024_02_12.tf @@ -0,0 +1,268 @@ +provider "akamai" { + edgerc = "../../common/testutils/edgerc" +} + +data "akamai_property_rules_builder" "default" { + rules_v2024_02_12 { + name = "default" + is_secure = false + custom_override { + name = "test" + override_id = "test" + } + advanced_override = "test" + comments = "test" + uuid = "test" + template_uuid = "test" + template_link = "test" + + behavior { + content_characteristics_amd { + catalog_size = "SMALL" + content_type = "ULTRA_HD" + dash = true + hds = true + hls = true + popularity_distribution = "UNKNOWN" + segment_duration_dash = "SEGMENT_DURATION_10S" + segment_duration_dash_custom = 100 + segment_duration_hds = "SEGMENT_DURATION_2S" + segment_duration_hds_custom = 100 + segment_duration_hls = "SEGMENT_DURATION_4S" + segment_duration_hls_custom = 3.14 + segment_duration_smooth = "SEGMENT_DURATION_8S" + segment_duration_smooth_custom = 3.14 + segment_size_dash = "GREATER_THAN_100MB" + segment_size_hds = "TEN_MB_TO_100_MB" + segment_size_hls = "GREATER_THAN_100MB" + segment_size_smooth = "UNKNOWN" + smooth = true + } + } + behavior { + origin { + cache_key_hostname = "ORIGIN_HOSTNAME" + compress = true + enable_true_client_ip = true + forward_host_header = "REQUEST_HOST_HEADER" + http_port = 80 + https_port = 443 + origin_sni = true + origin_type = "CUSTOMER" + true_client_ip_client_setting = false + true_client_ip_header = "True-Client-IP" + use_unique_cache_key = false + verification_mode = "PLATFORM_SETTINGS" + custom_certificates { + can_be_ca = false + can_be_leaf = true + issuer_rdns { + c = "US" + cn = "DigiCert TLS RSA SHA256 2020 CA1" + o = "DigiCert Inc" + } + } + } + } + behavior { + ad_scaler_circuit_breaker { + return_error_response_code_based = "502" + } + } + behavior { + application_load_balancer { + all_down_net_storage { + cp_code = 123 + download_domain_name = "test" + } + failover_origin_map { + from_origin_id = "123" + + } + } + } + behavior { + api_prioritization { + cloudlet_policy { + id = 1337 + name = "test" + } + } + } + + behavior { + caching { + behavior = "NO_STORE" + } + } + + behavior { + sure_route { + enabled = true + force_ssl_forward = false + race_stat_ttl = "30m" + to_host_status = "INCOMING_HH" + type = "PERFORMANCE" + } + } + + behavior { + tiered_distribution { + enabled = true + tiered_distribution_map = "CH2" + } + } + + behavior { + prefetch { + enabled = true + } + } + + behavior { + allow_post { + allow_without_content_length = false + enabled = true + } + } + behavior { + cp_code { + value { + created_date = 1678276597000 + description = "papi.declarativ.test.ipqa" + id = 1048126 + name = "papi.declarativ.test.ipqa" + products = ["Fresca", ] + } + } + } + behavior { + report { + log_accept_language = false + log_cookies = "OFF" + log_custom_log_field = false + log_edge_ip = false + log_host = false + log_referer = false + log_user_agent = true + log_x_forwarded_for = false + } + } + + behavior { + m_pulse { + api_key = "" + buffer_size = "" + config_override = <<-EOT + +EOT + enabled = true + loader_version = "V12" + require_pci = false + + } + } + children = [ + data.akamai_property_rules_builder.content_compression.json, + data.akamai_property_rules_builder.static_content.json, + data.akamai_property_rules_builder.dynamic_content.json, + ] + } +} + +data "akamai_property_rules_builder" "content_compression" { + rules_v2024_02_12 { + name = "Content Compression" + criteria_must_satisfy = "all" + criterion { + content_type { + match_case_sensitive = false + match_operator = "IS_ONE_OF" + match_wildcard = true + values = ["text/*", "application/javascript", "application/x-javascript", "application/x-javascript*", "application/json", "application/x-json", "application/*+json", "application/*+xml", "application/text", "application/vnd.microsoft.icon", "application/vnd-ms-fontobject", "application/x-font-ttf", "application/x-font-opentype", "application/x-font-truetype", "application/xmlfont/eot", "application/xml", "font/opentype", "font/otf", "font/eot", "image/svg+xml", "image/vnd.microsoft.icon", ] + } + } + behavior { + cp_code { + value { + created_date = 1678276597000 + description = "papi.declarativ.test.ipqa" + id = 1048126 + name = "papi.declarativ.test.ipqa" + products = ["Fresca", ] + cp_code_limits { + current_capacity = -143 + limit = 100 + limit_type = "global" + } + } + } + } + behavior { + gzip_response { + behavior = "ALWAYS" + } + } + children = [ + ] + } +} + +data "akamai_property_rules_builder" "static_content" { + rules_v2024_02_12 { + name = "Static Content" + criteria_must_satisfy = "all" + criterion { + file_extension { + match_case_sensitive = false + match_operator = "IS_ONE_OF" + values = ["aif", "aiff", "au", "avi", "bin", "bmp", "cab", "carb", "cct", "cdf", "class", "css", "doc", "dcr", "dtd", "exe", "flv", "gcf", "gff", "gif", "grv", "hdml", "hqx", "ico", "ini", "jpeg", "jpg", "js", "mov", "mp3", "nc", "pct", "pdf", "png", "ppc", "pws", "swa", "swf", "txt", "vbs", "w32", "wav", "wbmp", "wml", "wmlc", "wmls", "wmlsc", "xsd", "zip", "webp", "jxr", "hdp", "wdp", "pict", "tif", "tiff", "mid", "midi", "ttf", "eot", "woff", "woff2", "otf", "svg", "svgz", "webp", "jxr", "jar", "jp2", ] + } + } + behavior { + caching { + behavior = "MAX_AGE" + must_revalidate = false + ttl = "1d" + } + } + behavior { + prefetch { + enabled = false + } + } + behavior { + prefetchable { + enabled = true + } + } + children = [ + ] + } +} + +data "akamai_property_rules_builder" "dynamic_content" { + rules_v2024_02_12 { + name = "Dynamic Content" + criteria_must_satisfy = "all" + criterion { + cacheability { + match_operator = "IS_NOT" + value = "CACHEABLE" + } + } + behavior { + downstream_cache { + behavior = "TUNNEL_ORIGIN" + } + } + + behavior { + restrict_object_caching {} + } + + children = [ + ] + } +} + diff --git a/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/static_content_v2024_02_12.json b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/static_content_v2024_02_12.json new file mode 100755 index 000000000..8f75c39a1 --- /dev/null +++ b/pkg/providers/property/testdata/TestDSPropertyRulesBuilder/static_content_v2024_02_12.json @@ -0,0 +1,110 @@ +{ + "_ruleFormat_": "rules_v2024_02_12", + "rules": { + "behaviors": [ + { + "name": "caching", + "options": { + "behavior": "MAX_AGE", + "mustRevalidate": false, + "ttl": "1d" + } + }, + { + "name": "prefetch", + "options": { + "enabled": false + } + }, + { + "name": "prefetchable", + "options": { + "enabled": true + } + } + ], + "criteria": [ + { + "name": "fileExtension", + "options": { + "matchCaseSensitive": false, + "matchOperator": "IS_ONE_OF", + "values": [ + "aif", + "aiff", + "au", + "avi", + "bin", + "bmp", + "cab", + "carb", + "cct", + "cdf", + "class", + "css", + "doc", + "dcr", + "dtd", + "exe", + "flv", + "gcf", + "gff", + "gif", + "grv", + "hdml", + "hqx", + "ico", + "ini", + "jpeg", + "jpg", + "js", + "mov", + "mp3", + "nc", + "pct", + "pdf", + "png", + "ppc", + "pws", + "swa", + "swf", + "txt", + "vbs", + "w32", + "wav", + "wbmp", + "wml", + "wmlc", + "wmls", + "wmlsc", + "xsd", + "zip", + "webp", + "jxr", + "hdp", + "wdp", + "pict", + "tif", + "tiff", + "mid", + "midi", + "ttf", + "eot", + "woff", + "woff2", + "otf", + "svg", + "svgz", + "webp", + "jxr", + "jar", + "jp2" + ] + } + } + ], + "name": "Static Content", + "options": {}, + "criteriaMustSatisfy": "all" + } +} \ No newline at end of file From 9eac9b43a200481c1d7eb1995b379b7ad0712a8a Mon Sep 17 00:00:00 2001 From: Wojciech Zagrajczuk Date: Wed, 20 Mar 2024 12:39:37 +0000 Subject: [PATCH 46/52] DXE-3641 Enhance error handling --- CHANGELOG.md | 1 + .../gtm/resource_akamai_gtm_geomap.go | 34 ++++++++++++++----- .../gtm/resource_akamai_gtm_property.go | 6 ++-- .../gtm/resource_akamai_gtm_resource.go | 27 ++++++++++----- 4 files changed, 49 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce02b64dc..c5757bf7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -92,6 +92,7 @@ * `sign_and_serve` and `sign_and_serve_algorithm` in `akamai_gtm_domain` data source and resource * `http_method`, `http_request_body`, `alternate_ca_certificates` and `pre_2023_security_posture` inside `liveness_test` in `akamai_gtm_property` resource and `akamai_gtm_domain` data source * Added support for `ranked-failover` properties in `akamai_gtm_property` resource + * Enhanced error handling in `akamai_gtm_asmap`, `akamai_gtm_domain`, `akamai_gtm_geomap`, `akamai_gtm_property` and `akamai_gtm_resource` resources diff --git a/pkg/providers/gtm/resource_akamai_gtm_geomap.go b/pkg/providers/gtm/resource_akamai_gtm_geomap.go index e8383d39f..b5459a23f 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_geomap.go +++ b/pkg/providers/gtm/resource_akamai_gtm_geomap.go @@ -2,6 +2,7 @@ package gtm import ( "context" + "errors" "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" @@ -201,7 +202,13 @@ func resourceGTMv1GeoMapRead(ctx context.Context, d *schema.ResourceData, m inte Detail: err.Error(), }) } - populateTerraformGeoMapState(d, geo, m) + if err = populateTerraformGeoMapState(d, geo, m); err != nil { + return append(diags, diag.Diagnostic{ + Severity: diag.Error, + Summary: "geoMap Read populate state error", + Detail: err.Error(), + }) + } logger.Debugf("READ %v", geo) return nil } @@ -307,7 +314,9 @@ func resourceGTMv1GeoMapImport(d *schema.ResourceData, m interface{}) ([]*schema if err := d.Set("wait_on_complete", true); err != nil { return nil, err } - populateTerraformGeoMapState(d, geo, m) + if err = populateTerraformGeoMapState(d, geo, m); err != nil { + return nil, err + } // use same Id as passed in name, err := tf.GetStringValue("name", d) @@ -418,7 +427,7 @@ func populateGeoMapObject(d *schema.ResourceData, geo *gtm.GeoMap, m interface{} } // Populate Terraform state from provided GeoMap object -func populateTerraformGeoMapState(d *schema.ResourceData, geo *gtm.GeoMap, m interface{}) { +func populateTerraformGeoMapState(d *schema.ResourceData, geo *gtm.GeoMap, m interface{}) error { meta := meta.Must(m) logger := meta.Log("Akamai GTM", "populateTerraformGeoMapState") @@ -426,8 +435,10 @@ func populateTerraformGeoMapState(d *schema.ResourceData, geo *gtm.GeoMap, m int if err := d.Set("name", geo.Name); err != nil { logger.Errorf("populateTerraformGeoMapState failed: %s", err.Error()) } - populateTerraformGeoAssignmentsState(d, geo, m) - populateTerraformGeoDefaultDCState(d, geo, m) + if err := populateTerraformGeoAssignmentsState(d, geo, m); err != nil { + return err + } + return populateTerraformGeoDefaultDCState(d, geo, m) } // create and populate GTM GeoMap Assignments object @@ -466,7 +477,7 @@ func populateGeoAssignmentsObject(d *schema.ResourceData, geo *gtm.GeoMap, m int } // create and populate Terraform geoMap assignments schema -func populateTerraformGeoAssignmentsState(d *schema.ResourceData, geo *gtm.GeoMap, m interface{}) { +func populateTerraformGeoAssignmentsState(d *schema.ResourceData, geo *gtm.GeoMap, m interface{}) error { meta := meta.Must(m) logger := meta.Log("Akamai GTM", "populateTerraformGeoAssignmentsState") @@ -476,7 +487,10 @@ func populateTerraformGeoAssignmentsState(d *schema.ResourceData, geo *gtm.GeoMa objectInventory[aObj.DatacenterID] = aObj } } - aStateList, _ := tf.GetInterfaceArrayValue("assignment", d) + aStateList, err := tf.GetInterfaceArrayValue("assignment", d) + if err != nil && !errors.Is(err, tf.ErrNotFound) { + return err + } for _, aMap := range aStateList { a := aMap.(map[string]interface{}) objIndex := a["datacenter_id"].(int) @@ -509,7 +523,9 @@ func populateTerraformGeoAssignmentsState(d *schema.ResourceData, geo *gtm.GeoMa } if err := d.Set("assignment", aStateList); err != nil { logger.Errorf("populateTerraformGeoAssignmentsState failed: %s", err.Error()) + return err } + return nil } // create and populate GTM GeoMap DefaultDatacenter object @@ -536,7 +552,7 @@ func populateGeoDefaultDCObject(d *schema.ResourceData, geo *gtm.GeoMap, m inter } // create and populate Terraform geoMap default_datacenter schema -func populateTerraformGeoDefaultDCState(d *schema.ResourceData, geo *gtm.GeoMap, m interface{}) { +func populateTerraformGeoDefaultDCState(d *schema.ResourceData, geo *gtm.GeoMap, m interface{}) error { meta := meta.Must(m) logger := meta.Log("Akamai GTM", "populateTerraformGeoDefault") @@ -548,7 +564,9 @@ func populateTerraformGeoDefaultDCState(d *schema.ResourceData, geo *gtm.GeoMap, ddcListNew[0] = ddcNew if err := d.Set("default_datacenter", ddcListNew); err != nil { logger.Errorf("populateTerraformGeoDefaultDCState failed: %s", err.Error()) + return err } + return nil } // countriesEqual checks whether countries are equal diff --git a/pkg/providers/gtm/resource_akamai_gtm_property.go b/pkg/providers/gtm/resource_akamai_gtm_property.go index 5eedaa79e..46af15754 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_property.go +++ b/pkg/providers/gtm/resource_akamai_gtm_property.go @@ -1087,7 +1087,7 @@ func populateTerraformTrafficTargetState(d *schema.ResourceData, prop *gtm.Prope } ttStateList, err := tf.GetInterfaceArrayValue("traffic_target", d) - if err != nil { + if err != nil && !errors.Is(err, tf.ErrNotFound) { return err } for _, ttMap := range ttStateList { @@ -1169,7 +1169,7 @@ func populateTerraformStaticRRSetState(d *schema.ResourceData, prop *gtm.Propert } rrStateList, err := tf.GetInterfaceArrayValue("static_rr_set", d) - if err != nil { + if err != nil && !errors.Is(err, tf.ErrNotFound) { return err } for _, rrMap := range rrStateList { @@ -1283,7 +1283,7 @@ func populateTerraformLivenessTestState(d *schema.ResourceData, prop *gtm.Proper } ltStateList, err := tf.GetInterfaceArrayValue("liveness_test", d) - if err != nil { + if err != nil && !errors.Is(err, tf.ErrNotFound) { return err } for _, ltMap := range ltStateList { diff --git a/pkg/providers/gtm/resource_akamai_gtm_resource.go b/pkg/providers/gtm/resource_akamai_gtm_resource.go index c16a9b1a3..c65838b82 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_resource.go +++ b/pkg/providers/gtm/resource_akamai_gtm_resource.go @@ -218,7 +218,13 @@ func resourceGTMv1ResourceRead(ctx context.Context, d *schema.ResourceData, m in Detail: err.Error(), }) } - populateTerraformResourceState(d, rsrc, m) + if err = populateTerraformResourceState(d, rsrc, m); err != nil { + return append(diags, diag.Diagnostic{ + Severity: diag.Error, + Summary: "Resource Read populate state", + Detail: err.Error(), + }) + } logger.Debugf("READ %v", rsrc) return nil } @@ -330,7 +336,9 @@ func resourceGTMv1ResourceImport(d *schema.ResourceData, m interface{}) ([]*sche if err != nil { return nil, err } - populateTerraformResourceState(d, rsrc, m) + if err = populateTerraformResourceState(d, rsrc, m); err != nil { + return nil, err + } // use same Id as passed in name, err := tf.GetStringValue("name", d) @@ -542,7 +550,7 @@ func populateResourceObject(d *schema.ResourceData, rsrc *gtm.Resource, m interf } // Populate Terraform state from provided Resource object -func populateTerraformResourceState(d *schema.ResourceData, rsrc *gtm.Resource, m interface{}) { +func populateTerraformResourceState(d *schema.ResourceData, rsrc *gtm.Resource, m interface{}) error { meta := meta.Must(m) logger := meta.Log("Akamai GTM", "populateTerraformResourceState") @@ -565,9 +573,10 @@ func populateTerraformResourceState(d *schema.ResourceData, rsrc *gtm.Resource, err := d.Set(stateKey, stateValue) if err != nil { logger.Errorf("populateTerraformResourceState failed: %s", err.Error()) + return err } } - populateTerraformResourceInstancesState(d, rsrc, m) + return populateTerraformResourceInstancesState(d, rsrc, m) } // create and populate GTM Resource ResourceInstances object @@ -602,7 +611,7 @@ func populateResourceInstancesObject(meta meta.Meta, d *schema.ResourceData, rsr } // create and populate Terraform resource_instances schema -func populateTerraformResourceInstancesState(d *schema.ResourceData, rsrc *gtm.Resource, m interface{}) { +func populateTerraformResourceInstancesState(d *schema.ResourceData, rsrc *gtm.Resource, m interface{}) error { meta := meta.Must(m) logger := meta.Log("Akamai GTM", "populateTerraformResourceInstancesState") @@ -612,7 +621,10 @@ func populateTerraformResourceInstancesState(d *schema.ResourceData, rsrc *gtm.R riObjectInventory[riObj.DatacenterID] = riObj } } - riStateList, _ := tf.GetInterfaceArrayValue("resource_instance", d) + riStateList, err := tf.GetInterfaceArrayValue("resource_instance", d) + if err != nil && !errors.Is(err, tf.ErrNotFound) { + return err + } for _, riMap := range riStateList { ri := riMap.(map[string]interface{}) objIndex := ri["datacenter_id"].(int) @@ -649,8 +661,7 @@ func populateTerraformResourceInstancesState(d *schema.ResourceData, rsrc *gtm.R riStateList = append(riStateList, riNew) } } - _ = d.Set("resource_instance", riStateList) - + return d.Set("resource_instance", riStateList) } func resourceInstanceDiffSuppress(_, _, _ string, d *schema.ResourceData) bool { From e66523f383893004982279169c7284e227d9ab35 Mon Sep 17 00:00:00 2001 From: "Zagrajczuk, Wojciech" Date: Wed, 20 Mar 2024 14:34:48 +0100 Subject: [PATCH 47/52] DXE-3571 Bump dependencies after major release in edgegrid --- build/internal/docker_jenkins.bash | 2 +- build/internal/package/nexus-release.bash | 2 +- build/internal/releaser/goreleaser_build.bash | 2 +- go.mod | 4 ++-- go.sum | 8 ++++---- pkg/akamai/configure_context.go | 4 ++-- pkg/akamai/edgegrid.go | 2 +- pkg/akamai/edgegrid_test.go | 2 +- pkg/akamai/sdk_provider_test.go | 2 +- pkg/meta/meta.go | 2 +- pkg/meta/meta_test.go | 2 +- pkg/providers/appsec/config_versions.go | 2 +- ...mai_appsec_advanced_settings_attack_payload_logging.go | 2 +- ...ppsec_advanced_settings_attack_payload_logging_test.go | 2 +- ..._akamai_appsec_advanced_settings_evasive_path_match.go | 2 +- ...ai_appsec_advanced_settings_evasive_path_match_test.go | 2 +- .../data_akamai_appsec_advanced_settings_logging.go | 2 +- .../data_akamai_appsec_advanced_settings_logging_test.go | 2 +- .../data_akamai_appsec_advanced_settings_pii_learning.go | 2 +- ...a_akamai_appsec_advanced_settings_pii_learning_test.go | 2 +- .../data_akamai_appsec_advanced_settings_pragma_header.go | 2 +- .../data_akamai_appsec_advanced_settings_pragma_test.go | 2 +- .../data_akamai_appsec_advanced_settings_prefetch.go | 2 +- .../data_akamai_appsec_advanced_settings_prefetch_test.go | 2 +- .../data_akamai_appsec_advanced_settings_request_body.go | 2 +- ...a_akamai_appsec_advanced_settings_request_body_test.go | 2 +- pkg/providers/appsec/data_akamai_appsec_api_endpoints.go | 2 +- .../appsec/data_akamai_appsec_api_endpoints_test.go | 2 +- .../appsec/data_akamai_appsec_api_hostname_coverage.go | 2 +- ...a_akamai_appsec_api_hostname_coverage_match_targets.go | 2 +- ...mai_appsec_api_hostname_coverage_match_targets_test.go | 2 +- ...ata_akamai_appsec_api_hostname_coverage_overlapping.go | 2 +- ...kamai_appsec_api_hostname_coverage_overlapping_test.go | 2 +- .../data_akamai_appsec_api_hostname_coverage_test.go | 2 +- .../appsec/data_akamai_appsec_api_request_constraints.go | 2 +- .../data_akamai_appsec_api_request_constraints_test.go | 2 +- pkg/providers/appsec/data_akamai_appsec_attack_groups.go | 2 +- .../appsec/data_akamai_appsec_attack_groups_test.go | 2 +- .../appsec/data_akamai_appsec_bypass_network_lists.go | 2 +- .../data_akamai_appsec_bypass_network_lists_test.go | 2 +- pkg/providers/appsec/data_akamai_appsec_configuration.go | 2 +- .../appsec/data_akamai_appsec_configuration_test.go | 2 +- .../appsec/data_akamai_appsec_configuration_version.go | 2 +- .../data_akamai_appsec_configuration_version_test.go | 2 +- .../appsec/data_akamai_appsec_contracts_groups.go | 2 +- .../appsec/data_akamai_appsec_contracts_groups_test.go | 2 +- pkg/providers/appsec/data_akamai_appsec_custom_deny.go | 2 +- .../appsec/data_akamai_appsec_custom_deny_test.go | 2 +- .../appsec/data_akamai_appsec_custom_rule_actions.go | 2 +- .../appsec/data_akamai_appsec_custom_rule_actions_test.go | 2 +- pkg/providers/appsec/data_akamai_appsec_custom_rules.go | 2 +- .../appsec/data_akamai_appsec_custom_rules_test.go | 2 +- pkg/providers/appsec/data_akamai_appsec_eval.go | 2 +- pkg/providers/appsec/data_akamai_appsec_eval_groups.go | 2 +- .../appsec/data_akamai_appsec_eval_groups_test.go | 2 +- .../appsec/data_akamai_appsec_eval_penalty_box.go | 2 +- .../data_akamai_appsec_eval_penalty_box_conditions.go | 2 +- ...data_akamai_appsec_eval_penalty_box_conditions_test.go | 2 +- .../appsec/data_akamai_appsec_eval_penalty_box_test.go | 2 +- pkg/providers/appsec/data_akamai_appsec_eval_rules.go | 2 +- .../appsec/data_akamai_appsec_eval_rules_test.go | 2 +- pkg/providers/appsec/data_akamai_appsec_eval_test.go | 2 +- .../appsec/data_akamai_appsec_export_configuration.go | 2 +- .../data_akamai_appsec_export_configuration_test.go | 2 +- .../appsec/data_akamai_appsec_failover_hostnames.go | 2 +- .../appsec/data_akamai_appsec_failover_hostnames_test.go | 2 +- pkg/providers/appsec/data_akamai_appsec_ip_geo.go | 2 +- pkg/providers/appsec/data_akamai_appsec_ip_geo_test.go | 2 +- .../appsec/data_akamai_appsec_malware_content_types.go | 2 +- .../data_akamai_appsec_malware_content_types_test.go | 2 +- .../appsec/data_akamai_appsec_malware_policies.go | 2 +- .../appsec/data_akamai_appsec_malware_policies_test.go | 2 +- .../appsec/data_akamai_appsec_malware_policy_actions.go | 2 +- .../data_akamai_appsec_malware_policy_actions_test.go | 2 +- pkg/providers/appsec/data_akamai_appsec_match_targets.go | 2 +- .../appsec/data_akamai_appsec_match_targets_test.go | 2 +- pkg/providers/appsec/data_akamai_appsec_penalty_box.go | 2 +- .../appsec/data_akamai_appsec_penalty_box_conditions.go | 2 +- .../data_akamai_appsec_penalty_box_conditions_test.go | 2 +- .../appsec/data_akamai_appsec_penalty_box_test.go | 2 +- pkg/providers/appsec/data_akamai_appsec_rate_policies.go | 2 +- .../appsec/data_akamai_appsec_rate_policies_test.go | 2 +- .../appsec/data_akamai_appsec_rate_policy_actions.go | 2 +- .../appsec/data_akamai_appsec_rate_policy_actions_test.go | 2 +- .../appsec/data_akamai_appsec_reputation_analysis.go | 2 +- .../appsec/data_akamai_appsec_reputation_analysis_test.go | 2 +- .../data_akamai_appsec_reputation_profile_actions.go | 2 +- .../data_akamai_appsec_reputation_profile_actions_test.go | 2 +- .../appsec/data_akamai_appsec_reputation_profiles.go | 2 +- .../appsec/data_akamai_appsec_reputation_profiles_test.go | 2 +- pkg/providers/appsec/data_akamai_appsec_rule_upgrade.go | 2 +- .../appsec/data_akamai_appsec_rule_upgrade_test.go | 2 +- pkg/providers/appsec/data_akamai_appsec_rules.go | 2 +- pkg/providers/appsec/data_akamai_appsec_rules_test.go | 2 +- .../appsec/data_akamai_appsec_security_policy.go | 2 +- .../data_akamai_appsec_security_policy_protections.go | 2 +- ...data_akamai_appsec_security_policy_protections_test.go | 2 +- .../appsec/data_akamai_appsec_security_policy_test.go | 2 +- .../appsec/data_akamai_appsec_selectable_hostnames.go | 2 +- .../data_akamai_appsec_selectable_hostnames_test.go | 2 +- .../appsec/data_akamai_appsec_selected_hostnames.go | 2 +- .../appsec/data_akamai_appsec_selected_hostnames_test.go | 2 +- .../appsec/data_akamai_appsec_siem_definitions.go | 2 +- .../appsec/data_akamai_appsec_siem_definitions_test.go | 2 +- pkg/providers/appsec/data_akamai_appsec_siem_settings.go | 2 +- .../appsec/data_akamai_appsec_siem_settings_test.go | 2 +- .../data_akamai_appsec_slow_post_protection_settings.go | 2 +- ...ta_akamai_appsec_slow_post_protection_settings_test.go | 2 +- pkg/providers/appsec/data_akamai_appsec_threat_intel.go | 2 +- .../appsec/data_akamai_appsec_threat_intel_test.go | 2 +- .../appsec/data_akamai_appsec_tuning_recommendations.go | 2 +- .../data_akamai_appsec_tuning_recommendations_test.go | 2 +- pkg/providers/appsec/data_akamai_appsec_version_notes.go | 2 +- .../appsec/data_akamai_appsec_version_notes_test.go | 2 +- pkg/providers/appsec/data_akamai_appsec_waf_mode.go | 2 +- pkg/providers/appsec/data_akamai_appsec_waf_mode_test.go | 2 +- .../appsec/data_akamai_appsec_wap_selected_hostnames.go | 2 +- .../data_akamai_appsec_wap_selected_hostnames_test.go | 2 +- pkg/providers/appsec/diff_suppress_funcs.go | 2 +- pkg/providers/appsec/provider.go | 2 +- pkg/providers/appsec/provider_test.go | 2 +- .../appsec/resource_akamai_appsec_activations.go | 2 +- .../appsec/resource_akamai_appsec_activations_test.go | 2 +- ...mai_appsec_advanced_settings_attack_payload_logging.go | 2 +- ...ppsec_advanced_settings_attack_payload_logging_test.go | 2 +- ..._akamai_appsec_advanced_settings_evasive_path_match.go | 2 +- ...ai_appsec_advanced_settings_evasive_path_match_test.go | 2 +- .../resource_akamai_appsec_advanced_settings_logging.go | 2 +- ...source_akamai_appsec_advanced_settings_logging_test.go | 2 +- ...source_akamai_appsec_advanced_settings_pii_learning.go | 2 +- ...e_akamai_appsec_advanced_settings_pii_learning_test.go | 2 +- ...ource_akamai_appsec_advanced_settings_pragma_header.go | 2 +- ...esource_akamai_appsec_advanced_settings_pragma_test.go | 2 +- .../resource_akamai_appsec_advanced_settings_prefetch.go | 2 +- ...ource_akamai_appsec_advanced_settings_prefetch_test.go | 2 +- ...source_akamai_appsec_advanced_settings_request_body.go | 2 +- ...e_akamai_appsec_advanced_settings_request_body_test.go | 2 +- .../resource_akamai_appsec_api_constraints_protection.go | 2 +- ...ource_akamai_appsec_api_constraints_protection_test.go | 2 +- .../resource_akamai_appsec_api_request_constraints.go | 2 +- ...resource_akamai_appsec_api_request_constraints_test.go | 2 +- .../appsec/resource_akamai_appsec_attack_group.go | 2 +- .../appsec/resource_akamai_appsec_attack_group_test.go | 2 +- .../appsec/resource_akamai_appsec_bypass_network_lists.go | 2 +- .../resource_akamai_appsec_bypass_network_lists_test.go | 2 +- .../appsec/resource_akamai_appsec_configuration.go | 2 +- .../appsec/resource_akamai_appsec_configuration_rename.go | 2 +- .../resource_akamai_appsec_configuration_rename_test.go | 2 +- .../appsec/resource_akamai_appsec_configuration_test.go | 2 +- .../appsec/resource_akamai_appsec_custom_deny.go | 2 +- .../appsec/resource_akamai_appsec_custom_deny_test.go | 2 +- .../appsec/resource_akamai_appsec_custom_rule.go | 2 +- .../appsec/resource_akamai_appsec_custom_rule_action.go | 2 +- .../resource_akamai_appsec_custom_rule_action_test.go | 2 +- .../appsec/resource_akamai_appsec_custom_rule_test.go | 2 +- pkg/providers/appsec/resource_akamai_appsec_eval.go | 2 +- pkg/providers/appsec/resource_akamai_appsec_eval_group.go | 2 +- .../appsec/resource_akamai_appsec_eval_group_test.go | 2 +- .../appsec/resource_akamai_appsec_eval_penalty_box.go | 2 +- .../resource_akamai_appsec_eval_penalty_box_conditions.go | 2 +- ...urce_akamai_appsec_eval_penalty_box_conditions_test.go | 2 +- .../resource_akamai_appsec_eval_penalty_box_test.go | 2 +- pkg/providers/appsec/resource_akamai_appsec_eval_rule.go | 2 +- .../appsec/resource_akamai_appsec_eval_rule_test.go | 2 +- pkg/providers/appsec/resource_akamai_appsec_eval_test.go | 2 +- pkg/providers/appsec/resource_akamai_appsec_ip_geo.go | 2 +- .../appsec/resource_akamai_appsec_ip_geo_protection.go | 2 +- .../resource_akamai_appsec_ip_geo_protection_test.go | 2 +- .../appsec/resource_akamai_appsec_ip_geo_test.go | 2 +- .../appsec/resource_akamai_appsec_malware_policy.go | 2 +- .../resource_akamai_appsec_malware_policy_action.go | 2 +- .../resource_akamai_appsec_malware_policy_action_test.go | 2 +- .../resource_akamai_appsec_malware_policy_actions.go | 2 +- .../resource_akamai_appsec_malware_policy_actions_test.go | 2 +- .../appsec/resource_akamai_appsec_malware_policy_test.go | 2 +- .../appsec/resource_akamai_appsec_malware_protection.go | 2 +- .../resource_akamai_appsec_malware_protection_test.go | 2 +- .../appsec/resource_akamai_appsec_match_target.go | 2 +- .../resource_akamai_appsec_match_target_sequence.go | 2 +- .../resource_akamai_appsec_match_target_sequence_test.go | 2 +- .../appsec/resource_akamai_appsec_match_target_test.go | 2 +- .../appsec/resource_akamai_appsec_penalty_box.go | 2 +- .../resource_akamai_appsec_penalty_box_conditions.go | 2 +- .../resource_akamai_appsec_penalty_box_conditions_test.go | 2 +- .../appsec/resource_akamai_appsec_penalty_box_test.go | 2 +- .../appsec/resource_akamai_appsec_rate_policy.go | 2 +- .../appsec/resource_akamai_appsec_rate_policy_action.go | 2 +- .../resource_akamai_appsec_rate_policy_action_test.go | 2 +- .../appsec/resource_akamai_appsec_rate_policy_test.go | 2 +- .../appsec/resource_akamai_appsec_rate_protection.go | 2 +- .../appsec/resource_akamai_appsec_rate_protection_test.go | 2 +- .../appsec/resource_akamai_appsec_reputation_analysis.go | 2 +- .../resource_akamai_appsec_reputation_analysis_test.go | 2 +- .../appsec/resource_akamai_appsec_reputation_profile.go | 2 +- .../resource_akamai_appsec_reputation_profile_action.go | 2 +- ...source_akamai_appsec_reputation_profile_action_test.go | 2 +- .../resource_akamai_appsec_reputation_profile_test.go | 2 +- .../resource_akamai_appsec_reputation_protection.go | 2 +- .../resource_akamai_appsec_reputation_protection_test.go | 2 +- pkg/providers/appsec/resource_akamai_appsec_rule.go | 2 +- pkg/providers/appsec/resource_akamai_appsec_rule_test.go | 2 +- .../appsec/resource_akamai_appsec_rule_upgrade.go | 2 +- .../appsec/resource_akamai_appsec_rule_upgrade_test.go | 2 +- .../appsec/resource_akamai_appsec_security_policy.go | 2 +- ...e_akamai_appsec_security_policy_default_protections.go | 2 +- ...mai_appsec_security_policy_default_protections_test.go | 2 +- .../resource_akamai_appsec_security_policy_rename.go | 2 +- .../resource_akamai_appsec_security_policy_rename_test.go | 2 +- .../appsec/resource_akamai_appsec_security_policy_test.go | 2 +- .../appsec/resource_akamai_appsec_selected_hostname.go | 2 +- .../resource_akamai_appsec_selected_hostname_test.go | 2 +- .../appsec/resource_akamai_appsec_siem_settings.go | 2 +- .../appsec/resource_akamai_appsec_siem_settings_test.go | 2 +- ...resource_akamai_appsec_slow_post_protection_setting.go | 2 +- ...rce_akamai_appsec_slow_post_protection_setting_test.go | 2 +- .../appsec/resource_akamai_appsec_slowpost_protection.go | 2 +- .../resource_akamai_appsec_slowpost_protection_test.go | 2 +- .../appsec/resource_akamai_appsec_threat_intel.go | 2 +- .../appsec/resource_akamai_appsec_threat_intel_test.go | 2 +- .../appsec/resource_akamai_appsec_version_notes.go | 2 +- .../appsec/resource_akamai_appsec_version_notes_test.go | 2 +- pkg/providers/appsec/resource_akamai_appsec_waf_mode.go | 2 +- .../appsec/resource_akamai_appsec_waf_mode_test.go | 2 +- .../appsec/resource_akamai_appsec_waf_protection.go | 2 +- .../appsec/resource_akamai_appsec_waf_protection_test.go | 2 +- .../resource_akamai_appsec_wap_selected_hostnames.go | 2 +- .../resource_akamai_appsec_wap_selected_hostnames_test.go | 2 +- pkg/providers/appsec/templates.go | 2 +- pkg/providers/botman/cache.go | 2 +- .../botman/data_akamai_botman_akamai_bot_category.go | 2 +- .../data_akamai_botman_akamai_bot_category_action.go | 2 +- .../data_akamai_botman_akamai_bot_category_action_test.go | 2 +- .../botman/data_akamai_botman_akamai_bot_category_test.go | 2 +- .../botman/data_akamai_botman_akamai_defined_bot.go | 2 +- .../botman/data_akamai_botman_akamai_defined_bot_test.go | 2 +- .../botman/data_akamai_botman_bot_analytics_cookie.go | 2 +- .../data_akamai_botman_bot_analytics_cookie_test.go | 2 +- ...data_akamai_botman_bot_analytics_cookie_values_test.go | 2 +- .../botman/data_akamai_botman_bot_category_exception.go | 2 +- .../data_akamai_botman_bot_category_exception_test.go | 2 +- pkg/providers/botman/data_akamai_botman_bot_detection.go | 2 +- .../botman/data_akamai_botman_bot_detection_action.go | 2 +- .../data_akamai_botman_bot_detection_action_test.go | 2 +- .../botman/data_akamai_botman_bot_detection_test.go | 2 +- .../data_akamai_botman_bot_endpoint_coverage_report.go | 2 +- ...ata_akamai_botman_bot_endpoint_coverage_report_test.go | 2 +- .../botman/data_akamai_botman_bot_management_settings.go | 2 +- .../data_akamai_botman_bot_management_settings_test.go | 2 +- .../botman/data_akamai_botman_challenge_action.go | 2 +- .../botman/data_akamai_botman_challenge_action_test.go | 2 +- .../data_akamai_botman_challenge_injection_rules.go | 2 +- .../data_akamai_botman_challenge_injection_rules_test.go | 2 +- .../data_akamai_botman_challenge_interception_rules.go | 2 +- ...ata_akamai_botman_challenge_interception_rules_test.go | 2 +- .../botman/data_akamai_botman_client_side_security.go | 2 +- .../data_akamai_botman_client_side_security_test.go | 2 +- .../botman/data_akamai_botman_conditional_action.go | 2 +- .../botman/data_akamai_botman_conditional_action_test.go | 2 +- .../botman/data_akamai_botman_custom_bot_category.go | 2 +- .../data_akamai_botman_custom_bot_category_action.go | 2 +- .../data_akamai_botman_custom_bot_category_action_test.go | 2 +- .../data_akamai_botman_custom_bot_category_sequence.go | 2 +- ...ata_akamai_botman_custom_bot_category_sequence_test.go | 2 +- .../botman/data_akamai_botman_custom_bot_category_test.go | 2 +- pkg/providers/botman/data_akamai_botman_custom_client.go | 2 +- .../botman/data_akamai_botman_custom_client_sequence.go | 2 +- .../data_akamai_botman_custom_client_sequence_test.go | 2 +- .../botman/data_akamai_botman_custom_client_test.go | 2 +- pkg/providers/botman/data_akamai_botman_custom_code.go | 2 +- .../botman/data_akamai_botman_custom_code_test.go | 2 +- .../botman/data_akamai_botman_custom_defined_bot.go | 2 +- .../botman/data_akamai_botman_custom_defined_bot_test.go | 2 +- .../botman/data_akamai_botman_custom_deny_action.go | 2 +- .../botman/data_akamai_botman_custom_deny_action_test.go | 2 +- .../botman/data_akamai_botman_javascript_injection.go | 2 +- .../data_akamai_botman_javascript_injection_test.go | 2 +- ...data_akamai_botman_recategorized_akamai_defined_bot.go | 2 +- ...akamai_botman_recategorized_akamai_defined_bot_test.go | 2 +- .../botman/data_akamai_botman_response_action.go | 2 +- .../botman/data_akamai_botman_response_action_test.go | 2 +- .../botman/data_akamai_botman_serve_alternate_action.go | 2 +- .../data_akamai_botman_serve_alternate_action_test.go | 2 +- .../botman/data_akamai_botman_transactional_endpoint.go | 2 +- ...ata_akamai_botman_transactional_endpoint_protection.go | 2 +- ...kamai_botman_transactional_endpoint_protection_test.go | 2 +- .../data_akamai_botman_transactional_endpoint_test.go | 2 +- pkg/providers/botman/provider.go | 2 +- pkg/providers/botman/provider_test.go | 2 +- .../resource_akamai_botman_akamai_bot_category_action.go | 2 +- ...ource_akamai_botman_akamai_bot_category_action_test.go | 2 +- .../botman/resource_akamai_botman_bot_analytics_cookie.go | 2 +- .../resource_akamai_botman_bot_analytics_cookie_test.go | 2 +- .../resource_akamai_botman_bot_category_exception.go | 2 +- .../resource_akamai_botman_bot_category_exception_test.go | 2 +- .../botman/resource_akamai_botman_bot_detection_action.go | 2 +- .../resource_akamai_botman_bot_detection_action_test.go | 2 +- .../resource_akamai_botman_bot_management_settings.go | 2 +- ...resource_akamai_botman_bot_management_settings_test.go | 2 +- .../botman/resource_akamai_botman_challenge_action.go | 2 +- .../resource_akamai_botman_challenge_action_test.go | 2 +- .../resource_akamai_botman_challenge_injection_rules.go | 2 +- ...source_akamai_botman_challenge_injection_rules_test.go | 2 +- ...resource_akamai_botman_challenge_interception_rules.go | 2 +- ...rce_akamai_botman_challenge_interception_rules_test.go | 2 +- .../botman/resource_akamai_botman_client_side_security.go | 2 +- .../resource_akamai_botman_client_side_security_test.go | 2 +- .../botman/resource_akamai_botman_conditional_action.go | 2 +- .../resource_akamai_botman_conditional_action_test.go | 2 +- .../botman/resource_akamai_botman_custom_bot_category.go | 2 +- .../resource_akamai_botman_custom_bot_category_action.go | 2 +- ...ource_akamai_botman_custom_bot_category_action_test.go | 2 +- ...resource_akamai_botman_custom_bot_category_sequence.go | 2 +- ...rce_akamai_botman_custom_bot_category_sequence_test.go | 2 +- .../resource_akamai_botman_custom_bot_category_test.go | 2 +- .../botman/resource_akamai_botman_custom_client.go | 2 +- .../resource_akamai_botman_custom_client_sequence.go | 2 +- .../resource_akamai_botman_custom_client_sequence_test.go | 2 +- .../botman/resource_akamai_botman_custom_client_test.go | 2 +- .../botman/resource_akamai_botman_custom_code.go | 2 +- .../botman/resource_akamai_botman_custom_code_test.go | 2 +- .../botman/resource_akamai_botman_custom_defined_bot.go | 2 +- .../resource_akamai_botman_custom_defined_bot_test.go | 2 +- .../botman/resource_akamai_botman_custom_deny_action.go | 2 +- .../resource_akamai_botman_custom_deny_action_test.go | 2 +- .../botman/resource_akamai_botman_javascript_injection.go | 2 +- .../resource_akamai_botman_javascript_injection_test.go | 2 +- ...urce_akamai_botman_recategorized_akamai_defined_bot.go | 2 +- ...akamai_botman_recategorized_akamai_defined_bot_test.go | 2 +- .../resource_akamai_botman_serve_alternate_action.go | 2 +- .../resource_akamai_botman_serve_alternate_action_test.go | 2 +- .../resource_akamai_botman_transactional_endpoint.go | 2 +- ...rce_akamai_botman_transactional_endpoint_protection.go | 2 +- ...kamai_botman_transactional_endpoint_protection_test.go | 2 +- .../resource_akamai_botman_transactional_endpoint_test.go | 2 +- pkg/providers/clientlists/data_akamai_clientlist_lists.go | 2 +- .../clientlists/data_akamai_clientlist_lists_test.go | 2 +- pkg/providers/clientlists/provider.go | 2 +- pkg/providers/clientlists/provider_test.go | 2 +- .../clientlists/resource_akamai_clientlists_list.go | 2 +- .../resource_akamai_clientlists_list_activation.go | 2 +- .../resource_akamai_clientlists_list_activation_test.go | 2 +- .../clientlists/resource_akamai_clientlists_list_test.go | 2 +- ...data_akamai_cloudlets_api_prioritization_match_rule.go | 2 +- .../data_akamai_cloudlets_application_load_balancer.go | 2 +- ...amai_cloudlets_application_load_balancer_match_rule.go | 2 +- ...ata_akamai_cloudlets_application_load_balancer_test.go | 2 +- ...a_akamai_cloudlets_audience_segmentation_match_rule.go | 2 +- .../data_akamai_cloudlets_edge_redirector_match_rule.go | 2 +- .../data_akamai_cloudlets_forward_rewrite_match_rule.go | 2 +- .../data_akamai_cloudlets_phased_release_match_rule.go | 2 +- pkg/providers/cloudlets/data_akamai_cloudlets_policy.go | 2 +- .../cloudlets/data_akamai_cloudlets_policy_activation.go | 6 +++--- .../data_akamai_cloudlets_policy_activation_test.go | 4 ++-- .../cloudlets/data_akamai_cloudlets_policy_test.go | 2 +- .../data_akamai_cloudlets_request_control_match_rule.go | 2 +- .../cloudlets/data_akamai_cloudlets_shared_policy.go | 2 +- .../cloudlets/data_akamai_cloudlets_shared_policy_test.go | 2 +- ..._akamai_cloudlets_visitor_prioritization_match_rule.go | 2 +- pkg/providers/cloudlets/match_rules.go | 2 +- pkg/providers/cloudlets/match_rules_test.go | 2 +- pkg/providers/cloudlets/policy_version_test.go | 4 ++-- pkg/providers/cloudlets/policy_version_v2.go | 2 +- pkg/providers/cloudlets/policy_version_v3.go | 2 +- pkg/providers/cloudlets/provider.go | 4 ++-- pkg/providers/cloudlets/provider_test.go | 4 ++-- ...resource_akamai_cloudlets_application_load_balancer.go | 4 ++-- ...amai_cloudlets_application_load_balancer_activation.go | 4 ++-- ...cloudlets_application_load_balancer_activation_test.go | 2 +- ...rce_akamai_cloudlets_application_load_balancer_test.go | 2 +- .../cloudlets/resource_akamai_cloudlets_policy.go | 6 +++--- .../resource_akamai_cloudlets_policy_activation.go | 6 +++--- .../resource_akamai_cloudlets_policy_activation_test.go | 4 ++-- .../resource_akamai_cloudlets_policy_activation_v2.go | 2 +- .../resource_akamai_cloudlets_policy_activation_v3.go | 4 ++-- .../cloudlets/resource_akamai_cloudlets_policy_test.go | 4 ++-- .../cloudlets/resource_akamai_cloudlets_policy_v2.go | 2 +- .../cloudlets/resource_akamai_cloudlets_policy_v3.go | 2 +- .../cloudwrapper/data_akamai_cloudwrapper_capacities.go | 2 +- .../data_akamai_cloudwrapper_capacities_test.go | 2 +- .../data_akamai_cloudwrapper_configuration.go | 2 +- .../data_akamai_cloudwrapper_configuration_test.go | 2 +- .../data_akamai_cloudwrapper_configurations.go | 2 +- .../data_akamai_cloudwrapper_configurations_test.go | 2 +- .../cloudwrapper/data_akamai_cloudwrapper_location.go | 2 +- .../data_akamai_cloudwrapper_location_test.go | 2 +- .../cloudwrapper/data_akamai_cloudwrapper_locations.go | 2 +- .../data_akamai_cloudwrapper_locations_test.go | 2 +- .../cloudwrapper/data_akamai_cloudwrapper_properties.go | 2 +- .../data_akamai_cloudwrapper_properties_test.go | 2 +- pkg/providers/cloudwrapper/provider_test.go | 2 +- .../resource_akamai_cloudwrapper_activation.go | 2 +- .../resource_akamai_cloudwrapper_activation_test.go | 2 +- .../resource_akamai_cloudwrapper_configuration.go | 2 +- .../resource_akamai_cloudwrapper_configuration_model.go | 2 +- .../resource_akamai_cloudwrapper_configuration_test.go | 2 +- pkg/providers/cps/data_akamai_cps_csr.go | 4 ++-- pkg/providers/cps/data_akamai_cps_csr_test.go | 2 +- pkg/providers/cps/data_akamai_cps_deployments.go | 4 ++-- pkg/providers/cps/data_akamai_cps_deployments_test.go | 2 +- pkg/providers/cps/data_akamai_cps_enrollment.go | 4 ++-- pkg/providers/cps/data_akamai_cps_enrollment_test.go | 2 +- pkg/providers/cps/data_akamai_cps_enrollments.go | 4 ++-- pkg/providers/cps/data_akamai_cps_enrollments_test.go | 2 +- pkg/providers/cps/enrollments.go | 4 ++-- pkg/providers/cps/enrollments_mocks.go | 2 +- pkg/providers/cps/enrollments_test.go | 2 +- pkg/providers/cps/provider.go | 2 +- pkg/providers/cps/provider_test.go | 2 +- pkg/providers/cps/resource_akamai_cps_dv_enrollment.go | 4 ++-- .../cps/resource_akamai_cps_dv_enrollment_test.go | 2 +- pkg/providers/cps/resource_akamai_cps_dv_validation.go | 4 ++-- .../cps/resource_akamai_cps_dv_validation_test.go | 2 +- .../cps/resource_akamai_cps_third_party_enrollment.go | 4 ++-- .../resource_akamai_cps_third_party_enrollment_test.go | 2 +- .../cps/resource_akamai_cps_upload_certificate.go | 4 ++-- .../cps/resource_akamai_cps_upload_certificate_test.go | 2 +- pkg/providers/cps/tools/enrollment.go | 2 +- pkg/providers/cps/tools/enrollment_test.go | 2 +- pkg/providers/datastream/connectors.go | 2 +- pkg/providers/datastream/connectors_test.go | 2 +- .../data_akamai_datastream_activation_history.go | 2 +- .../data_akamai_datastream_activation_history_test.go | 2 +- .../datastream/data_akamai_datastream_dataset_fields.go | 4 ++-- .../data_akamai_datastream_dataset_fields_test.go | 2 +- pkg/providers/datastream/data_akamai_datastreams.go | 4 ++-- pkg/providers/datastream/data_akamai_datastreams_test.go | 2 +- pkg/providers/datastream/provider.go | 2 +- pkg/providers/datastream/provider_test.go | 2 +- pkg/providers/datastream/resource_akamai_datastream.go | 4 ++-- .../datastream/resource_akamai_datastream_test.go | 2 +- pkg/providers/datastream/stream.go | 2 +- pkg/providers/datastream/stream_test.go | 2 +- pkg/providers/dns/data_authorities_set.go | 2 +- pkg/providers/dns/data_authorities_set_test.go | 2 +- pkg/providers/dns/data_dns_record_set.go | 2 +- pkg/providers/dns/data_dns_record_set_test.go | 2 +- pkg/providers/dns/provider.go | 2 +- pkg/providers/dns/provider_test.go | 2 +- pkg/providers/dns/resource_akamai_dns_record.go | 4 ++-- pkg/providers/dns/resource_akamai_dns_record_test.go | 4 ++-- pkg/providers/dns/resource_akamai_dns_zone.go | 4 ++-- pkg/providers/dns/resource_akamai_dns_zone_test.go | 2 +- pkg/providers/edgeworkers/bundle_hash.go | 2 +- pkg/providers/edgeworkers/bundle_hash_test.go | 2 +- .../edgeworkers/data_akamai_edgekv_group_items.go | 4 ++-- .../edgeworkers/data_akamai_edgekv_group_items_test.go | 2 +- pkg/providers/edgeworkers/data_akamai_edgekv_groups.go | 4 ++-- .../edgeworkers/data_akamai_edgekv_groups_test.go | 2 +- pkg/providers/edgeworkers/data_akamai_edgeworker.go | 4 ++-- .../edgeworkers/data_akamai_edgeworker_activation.go | 4 ++-- .../edgeworkers/data_akamai_edgeworker_activation_test.go | 2 +- pkg/providers/edgeworkers/data_akamai_edgeworker_test.go | 2 +- .../edgeworkers/data_akamai_edgeworkers_resource_tier.go | 2 +- .../data_akamai_edgeworkers_resource_tier_test.go | 2 +- pkg/providers/edgeworkers/provider.go | 2 +- pkg/providers/edgeworkers/provider_test.go | 2 +- pkg/providers/edgeworkers/resource_akamai_edgekv.go | 4 ++-- .../edgeworkers/resource_akamai_edgekv_group_items.go | 4 ++-- .../resource_akamai_edgekv_group_items_test.go | 2 +- pkg/providers/edgeworkers/resource_akamai_edgekv_test.go | 2 +- pkg/providers/edgeworkers/resource_akamai_edgeworker.go | 4 ++-- .../edgeworkers/resource_akamai_edgeworker_test.go | 2 +- .../edgeworkers/resource_akamai_edgeworkers_activation.go | 4 ++-- .../resource_akamai_edgeworkers_activation_test.go | 2 +- pkg/providers/gtm/data_akamai_gtm_asmap.go | 2 +- pkg/providers/gtm/data_akamai_gtm_asmap_test.go | 2 +- pkg/providers/gtm/data_akamai_gtm_cidrmap.go | 2 +- pkg/providers/gtm/data_akamai_gtm_cidrmap_test.go | 2 +- pkg/providers/gtm/data_akamai_gtm_datacenter.go | 4 ++-- pkg/providers/gtm/data_akamai_gtm_datacenter_test.go | 2 +- pkg/providers/gtm/data_akamai_gtm_datacenters.go | 2 +- pkg/providers/gtm/data_akamai_gtm_datacenters_test.go | 2 +- pkg/providers/gtm/data_akamai_gtm_default_datacenter.go | 4 ++-- .../gtm/data_akamai_gtm_default_datacenter_test.go | 2 +- pkg/providers/gtm/data_akamai_gtm_domain.go | 2 +- pkg/providers/gtm/data_akamai_gtm_domain_test.go | 2 +- pkg/providers/gtm/data_akamai_gtm_domains.go | 2 +- pkg/providers/gtm/data_akamai_gtm_domains_test.go | 2 +- pkg/providers/gtm/data_akamai_gtm_resource.go | 2 +- pkg/providers/gtm/data_akamai_gtm_resource_test.go | 2 +- pkg/providers/gtm/data_akamai_gtm_resources_test.go | 2 +- pkg/providers/gtm/provider.go | 2 +- pkg/providers/gtm/provider_test.go | 2 +- pkg/providers/gtm/resource_akamai_gtm_asmap.go | 4 ++-- pkg/providers/gtm/resource_akamai_gtm_asmap_test.go | 2 +- pkg/providers/gtm/resource_akamai_gtm_cidrmap.go | 4 ++-- pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go | 2 +- pkg/providers/gtm/resource_akamai_gtm_datacenter.go | 4 ++-- pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go | 2 +- pkg/providers/gtm/resource_akamai_gtm_domain.go | 4 ++-- pkg/providers/gtm/resource_akamai_gtm_domain_test.go | 2 +- pkg/providers/gtm/resource_akamai_gtm_geomap.go | 4 ++-- pkg/providers/gtm/resource_akamai_gtm_geomap_test.go | 2 +- pkg/providers/gtm/resource_akamai_gtm_property.go | 4 ++-- pkg/providers/gtm/resource_akamai_gtm_property_test.go | 2 +- pkg/providers/gtm/resource_akamai_gtm_resource.go | 4 ++-- pkg/providers/gtm/resource_akamai_gtm_resource_test.go | 2 +- pkg/providers/iam/data_akamai_iam_contact_types.go | 2 +- pkg/providers/iam/data_akamai_iam_contact_types_test.go | 2 +- pkg/providers/iam/data_akamai_iam_countries.go | 2 +- pkg/providers/iam/data_akamai_iam_countries_test.go | 2 +- pkg/providers/iam/data_akamai_iam_grantable_roles.go | 4 ++-- pkg/providers/iam/data_akamai_iam_grantable_roles_test.go | 2 +- pkg/providers/iam/data_akamai_iam_groups.go | 4 ++-- pkg/providers/iam/data_akamai_iam_groups_test.go | 2 +- pkg/providers/iam/data_akamai_iam_roles.go | 4 ++-- pkg/providers/iam/data_akamai_iam_roles_test.go | 2 +- pkg/providers/iam/data_akamai_iam_states.go | 4 ++-- pkg/providers/iam/data_akamai_iam_states_test.go | 2 +- pkg/providers/iam/data_akamai_iam_supported_langs.go | 2 +- pkg/providers/iam/data_akamai_iam_supported_langs_test.go | 2 +- pkg/providers/iam/data_akamai_iam_timeout_policies.go | 2 +- .../iam/data_akamai_iam_timeout_policies_test.go | 2 +- pkg/providers/iam/data_akamai_iam_timezones.go | 4 ++-- pkg/providers/iam/data_akamai_iam_timezones_test.go | 2 +- pkg/providers/iam/provider.go | 2 +- pkg/providers/iam/provider_test.go | 2 +- .../iam/resource_akamai_iam_blocked_user_properties.go | 4 ++-- .../resource_akamai_iam_blocked_user_properties_test.go | 2 +- pkg/providers/iam/resource_akamai_iam_group.go | 4 ++-- pkg/providers/iam/resource_akamai_iam_group_test.go | 2 +- pkg/providers/iam/resource_akamai_iam_role.go | 4 ++-- pkg/providers/iam/resource_akamai_iam_role_test.go | 2 +- pkg/providers/iam/resource_akamai_iam_user.go | 4 ++-- pkg/providers/iam/resource_akamai_iam_user_test.go | 2 +- pkg/providers/imaging/data_akamai_imaging_policy_image.go | 2 +- pkg/providers/imaging/data_akamai_imaging_policy_video.go | 2 +- pkg/providers/imaging/imagewriter/convert-image.gen.go | 2 +- pkg/providers/imaging/provider.go | 2 +- pkg/providers/imaging/provider_test.go | 2 +- .../imaging/resource_akamai_imaging_policy_image.go | 4 ++-- .../imaging/resource_akamai_imaging_policy_image_test.go | 2 +- .../imaging/resource_akamai_imaging_policy_set.go | 4 ++-- .../imaging/resource_akamai_imaging_policy_set_test.go | 2 +- .../imaging/resource_akamai_imaging_policy_video.go | 4 ++-- .../imaging/resource_akamai_imaging_policy_video_test.go | 2 +- pkg/providers/imaging/videowriter/convert-video.gen.go | 2 +- .../networklists/data_akamai_network_network_lists.go | 2 +- .../data_akamai_networklist_network_lists_test.go | 2 +- pkg/providers/networklists/provider.go | 2 +- pkg/providers/networklists/provider_test.go | 2 +- .../resource_akamai_networklist_activations.go | 2 +- .../resource_akamai_networklist_activations_test.go | 2 +- .../resource_akamai_networklist_network_list.go | 2 +- ...esource_akamai_networklist_network_list_description.go | 2 +- ...ce_akamai_networklist_network_list_description_test.go | 2 +- ...source_akamai_networklist_network_list_subscription.go | 2 +- ...e_akamai_networklist_network_list_subscription_test.go | 2 +- .../resource_akamai_networklist_network_list_test.go | 2 +- pkg/providers/property/data_akamai_contracts.go | 4 ++-- pkg/providers/property/data_akamai_contracts_test.go | 2 +- pkg/providers/property/data_akamai_cp_code.go | 2 +- pkg/providers/property/data_akamai_cp_code_test.go | 2 +- pkg/providers/property/data_akamai_properties.go | 4 ++-- pkg/providers/property/data_akamai_properties_search.go | 2 +- .../property/data_akamai_properties_search_test.go | 2 +- pkg/providers/property/data_akamai_properties_test.go | 2 +- pkg/providers/property/data_akamai_property.go | 2 +- pkg/providers/property/data_akamai_property_activation.go | 4 ++-- .../property/data_akamai_property_activation_test.go | 2 +- pkg/providers/property/data_akamai_property_hostnames.go | 4 ++-- .../property/data_akamai_property_hostnames_test.go | 2 +- pkg/providers/property/data_akamai_property_include.go | 2 +- .../property/data_akamai_property_include_activation.go | 2 +- .../data_akamai_property_include_activation_test.go | 2 +- .../property/data_akamai_property_include_parents.go | 2 +- .../property/data_akamai_property_include_parents_test.go | 2 +- .../property/data_akamai_property_include_rules.go | 4 ++-- .../property/data_akamai_property_include_rules_test.go | 2 +- .../property/data_akamai_property_include_test.go | 2 +- pkg/providers/property/data_akamai_property_includes.go | 2 +- .../property/data_akamai_property_includes_test.go | 2 +- pkg/providers/property/data_akamai_property_products.go | 4 ++-- .../property/data_akamai_property_products_test.go | 2 +- .../property/data_akamai_property_rule_formats_test.go | 2 +- pkg/providers/property/data_akamai_property_rules.go | 2 +- .../property/data_akamai_property_rules_builder.go | 2 +- .../property/data_akamai_property_rules_template_test.go | 2 +- pkg/providers/property/data_akamai_property_rules_test.go | 2 +- pkg/providers/property/data_akamai_property_test.go | 2 +- pkg/providers/property/data_property_akamai_contract.go | 4 ++-- .../property/data_property_akamai_contract_test.go | 2 +- pkg/providers/property/data_property_akamai_group.go | 4 ++-- pkg/providers/property/data_property_akamai_group_test.go | 2 +- pkg/providers/property/data_property_akamai_groups.go | 2 +- .../property/data_property_akamai_groups_test.go | 2 +- pkg/providers/property/diff_suppress_funcs.go | 2 +- pkg/providers/property/diff_suppress_funcs_test.go | 2 +- pkg/providers/property/helpers.go | 2 +- pkg/providers/property/helpers_test.go | 2 +- pkg/providers/property/log_fields.go | 2 +- pkg/providers/property/provider.go | 4 ++-- pkg/providers/property/provider_test.go | 4 ++-- pkg/providers/property/resource_akamai_cp_code.go | 2 +- pkg/providers/property/resource_akamai_cp_code_test.go | 2 +- pkg/providers/property/resource_akamai_edge_hostname.go | 4 ++-- .../property/resource_akamai_edge_hostname_test.go | 4 ++-- pkg/providers/property/resource_akamai_property.go | 4 ++-- .../property/resource_akamai_property_activation.go | 4 ++-- .../resource_akamai_property_activation_schema_v0.go | 2 +- .../property/resource_akamai_property_activation_test.go | 2 +- .../resource_akamai_property_activation_unit_test.go | 2 +- .../property/resource_akamai_property_bootstrap.go | 2 +- .../property/resource_akamai_property_bootstrap_test.go | 2 +- pkg/providers/property/resource_akamai_property_common.go | 2 +- .../property/resource_akamai_property_helpers_test.go | 2 +- .../property/resource_akamai_property_include.go | 4 ++-- .../resource_akamai_property_include_activation.go | 4 ++-- .../resource_akamai_property_include_activation_test.go | 2 +- .../property/resource_akamai_property_include_test.go | 4 ++-- pkg/providers/property/resource_akamai_property_test.go | 2 +- pkg/providers/property/ruleformats/builder.go | 2 +- pkg/providers/property/ruleformats/rules_schema_reader.go | 2 +- 613 files changed, 694 insertions(+), 694 deletions(-) diff --git a/build/internal/docker_jenkins.bash b/build/internal/docker_jenkins.bash index 02d3f579f..d1a10acda 100755 --- a/build/internal/docker_jenkins.bash +++ b/build/internal/docker_jenkins.bash @@ -91,7 +91,7 @@ docker exec akatf-container sh -c 'git clone ssh://git@git.source.akamai.com:799 echo "Checkout branches" docker exec akatf-container sh -c 'cd edgegrid; git checkout ${EDGEGRID_BRANCH_NAME}; cd ../terraform-provider-akamai; git checkout ${PROVIDER_BRANCH_NAME}; - go mod edit -replace github.com/akamai/AkamaiOPEN-edgegrid-golang/v7=../edgegrid' + go mod edit -replace github.com/akamai/AkamaiOPEN-edgegrid-golang/v8=../edgegrid' echo "Installing terraform" docker exec akatf-container sh -c 'cd terraform-provider-akamai; make tools.terraform' diff --git a/build/internal/package/nexus-release.bash b/build/internal/package/nexus-release.bash index b8e92ae13..060fb4989 100755 --- a/build/internal/package/nexus-release.bash +++ b/build/internal/package/nexus-release.bash @@ -84,7 +84,7 @@ checkout_edgegrid() { } adjust_edgegrid() { - go mod edit -replace github.com/akamai/AkamaiOPEN-edgegrid-golang/v7="./akamaiopen-edgegrid-golang" + go mod edit -replace github.com/akamai/AkamaiOPEN-edgegrid-golang/v8="./akamaiopen-edgegrid-golang" go mod tidy -compat=1.21 } diff --git a/build/internal/releaser/goreleaser_build.bash b/build/internal/releaser/goreleaser_build.bash index 5227567f9..6c3b271c8 100755 --- a/build/internal/releaser/goreleaser_build.bash +++ b/build/internal/releaser/goreleaser_build.bash @@ -1,4 +1,4 @@ cd /workspace/terraform-provider-akamai -go mod edit -replace github.com/akamai/AkamaiOPEN-edgegrid-golang/v7=../akamaiopen-edgegrid-golang/ +go mod edit -replace github.com/akamai/AkamaiOPEN-edgegrid-golang/v8=../akamaiopen-edgegrid-golang/ git tag v10.0.0 goreleaser build --single-target --skip-validate --config ./.goreleaser.yml --output /root/.terraform.d/plugins/registry.terraform.io/akamai/akamai/10.0.0/linux_amd64/terraform-provider-akamai_v10.0.0 diff --git a/go.mod b/go.mod index 0c4a3a447..39ce955cc 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/akamai/terraform-provider-akamai/v5 go 1.21 require ( - github.com/akamai/AkamaiOPEN-edgegrid-golang/v7 v7.6.1 + github.com/akamai/AkamaiOPEN-edgegrid-golang/v8 v8.0.0 github.com/allegro/bigcache/v2 v2.2.5 github.com/apex/log v1.9.0 github.com/dlclark/regexp2 v1.10.0 @@ -89,4 +89,4 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect ) -// replace github.com/akamai/AkamaiOPEN-edgegrid-golang/v7 => ../AkamaiOPEN-edgegrid-golang +// replace github.com/akamai/AkamaiOPEN-edgegrid-golang/v8 => ../AkamaiOPEN-edgegrid-golang diff --git a/go.sum b/go.sum index f51d22eda..059f6ea47 100644 --- a/go.sum +++ b/go.sum @@ -6,8 +6,8 @@ github.com/ProtonMail/go-crypto v1.1.0-alpha.0 h1:nHGfwXmFvJrSR9xu8qL7BkO4DqTHXE github.com/ProtonMail/go-crypto v1.1.0-alpha.0/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= -github.com/akamai/AkamaiOPEN-edgegrid-golang/v7 v7.6.1 h1:KrYkNvCKBGPs/upjgJCojZnnmt5XdEPWS4L2zRQm7+o= -github.com/akamai/AkamaiOPEN-edgegrid-golang/v7 v7.6.1/go.mod h1:gajRk0oNRQj4bHUc2SGAvAp/gPestSpuvK4QXU1QtPA= +github.com/akamai/AkamaiOPEN-edgegrid-golang/v8 v8.0.0 h1:6/5z5SK2NvSsgu19vHfh2lurMPaE9fwvSB/VIBizFRo= +github.com/akamai/AkamaiOPEN-edgegrid-golang/v8 v8.0.0/go.mod h1:ytNNwwgBIEeWJJCWy57vbkkEaYiCxWrYU68B/F0Gi5g= github.com/allegro/bigcache/v2 v2.2.5 h1:mRc8r6GQjuJsmSKQNPsR5jQVXc8IJ1xsW5YXUYMLfqI= github.com/allegro/bigcache/v2 v2.2.5/go.mod h1:FppZsIO+IZk7gCuj5FiIDHGygD9xvWQcqg1uIPMb6tY= github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 h1:MzBOUgng9orim59UnfUTLRjMpd09C5uEVQ6RPGeCaVI= @@ -271,8 +271,8 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= -golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= diff --git a/pkg/akamai/configure_context.go b/pkg/akamai/configure_context.go index 2b56f5896..f81565522 100644 --- a/pkg/akamai/configure_context.go +++ b/pkg/akamai/configure_context.go @@ -9,8 +9,8 @@ import ( "strings" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgegrid" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgegrid" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/cache" "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/akamai/edgegrid.go b/pkg/akamai/edgegrid.go index a7c5c69eb..303897e74 100644 --- a/pkg/akamai/edgegrid.go +++ b/pkg/akamai/edgegrid.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgegrid" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgegrid" ) // ErrWrongEdgeGridConfiguration is returned when the configuration could not be read diff --git a/pkg/akamai/edgegrid_test.go b/pkg/akamai/edgegrid_test.go index 4837e6a9a..466ca47e6 100644 --- a/pkg/akamai/edgegrid_test.go +++ b/pkg/akamai/edgegrid_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgegrid" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgegrid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/akamai/sdk_provider_test.go b/pkg/akamai/sdk_provider_test.go index e8670d820..644f1f882 100644 --- a/pkg/akamai/sdk_provider_test.go +++ b/pkg/akamai/sdk_provider_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgegrid" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgegrid" "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/cache" diff --git a/pkg/meta/meta.go b/pkg/meta/meta.go index 1c3b772b4..5a04d5d18 100644 --- a/pkg/meta/meta.go +++ b/pkg/meta/meta.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" "github.com/apex/log" "github.com/hashicorp/go-hclog" diff --git a/pkg/meta/meta_test.go b/pkg/meta/meta_test.go index b1ad87bd5..af559b879 100644 --- a/pkg/meta/meta_test.go +++ b/pkg/meta/meta_test.go @@ -3,7 +3,7 @@ package meta import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/hashicorp/go-hclog" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/config_versions.go b/pkg/providers/appsec/config_versions.go index 5c8ad123d..de6d08eab 100644 --- a/pkg/providers/appsec/config_versions.go +++ b/pkg/providers/appsec/config_versions.go @@ -6,7 +6,7 @@ import ( "fmt" "sync" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/cache" akameta "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_attack_payload_logging.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_attack_payload_logging.go index e6803d6e5..23075b4d9 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_attack_payload_logging.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_attack_payload_logging.go @@ -6,7 +6,7 @@ import ( "errors" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_attack_payload_logging_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_attack_payload_logging_test.go index d8028b7bc..57f055884 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_attack_payload_logging_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_attack_payload_logging_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_evasive_path_match.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_evasive_path_match.go index f1cf8c0cb..6082ec50d 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_evasive_path_match.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_evasive_path_match.go @@ -6,7 +6,7 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_evasive_path_match_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_evasive_path_match_test.go index 2a432cb99..d8ecdf7ce 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_evasive_path_match_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_evasive_path_match_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_logging.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_logging.go index 7d7aca200..27eae2662 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_logging.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_logging.go @@ -6,7 +6,7 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_logging_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_logging_test.go index 049727e34..30fbbf9fc 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_logging_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_logging_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pii_learning.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pii_learning.go index f1d2b0826..3625052a8 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pii_learning.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pii_learning.go @@ -5,7 +5,7 @@ import ( "encoding/json" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pii_learning_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pii_learning_test.go index 539b670be..3d9eb745b 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pii_learning_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pii_learning_test.go @@ -7,7 +7,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pragma_header.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pragma_header.go index 776389b32..4ed4053f8 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pragma_header.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pragma_header.go @@ -6,7 +6,7 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pragma_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pragma_test.go index e481aeb55..b747a3696 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pragma_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pragma_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_prefetch.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_prefetch.go index f68f16321..f33c10325 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_prefetch.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_prefetch.go @@ -5,7 +5,7 @@ import ( "encoding/json" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_prefetch_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_prefetch_test.go index b6bd81319..4f27a505d 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_prefetch_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_prefetch_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_request_body.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_request_body.go index 7e872c488..40153c233 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_request_body.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_request_body.go @@ -6,7 +6,7 @@ import ( "errors" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_request_body_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_request_body_test.go index 90b86ce18..561586b8d 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_request_body_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_request_body_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_api_endpoints.go b/pkg/providers/appsec/data_akamai_appsec_api_endpoints.go index 9b7c9582d..5fb56f401 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_endpoints.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_endpoints.go @@ -6,7 +6,7 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_api_endpoints_test.go b/pkg/providers/appsec/data_akamai_appsec_api_endpoints_test.go index 4ee405698..811b7a5e3 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_endpoints_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_endpoints_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage.go b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage.go index 2517777de..9b1963431 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage.go @@ -5,7 +5,7 @@ import ( "encoding/json" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_match_targets.go b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_match_targets.go index 62ead25a2..5ce9dd18d 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_match_targets.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_match_targets.go @@ -5,7 +5,7 @@ import ( "encoding/json" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_match_targets_test.go b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_match_targets_test.go index a7f2002fc..46aced7be 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_match_targets_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_match_targets_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_overlapping.go b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_overlapping.go index 95ede519a..c246cc3a1 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_overlapping.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_overlapping.go @@ -5,7 +5,7 @@ import ( "encoding/json" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_overlapping_test.go b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_overlapping_test.go index 3f2fbea53..929350d67 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_overlapping_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_overlapping_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_test.go b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_test.go index 28d0deca9..75753d00c 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_api_request_constraints.go b/pkg/providers/appsec/data_akamai_appsec_api_request_constraints.go index d9b29c655..94d11061b 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_request_constraints.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_request_constraints.go @@ -6,7 +6,7 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_api_request_constraints_test.go b/pkg/providers/appsec/data_akamai_appsec_api_request_constraints_test.go index aa418e343..d8d56c2d7 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_request_constraints_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_request_constraints_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_attack_groups.go b/pkg/providers/appsec/data_akamai_appsec_attack_groups.go index 3aa9dc6b7..7ec156aef 100644 --- a/pkg/providers/appsec/data_akamai_appsec_attack_groups.go +++ b/pkg/providers/appsec/data_akamai_appsec_attack_groups.go @@ -6,7 +6,7 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_attack_groups_test.go b/pkg/providers/appsec/data_akamai_appsec_attack_groups_test.go index c728e71d5..81e8242fe 100644 --- a/pkg/providers/appsec/data_akamai_appsec_attack_groups_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_attack_groups_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_bypass_network_lists.go b/pkg/providers/appsec/data_akamai_appsec_bypass_network_lists.go index fd0c56e80..cdd0cb30b 100644 --- a/pkg/providers/appsec/data_akamai_appsec_bypass_network_lists.go +++ b/pkg/providers/appsec/data_akamai_appsec_bypass_network_lists.go @@ -5,7 +5,7 @@ import ( "encoding/json" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_bypass_network_lists_test.go b/pkg/providers/appsec/data_akamai_appsec_bypass_network_lists_test.go index 4e45b1dd0..b727855c0 100644 --- a/pkg/providers/appsec/data_akamai_appsec_bypass_network_lists_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_bypass_network_lists_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_configuration.go b/pkg/providers/appsec/data_akamai_appsec_configuration.go index e9c2a2ad4..92c3d49fc 100644 --- a/pkg/providers/appsec/data_akamai_appsec_configuration.go +++ b/pkg/providers/appsec/data_akamai_appsec_configuration.go @@ -5,7 +5,7 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_configuration_test.go b/pkg/providers/appsec/data_akamai_appsec_configuration_test.go index 9e21c8a8a..71653c1f0 100644 --- a/pkg/providers/appsec/data_akamai_appsec_configuration_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_configuration_test.go @@ -6,7 +6,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_configuration_version.go b/pkg/providers/appsec/data_akamai_appsec_configuration_version.go index 3338ec849..1cf53ff87 100644 --- a/pkg/providers/appsec/data_akamai_appsec_configuration_version.go +++ b/pkg/providers/appsec/data_akamai_appsec_configuration_version.go @@ -5,7 +5,7 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_configuration_version_test.go b/pkg/providers/appsec/data_akamai_appsec_configuration_version_test.go index af4977dea..a3a8acc90 100644 --- a/pkg/providers/appsec/data_akamai_appsec_configuration_version_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_configuration_version_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_contracts_groups.go b/pkg/providers/appsec/data_akamai_appsec_contracts_groups.go index 5aa83e8ee..45669b255 100644 --- a/pkg/providers/appsec/data_akamai_appsec_contracts_groups.go +++ b/pkg/providers/appsec/data_akamai_appsec_contracts_groups.go @@ -5,7 +5,7 @@ import ( "encoding/json" "errors" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_contracts_groups_test.go b/pkg/providers/appsec/data_akamai_appsec_contracts_groups_test.go index 30c3dcf1f..874ca3925 100644 --- a/pkg/providers/appsec/data_akamai_appsec_contracts_groups_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_contracts_groups_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_custom_deny.go b/pkg/providers/appsec/data_akamai_appsec_custom_deny.go index ed02dcf03..836c2d6bb 100644 --- a/pkg/providers/appsec/data_akamai_appsec_custom_deny.go +++ b/pkg/providers/appsec/data_akamai_appsec_custom_deny.go @@ -5,7 +5,7 @@ import ( "encoding/json" "errors" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_custom_deny_test.go b/pkg/providers/appsec/data_akamai_appsec_custom_deny_test.go index 6dc17cdc7..371d0745f 100644 --- a/pkg/providers/appsec/data_akamai_appsec_custom_deny_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_custom_deny_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_custom_rule_actions.go b/pkg/providers/appsec/data_akamai_appsec_custom_rule_actions.go index 5e17c7016..c7971363c 100644 --- a/pkg/providers/appsec/data_akamai_appsec_custom_rule_actions.go +++ b/pkg/providers/appsec/data_akamai_appsec_custom_rule_actions.go @@ -5,7 +5,7 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_custom_rule_actions_test.go b/pkg/providers/appsec/data_akamai_appsec_custom_rule_actions_test.go index 303c520de..55ac2e225 100644 --- a/pkg/providers/appsec/data_akamai_appsec_custom_rule_actions_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_custom_rule_actions_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_custom_rules.go b/pkg/providers/appsec/data_akamai_appsec_custom_rules.go index 8a49d8bcd..4ce550bfc 100644 --- a/pkg/providers/appsec/data_akamai_appsec_custom_rules.go +++ b/pkg/providers/appsec/data_akamai_appsec_custom_rules.go @@ -6,7 +6,7 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_custom_rules_test.go b/pkg/providers/appsec/data_akamai_appsec_custom_rules_test.go index e7c2a156c..65b839566 100644 --- a/pkg/providers/appsec/data_akamai_appsec_custom_rules_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_custom_rules_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_eval.go b/pkg/providers/appsec/data_akamai_appsec_eval.go index 533f692d2..d9446ea29 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval.go @@ -4,7 +4,7 @@ import ( "context" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_groups.go b/pkg/providers/appsec/data_akamai_appsec_eval_groups.go index e9bb2c90b..b8e433f89 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval_groups.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval_groups.go @@ -5,7 +5,7 @@ import ( "encoding/json" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_groups_test.go b/pkg/providers/appsec/data_akamai_appsec_eval_groups_test.go index 03112636f..15449d0f1 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval_groups_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval_groups_test.go @@ -6,7 +6,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box.go b/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box.go index f8119d99d..19f5d00b3 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box.go @@ -4,7 +4,7 @@ import ( "context" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions.go b/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions.go index 73d71bf80..3da8b93cf 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions_test.go b/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions_test.go index 7f85950d2..0168887f1 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions_test.go @@ -5,7 +5,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_test.go b/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_test.go index 0b7769f17..11db5f086 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_rules.go b/pkg/providers/appsec/data_akamai_appsec_eval_rules.go index 154f28648..f27adcf81 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval_rules.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval_rules.go @@ -6,7 +6,7 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_rules_test.go b/pkg/providers/appsec/data_akamai_appsec_eval_rules_test.go index 8ef42655d..7aceb7a8c 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval_rules_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval_rules_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_test.go b/pkg/providers/appsec/data_akamai_appsec_eval_test.go index c65646d37..7bd096ed9 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_export_configuration.go b/pkg/providers/appsec/data_akamai_appsec_export_configuration.go index d15332ebf..849f4d021 100644 --- a/pkg/providers/appsec/data_akamai_appsec_export_configuration.go +++ b/pkg/providers/appsec/data_akamai_appsec_export_configuration.go @@ -5,7 +5,7 @@ import ( "encoding/json" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_export_configuration_test.go b/pkg/providers/appsec/data_akamai_appsec_export_configuration_test.go index bd6e05101..3cb782723 100644 --- a/pkg/providers/appsec/data_akamai_appsec_export_configuration_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_export_configuration_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_failover_hostnames.go b/pkg/providers/appsec/data_akamai_appsec_failover_hostnames.go index ecbbc615c..29729e047 100644 --- a/pkg/providers/appsec/data_akamai_appsec_failover_hostnames.go +++ b/pkg/providers/appsec/data_akamai_appsec_failover_hostnames.go @@ -5,7 +5,7 @@ import ( "encoding/json" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_failover_hostnames_test.go b/pkg/providers/appsec/data_akamai_appsec_failover_hostnames_test.go index f79f33a88..ef6f371de 100644 --- a/pkg/providers/appsec/data_akamai_appsec_failover_hostnames_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_failover_hostnames_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_ip_geo.go b/pkg/providers/appsec/data_akamai_appsec_ip_geo.go index fb0f584b8..19d0e7e9d 100644 --- a/pkg/providers/appsec/data_akamai_appsec_ip_geo.go +++ b/pkg/providers/appsec/data_akamai_appsec_ip_geo.go @@ -4,7 +4,7 @@ import ( "context" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_ip_geo_test.go b/pkg/providers/appsec/data_akamai_appsec_ip_geo_test.go index 1a0c0f574..39e2e922b 100644 --- a/pkg/providers/appsec/data_akamai_appsec_ip_geo_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_ip_geo_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_malware_content_types.go b/pkg/providers/appsec/data_akamai_appsec_malware_content_types.go index bd3d6c1d7..ef4228c0f 100644 --- a/pkg/providers/appsec/data_akamai_appsec_malware_content_types.go +++ b/pkg/providers/appsec/data_akamai_appsec_malware_content_types.go @@ -5,7 +5,7 @@ import ( "encoding/json" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_malware_content_types_test.go b/pkg/providers/appsec/data_akamai_appsec_malware_content_types_test.go index f0bdcfcec..9f32d9c53 100644 --- a/pkg/providers/appsec/data_akamai_appsec_malware_content_types_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_malware_content_types_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_malware_policies.go b/pkg/providers/appsec/data_akamai_appsec_malware_policies.go index 679c20a6b..a9f872972 100644 --- a/pkg/providers/appsec/data_akamai_appsec_malware_policies.go +++ b/pkg/providers/appsec/data_akamai_appsec_malware_policies.go @@ -7,7 +7,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_malware_policies_test.go b/pkg/providers/appsec/data_akamai_appsec_malware_policies_test.go index 9fde06b50..3b7ff22f2 100644 --- a/pkg/providers/appsec/data_akamai_appsec_malware_policies_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_malware_policies_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_malware_policy_actions.go b/pkg/providers/appsec/data_akamai_appsec_malware_policy_actions.go index b8b8b2262..db9a8bc54 100644 --- a/pkg/providers/appsec/data_akamai_appsec_malware_policy_actions.go +++ b/pkg/providers/appsec/data_akamai_appsec_malware_policy_actions.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_malware_policy_actions_test.go b/pkg/providers/appsec/data_akamai_appsec_malware_policy_actions_test.go index ad6a30a81..ccaf66e8e 100644 --- a/pkg/providers/appsec/data_akamai_appsec_malware_policy_actions_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_malware_policy_actions_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_match_targets.go b/pkg/providers/appsec/data_akamai_appsec_match_targets.go index ebab3a24d..435ecca66 100644 --- a/pkg/providers/appsec/data_akamai_appsec_match_targets.go +++ b/pkg/providers/appsec/data_akamai_appsec_match_targets.go @@ -6,7 +6,7 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_match_targets_test.go b/pkg/providers/appsec/data_akamai_appsec_match_targets_test.go index f221098da..e23aa920c 100644 --- a/pkg/providers/appsec/data_akamai_appsec_match_targets_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_match_targets_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_penalty_box.go b/pkg/providers/appsec/data_akamai_appsec_penalty_box.go index 5935d3011..acc0a0123 100644 --- a/pkg/providers/appsec/data_akamai_appsec_penalty_box.go +++ b/pkg/providers/appsec/data_akamai_appsec_penalty_box.go @@ -4,7 +4,7 @@ import ( "context" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions.go b/pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions.go index 455a4ce90..baf189b1a 100644 --- a/pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions.go +++ b/pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions_test.go b/pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions_test.go index 2bc1beeb3..c3ceb9baa 100644 --- a/pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions_test.go @@ -5,7 +5,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_penalty_box_test.go b/pkg/providers/appsec/data_akamai_appsec_penalty_box_test.go index d83570713..491301bd1 100644 --- a/pkg/providers/appsec/data_akamai_appsec_penalty_box_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_penalty_box_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_rate_policies.go b/pkg/providers/appsec/data_akamai_appsec_rate_policies.go index 5581b2ddf..c355d5f07 100644 --- a/pkg/providers/appsec/data_akamai_appsec_rate_policies.go +++ b/pkg/providers/appsec/data_akamai_appsec_rate_policies.go @@ -6,7 +6,7 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_rate_policies_test.go b/pkg/providers/appsec/data_akamai_appsec_rate_policies_test.go index 55ae7f5be..bb49fbdf9 100644 --- a/pkg/providers/appsec/data_akamai_appsec_rate_policies_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_rate_policies_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_rate_policy_actions.go b/pkg/providers/appsec/data_akamai_appsec_rate_policy_actions.go index 530da8866..fca4045d7 100644 --- a/pkg/providers/appsec/data_akamai_appsec_rate_policy_actions.go +++ b/pkg/providers/appsec/data_akamai_appsec_rate_policy_actions.go @@ -5,7 +5,7 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_rate_policy_actions_test.go b/pkg/providers/appsec/data_akamai_appsec_rate_policy_actions_test.go index 040e86eae..d5ff54c10 100644 --- a/pkg/providers/appsec/data_akamai_appsec_rate_policy_actions_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_rate_policy_actions_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_reputation_analysis.go b/pkg/providers/appsec/data_akamai_appsec_reputation_analysis.go index b4d9cee9c..f60c8e39c 100644 --- a/pkg/providers/appsec/data_akamai_appsec_reputation_analysis.go +++ b/pkg/providers/appsec/data_akamai_appsec_reputation_analysis.go @@ -5,7 +5,7 @@ import ( "encoding/json" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_reputation_analysis_test.go b/pkg/providers/appsec/data_akamai_appsec_reputation_analysis_test.go index 766916b68..0771f7c2b 100644 --- a/pkg/providers/appsec/data_akamai_appsec_reputation_analysis_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_reputation_analysis_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_reputation_profile_actions.go b/pkg/providers/appsec/data_akamai_appsec_reputation_profile_actions.go index 787837fda..d2e3f691d 100644 --- a/pkg/providers/appsec/data_akamai_appsec_reputation_profile_actions.go +++ b/pkg/providers/appsec/data_akamai_appsec_reputation_profile_actions.go @@ -6,7 +6,7 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_reputation_profile_actions_test.go b/pkg/providers/appsec/data_akamai_appsec_reputation_profile_actions_test.go index 144ee56dd..c645e0853 100644 --- a/pkg/providers/appsec/data_akamai_appsec_reputation_profile_actions_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_reputation_profile_actions_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_reputation_profiles.go b/pkg/providers/appsec/data_akamai_appsec_reputation_profiles.go index 530b7f528..89a09fd96 100644 --- a/pkg/providers/appsec/data_akamai_appsec_reputation_profiles.go +++ b/pkg/providers/appsec/data_akamai_appsec_reputation_profiles.go @@ -6,7 +6,7 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_reputation_profiles_test.go b/pkg/providers/appsec/data_akamai_appsec_reputation_profiles_test.go index 8a38b934e..d8b776a0d 100644 --- a/pkg/providers/appsec/data_akamai_appsec_reputation_profiles_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_reputation_profiles_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_rule_upgrade.go b/pkg/providers/appsec/data_akamai_appsec_rule_upgrade.go index 1bfc52df5..2242b8595 100644 --- a/pkg/providers/appsec/data_akamai_appsec_rule_upgrade.go +++ b/pkg/providers/appsec/data_akamai_appsec_rule_upgrade.go @@ -5,7 +5,7 @@ import ( "encoding/json" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_rule_upgrade_test.go b/pkg/providers/appsec/data_akamai_appsec_rule_upgrade_test.go index 7443fe11f..7defd3360 100644 --- a/pkg/providers/appsec/data_akamai_appsec_rule_upgrade_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_rule_upgrade_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_rules.go b/pkg/providers/appsec/data_akamai_appsec_rules.go index ac4182d87..8ec27b37f 100644 --- a/pkg/providers/appsec/data_akamai_appsec_rules.go +++ b/pkg/providers/appsec/data_akamai_appsec_rules.go @@ -6,7 +6,7 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_rules_test.go b/pkg/providers/appsec/data_akamai_appsec_rules_test.go index 731f0be07..6d25c00d8 100644 --- a/pkg/providers/appsec/data_akamai_appsec_rules_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_rules_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_security_policy.go b/pkg/providers/appsec/data_akamai_appsec_security_policy.go index 0106d9a1c..50df965eb 100644 --- a/pkg/providers/appsec/data_akamai_appsec_security_policy.go +++ b/pkg/providers/appsec/data_akamai_appsec_security_policy.go @@ -6,7 +6,7 @@ import ( "errors" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_security_policy_protections.go b/pkg/providers/appsec/data_akamai_appsec_security_policy_protections.go index 7c7c578e3..9917d07b0 100644 --- a/pkg/providers/appsec/data_akamai_appsec_security_policy_protections.go +++ b/pkg/providers/appsec/data_akamai_appsec_security_policy_protections.go @@ -5,7 +5,7 @@ import ( "encoding/json" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_security_policy_protections_test.go b/pkg/providers/appsec/data_akamai_appsec_security_policy_protections_test.go index 65550f506..5ec05060c 100644 --- a/pkg/providers/appsec/data_akamai_appsec_security_policy_protections_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_security_policy_protections_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_security_policy_test.go b/pkg/providers/appsec/data_akamai_appsec_security_policy_test.go index 4272c2b0c..472e5aaa7 100644 --- a/pkg/providers/appsec/data_akamai_appsec_security_policy_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_security_policy_test.go @@ -5,7 +5,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_selectable_hostnames.go b/pkg/providers/appsec/data_akamai_appsec_selectable_hostnames.go index 053e3c41c..1ad88b47c 100644 --- a/pkg/providers/appsec/data_akamai_appsec_selectable_hostnames.go +++ b/pkg/providers/appsec/data_akamai_appsec_selectable_hostnames.go @@ -6,7 +6,7 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_selectable_hostnames_test.go b/pkg/providers/appsec/data_akamai_appsec_selectable_hostnames_test.go index a66942d3a..3a5ec1d32 100644 --- a/pkg/providers/appsec/data_akamai_appsec_selectable_hostnames_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_selectable_hostnames_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_selected_hostnames.go b/pkg/providers/appsec/data_akamai_appsec_selected_hostnames.go index 32c590e85..2ea73d005 100644 --- a/pkg/providers/appsec/data_akamai_appsec_selected_hostnames.go +++ b/pkg/providers/appsec/data_akamai_appsec_selected_hostnames.go @@ -5,7 +5,7 @@ import ( "encoding/json" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_selected_hostnames_test.go b/pkg/providers/appsec/data_akamai_appsec_selected_hostnames_test.go index 41df017c9..92b6e91ef 100644 --- a/pkg/providers/appsec/data_akamai_appsec_selected_hostnames_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_selected_hostnames_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_siem_definitions.go b/pkg/providers/appsec/data_akamai_appsec_siem_definitions.go index 0feb1fe82..6157f3367 100644 --- a/pkg/providers/appsec/data_akamai_appsec_siem_definitions.go +++ b/pkg/providers/appsec/data_akamai_appsec_siem_definitions.go @@ -6,7 +6,7 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_siem_definitions_test.go b/pkg/providers/appsec/data_akamai_appsec_siem_definitions_test.go index 172e02526..84681e438 100644 --- a/pkg/providers/appsec/data_akamai_appsec_siem_definitions_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_siem_definitions_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_siem_settings.go b/pkg/providers/appsec/data_akamai_appsec_siem_settings.go index 7add2879a..ce1001047 100644 --- a/pkg/providers/appsec/data_akamai_appsec_siem_settings.go +++ b/pkg/providers/appsec/data_akamai_appsec_siem_settings.go @@ -5,7 +5,7 @@ import ( "encoding/json" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_siem_settings_test.go b/pkg/providers/appsec/data_akamai_appsec_siem_settings_test.go index 62545625f..9597c41a5 100644 --- a/pkg/providers/appsec/data_akamai_appsec_siem_settings_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_siem_settings_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_slow_post_protection_settings.go b/pkg/providers/appsec/data_akamai_appsec_slow_post_protection_settings.go index fea844764..ed5b828b6 100644 --- a/pkg/providers/appsec/data_akamai_appsec_slow_post_protection_settings.go +++ b/pkg/providers/appsec/data_akamai_appsec_slow_post_protection_settings.go @@ -5,7 +5,7 @@ import ( "encoding/json" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_slow_post_protection_settings_test.go b/pkg/providers/appsec/data_akamai_appsec_slow_post_protection_settings_test.go index e2449754f..af391ca33 100644 --- a/pkg/providers/appsec/data_akamai_appsec_slow_post_protection_settings_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_slow_post_protection_settings_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_threat_intel.go b/pkg/providers/appsec/data_akamai_appsec_threat_intel.go index ec3f7b76c..e1866c6bb 100644 --- a/pkg/providers/appsec/data_akamai_appsec_threat_intel.go +++ b/pkg/providers/appsec/data_akamai_appsec_threat_intel.go @@ -5,7 +5,7 @@ import ( "encoding/json" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_threat_intel_test.go b/pkg/providers/appsec/data_akamai_appsec_threat_intel_test.go index e85d67535..46dd6e5c4 100644 --- a/pkg/providers/appsec/data_akamai_appsec_threat_intel_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_threat_intel_test.go @@ -6,7 +6,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_tuning_recommendations.go b/pkg/providers/appsec/data_akamai_appsec_tuning_recommendations.go index ff4ab6cab..c36249bda 100644 --- a/pkg/providers/appsec/data_akamai_appsec_tuning_recommendations.go +++ b/pkg/providers/appsec/data_akamai_appsec_tuning_recommendations.go @@ -6,7 +6,7 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" diff --git a/pkg/providers/appsec/data_akamai_appsec_tuning_recommendations_test.go b/pkg/providers/appsec/data_akamai_appsec_tuning_recommendations_test.go index 336754b78..9745eacc4 100644 --- a/pkg/providers/appsec/data_akamai_appsec_tuning_recommendations_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_tuning_recommendations_test.go @@ -6,7 +6,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_version_notes.go b/pkg/providers/appsec/data_akamai_appsec_version_notes.go index 4c6f16e72..8dbd2217b 100644 --- a/pkg/providers/appsec/data_akamai_appsec_version_notes.go +++ b/pkg/providers/appsec/data_akamai_appsec_version_notes.go @@ -5,7 +5,7 @@ import ( "encoding/json" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_version_notes_test.go b/pkg/providers/appsec/data_akamai_appsec_version_notes_test.go index 2ce39eccf..2a3236842 100644 --- a/pkg/providers/appsec/data_akamai_appsec_version_notes_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_version_notes_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_waf_mode.go b/pkg/providers/appsec/data_akamai_appsec_waf_mode.go index dba18091d..e75f93694 100644 --- a/pkg/providers/appsec/data_akamai_appsec_waf_mode.go +++ b/pkg/providers/appsec/data_akamai_appsec_waf_mode.go @@ -5,7 +5,7 @@ import ( "encoding/json" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_waf_mode_test.go b/pkg/providers/appsec/data_akamai_appsec_waf_mode_test.go index 094db8d36..2847fb28d 100644 --- a/pkg/providers/appsec/data_akamai_appsec_waf_mode_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_waf_mode_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/data_akamai_appsec_wap_selected_hostnames.go b/pkg/providers/appsec/data_akamai_appsec_wap_selected_hostnames.go index cf9153810..7739fc8df 100644 --- a/pkg/providers/appsec/data_akamai_appsec_wap_selected_hostnames.go +++ b/pkg/providers/appsec/data_akamai_appsec_wap_selected_hostnames.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_wap_selected_hostnames_test.go b/pkg/providers/appsec/data_akamai_appsec_wap_selected_hostnames_test.go index cd21d3606..c96cf5102 100644 --- a/pkg/providers/appsec/data_akamai_appsec_wap_selected_hostnames_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_wap_selected_hostnames_test.go @@ -6,7 +6,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/diff_suppress_funcs.go b/pkg/providers/appsec/diff_suppress_funcs.go index 83f6fb525..9a14f9fa8 100644 --- a/pkg/providers/appsec/diff_suppress_funcs.go +++ b/pkg/providers/appsec/diff_suppress_funcs.go @@ -9,7 +9,7 @@ import ( "sort" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/provider.go b/pkg/providers/appsec/provider.go index 763a9d5af..93410de04 100644 --- a/pkg/providers/appsec/provider.go +++ b/pkg/providers/appsec/provider.go @@ -4,7 +4,7 @@ package appsec import ( "sync" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" "github.com/hashicorp/terraform-plugin-framework/datasource" diff --git a/pkg/providers/appsec/provider_test.go b/pkg/providers/appsec/provider_test.go index 38e3003bd..2e8f36ae3 100644 --- a/pkg/providers/appsec/provider_test.go +++ b/pkg/providers/appsec/provider_test.go @@ -4,7 +4,7 @@ import ( "sync" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" ) diff --git a/pkg/providers/appsec/resource_akamai_appsec_activations.go b/pkg/providers/appsec/resource_akamai_appsec_activations.go index 48dcbd0d8..96131d352 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_activations.go +++ b/pkg/providers/appsec/resource_akamai_appsec_activations.go @@ -7,7 +7,7 @@ import ( "strconv" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/go-hclog" diff --git a/pkg/providers/appsec/resource_akamai_appsec_activations_test.go b/pkg/providers/appsec/resource_akamai_appsec_activations_test.go index 73ca3853b..9945ec5be 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_activations_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_activations_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_attack_payload_logging.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_attack_payload_logging.go index 7a07229ca..f26375779 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_attack_payload_logging.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_attack_payload_logging.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_attack_payload_logging_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_attack_payload_logging_test.go index a9bf2aefe..95d2b296b 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_attack_payload_logging_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_attack_payload_logging_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_evasive_path_match.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_evasive_path_match.go index 1387bc1ea..bebf50faf 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_evasive_path_match.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_evasive_path_match.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_evasive_path_match_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_evasive_path_match_test.go index 50c05068a..a90300334 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_evasive_path_match_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_evasive_path_match_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_logging.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_logging.go index a32895f8c..d81ca3231 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_logging.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_logging.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_logging_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_logging_test.go index cd899dfeb..e03f66d54 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_logging_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_logging_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pii_learning.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pii_learning.go index ba2ba4ce2..319dd6c36 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pii_learning.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pii_learning.go @@ -5,7 +5,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pii_learning_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pii_learning_test.go index 2a7962843..ff6b44e32 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pii_learning_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pii_learning_test.go @@ -7,7 +7,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pragma_header.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pragma_header.go index bf02d65e3..e13bfdbb1 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pragma_header.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pragma_header.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pragma_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pragma_test.go index 545e43dc4..dc0eda514 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pragma_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pragma_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_prefetch.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_prefetch.go index 03a9dba01..f7724efcf 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_prefetch.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_prefetch.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_prefetch_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_prefetch_test.go index c012651dd..0d90901da 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_prefetch_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_prefetch_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_request_body.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_request_body.go index 82a2d6925..67680f7d6 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_request_body.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_request_body.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_request_body_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_request_body_test.go index 311263553..ddf3ad95a 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_request_body_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_request_body_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_api_constraints_protection.go b/pkg/providers/appsec/resource_akamai_appsec_api_constraints_protection.go index 1c8f45861..f3e59c692 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_api_constraints_protection.go +++ b/pkg/providers/appsec/resource_akamai_appsec_api_constraints_protection.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_api_constraints_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_api_constraints_protection_test.go index b881b8665..68afc3dcc 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_api_constraints_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_api_constraints_protection_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_api_request_constraints.go b/pkg/providers/appsec/resource_akamai_appsec_api_request_constraints.go index fb6be35b3..3cde60cdd 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_api_request_constraints.go +++ b/pkg/providers/appsec/resource_akamai_appsec_api_request_constraints.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_api_request_constraints_test.go b/pkg/providers/appsec/resource_akamai_appsec_api_request_constraints_test.go index 7876e7853..79561fbfe 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_api_request_constraints_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_api_request_constraints_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_attack_group.go b/pkg/providers/appsec/resource_akamai_appsec_attack_group.go index 49bb0cb2d..5b175adc3 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_attack_group.go +++ b/pkg/providers/appsec/resource_akamai_appsec_attack_group.go @@ -7,7 +7,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_attack_group_test.go b/pkg/providers/appsec/resource_akamai_appsec_attack_group_test.go index 9a39b7816..7f93dcfb2 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_attack_group_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_attack_group_test.go @@ -6,7 +6,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_bypass_network_lists.go b/pkg/providers/appsec/resource_akamai_appsec_bypass_network_lists.go index 971adac07..ad989690c 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_bypass_network_lists.go +++ b/pkg/providers/appsec/resource_akamai_appsec_bypass_network_lists.go @@ -5,7 +5,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_bypass_network_lists_test.go b/pkg/providers/appsec/resource_akamai_appsec_bypass_network_lists_test.go index fee94eef2..d1229bfc6 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_bypass_network_lists_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_bypass_network_lists_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_configuration.go b/pkg/providers/appsec/resource_akamai_appsec_configuration.go index 4f8419476..8d61c71fa 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_configuration.go +++ b/pkg/providers/appsec/resource_akamai_appsec_configuration.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_configuration_rename.go b/pkg/providers/appsec/resource_akamai_appsec_configuration_rename.go index a3e488ddd..a2a4e5f12 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_configuration_rename.go +++ b/pkg/providers/appsec/resource_akamai_appsec_configuration_rename.go @@ -5,7 +5,7 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_configuration_rename_test.go b/pkg/providers/appsec/resource_akamai_appsec_configuration_rename_test.go index 95461771e..535ae677d 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_configuration_rename_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_configuration_rename_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_configuration_test.go b/pkg/providers/appsec/resource_akamai_appsec_configuration_test.go index ee3628152..dc55769cf 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_configuration_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_configuration_test.go @@ -6,7 +6,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_custom_deny.go b/pkg/providers/appsec/resource_akamai_appsec_custom_deny.go index 61da96302..9f3be5fdc 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_custom_deny.go +++ b/pkg/providers/appsec/resource_akamai_appsec_custom_deny.go @@ -7,7 +7,7 @@ import ( "log" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_custom_deny_test.go b/pkg/providers/appsec/resource_akamai_appsec_custom_deny_test.go index 766291277..b6ed8a68d 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_custom_deny_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_custom_deny_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_custom_rule.go b/pkg/providers/appsec/resource_akamai_appsec_custom_rule.go index 1c696fe97..f8e23cadd 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_custom_rule.go +++ b/pkg/providers/appsec/resource_akamai_appsec_custom_rule.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_custom_rule_action.go b/pkg/providers/appsec/resource_akamai_appsec_custom_rule_action.go index 5c9f4872e..ecd16b7c5 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_custom_rule_action.go +++ b/pkg/providers/appsec/resource_akamai_appsec_custom_rule_action.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_custom_rule_action_test.go b/pkg/providers/appsec/resource_akamai_appsec_custom_rule_action_test.go index 9d34104ec..cc7c33143 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_custom_rule_action_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_custom_rule_action_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_custom_rule_test.go b/pkg/providers/appsec/resource_akamai_appsec_custom_rule_test.go index 120c12b78..72484089b 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_custom_rule_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_custom_rule_test.go @@ -6,7 +6,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval.go b/pkg/providers/appsec/resource_akamai_appsec_eval.go index 869795506..3b3d75cb1 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_group.go b/pkg/providers/appsec/resource_akamai_appsec_eval_group.go index c989d08ff..b7e69facc 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval_group.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_group.go @@ -7,7 +7,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_group_test.go b/pkg/providers/appsec/resource_akamai_appsec_eval_group_test.go index 701acb2c6..2b88f0b14 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval_group_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_group_test.go @@ -6,7 +6,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box.go b/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box.go index 168f782a3..8bbfb9a5f 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box.go @@ -5,7 +5,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions.go b/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions.go index 1d8237057..83feb5576 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions_test.go b/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions_test.go index a78a85ab0..e36a45f50 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_test.go b/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_test.go index 90c9b3a5f..8ddd23a6d 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_rule.go b/pkg/providers/appsec/resource_akamai_appsec_eval_rule.go index 5ede74deb..a45436fcc 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval_rule.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_rule.go @@ -7,7 +7,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_rule_test.go b/pkg/providers/appsec/resource_akamai_appsec_eval_rule_test.go index 133db9bf6..4655fad35 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval_rule_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_rule_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_test.go b/pkg/providers/appsec/resource_akamai_appsec_eval_test.go index 446474a58..b7b839825 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_ip_geo.go b/pkg/providers/appsec/resource_akamai_appsec_ip_geo.go index 15afa92f2..1cc5fc8fa 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_ip_geo.go +++ b/pkg/providers/appsec/resource_akamai_appsec_ip_geo.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_ip_geo_protection.go b/pkg/providers/appsec/resource_akamai_appsec_ip_geo_protection.go index e3c0c3fda..1d6fa9617 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_ip_geo_protection.go +++ b/pkg/providers/appsec/resource_akamai_appsec_ip_geo_protection.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_ip_geo_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_ip_geo_protection_test.go index 4bc97d430..4d2c7b324 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_ip_geo_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_ip_geo_protection_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_ip_geo_test.go b/pkg/providers/appsec/resource_akamai_appsec_ip_geo_test.go index d47544a9d..cf88477c4 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_ip_geo_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_ip_geo_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_malware_policy.go b/pkg/providers/appsec/resource_akamai_appsec_malware_policy.go index fc9bbf02b..9dcf59552 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_malware_policy.go +++ b/pkg/providers/appsec/resource_akamai_appsec_malware_policy.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_action.go b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_action.go index 9da130bdd..8f13c6700 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_action.go +++ b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_action.go @@ -5,7 +5,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_action_test.go b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_action_test.go index 15e1d1ba0..579f59cc8 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_action_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_action_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_actions.go b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_actions.go index 22f27bf0f..eb6fef726 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_actions.go +++ b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_actions.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_actions_test.go b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_actions_test.go index 7f52002a7..67dfdb066 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_actions_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_actions_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_test.go b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_test.go index f98c82365..cd521599f 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_malware_protection.go b/pkg/providers/appsec/resource_akamai_appsec_malware_protection.go index 5c6946ddf..7eb2f1151 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_malware_protection.go +++ b/pkg/providers/appsec/resource_akamai_appsec_malware_protection.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_malware_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_malware_protection_test.go index f82097cc7..f77b91536 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_malware_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_malware_protection_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_match_target.go b/pkg/providers/appsec/resource_akamai_appsec_match_target.go index df284427b..685b2e2b9 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_match_target.go +++ b/pkg/providers/appsec/resource_akamai_appsec_match_target.go @@ -8,7 +8,7 @@ import ( "sort" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_match_target_sequence.go b/pkg/providers/appsec/resource_akamai_appsec_match_target_sequence.go index b2dfb20d0..9b0dc384e 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_match_target_sequence.go +++ b/pkg/providers/appsec/resource_akamai_appsec_match_target_sequence.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_match_target_sequence_test.go b/pkg/providers/appsec/resource_akamai_appsec_match_target_sequence_test.go index 86604bc78..712126fef 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_match_target_sequence_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_match_target_sequence_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_match_target_test.go b/pkg/providers/appsec/resource_akamai_appsec_match_target_test.go index 566a1c5b1..f5a93cbde 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_match_target_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_match_target_test.go @@ -5,7 +5,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_penalty_box.go b/pkg/providers/appsec/resource_akamai_appsec_penalty_box.go index 26d4e4f42..c4ff4c831 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_penalty_box.go +++ b/pkg/providers/appsec/resource_akamai_appsec_penalty_box.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions.go b/pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions.go index 5910d7e72..69d0b7030 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions.go +++ b/pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions_test.go b/pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions_test.go index a52386208..01c5dafdf 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_penalty_box_test.go b/pkg/providers/appsec/resource_akamai_appsec_penalty_box_test.go index 0d09cc2a7..a49e654ef 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_penalty_box_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_penalty_box_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_rate_policy.go b/pkg/providers/appsec/resource_akamai_appsec_rate_policy.go index 37a549134..75ab893af 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rate_policy.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rate_policy.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_rate_policy_action.go b/pkg/providers/appsec/resource_akamai_appsec_rate_policy_action.go index fd8cccc8d..0e1bb0517 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rate_policy_action.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rate_policy_action.go @@ -5,7 +5,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_rate_policy_action_test.go b/pkg/providers/appsec/resource_akamai_appsec_rate_policy_action_test.go index 7c1c8b965..e98c220e8 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rate_policy_action_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rate_policy_action_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_rate_policy_test.go b/pkg/providers/appsec/resource_akamai_appsec_rate_policy_test.go index 743506aae..ec6662864 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rate_policy_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rate_policy_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_rate_protection.go b/pkg/providers/appsec/resource_akamai_appsec_rate_protection.go index aaec3236a..f2214440e 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rate_protection.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rate_protection.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_rate_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_rate_protection_test.go index 2c01b3527..45f1e8e52 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rate_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rate_protection_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_reputation_analysis.go b/pkg/providers/appsec/resource_akamai_appsec_reputation_analysis.go index 902d8d1e1..a1e6886e8 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_reputation_analysis.go +++ b/pkg/providers/appsec/resource_akamai_appsec_reputation_analysis.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_reputation_analysis_test.go b/pkg/providers/appsec/resource_akamai_appsec_reputation_analysis_test.go index 5d5c95bed..3c674ca01 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_reputation_analysis_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_reputation_analysis_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_reputation_profile.go b/pkg/providers/appsec/resource_akamai_appsec_reputation_profile.go index 6a6397178..d9ddb8083 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_reputation_profile.go +++ b/pkg/providers/appsec/resource_akamai_appsec_reputation_profile.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_action.go b/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_action.go index 51404ff5b..5d9472a78 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_action.go +++ b/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_action.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_action_test.go b/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_action_test.go index f28f4204a..d58c9b81b 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_action_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_action_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_test.go b/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_test.go index 5e0f3771d..27bc2a9d1 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_reputation_protection.go b/pkg/providers/appsec/resource_akamai_appsec_reputation_protection.go index 2e124b8ee..b0d7b1d38 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_reputation_protection.go +++ b/pkg/providers/appsec/resource_akamai_appsec_reputation_protection.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_reputation_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_reputation_protection_test.go index 52de3c1c7..348e3de59 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_reputation_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_reputation_protection_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_rule.go b/pkg/providers/appsec/resource_akamai_appsec_rule.go index 522cc82fa..5608f7356 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rule.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rule.go @@ -8,7 +8,7 @@ import ( "strconv" "sync" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/cache" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" akameta "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/appsec/resource_akamai_appsec_rule_test.go b/pkg/providers/appsec/resource_akamai_appsec_rule_test.go index 0937b1755..54616e040 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rule_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rule_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_rule_upgrade.go b/pkg/providers/appsec/resource_akamai_appsec_rule_upgrade.go index 3bf5f4c81..b0f29aded 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rule_upgrade.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rule_upgrade.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_rule_upgrade_test.go b/pkg/providers/appsec/resource_akamai_appsec_rule_upgrade_test.go index c75f33732..e8a6c70af 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rule_upgrade_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rule_upgrade_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_security_policy.go b/pkg/providers/appsec/resource_akamai_appsec_security_policy.go index 6964d101b..c04c86d45 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_security_policy.go +++ b/pkg/providers/appsec/resource_akamai_appsec_security_policy.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_security_policy_default_protections.go b/pkg/providers/appsec/resource_akamai_appsec_security_policy_default_protections.go index ff61cabbc..538f1a40e 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_security_policy_default_protections.go +++ b/pkg/providers/appsec/resource_akamai_appsec_security_policy_default_protections.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_security_policy_default_protections_test.go b/pkg/providers/appsec/resource_akamai_appsec_security_policy_default_protections_test.go index 28a77bd21..afd64b725 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_security_policy_default_protections_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_security_policy_default_protections_test.go @@ -6,7 +6,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_security_policy_rename.go b/pkg/providers/appsec/resource_akamai_appsec_security_policy_rename.go index 0685bbff2..a447a2102 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_security_policy_rename.go +++ b/pkg/providers/appsec/resource_akamai_appsec_security_policy_rename.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_security_policy_rename_test.go b/pkg/providers/appsec/resource_akamai_appsec_security_policy_rename_test.go index 3ccdce2d3..6648fd554 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_security_policy_rename_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_security_policy_rename_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_security_policy_test.go b/pkg/providers/appsec/resource_akamai_appsec_security_policy_test.go index 7efa991e3..473be6c5a 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_security_policy_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_security_policy_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_selected_hostname.go b/pkg/providers/appsec/resource_akamai_appsec_selected_hostname.go index c454a9f8c..379c98a3f 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_selected_hostname.go +++ b/pkg/providers/appsec/resource_akamai_appsec_selected_hostname.go @@ -5,7 +5,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_selected_hostname_test.go b/pkg/providers/appsec/resource_akamai_appsec_selected_hostname_test.go index 42edd45d2..c0c834a08 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_selected_hostname_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_selected_hostname_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_siem_settings.go b/pkg/providers/appsec/resource_akamai_appsec_siem_settings.go index 5474155b0..3d70ba938 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_siem_settings.go +++ b/pkg/providers/appsec/resource_akamai_appsec_siem_settings.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_siem_settings_test.go b/pkg/providers/appsec/resource_akamai_appsec_siem_settings_test.go index 9b187d9a7..b10bdf0af 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_siem_settings_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_siem_settings_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_slow_post_protection_setting.go b/pkg/providers/appsec/resource_akamai_appsec_slow_post_protection_setting.go index 3136f53cf..7b6f03653 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_slow_post_protection_setting.go +++ b/pkg/providers/appsec/resource_akamai_appsec_slow_post_protection_setting.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_slow_post_protection_setting_test.go b/pkg/providers/appsec/resource_akamai_appsec_slow_post_protection_setting_test.go index 1fbf236f5..e15a39eff 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_slow_post_protection_setting_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_slow_post_protection_setting_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_slowpost_protection.go b/pkg/providers/appsec/resource_akamai_appsec_slowpost_protection.go index 47a5f14f6..7014258c6 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_slowpost_protection.go +++ b/pkg/providers/appsec/resource_akamai_appsec_slowpost_protection.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_slowpost_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_slowpost_protection_test.go index 5721ba6cd..25adb2686 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_slowpost_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_slowpost_protection_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_threat_intel.go b/pkg/providers/appsec/resource_akamai_appsec_threat_intel.go index 115e3936d..bd88070c6 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_threat_intel.go +++ b/pkg/providers/appsec/resource_akamai_appsec_threat_intel.go @@ -9,7 +9,7 @@ import ( "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_threat_intel_test.go b/pkg/providers/appsec/resource_akamai_appsec_threat_intel_test.go index 4bbeebaf8..70455fd28 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_threat_intel_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_threat_intel_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_version_notes.go b/pkg/providers/appsec/resource_akamai_appsec_version_notes.go index aa9588266..b9b75ea15 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_version_notes.go +++ b/pkg/providers/appsec/resource_akamai_appsec_version_notes.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_version_notes_test.go b/pkg/providers/appsec/resource_akamai_appsec_version_notes_test.go index bc9ac9882..0badc6bb0 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_version_notes_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_version_notes_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_waf_mode.go b/pkg/providers/appsec/resource_akamai_appsec_waf_mode.go index c944f8154..67429a979 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_waf_mode.go +++ b/pkg/providers/appsec/resource_akamai_appsec_waf_mode.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_waf_mode_test.go b/pkg/providers/appsec/resource_akamai_appsec_waf_mode_test.go index d2e6a09ee..51aa6012f 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_waf_mode_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_waf_mode_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_waf_protection.go b/pkg/providers/appsec/resource_akamai_appsec_waf_protection.go index 7b0065db3..5166db82f 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_waf_protection.go +++ b/pkg/providers/appsec/resource_akamai_appsec_waf_protection.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_waf_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_waf_protection_test.go index b25e833cf..021f7af88 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_waf_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_waf_protection_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/resource_akamai_appsec_wap_selected_hostnames.go b/pkg/providers/appsec/resource_akamai_appsec_wap_selected_hostnames.go index 0e0aa7d9b..d337f948f 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_wap_selected_hostnames.go +++ b/pkg/providers/appsec/resource_akamai_appsec_wap_selected_hostnames.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/resource_akamai_appsec_wap_selected_hostnames_test.go b/pkg/providers/appsec/resource_akamai_appsec_wap_selected_hostnames_test.go index df1d449b8..5e3eea6f8 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_wap_selected_hostnames_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_wap_selected_hostnames_test.go @@ -6,7 +6,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/appsec/templates.go b/pkg/providers/appsec/templates.go index 23efdd684..e338e5873 100644 --- a/pkg/providers/appsec/templates.go +++ b/pkg/providers/appsec/templates.go @@ -8,7 +8,7 @@ import ( "strings" "text/template" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/appsec" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" "github.com/jedib0t/go-pretty/v6/table" ) diff --git a/pkg/providers/botman/cache.go b/pkg/providers/botman/cache.go index 0c8299bd1..3db035a27 100644 --- a/pkg/providers/botman/cache.go +++ b/pkg/providers/botman/cache.go @@ -6,7 +6,7 @@ import ( "fmt" "sync" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/cache" akameta "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/apex/log" diff --git a/pkg/providers/botman/data_akamai_botman_akamai_bot_category.go b/pkg/providers/botman/data_akamai_botman_akamai_bot_category.go index 560505d99..681e698eb 100644 --- a/pkg/providers/botman/data_akamai_botman_akamai_bot_category.go +++ b/pkg/providers/botman/data_akamai_botman_akamai_bot_category.go @@ -5,7 +5,7 @@ import ( "encoding/json" "errors" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action.go b/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action.go index 4f57230e1..7a0f38eda 100644 --- a/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action.go +++ b/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action.go @@ -6,7 +6,7 @@ import ( "errors" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action_test.go b/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action_test.go index 9b8c98bf1..37060a1ab 100644 --- a/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_akamai_bot_category_test.go b/pkg/providers/botman/data_akamai_botman_akamai_bot_category_test.go index b9981c5e2..1e1c0ef78 100644 --- a/pkg/providers/botman/data_akamai_botman_akamai_bot_category_test.go +++ b/pkg/providers/botman/data_akamai_botman_akamai_bot_category_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_akamai_defined_bot.go b/pkg/providers/botman/data_akamai_botman_akamai_defined_bot.go index 633eaf78c..08fda0811 100644 --- a/pkg/providers/botman/data_akamai_botman_akamai_defined_bot.go +++ b/pkg/providers/botman/data_akamai_botman_akamai_defined_bot.go @@ -5,7 +5,7 @@ import ( "encoding/json" "errors" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/botman/data_akamai_botman_akamai_defined_bot_test.go b/pkg/providers/botman/data_akamai_botman_akamai_defined_bot_test.go index e8d929039..e6818c3e1 100644 --- a/pkg/providers/botman/data_akamai_botman_akamai_defined_bot_test.go +++ b/pkg/providers/botman/data_akamai_botman_akamai_defined_bot_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie.go b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie.go index 3153d4f4e..3ed5166e7 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie.go +++ b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie.go @@ -5,7 +5,7 @@ import ( "encoding/json" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_test.go b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_test.go index 510b7b563..fcf899321 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values_test.go b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values_test.go index fa0686a59..742b7dcb3 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_bot_category_exception.go b/pkg/providers/botman/data_akamai_botman_bot_category_exception.go index 30b81d74a..f5de5cf43 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_category_exception.go +++ b/pkg/providers/botman/data_akamai_botman_bot_category_exception.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/data_akamai_botman_bot_category_exception_test.go b/pkg/providers/botman/data_akamai_botman_bot_category_exception_test.go index 5ba4dab6b..9359c0b51 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_category_exception_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_category_exception_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_bot_detection.go b/pkg/providers/botman/data_akamai_botman_bot_detection.go index fc52d5f06..ae4538601 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_detection.go +++ b/pkg/providers/botman/data_akamai_botman_bot_detection.go @@ -5,7 +5,7 @@ import ( "encoding/json" "errors" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/botman/data_akamai_botman_bot_detection_action.go b/pkg/providers/botman/data_akamai_botman_bot_detection_action.go index 44157f7fd..c92af9114 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_detection_action.go +++ b/pkg/providers/botman/data_akamai_botman_bot_detection_action.go @@ -6,7 +6,7 @@ import ( "errors" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/data_akamai_botman_bot_detection_action_test.go b/pkg/providers/botman/data_akamai_botman_bot_detection_action_test.go index 03016936c..067bc0278 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_detection_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_detection_action_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_bot_detection_test.go b/pkg/providers/botman/data_akamai_botman_bot_detection_test.go index dd8ab8312..8a05b6c05 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_detection_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_detection_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report.go b/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report.go index a75e2d256..47c823cd2 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report.go +++ b/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report.go @@ -6,7 +6,7 @@ import ( "errors" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report_test.go b/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report_test.go index 6be43367c..33fa3481d 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_bot_management_settings.go b/pkg/providers/botman/data_akamai_botman_bot_management_settings.go index 63b9b8520..1873d5b9a 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_management_settings.go +++ b/pkg/providers/botman/data_akamai_botman_bot_management_settings.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/data_akamai_botman_bot_management_settings_test.go b/pkg/providers/botman/data_akamai_botman_bot_management_settings_test.go index f7dd6ef93..1b98063f2 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_management_settings_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_management_settings_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_challenge_action.go b/pkg/providers/botman/data_akamai_botman_challenge_action.go index 4bb824267..19fcd7e05 100644 --- a/pkg/providers/botman/data_akamai_botman_challenge_action.go +++ b/pkg/providers/botman/data_akamai_botman_challenge_action.go @@ -7,7 +7,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/data_akamai_botman_challenge_action_test.go b/pkg/providers/botman/data_akamai_botman_challenge_action_test.go index 8e3e1dea2..7ae2c073f 100644 --- a/pkg/providers/botman/data_akamai_botman_challenge_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_challenge_action_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_challenge_injection_rules.go b/pkg/providers/botman/data_akamai_botman_challenge_injection_rules.go index d4760e685..0f4245604 100644 --- a/pkg/providers/botman/data_akamai_botman_challenge_injection_rules.go +++ b/pkg/providers/botman/data_akamai_botman_challenge_injection_rules.go @@ -5,7 +5,7 @@ import ( "encoding/json" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/data_akamai_botman_challenge_injection_rules_test.go b/pkg/providers/botman/data_akamai_botman_challenge_injection_rules_test.go index dee145c47..18705c995 100644 --- a/pkg/providers/botman/data_akamai_botman_challenge_injection_rules_test.go +++ b/pkg/providers/botman/data_akamai_botman_challenge_injection_rules_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_challenge_interception_rules.go b/pkg/providers/botman/data_akamai_botman_challenge_interception_rules.go index 7a25cf844..9f8988daa 100644 --- a/pkg/providers/botman/data_akamai_botman_challenge_interception_rules.go +++ b/pkg/providers/botman/data_akamai_botman_challenge_interception_rules.go @@ -5,7 +5,7 @@ import ( "encoding/json" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/data_akamai_botman_challenge_interception_rules_test.go b/pkg/providers/botman/data_akamai_botman_challenge_interception_rules_test.go index 02176460e..c3f9e16df 100644 --- a/pkg/providers/botman/data_akamai_botman_challenge_interception_rules_test.go +++ b/pkg/providers/botman/data_akamai_botman_challenge_interception_rules_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_client_side_security.go b/pkg/providers/botman/data_akamai_botman_client_side_security.go index 9fcc46d1e..57cc9e97f 100644 --- a/pkg/providers/botman/data_akamai_botman_client_side_security.go +++ b/pkg/providers/botman/data_akamai_botman_client_side_security.go @@ -5,7 +5,7 @@ import ( "encoding/json" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/data_akamai_botman_client_side_security_test.go b/pkg/providers/botman/data_akamai_botman_client_side_security_test.go index 5ed8107d6..a6021eaa7 100644 --- a/pkg/providers/botman/data_akamai_botman_client_side_security_test.go +++ b/pkg/providers/botman/data_akamai_botman_client_side_security_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_conditional_action.go b/pkg/providers/botman/data_akamai_botman_conditional_action.go index f7228b5cc..e297a5d25 100644 --- a/pkg/providers/botman/data_akamai_botman_conditional_action.go +++ b/pkg/providers/botman/data_akamai_botman_conditional_action.go @@ -7,7 +7,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/data_akamai_botman_conditional_action_test.go b/pkg/providers/botman/data_akamai_botman_conditional_action_test.go index 9f73db102..847375044 100644 --- a/pkg/providers/botman/data_akamai_botman_conditional_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_conditional_action_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_custom_bot_category.go b/pkg/providers/botman/data_akamai_botman_custom_bot_category.go index 14d843f79..301f4fd90 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_bot_category.go +++ b/pkg/providers/botman/data_akamai_botman_custom_bot_category.go @@ -6,7 +6,7 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/data_akamai_botman_custom_bot_category_action.go b/pkg/providers/botman/data_akamai_botman_custom_bot_category_action.go index aeb691ef4..bd32ebb22 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_bot_category_action.go +++ b/pkg/providers/botman/data_akamai_botman_custom_bot_category_action.go @@ -6,7 +6,7 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/data_akamai_botman_custom_bot_category_action_test.go b/pkg/providers/botman/data_akamai_botman_custom_bot_category_action_test.go index 9f2e61c6a..d65a5120e 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_bot_category_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_bot_category_action_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence.go b/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence.go index 1c67c56ef..7b9a07828 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence.go +++ b/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence.go @@ -4,7 +4,7 @@ import ( "context" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence_test.go b/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence_test.go index c082109c5..c10250e00 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_custom_bot_category_test.go b/pkg/providers/botman/data_akamai_botman_custom_bot_category_test.go index 601d4beea..eb5e7d4d3 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_bot_category_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_bot_category_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_custom_client.go b/pkg/providers/botman/data_akamai_botman_custom_client.go index be3c06713..3261b1290 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_client.go +++ b/pkg/providers/botman/data_akamai_botman_custom_client.go @@ -6,7 +6,7 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/data_akamai_botman_custom_client_sequence.go b/pkg/providers/botman/data_akamai_botman_custom_client_sequence.go index 2a4231025..3816ed40a 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_client_sequence.go +++ b/pkg/providers/botman/data_akamai_botman_custom_client_sequence.go @@ -4,7 +4,7 @@ import ( "context" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/data_akamai_botman_custom_client_sequence_test.go b/pkg/providers/botman/data_akamai_botman_custom_client_sequence_test.go index 8aa410f54..20ca72f57 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_client_sequence_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_client_sequence_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_custom_client_test.go b/pkg/providers/botman/data_akamai_botman_custom_client_test.go index 4fce9283d..98971f12b 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_client_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_client_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_custom_code.go b/pkg/providers/botman/data_akamai_botman_custom_code.go index 2fa5a4d8d..5ff0c5c59 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_code.go +++ b/pkg/providers/botman/data_akamai_botman_custom_code.go @@ -5,7 +5,7 @@ import ( "encoding/json" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/data_akamai_botman_custom_code_test.go b/pkg/providers/botman/data_akamai_botman_custom_code_test.go index 05a45acb1..8e9dade07 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_code_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_code_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_custom_defined_bot.go b/pkg/providers/botman/data_akamai_botman_custom_defined_bot.go index 1fd1c5a39..9c1370932 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_defined_bot.go +++ b/pkg/providers/botman/data_akamai_botman_custom_defined_bot.go @@ -6,7 +6,7 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/data_akamai_botman_custom_defined_bot_test.go b/pkg/providers/botman/data_akamai_botman_custom_defined_bot_test.go index 7ad336a7f..4fc3f5e2a 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_defined_bot_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_defined_bot_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_custom_deny_action.go b/pkg/providers/botman/data_akamai_botman_custom_deny_action.go index 1bd8cd448..60dfbbab4 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_deny_action.go +++ b/pkg/providers/botman/data_akamai_botman_custom_deny_action.go @@ -7,7 +7,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/data_akamai_botman_custom_deny_action_test.go b/pkg/providers/botman/data_akamai_botman_custom_deny_action_test.go index c234d3008..dc437c75e 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_deny_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_deny_action_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_javascript_injection.go b/pkg/providers/botman/data_akamai_botman_javascript_injection.go index c10f828c3..610cb9992 100644 --- a/pkg/providers/botman/data_akamai_botman_javascript_injection.go +++ b/pkg/providers/botman/data_akamai_botman_javascript_injection.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/data_akamai_botman_javascript_injection_test.go b/pkg/providers/botman/data_akamai_botman_javascript_injection_test.go index 446af8867..fac6383b9 100644 --- a/pkg/providers/botman/data_akamai_botman_javascript_injection_test.go +++ b/pkg/providers/botman/data_akamai_botman_javascript_injection_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot.go b/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot.go index a588fa935..c7feba821 100644 --- a/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot.go +++ b/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot.go @@ -6,7 +6,7 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot_test.go b/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot_test.go index 5dfb3ef09..5db05836b 100644 --- a/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot_test.go +++ b/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_response_action.go b/pkg/providers/botman/data_akamai_botman_response_action.go index 9cf10919e..58d8fe01a 100644 --- a/pkg/providers/botman/data_akamai_botman_response_action.go +++ b/pkg/providers/botman/data_akamai_botman_response_action.go @@ -6,7 +6,7 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/data_akamai_botman_response_action_test.go b/pkg/providers/botman/data_akamai_botman_response_action_test.go index e3bcbff05..14b71bec0 100644 --- a/pkg/providers/botman/data_akamai_botman_response_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_response_action_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_serve_alternate_action.go b/pkg/providers/botman/data_akamai_botman_serve_alternate_action.go index 5b04a6d7c..00c6761ab 100644 --- a/pkg/providers/botman/data_akamai_botman_serve_alternate_action.go +++ b/pkg/providers/botman/data_akamai_botman_serve_alternate_action.go @@ -7,7 +7,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/data_akamai_botman_serve_alternate_action_test.go b/pkg/providers/botman/data_akamai_botman_serve_alternate_action_test.go index 89fd69faa..696e851fb 100644 --- a/pkg/providers/botman/data_akamai_botman_serve_alternate_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_serve_alternate_action_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_transactional_endpoint.go b/pkg/providers/botman/data_akamai_botman_transactional_endpoint.go index 22df588cd..b88fd303c 100644 --- a/pkg/providers/botman/data_akamai_botman_transactional_endpoint.go +++ b/pkg/providers/botman/data_akamai_botman_transactional_endpoint.go @@ -6,7 +6,7 @@ import ( "errors" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection.go b/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection.go index 72d6eb24c..184e82805 100644 --- a/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection.go +++ b/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection.go @@ -5,7 +5,7 @@ import ( "encoding/json" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection_test.go b/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection_test.go index d141f66c6..c1144a6fb 100644 --- a/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection_test.go +++ b/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/data_akamai_botman_transactional_endpoint_test.go b/pkg/providers/botman/data_akamai_botman_transactional_endpoint_test.go index 83a0a2433..1ce64b524 100644 --- a/pkg/providers/botman/data_akamai_botman_transactional_endpoint_test.go +++ b/pkg/providers/botman/data_akamai_botman_transactional_endpoint_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/provider.go b/pkg/providers/botman/provider.go index a85266b32..d64859a05 100644 --- a/pkg/providers/botman/provider.go +++ b/pkg/providers/botman/provider.go @@ -4,7 +4,7 @@ package botman import ( "sync" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/appsec" "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" diff --git a/pkg/providers/botman/provider_test.go b/pkg/providers/botman/provider_test.go index 14e228c51..5a7b6010a 100644 --- a/pkg/providers/botman/provider_test.go +++ b/pkg/providers/botman/provider_test.go @@ -7,7 +7,7 @@ import ( "sync" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" ) diff --git a/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action.go b/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action.go index c3407453e..08116c6f1 100644 --- a/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action.go +++ b/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action_test.go b/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action_test.go index e89bcc745..1d60e9447 100644 --- a/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie.go b/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie.go index 8fcf5e100..9d278c61f 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie.go @@ -5,7 +5,7 @@ import ( "encoding/json" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie_test.go b/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie_test.go index 71f703338..238097bcf 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie_test.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/resource_akamai_botman_bot_category_exception.go b/pkg/providers/botman/resource_akamai_botman_bot_category_exception.go index 0e2dcac00..efcf659a6 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_category_exception.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_category_exception.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/resource_akamai_botman_bot_category_exception_test.go b/pkg/providers/botman/resource_akamai_botman_bot_category_exception_test.go index e706d821c..b1ea31833 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_category_exception_test.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_category_exception_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/resource_akamai_botman_bot_detection_action.go b/pkg/providers/botman/resource_akamai_botman_bot_detection_action.go index 009092b48..2175162a4 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_detection_action.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_detection_action.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/resource_akamai_botman_bot_detection_action_test.go b/pkg/providers/botman/resource_akamai_botman_bot_detection_action_test.go index beb2890c6..7a1fb59e7 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_detection_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_detection_action_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/resource_akamai_botman_bot_management_settings.go b/pkg/providers/botman/resource_akamai_botman_bot_management_settings.go index b933486f7..631c8d794 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_management_settings.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_management_settings.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/resource_akamai_botman_bot_management_settings_test.go b/pkg/providers/botman/resource_akamai_botman_bot_management_settings_test.go index e39c41839..cb27dd2bd 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_management_settings_test.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_management_settings_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/resource_akamai_botman_challenge_action.go b/pkg/providers/botman/resource_akamai_botman_challenge_action.go index b982c774a..1e216d0d8 100644 --- a/pkg/providers/botman/resource_akamai_botman_challenge_action.go +++ b/pkg/providers/botman/resource_akamai_botman_challenge_action.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/botman/resource_akamai_botman_challenge_action_test.go b/pkg/providers/botman/resource_akamai_botman_challenge_action_test.go index c66214ffd..e35201721 100644 --- a/pkg/providers/botman/resource_akamai_botman_challenge_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_challenge_action_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules.go b/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules.go index ef86587e3..b3a763a5a 100644 --- a/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules.go +++ b/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules_test.go b/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules_test.go index 5a3312826..3c6a094d4 100644 --- a/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules_test.go +++ b/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules.go b/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules.go index fe927da91..1f93efd12 100644 --- a/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules.go +++ b/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules.go @@ -5,7 +5,7 @@ import ( "encoding/json" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules_test.go b/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules_test.go index 73f0237c1..5fef0ebc9 100644 --- a/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules_test.go +++ b/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/resource_akamai_botman_client_side_security.go b/pkg/providers/botman/resource_akamai_botman_client_side_security.go index 02d112349..3f6dffe07 100644 --- a/pkg/providers/botman/resource_akamai_botman_client_side_security.go +++ b/pkg/providers/botman/resource_akamai_botman_client_side_security.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/resource_akamai_botman_client_side_security_test.go b/pkg/providers/botman/resource_akamai_botman_client_side_security_test.go index 85d82c33c..8ea9d86c3 100644 --- a/pkg/providers/botman/resource_akamai_botman_client_side_security_test.go +++ b/pkg/providers/botman/resource_akamai_botman_client_side_security_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/resource_akamai_botman_conditional_action.go b/pkg/providers/botman/resource_akamai_botman_conditional_action.go index 3beefac40..7a706d227 100644 --- a/pkg/providers/botman/resource_akamai_botman_conditional_action.go +++ b/pkg/providers/botman/resource_akamai_botman_conditional_action.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/botman/resource_akamai_botman_conditional_action_test.go b/pkg/providers/botman/resource_akamai_botman_conditional_action_test.go index f3b2f1d1e..8566eafa4 100644 --- a/pkg/providers/botman/resource_akamai_botman_conditional_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_conditional_action_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/resource_akamai_botman_custom_bot_category.go b/pkg/providers/botman/resource_akamai_botman_custom_bot_category.go index 83377f13e..531c735ff 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_bot_category.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_bot_category.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action.go b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action.go index 7b8509043..d38bb8187 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action_test.go b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action_test.go index c057cc5a1..eee427d5f 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence.go b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence.go index fa2f2970d..e8cbc0ebb 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence.go @@ -4,7 +4,7 @@ import ( "context" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence_test.go b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence_test.go index 30e54db61..98e3c02ac 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_test.go b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_test.go index 070f9cad1..a456f2ac6 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/resource_akamai_botman_custom_client.go b/pkg/providers/botman/resource_akamai_botman_custom_client.go index 5e5d6d12f..0a418042d 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_client.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_client.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/resource_akamai_botman_custom_client_sequence.go b/pkg/providers/botman/resource_akamai_botman_custom_client_sequence.go index 2e856a7ca..080b0d77e 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_client_sequence.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_client_sequence.go @@ -4,7 +4,7 @@ import ( "context" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/resource_akamai_botman_custom_client_sequence_test.go b/pkg/providers/botman/resource_akamai_botman_custom_client_sequence_test.go index 29f0d5e00..cdd7007c1 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_client_sequence_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_client_sequence_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/botman/resource_akamai_botman_custom_client_test.go b/pkg/providers/botman/resource_akamai_botman_custom_client_test.go index 9f79d6070..74a311c6a 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_client_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_client_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/resource_akamai_botman_custom_code.go b/pkg/providers/botman/resource_akamai_botman_custom_code.go index 694095843..8536f16f5 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_code.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_code.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/resource_akamai_botman_custom_code_test.go b/pkg/providers/botman/resource_akamai_botman_custom_code_test.go index 9d62ca7d1..0efe09d79 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_code_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_code_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/resource_akamai_botman_custom_defined_bot.go b/pkg/providers/botman/resource_akamai_botman_custom_defined_bot.go index d13c7c9f5..348a04e8b 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_defined_bot.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_defined_bot.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/resource_akamai_botman_custom_defined_bot_test.go b/pkg/providers/botman/resource_akamai_botman_custom_defined_bot_test.go index 4b46116e7..e6b010559 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_defined_bot_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_defined_bot_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/resource_akamai_botman_custom_deny_action.go b/pkg/providers/botman/resource_akamai_botman_custom_deny_action.go index 9a831338b..cafd5926b 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_deny_action.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_deny_action.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/botman/resource_akamai_botman_custom_deny_action_test.go b/pkg/providers/botman/resource_akamai_botman_custom_deny_action_test.go index ad0ebd9fa..6511d236e 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_deny_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_deny_action_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/resource_akamai_botman_javascript_injection.go b/pkg/providers/botman/resource_akamai_botman_javascript_injection.go index 775b985c8..31aafb851 100644 --- a/pkg/providers/botman/resource_akamai_botman_javascript_injection.go +++ b/pkg/providers/botman/resource_akamai_botman_javascript_injection.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/resource_akamai_botman_javascript_injection_test.go b/pkg/providers/botman/resource_akamai_botman_javascript_injection_test.go index 7e68c6a6c..5fda8379b 100644 --- a/pkg/providers/botman/resource_akamai_botman_javascript_injection_test.go +++ b/pkg/providers/botman/resource_akamai_botman_javascript_injection_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot.go b/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot.go index 88e6eca60..199518637 100644 --- a/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot.go +++ b/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot.go @@ -5,7 +5,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot_test.go b/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot_test.go index 236e679a9..2f3b20678 100644 --- a/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot_test.go +++ b/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/resource_akamai_botman_serve_alternate_action.go b/pkg/providers/botman/resource_akamai_botman_serve_alternate_action.go index 7c49ef2d7..75b993ef0 100644 --- a/pkg/providers/botman/resource_akamai_botman_serve_alternate_action.go +++ b/pkg/providers/botman/resource_akamai_botman_serve_alternate_action.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/botman/resource_akamai_botman_serve_alternate_action_test.go b/pkg/providers/botman/resource_akamai_botman_serve_alternate_action_test.go index fb2601267..559030fec 100644 --- a/pkg/providers/botman/resource_akamai_botman_serve_alternate_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_serve_alternate_action_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint.go b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint.go index 66f24b8e6..04f575bc8 100644 --- a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint.go +++ b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection.go b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection.go index 6c1ed67ee..26ebc1893 100644 --- a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection.go +++ b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection_test.go b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection_test.go index 51a45ea2d..cb9931381 100644 --- a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection_test.go +++ b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection_test.go @@ -3,7 +3,7 @@ package botman import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_test.go b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_test.go index 42777e5ff..7270f6e85 100644 --- a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_test.go +++ b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/botman" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/clientlists/data_akamai_clientlist_lists.go b/pkg/providers/clientlists/data_akamai_clientlist_lists.go index 62035c1f0..805b6b7d6 100644 --- a/pkg/providers/clientlists/data_akamai_clientlist_lists.go +++ b/pkg/providers/clientlists/data_akamai_clientlist_lists.go @@ -5,7 +5,7 @@ import ( "encoding/json" "errors" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/clientlists" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/clientlists" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/clientlists/data_akamai_clientlist_lists_test.go b/pkg/providers/clientlists/data_akamai_clientlist_lists_test.go index 90f193038..047f99a70 100644 --- a/pkg/providers/clientlists/data_akamai_clientlist_lists_test.go +++ b/pkg/providers/clientlists/data_akamai_clientlist_lists_test.go @@ -7,7 +7,7 @@ import ( "strconv" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/clientlists" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/clientlists" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/clientlists/provider.go b/pkg/providers/clientlists/provider.go index 3b006385b..d0b16c381 100644 --- a/pkg/providers/clientlists/provider.go +++ b/pkg/providers/clientlists/provider.go @@ -4,7 +4,7 @@ package clientlists import ( "sync" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/clientlists" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/clientlists" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-framework/datasource" diff --git a/pkg/providers/clientlists/provider_test.go b/pkg/providers/clientlists/provider_test.go index 5721467a5..707422251 100644 --- a/pkg/providers/clientlists/provider_test.go +++ b/pkg/providers/clientlists/provider_test.go @@ -5,7 +5,7 @@ import ( "sync" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/clientlists" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/clientlists" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" ) diff --git a/pkg/providers/clientlists/resource_akamai_clientlists_list.go b/pkg/providers/clientlists/resource_akamai_clientlists_list.go index 1704a497a..86c783bca 100644 --- a/pkg/providers/clientlists/resource_akamai_clientlists_list.go +++ b/pkg/providers/clientlists/resource_akamai_clientlists_list.go @@ -8,7 +8,7 @@ import ( "reflect" "sort" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/clientlists" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/clientlists" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/clientlists/resource_akamai_clientlists_list_activation.go b/pkg/providers/clientlists/resource_akamai_clientlists_list_activation.go index f7e4b2055..1ae0613cf 100644 --- a/pkg/providers/clientlists/resource_akamai_clientlists_list_activation.go +++ b/pkg/providers/clientlists/resource_akamai_clientlists_list_activation.go @@ -8,7 +8,7 @@ import ( "strings" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/clientlists" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/clientlists" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/clientlists/resource_akamai_clientlists_list_activation_test.go b/pkg/providers/clientlists/resource_akamai_clientlists_list_activation_test.go index 0a95cf685..f4fe326e2 100644 --- a/pkg/providers/clientlists/resource_akamai_clientlists_list_activation_test.go +++ b/pkg/providers/clientlists/resource_akamai_clientlists_list_activation_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/clientlists" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/clientlists" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/clientlists/resource_akamai_clientlists_list_test.go b/pkg/providers/clientlists/resource_akamai_clientlists_list_test.go index a23fcd069..b727e5efe 100644 --- a/pkg/providers/clientlists/resource_akamai_clientlists_list_test.go +++ b/pkg/providers/clientlists/resource_akamai_clientlists_list_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/clientlists" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/clientlists" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule.go b/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule.go index 87d2e8b7b..9c03fae7d 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer.go b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer.go index 944497bd0..ee89ba7b7 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer.go @@ -6,7 +6,7 @@ import ( "errors" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule.go b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule.go index 8ddbeff0e..d289a8249 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule.go @@ -4,7 +4,7 @@ import ( "context" "encoding/json" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_test.go index 970457ce3..5c8e88a58 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_test.go @@ -4,7 +4,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule.go b/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule.go index f6e0f132f..bb5327a5d 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule.go b/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule.go index b386d84f1..68d53bfba 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule.go b/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule.go index febd96391..60512218e 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule.go b/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule.go index 0d6330360..50ad9a601 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_policy.go b/pkg/providers/cloudlets/data_akamai_cloudlets_policy.go index c231cd8fa..cb79345c2 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_policy.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_policy.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_policy_activation.go b/pkg/providers/cloudlets/data_akamai_cloudlets_policy_activation.go index c34fa41c6..347609fc5 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_policy_activation.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_policy_activation.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" - v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets/v3" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" + v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets/v3" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_policy_activation_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_policy_activation_test.go index 94c98f957..8ef47a053 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_policy_activation_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_policy_activation_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" - v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets/v3" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" + v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets/v3" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_policy_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_policy_test.go index fdcb9737a..867dc30c4 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_policy_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_policy_test.go @@ -4,7 +4,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule.go b/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule.go index 5643d4806..4ef6c7c5a 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_shared_policy.go b/pkg/providers/cloudlets/data_akamai_cloudlets_shared_policy.go index ff516a90c..fd4cb5817 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_shared_policy.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_shared_policy.go @@ -6,7 +6,7 @@ import ( "errors" "fmt" - v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets/v3" + v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets/v3" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_shared_policy_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_shared_policy_test.go index 6d7ee7128..476af8e03 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_shared_policy_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_shared_policy_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets/v3" + v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets/v3" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule.go b/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule.go index a13e3ed35..aa495d281 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/cloudlets/match_rules.go b/pkg/providers/cloudlets/match_rules.go index 2a80023f1..0775cce3d 100644 --- a/pkg/providers/cloudlets/match_rules.go +++ b/pkg/providers/cloudlets/match_rules.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/cloudlets/match_rules_test.go b/pkg/providers/cloudlets/match_rules_test.go index 50c1374dd..0a2d602c9 100644 --- a/pkg/providers/cloudlets/match_rules_test.go +++ b/pkg/providers/cloudlets/match_rules_test.go @@ -4,7 +4,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/stretchr/testify/require" "github.com/tj/assert" diff --git a/pkg/providers/cloudlets/policy_version_test.go b/pkg/providers/cloudlets/policy_version_test.go index 01a6cdd01..c078c3488 100644 --- a/pkg/providers/cloudlets/policy_version_test.go +++ b/pkg/providers/cloudlets/policy_version_test.go @@ -5,8 +5,8 @@ import ( "fmt" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" - v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets/v3" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" + v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets/v3" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/cloudlets/policy_version_v2.go b/pkg/providers/cloudlets/policy_version_v2.go index 3d79284d4..b6027d109 100644 --- a/pkg/providers/cloudlets/policy_version_v2.go +++ b/pkg/providers/cloudlets/policy_version_v2.go @@ -3,7 +3,7 @@ package cloudlets import ( "context" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" ) type v2VersionStrategy struct { diff --git a/pkg/providers/cloudlets/policy_version_v3.go b/pkg/providers/cloudlets/policy_version_v3.go index cf575a5b7..63e81338b 100644 --- a/pkg/providers/cloudlets/policy_version_v3.go +++ b/pkg/providers/cloudlets/policy_version_v3.go @@ -3,7 +3,7 @@ package cloudlets import ( "context" - cloudlets "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets/v3" + cloudlets "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets/v3" ) type v3VersionStrategy struct { diff --git a/pkg/providers/cloudlets/provider.go b/pkg/providers/cloudlets/provider.go index 695909537..400285657 100644 --- a/pkg/providers/cloudlets/provider.go +++ b/pkg/providers/cloudlets/provider.go @@ -6,8 +6,8 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" - v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets/v3" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" + v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets/v3" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" ) diff --git a/pkg/providers/cloudlets/provider_test.go b/pkg/providers/cloudlets/provider_test.go index 747ab036a..9bb9097af 100644 --- a/pkg/providers/cloudlets/provider_test.go +++ b/pkg/providers/cloudlets/provider_test.go @@ -4,10 +4,10 @@ import ( "sync" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets/v3" + v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets/v3" ) func TestMain(m *testing.M) { diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer.go index 3fec5c73a..da49d68bc 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer.go @@ -8,8 +8,8 @@ import ( "strconv" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" ozzo "github.com/go-ozzo/ozzo-validation/v4" diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_activation.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_activation.go index a25fe6c7f..f0f29d460 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_activation.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_activation.go @@ -8,8 +8,8 @@ import ( "strings" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_activation_test.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_activation_test.go index 09c35bd04..8f3523518 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_activation_test.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_activation_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_test.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_test.go index 1d64ac526..4c7974ca7 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_test.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy.go index 697ef7ffb..6cfa581bf 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy.go @@ -10,9 +10,9 @@ import ( "strings" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" - v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets/v3" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" + v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets/v3" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation.go index f056888bb..eeb6f26a1 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation.go @@ -12,9 +12,9 @@ import ( "github.com/apex/log" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" - v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets/v3" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" + v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets/v3" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_test.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_test.go index 6af5b3edb..3040c63d8 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_test.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" - v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets/v3" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" + v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets/v3" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_v2.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_v2.go index 852d7b873..13871a9b6 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_v2.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_v2.go @@ -8,7 +8,7 @@ import ( "sort" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/apex/log" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_v3.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_v3.go index 7fbe4212a..cd7254f57 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_v3.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_v3.go @@ -7,8 +7,8 @@ import ( "strings" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" - v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets/v3" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" + v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets/v3" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/apex/log" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go index 13210bcab..1f12c8ecd 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go @@ -5,8 +5,8 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" - v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets/v3" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" + v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets/v3" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_v2.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_v2.go index beda0a153..2ba43f2a8 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_v2.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_v2.go @@ -9,7 +9,7 @@ import ( "strings" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_v3.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_v3.go index 1e1b271ba..b42482bf3 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_v3.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_v3.go @@ -7,7 +7,7 @@ import ( "strconv" "time" - v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudlets/v3" + v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets/v3" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_capacities.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_capacities.go index bd0de50aa..bf7d9917d 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_capacities.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_capacities.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudwrapper" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/collections" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-framework/attr" diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_capacities_test.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_capacities_test.go index bc7719ee4..12b0f95f7 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_capacities_test.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_capacities_test.go @@ -8,7 +8,7 @@ import ( "strings" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudwrapper" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/assert" diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configuration.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configuration.go index 4a4a34a74..9471b72ee 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configuration.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configuration.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudwrapper" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/datasource" diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configuration_test.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configuration_test.go index ac4e21e75..2e9d0fe83 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configuration_test.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configuration_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudwrapper" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configurations.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configurations.go index 51fc31802..8e88015e7 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configurations.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configurations.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudwrapper" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configurations_test.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configurations_test.go index 4249e01b5..28ee9327b 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configurations_test.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configurations_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudwrapper" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_location.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_location.go index d8c7ca21f..39a765a75 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_location.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_location.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudwrapper" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" "github.com/hashicorp/terraform-plugin-framework/datasource" diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_location_test.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_location_test.go index 772acddea..24af6bc6d 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_location_test.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_location_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudwrapper" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_locations.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_locations.go index 377b97f84..84768001a 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_locations.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_locations.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudwrapper" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_locations_test.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_locations_test.go index f9e4036f6..3c0fd83ff 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_locations_test.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_locations_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudwrapper" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_properties.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_properties.go index 7f615b4b7..ad85e0950 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_properties.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_properties.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudwrapper" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_properties_test.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_properties_test.go index 417144668..14fbb4e93 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_properties_test.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_properties_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudwrapper" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/cloudwrapper/provider_test.go b/pkg/providers/cloudwrapper/provider_test.go index a4621710b..337a6afc4 100644 --- a/pkg/providers/cloudwrapper/provider_test.go +++ b/pkg/providers/cloudwrapper/provider_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudwrapper" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-framework/datasource" diff --git a/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_activation.go b/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_activation.go index c5ca47761..e06533c20 100644 --- a/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_activation.go +++ b/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_activation.go @@ -6,7 +6,7 @@ import ( "strconv" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudwrapper" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts" "github.com/hashicorp/terraform-plugin-framework/attr" diff --git a/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_activation_test.go b/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_activation_test.go index 89b04d569..db54300b0 100644 --- a/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_activation_test.go +++ b/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_activation_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudwrapper" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration.go b/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration.go index 42d22e082..5769d65e6 100644 --- a/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration.go +++ b/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration.go @@ -7,7 +7,7 @@ import ( "strconv" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudwrapper" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/framework/modifiers" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts" diff --git a/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration_model.go b/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration_model.go index 3b8ef1714..2e460cfb9 100644 --- a/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration_model.go +++ b/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration_model.go @@ -9,7 +9,7 @@ import ( "strconv" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudwrapper" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/framework/modifiers" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/framework/replacer" "github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts" diff --git a/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration_test.go b/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration_test.go index 3b2751f5f..01f6bde8e 100644 --- a/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration_test.go +++ b/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration_test.go @@ -4,7 +4,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cloudwrapper" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/jinzhu/copier" diff --git a/pkg/providers/cps/data_akamai_cps_csr.go b/pkg/providers/cps/data_akamai_cps_csr.go index 131d887d5..5ddf10321 100644 --- a/pkg/providers/cps/data_akamai_cps_csr.go +++ b/pkg/providers/cps/data_akamai_cps_csr.go @@ -5,8 +5,8 @@ import ( "errors" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/collections" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/cps/data_akamai_cps_csr_test.go b/pkg/providers/cps/data_akamai_cps_csr_test.go index 941857acc..15f5daf85 100644 --- a/pkg/providers/cps/data_akamai_cps_csr_test.go +++ b/pkg/providers/cps/data_akamai_cps_csr_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/cps/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/cps/data_akamai_cps_deployments.go b/pkg/providers/cps/data_akamai_cps_deployments.go index 35df7ff6b..2d6464ce1 100644 --- a/pkg/providers/cps/data_akamai_cps_deployments.go +++ b/pkg/providers/cps/data_akamai_cps_deployments.go @@ -4,8 +4,8 @@ import ( "context" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/cps/data_akamai_cps_deployments_test.go b/pkg/providers/cps/data_akamai_cps_deployments_test.go index e5e1368b1..baa859d8b 100644 --- a/pkg/providers/cps/data_akamai_cps_deployments_test.go +++ b/pkg/providers/cps/data_akamai_cps_deployments_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/cps/data_akamai_cps_enrollment.go b/pkg/providers/cps/data_akamai_cps_enrollment.go index 9f372daee..578d29655 100644 --- a/pkg/providers/cps/data_akamai_cps_enrollment.go +++ b/pkg/providers/cps/data_akamai_cps_enrollment.go @@ -4,8 +4,8 @@ import ( "context" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" cpstools "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/cps/tools" diff --git a/pkg/providers/cps/data_akamai_cps_enrollment_test.go b/pkg/providers/cps/data_akamai_cps_enrollment_test.go index 304d62ed5..cbe3d9a6f 100644 --- a/pkg/providers/cps/data_akamai_cps_enrollment_test.go +++ b/pkg/providers/cps/data_akamai_cps_enrollment_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/cps/data_akamai_cps_enrollments.go b/pkg/providers/cps/data_akamai_cps_enrollments.go index 9b0cdc16a..6d3407acc 100644 --- a/pkg/providers/cps/data_akamai_cps_enrollments.go +++ b/pkg/providers/cps/data_akamai_cps_enrollments.go @@ -3,8 +3,8 @@ package cps import ( "context" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" cpstools "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/cps/tools" diff --git a/pkg/providers/cps/data_akamai_cps_enrollments_test.go b/pkg/providers/cps/data_akamai_cps_enrollments_test.go index cb61440b8..f710219b1 100644 --- a/pkg/providers/cps/data_akamai_cps_enrollments_test.go +++ b/pkg/providers/cps/data_akamai_cps_enrollments_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/cps/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/cps/enrollments.go b/pkg/providers/cps/enrollments.go index 607eef349..e0fee01d2 100644 --- a/pkg/providers/cps/enrollments.go +++ b/pkg/providers/cps/enrollments.go @@ -9,8 +9,8 @@ import ( "strings" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/cps/enrollments_mocks.go b/pkg/providers/cps/enrollments_mocks.go index db62cea8f..c57703e64 100644 --- a/pkg/providers/cps/enrollments_mocks.go +++ b/pkg/providers/cps/enrollments_mocks.go @@ -1,6 +1,6 @@ package cps -import "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" +import "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" func mockLetsEncryptChallenges() *cps.Change { allowedInput := cps.AllowedInput{ diff --git a/pkg/providers/cps/enrollments_test.go b/pkg/providers/cps/enrollments_test.go index 6c334ba32..722ded0dc 100644 --- a/pkg/providers/cps/enrollments_test.go +++ b/pkg/providers/cps/enrollments_test.go @@ -3,7 +3,7 @@ package cps import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" "github.com/stretchr/testify/assert" ) diff --git a/pkg/providers/cps/provider.go b/pkg/providers/cps/provider.go index 91c1f237d..4369b5a64 100644 --- a/pkg/providers/cps/provider.go +++ b/pkg/providers/cps/provider.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" ) diff --git a/pkg/providers/cps/provider_test.go b/pkg/providers/cps/provider_test.go index ddd510e77..e8f5a7940 100644 --- a/pkg/providers/cps/provider_test.go +++ b/pkg/providers/cps/provider_test.go @@ -4,7 +4,7 @@ import ( "sync" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" ) diff --git a/pkg/providers/cps/resource_akamai_cps_dv_enrollment.go b/pkg/providers/cps/resource_akamai_cps_dv_enrollment.go index e1fa5ad63..a231e8c18 100644 --- a/pkg/providers/cps/resource_akamai_cps_dv_enrollment.go +++ b/pkg/providers/cps/resource_akamai_cps_dv_enrollment.go @@ -8,8 +8,8 @@ import ( "strings" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" diff --git a/pkg/providers/cps/resource_akamai_cps_dv_enrollment_test.go b/pkg/providers/cps/resource_akamai_cps_dv_enrollment_test.go index 0ac61586b..87ff1cd1a 100644 --- a/pkg/providers/cps/resource_akamai_cps_dv_enrollment_test.go +++ b/pkg/providers/cps/resource_akamai_cps_dv_enrollment_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/cps/resource_akamai_cps_dv_validation.go b/pkg/providers/cps/resource_akamai_cps_dv_validation.go index 8d63a68ad..8828dadba 100644 --- a/pkg/providers/cps/resource_akamai_cps_dv_validation.go +++ b/pkg/providers/cps/resource_akamai_cps_dv_validation.go @@ -8,8 +8,8 @@ import ( "strconv" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/cps/resource_akamai_cps_dv_validation_test.go b/pkg/providers/cps/resource_akamai_cps_dv_validation_test.go index 31fd09e82..20bc054c8 100644 --- a/pkg/providers/cps/resource_akamai_cps_dv_validation_test.go +++ b/pkg/providers/cps/resource_akamai_cps_dv_validation_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/cps/resource_akamai_cps_third_party_enrollment.go b/pkg/providers/cps/resource_akamai_cps_third_party_enrollment.go index 1ba99ce72..a6107875b 100644 --- a/pkg/providers/cps/resource_akamai_cps_third_party_enrollment.go +++ b/pkg/providers/cps/resource_akamai_cps_third_party_enrollment.go @@ -7,8 +7,8 @@ import ( "strconv" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" diff --git a/pkg/providers/cps/resource_akamai_cps_third_party_enrollment_test.go b/pkg/providers/cps/resource_akamai_cps_third_party_enrollment_test.go index 2bf7ac59d..f24826916 100644 --- a/pkg/providers/cps/resource_akamai_cps_third_party_enrollment_test.go +++ b/pkg/providers/cps/resource_akamai_cps_third_party_enrollment_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/cps/resource_akamai_cps_upload_certificate.go b/pkg/providers/cps/resource_akamai_cps_upload_certificate.go index 77fe58dbe..3945bffc5 100644 --- a/pkg/providers/cps/resource_akamai_cps_upload_certificate.go +++ b/pkg/providers/cps/resource_akamai_cps_upload_certificate.go @@ -8,8 +8,8 @@ import ( "strings" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/cps/resource_akamai_cps_upload_certificate_test.go b/pkg/providers/cps/resource_akamai_cps_upload_certificate_test.go index c9d83b45a..9fc6d6318 100644 --- a/pkg/providers/cps/resource_akamai_cps_upload_certificate_test.go +++ b/pkg/providers/cps/resource_akamai_cps_upload_certificate_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/cps/tools/enrollment.go b/pkg/providers/cps/tools/enrollment.go index 9e9e6f152..4002ecf18 100644 --- a/pkg/providers/cps/tools/enrollment.go +++ b/pkg/providers/cps/tools/enrollment.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/cps/tools/enrollment_test.go b/pkg/providers/cps/tools/enrollment_test.go index 9988c0bda..91937747e 100644 --- a/pkg/providers/cps/tools/enrollment_test.go +++ b/pkg/providers/cps/tools/enrollment_test.go @@ -3,7 +3,7 @@ package tools import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/cps" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/pkg/providers/datastream/connectors.go b/pkg/providers/datastream/connectors.go index 57cb0d13c..a6665a5d9 100644 --- a/pkg/providers/datastream/connectors.go +++ b/pkg/providers/datastream/connectors.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/datastream" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/datastream" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/datastream/connectors_test.go b/pkg/providers/datastream/connectors_test.go index 8cb80d489..f79576d96 100644 --- a/pkg/providers/datastream/connectors_test.go +++ b/pkg/providers/datastream/connectors_test.go @@ -3,7 +3,7 @@ package datastream import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/datastream" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/datastream" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/stretchr/testify/assert" ) diff --git a/pkg/providers/datastream/data_akamai_datastream_activation_history.go b/pkg/providers/datastream/data_akamai_datastream_activation_history.go index 07000cf94..70a83b950 100644 --- a/pkg/providers/datastream/data_akamai_datastream_activation_history.go +++ b/pkg/providers/datastream/data_akamai_datastream_activation_history.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/datastream" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/datastream" ) func dataAkamaiDatastreamActivationHistory() *schema.Resource { diff --git a/pkg/providers/datastream/data_akamai_datastream_activation_history_test.go b/pkg/providers/datastream/data_akamai_datastream_activation_history_test.go index d6eb4d1fa..c4b5b2a25 100644 --- a/pkg/providers/datastream/data_akamai_datastream_activation_history_test.go +++ b/pkg/providers/datastream/data_akamai_datastream_activation_history_test.go @@ -6,7 +6,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/datastream" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/datastream" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/datastream/data_akamai_datastream_dataset_fields.go b/pkg/providers/datastream/data_akamai_datastream_dataset_fields.go index 5be4a0d74..db5527002 100644 --- a/pkg/providers/datastream/data_akamai_datastream_dataset_fields.go +++ b/pkg/providers/datastream/data_akamai_datastream_dataset_fields.go @@ -5,8 +5,8 @@ import ( "errors" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/datastream" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/datastream" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/datastream/data_akamai_datastream_dataset_fields_test.go b/pkg/providers/datastream/data_akamai_datastream_dataset_fields_test.go index 548de8345..89fd0a7e0 100644 --- a/pkg/providers/datastream/data_akamai_datastream_dataset_fields_test.go +++ b/pkg/providers/datastream/data_akamai_datastream_dataset_fields_test.go @@ -4,7 +4,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/datastream" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/datastream" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/datastream/data_akamai_datastreams.go b/pkg/providers/datastream/data_akamai_datastreams.go index 437b312c1..585dc82ca 100644 --- a/pkg/providers/datastream/data_akamai_datastreams.go +++ b/pkg/providers/datastream/data_akamai_datastreams.go @@ -5,12 +5,12 @@ import ( "errors" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/datastream" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/datastream" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/datastream/data_akamai_datastreams_test.go b/pkg/providers/datastream/data_akamai_datastreams_test.go index e8042e95c..faba021af 100644 --- a/pkg/providers/datastream/data_akamai_datastreams_test.go +++ b/pkg/providers/datastream/data_akamai_datastreams_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/datastream" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/datastream" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/datastream/provider.go b/pkg/providers/datastream/provider.go index f8e7ae08d..6432e8ec0 100644 --- a/pkg/providers/datastream/provider.go +++ b/pkg/providers/datastream/provider.go @@ -4,7 +4,7 @@ package datastream import ( "sync" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/datastream" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/datastream" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" "github.com/hashicorp/terraform-plugin-framework/datasource" diff --git a/pkg/providers/datastream/provider_test.go b/pkg/providers/datastream/provider_test.go index a4bb58e91..1574b0c15 100644 --- a/pkg/providers/datastream/provider_test.go +++ b/pkg/providers/datastream/provider_test.go @@ -4,7 +4,7 @@ import ( "sync" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/datastream" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/datastream" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" ) diff --git a/pkg/providers/datastream/resource_akamai_datastream.go b/pkg/providers/datastream/resource_akamai_datastream.go index 868d3b6e1..82fdc408a 100644 --- a/pkg/providers/datastream/resource_akamai_datastream.go +++ b/pkg/providers/datastream/resource_akamai_datastream.go @@ -8,8 +8,8 @@ import ( "strings" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/datastream" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/datastream" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/collections" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" diff --git a/pkg/providers/datastream/resource_akamai_datastream_test.go b/pkg/providers/datastream/resource_akamai_datastream_test.go index 5d5b4d500..728ef5d16 100644 --- a/pkg/providers/datastream/resource_akamai_datastream_test.go +++ b/pkg/providers/datastream/resource_akamai_datastream_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/datastream" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/datastream" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/datastream/stream.go b/pkg/providers/datastream/stream.go index 373040371..63956ff75 100644 --- a/pkg/providers/datastream/stream.go +++ b/pkg/providers/datastream/stream.go @@ -5,7 +5,7 @@ import ( "strconv" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/datastream" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/datastream" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/datastream/stream_test.go b/pkg/providers/datastream/stream_test.go index b1def6e74..8f43570dc 100644 --- a/pkg/providers/datastream/stream_test.go +++ b/pkg/providers/datastream/stream_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" "github.com/tj/assert" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/datastream" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/datastream" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/dns/data_authorities_set.go b/pkg/providers/dns/data_authorities_set.go index e1bb87724..d062ebd4c 100644 --- a/pkg/providers/dns/data_authorities_set.go +++ b/pkg/providers/dns/data_authorities_set.go @@ -6,7 +6,7 @@ import ( "sort" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/dns/data_authorities_set_test.go b/pkg/providers/dns/data_authorities_set_test.go index beaca028f..ac1977027 100644 --- a/pkg/providers/dns/data_authorities_set_test.go +++ b/pkg/providers/dns/data_authorities_set_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/dns" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/dns" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/dns/data_dns_record_set.go b/pkg/providers/dns/data_dns_record_set.go index 46ca6bd1c..cdf83c38b 100644 --- a/pkg/providers/dns/data_dns_record_set.go +++ b/pkg/providers/dns/data_dns_record_set.go @@ -7,7 +7,7 @@ import ( "github.com/apex/log" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/dns/data_dns_record_set_test.go b/pkg/providers/dns/data_dns_record_set_test.go index ddae2cf0e..5684f069d 100644 --- a/pkg/providers/dns/data_dns_record_set_test.go +++ b/pkg/providers/dns/data_dns_record_set_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/dns" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/dns" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/dns/provider.go b/pkg/providers/dns/provider.go index 7c6dec03a..835ee54ad 100644 --- a/pkg/providers/dns/provider.go +++ b/pkg/providers/dns/provider.go @@ -4,7 +4,7 @@ package dns import ( "sync" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/dns" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/dns" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" "github.com/hashicorp/terraform-plugin-framework/datasource" diff --git a/pkg/providers/dns/provider_test.go b/pkg/providers/dns/provider_test.go index 4eb4d021c..c4764cfad 100644 --- a/pkg/providers/dns/provider_test.go +++ b/pkg/providers/dns/provider_test.go @@ -4,7 +4,7 @@ import ( "sync" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/dns" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/dns" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" ) diff --git a/pkg/providers/dns/resource_akamai_dns_record.go b/pkg/providers/dns/resource_akamai_dns_record.go index 801d5faed..bbfa4dff8 100644 --- a/pkg/providers/dns/resource_akamai_dns_record.go +++ b/pkg/providers/dns/resource_akamai_dns_record.go @@ -15,8 +15,8 @@ import ( "sync" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/dns" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/dns" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/dns/internal/txtrecord" diff --git a/pkg/providers/dns/resource_akamai_dns_record_test.go b/pkg/providers/dns/resource_akamai_dns_record_test.go index 1ee587d54..fafbac3e4 100644 --- a/pkg/providers/dns/resource_akamai_dns_record_test.go +++ b/pkg/providers/dns/resource_akamai_dns_record_test.go @@ -7,8 +7,8 @@ import ( "strings" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/dns" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/dns" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/dns/resource_akamai_dns_zone.go b/pkg/providers/dns/resource_akamai_dns_zone.go index af1762f31..ad7f69205 100644 --- a/pkg/providers/dns/resource_akamai_dns_zone.go +++ b/pkg/providers/dns/resource_akamai_dns_zone.go @@ -12,8 +12,8 @@ import ( "github.com/apex/log" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/dns" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/dns" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/dns/resource_akamai_dns_zone_test.go b/pkg/providers/dns/resource_akamai_dns_zone_test.go index 528bd1a49..93d19c9cc 100644 --- a/pkg/providers/dns/resource_akamai_dns_zone_test.go +++ b/pkg/providers/dns/resource_akamai_dns_zone_test.go @@ -6,7 +6,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/dns" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/dns" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/edgeworkers/bundle_hash.go b/pkg/providers/edgeworkers/bundle_hash.go index c2439aba6..7b04843eb 100644 --- a/pkg/providers/edgeworkers/bundle_hash.go +++ b/pkg/providers/edgeworkers/bundle_hash.go @@ -8,7 +8,7 @@ import ( "io" "sort" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" ) type bundleFile struct { diff --git a/pkg/providers/edgeworkers/bundle_hash_test.go b/pkg/providers/edgeworkers/bundle_hash_test.go index 14e35c218..ee0ae929c 100644 --- a/pkg/providers/edgeworkers/bundle_hash_test.go +++ b/pkg/providers/edgeworkers/bundle_hash_test.go @@ -7,7 +7,7 @@ import ( "io" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/providers/edgeworkers/data_akamai_edgekv_group_items.go b/pkg/providers/edgeworkers/data_akamai_edgekv_group_items.go index 1bd96365b..cfa465136 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgekv_group_items.go +++ b/pkg/providers/edgeworkers/data_akamai_edgekv_group_items.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/edgeworkers/data_akamai_edgekv_group_items_test.go b/pkg/providers/edgeworkers/data_akamai_edgekv_group_items_test.go index b1503eec3..a24e6cd5e 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgekv_group_items_test.go +++ b/pkg/providers/edgeworkers/data_akamai_edgekv_group_items_test.go @@ -4,7 +4,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/edgeworkers/data_akamai_edgekv_groups.go b/pkg/providers/edgeworkers/data_akamai_edgekv_groups.go index 2fd494443..4606db863 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgekv_groups.go +++ b/pkg/providers/edgeworkers/data_akamai_edgekv_groups.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/edgeworkers/data_akamai_edgekv_groups_test.go b/pkg/providers/edgeworkers/data_akamai_edgekv_groups_test.go index 0647b13b1..46f0324b0 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgekv_groups_test.go +++ b/pkg/providers/edgeworkers/data_akamai_edgekv_groups_test.go @@ -4,7 +4,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/edgeworkers/data_akamai_edgeworker.go b/pkg/providers/edgeworkers/data_akamai_edgeworker.go index 8b112a113..a1216750b 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgeworker.go +++ b/pkg/providers/edgeworkers/data_akamai_edgeworker.go @@ -10,8 +10,8 @@ import ( "strconv" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/edgeworkers/data_akamai_edgeworker_activation.go b/pkg/providers/edgeworkers/data_akamai_edgeworker_activation.go index cad1c9064..c0b63249c 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgeworker_activation.go +++ b/pkg/providers/edgeworkers/data_akamai_edgeworker_activation.go @@ -5,8 +5,8 @@ import ( "errors" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/edgeworkers/data_akamai_edgeworker_activation_test.go b/pkg/providers/edgeworkers/data_akamai_edgeworker_activation_test.go index d3c4ec23d..da3056271 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgeworker_activation_test.go +++ b/pkg/providers/edgeworkers/data_akamai_edgeworker_activation_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/edgeworkers/data_akamai_edgeworker_test.go b/pkg/providers/edgeworkers/data_akamai_edgeworker_test.go index b4ec2c366..f63891ceb 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgeworker_test.go +++ b/pkg/providers/edgeworkers/data_akamai_edgeworker_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/edgeworkers/data_akamai_edgeworkers_resource_tier.go b/pkg/providers/edgeworkers/data_akamai_edgeworkers_resource_tier.go index c1546756d..ea94424c9 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgeworkers_resource_tier.go +++ b/pkg/providers/edgeworkers/data_akamai_edgeworkers_resource_tier.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/edgeworkers/data_akamai_edgeworkers_resource_tier_test.go b/pkg/providers/edgeworkers/data_akamai_edgeworkers_resource_tier_test.go index e90304ee0..33203efdc 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgeworkers_resource_tier_test.go +++ b/pkg/providers/edgeworkers/data_akamai_edgeworkers_resource_tier_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/edgeworkers/provider.go b/pkg/providers/edgeworkers/provider.go index cee51c6d3..4115197ff 100644 --- a/pkg/providers/edgeworkers/provider.go +++ b/pkg/providers/edgeworkers/provider.go @@ -4,7 +4,7 @@ package edgeworkers import ( "sync" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" "github.com/hashicorp/terraform-plugin-framework/datasource" diff --git a/pkg/providers/edgeworkers/provider_test.go b/pkg/providers/edgeworkers/provider_test.go index b6f79de16..9077ce616 100644 --- a/pkg/providers/edgeworkers/provider_test.go +++ b/pkg/providers/edgeworkers/provider_test.go @@ -4,7 +4,7 @@ import ( "sync" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" ) diff --git a/pkg/providers/edgeworkers/resource_akamai_edgekv.go b/pkg/providers/edgeworkers/resource_akamai_edgekv.go index ce5a75f79..d2dc6f443 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgekv.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgekv.go @@ -7,8 +7,8 @@ import ( "strings" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items.go b/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items.go index 27846951d..bf5630eb3 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items.go @@ -7,8 +7,8 @@ import ( "strings" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/collections" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" diff --git a/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items_test.go b/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items_test.go index 34ce8e377..53e681424 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items_test.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/edgeworkers/resource_akamai_edgekv_test.go b/pkg/providers/edgeworkers/resource_akamai_edgekv_test.go index 3a54a8f74..215a2286b 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgekv_test.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgekv_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/edgeworkers/resource_akamai_edgeworker.go b/pkg/providers/edgeworkers/resource_akamai_edgeworker.go index 5257c6b44..d1b76bd72 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgeworker.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgeworker.go @@ -14,8 +14,8 @@ import ( "strconv" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" diff --git a/pkg/providers/edgeworkers/resource_akamai_edgeworker_test.go b/pkg/providers/edgeworkers/resource_akamai_edgeworker_test.go index 54727d424..9fb875ed2 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgeworker_test.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgeworker_test.go @@ -13,7 +13,7 @@ import ( "testing" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation.go b/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation.go index fb9e3376f..9a586ffb7 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation.go @@ -9,8 +9,8 @@ import ( "strings" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/collections" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" diff --git a/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation_test.go b/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation_test.go index f970d2b9a..eb90f5f59 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation_test.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/edgeworkers" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/gtm/data_akamai_gtm_asmap.go b/pkg/providers/gtm/data_akamai_gtm_asmap.go index 7d590756d..250666a0e 100644 --- a/pkg/providers/gtm/data_akamai_gtm_asmap.go +++ b/pkg/providers/gtm/data_akamai_gtm_asmap.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" diff --git a/pkg/providers/gtm/data_akamai_gtm_asmap_test.go b/pkg/providers/gtm/data_akamai_gtm_asmap_test.go index 60a77bf83..248e66927 100644 --- a/pkg/providers/gtm/data_akamai_gtm_asmap_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_asmap_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/gtm/data_akamai_gtm_cidrmap.go b/pkg/providers/gtm/data_akamai_gtm_cidrmap.go index 5e477e654..852672b2d 100644 --- a/pkg/providers/gtm/data_akamai_gtm_cidrmap.go +++ b/pkg/providers/gtm/data_akamai_gtm_cidrmap.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" diff --git a/pkg/providers/gtm/data_akamai_gtm_cidrmap_test.go b/pkg/providers/gtm/data_akamai_gtm_cidrmap_test.go index 564ad823d..4599d8eb9 100644 --- a/pkg/providers/gtm/data_akamai_gtm_cidrmap_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_cidrmap_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/gtm/data_akamai_gtm_datacenter.go b/pkg/providers/gtm/data_akamai_gtm_datacenter.go index c5b2d3c17..4e62872aa 100644 --- a/pkg/providers/gtm/data_akamai_gtm_datacenter.go +++ b/pkg/providers/gtm/data_akamai_gtm_datacenter.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/gtm/data_akamai_gtm_datacenter_test.go b/pkg/providers/gtm/data_akamai_gtm_datacenter_test.go index bcbfb53b4..27114643c 100644 --- a/pkg/providers/gtm/data_akamai_gtm_datacenter_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_datacenter_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/gtm/data_akamai_gtm_datacenters.go b/pkg/providers/gtm/data_akamai_gtm_datacenters.go index 4215a356d..86cb15839 100644 --- a/pkg/providers/gtm/data_akamai_gtm_datacenters.go +++ b/pkg/providers/gtm/data_akamai_gtm_datacenters.go @@ -3,7 +3,7 @@ package gtm import ( "context" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/gtm/data_akamai_gtm_datacenters_test.go b/pkg/providers/gtm/data_akamai_gtm_datacenters_test.go index 672f81cab..7604fee34 100644 --- a/pkg/providers/gtm/data_akamai_gtm_datacenters_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_datacenters_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/gtm/data_akamai_gtm_default_datacenter.go b/pkg/providers/gtm/data_akamai_gtm_default_datacenter.go index 5bba65fe5..a11e4cd41 100644 --- a/pkg/providers/gtm/data_akamai_gtm_default_datacenter.go +++ b/pkg/providers/gtm/data_akamai_gtm_default_datacenter.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go b/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go index 1277822f6..bc88827af 100644 --- a/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go @@ -3,7 +3,7 @@ package gtm import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/gtm/data_akamai_gtm_domain.go b/pkg/providers/gtm/data_akamai_gtm_domain.go index fa3e6e05f..ea4978901 100644 --- a/pkg/providers/gtm/data_akamai_gtm_domain.go +++ b/pkg/providers/gtm/data_akamai_gtm_domain.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" diff --git a/pkg/providers/gtm/data_akamai_gtm_domain_test.go b/pkg/providers/gtm/data_akamai_gtm_domain_test.go index baf29a4e8..59b483159 100644 --- a/pkg/providers/gtm/data_akamai_gtm_domain_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_domain_test.go @@ -7,7 +7,7 @@ import ( "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/gtm/data_akamai_gtm_domains.go b/pkg/providers/gtm/data_akamai_gtm_domains.go index d4cbcd308..94f05643e 100644 --- a/pkg/providers/gtm/data_akamai_gtm_domains.go +++ b/pkg/providers/gtm/data_akamai_gtm_domains.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" diff --git a/pkg/providers/gtm/data_akamai_gtm_domains_test.go b/pkg/providers/gtm/data_akamai_gtm_domains_test.go index 2c9d6721b..5938d6bec 100644 --- a/pkg/providers/gtm/data_akamai_gtm_domains_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_domains_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/gtm/data_akamai_gtm_resource.go b/pkg/providers/gtm/data_akamai_gtm_resource.go index f1a75a2fa..b1b143b81 100644 --- a/pkg/providers/gtm/data_akamai_gtm_resource.go +++ b/pkg/providers/gtm/data_akamai_gtm_resource.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" diff --git a/pkg/providers/gtm/data_akamai_gtm_resource_test.go b/pkg/providers/gtm/data_akamai_gtm_resource_test.go index 70f21bc0d..a2b972e0f 100644 --- a/pkg/providers/gtm/data_akamai_gtm_resource_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_resource_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/gtm/data_akamai_gtm_resources_test.go b/pkg/providers/gtm/data_akamai_gtm_resources_test.go index 34279bf6c..dd4524d02 100644 --- a/pkg/providers/gtm/data_akamai_gtm_resources_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_resources_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/gtm/provider.go b/pkg/providers/gtm/provider.go index fc8e0fa4d..c8ae8b91e 100644 --- a/pkg/providers/gtm/provider.go +++ b/pkg/providers/gtm/provider.go @@ -2,7 +2,7 @@ package gtm import ( - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" "github.com/hashicorp/terraform-plugin-framework/datasource" diff --git a/pkg/providers/gtm/provider_test.go b/pkg/providers/gtm/provider_test.go index 79267aeb9..217359a55 100644 --- a/pkg/providers/gtm/provider_test.go +++ b/pkg/providers/gtm/provider_test.go @@ -4,7 +4,7 @@ import ( "sync" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" ) diff --git a/pkg/providers/gtm/resource_akamai_gtm_asmap.go b/pkg/providers/gtm/resource_akamai_gtm_asmap.go index 684c77cd9..64c053e2c 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_asmap.go +++ b/pkg/providers/gtm/resource_akamai_gtm_asmap.go @@ -6,8 +6,8 @@ import ( "net/http" "sort" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go b/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go index 96d590702..6c5208a48 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go @@ -6,7 +6,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/gtm/resource_akamai_gtm_cidrmap.go b/pkg/providers/gtm/resource_akamai_gtm_cidrmap.go index c13311dca..9de68fdae 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_cidrmap.go +++ b/pkg/providers/gtm/resource_akamai_gtm_cidrmap.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" diff --git a/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go b/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go index 4b7cd2f7f..b172089c8 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/gtm/resource_akamai_gtm_datacenter.go b/pkg/providers/gtm/resource_akamai_gtm_datacenter.go index adbc7bb8a..b416c7f16 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_datacenter.go +++ b/pkg/providers/gtm/resource_akamai_gtm_datacenter.go @@ -8,8 +8,8 @@ import ( "strings" "sync" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go b/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go index b2c8a9bdc..99aceee89 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/gtm/resource_akamai_gtm_domain.go b/pkg/providers/gtm/resource_akamai_gtm_domain.go index d627fd589..55bc32898 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_domain.go +++ b/pkg/providers/gtm/resource_akamai_gtm_domain.go @@ -8,8 +8,8 @@ import ( "strings" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/gtm/resource_akamai_gtm_domain_test.go b/pkg/providers/gtm/resource_akamai_gtm_domain_test.go index 1dc4cf3a1..46011ecf5 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_domain_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_domain_test.go @@ -7,7 +7,7 @@ import ( "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/gtm/resource_akamai_gtm_geomap.go b/pkg/providers/gtm/resource_akamai_gtm_geomap.go index b5459a23f..6a63549d6 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_geomap.go +++ b/pkg/providers/gtm/resource_akamai_gtm_geomap.go @@ -5,8 +5,8 @@ import ( "errors" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" diff --git a/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go b/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go index 55c942348..8cb3beb52 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/gtm/resource_akamai_gtm_property.go b/pkg/providers/gtm/resource_akamai_gtm_property.go index 46af15754..28c4104bb 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_property.go +++ b/pkg/providers/gtm/resource_akamai_gtm_property.go @@ -7,8 +7,8 @@ import ( "sort" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" diff --git a/pkg/providers/gtm/resource_akamai_gtm_property_test.go b/pkg/providers/gtm/resource_akamai_gtm_property_test.go index fc8f80eb5..aa4794b12 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_property_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_property_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/gtm/resource_akamai_gtm_resource.go b/pkg/providers/gtm/resource_akamai_gtm_resource.go index c65838b82..76b61457d 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_resource.go +++ b/pkg/providers/gtm/resource_akamai_gtm_resource.go @@ -6,8 +6,8 @@ import ( "fmt" "sort" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/gtm/resource_akamai_gtm_resource_test.go b/pkg/providers/gtm/resource_akamai_gtm_resource_test.go index a678f7d12..c5424d74a 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_resource_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_resource_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/gtm" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/iam/data_akamai_iam_contact_types.go b/pkg/providers/iam/data_akamai_iam_contact_types.go index 59a8e025a..64912c533 100644 --- a/pkg/providers/iam/data_akamai_iam_contact_types.go +++ b/pkg/providers/iam/data_akamai_iam_contact_types.go @@ -3,7 +3,7 @@ package iam import ( "context" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/iam/data_akamai_iam_contact_types_test.go b/pkg/providers/iam/data_akamai_iam_contact_types_test.go index b1696ff42..1f588f18a 100644 --- a/pkg/providers/iam/data_akamai_iam_contact_types_test.go +++ b/pkg/providers/iam/data_akamai_iam_contact_types_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/iam/data_akamai_iam_countries.go b/pkg/providers/iam/data_akamai_iam_countries.go index 1a597101a..d01c0223d 100644 --- a/pkg/providers/iam/data_akamai_iam_countries.go +++ b/pkg/providers/iam/data_akamai_iam_countries.go @@ -3,7 +3,7 @@ package iam import ( "context" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/iam/data_akamai_iam_countries_test.go b/pkg/providers/iam/data_akamai_iam_countries_test.go index 5b8630da2..f7d8c1829 100644 --- a/pkg/providers/iam/data_akamai_iam_countries_test.go +++ b/pkg/providers/iam/data_akamai_iam_countries_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/iam/data_akamai_iam_grantable_roles.go b/pkg/providers/iam/data_akamai_iam_grantable_roles.go index c9150de72..b58242d15 100644 --- a/pkg/providers/iam/data_akamai_iam_grantable_roles.go +++ b/pkg/providers/iam/data_akamai_iam_grantable_roles.go @@ -3,8 +3,8 @@ package iam import ( "context" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/iam/data_akamai_iam_grantable_roles_test.go b/pkg/providers/iam/data_akamai_iam_grantable_roles_test.go index 41cc081df..69c08fa70 100644 --- a/pkg/providers/iam/data_akamai_iam_grantable_roles_test.go +++ b/pkg/providers/iam/data_akamai_iam_grantable_roles_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/iam/data_akamai_iam_groups.go b/pkg/providers/iam/data_akamai_iam_groups.go index 5c9c9b818..4207253f4 100644 --- a/pkg/providers/iam/data_akamai_iam_groups.go +++ b/pkg/providers/iam/data_akamai_iam_groups.go @@ -4,8 +4,8 @@ import ( "context" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/iam/data_akamai_iam_groups_test.go b/pkg/providers/iam/data_akamai_iam_groups_test.go index 0f41a0b1b..b1822363c 100644 --- a/pkg/providers/iam/data_akamai_iam_groups_test.go +++ b/pkg/providers/iam/data_akamai_iam_groups_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/iam/data_akamai_iam_roles.go b/pkg/providers/iam/data_akamai_iam_roles.go index aac13bf8f..9d9463d1a 100644 --- a/pkg/providers/iam/data_akamai_iam_roles.go +++ b/pkg/providers/iam/data_akamai_iam_roles.go @@ -4,8 +4,8 @@ import ( "context" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/iam/data_akamai_iam_roles_test.go b/pkg/providers/iam/data_akamai_iam_roles_test.go index af9206d39..455dcff55 100644 --- a/pkg/providers/iam/data_akamai_iam_roles_test.go +++ b/pkg/providers/iam/data_akamai_iam_roles_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/iam/data_akamai_iam_states.go b/pkg/providers/iam/data_akamai_iam_states.go index e10479535..8f306826f 100644 --- a/pkg/providers/iam/data_akamai_iam_states.go +++ b/pkg/providers/iam/data_akamai_iam_states.go @@ -3,8 +3,8 @@ package iam import ( "context" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/iam/data_akamai_iam_states_test.go b/pkg/providers/iam/data_akamai_iam_states_test.go index 654a59653..9f7fe59b1 100644 --- a/pkg/providers/iam/data_akamai_iam_states_test.go +++ b/pkg/providers/iam/data_akamai_iam_states_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/iam/data_akamai_iam_supported_langs.go b/pkg/providers/iam/data_akamai_iam_supported_langs.go index 4afb2f24a..9b380dfa3 100644 --- a/pkg/providers/iam/data_akamai_iam_supported_langs.go +++ b/pkg/providers/iam/data_akamai_iam_supported_langs.go @@ -3,7 +3,7 @@ package iam import ( "context" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/iam/data_akamai_iam_supported_langs_test.go b/pkg/providers/iam/data_akamai_iam_supported_langs_test.go index 914e4ef6d..8a1047f49 100644 --- a/pkg/providers/iam/data_akamai_iam_supported_langs_test.go +++ b/pkg/providers/iam/data_akamai_iam_supported_langs_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/iam/data_akamai_iam_timeout_policies.go b/pkg/providers/iam/data_akamai_iam_timeout_policies.go index 711f6e10e..35f29819c 100644 --- a/pkg/providers/iam/data_akamai_iam_timeout_policies.go +++ b/pkg/providers/iam/data_akamai_iam_timeout_policies.go @@ -3,7 +3,7 @@ package iam import ( "context" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/iam/data_akamai_iam_timeout_policies_test.go b/pkg/providers/iam/data_akamai_iam_timeout_policies_test.go index c65e70489..f8cb67f9c 100644 --- a/pkg/providers/iam/data_akamai_iam_timeout_policies_test.go +++ b/pkg/providers/iam/data_akamai_iam_timeout_policies_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/iam/data_akamai_iam_timezones.go b/pkg/providers/iam/data_akamai_iam_timezones.go index 279753a4e..e5638d67a 100644 --- a/pkg/providers/iam/data_akamai_iam_timezones.go +++ b/pkg/providers/iam/data_akamai_iam_timezones.go @@ -3,8 +3,8 @@ package iam import ( "context" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/apex/log" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/iam/data_akamai_iam_timezones_test.go b/pkg/providers/iam/data_akamai_iam_timezones_test.go index cdec86e0e..0c50b45b9 100644 --- a/pkg/providers/iam/data_akamai_iam_timezones_test.go +++ b/pkg/providers/iam/data_akamai_iam_timezones_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/iam/provider.go b/pkg/providers/iam/provider.go index f79b9a1cd..50cbedf75 100644 --- a/pkg/providers/iam/provider.go +++ b/pkg/providers/iam/provider.go @@ -4,7 +4,7 @@ package iam import ( "sync" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" "github.com/hashicorp/terraform-plugin-framework/datasource" diff --git a/pkg/providers/iam/provider_test.go b/pkg/providers/iam/provider_test.go index 404688d72..85c6111ec 100644 --- a/pkg/providers/iam/provider_test.go +++ b/pkg/providers/iam/provider_test.go @@ -4,7 +4,7 @@ import ( "sync" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" ) diff --git a/pkg/providers/iam/resource_akamai_iam_blocked_user_properties.go b/pkg/providers/iam/resource_akamai_iam_blocked_user_properties.go index 268d02a06..866be9e48 100644 --- a/pkg/providers/iam/resource_akamai_iam_blocked_user_properties.go +++ b/pkg/providers/iam/resource_akamai_iam_blocked_user_properties.go @@ -6,8 +6,8 @@ import ( "strconv" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/iam/resource_akamai_iam_blocked_user_properties_test.go b/pkg/providers/iam/resource_akamai_iam_blocked_user_properties_test.go index 18d0b8fbe..1a29e049c 100644 --- a/pkg/providers/iam/resource_akamai_iam_blocked_user_properties_test.go +++ b/pkg/providers/iam/resource_akamai_iam_blocked_user_properties_test.go @@ -5,7 +5,7 @@ import ( "strconv" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/iam/resource_akamai_iam_group.go b/pkg/providers/iam/resource_akamai_iam_group.go index e4f7495fe..489af1e20 100644 --- a/pkg/providers/iam/resource_akamai_iam_group.go +++ b/pkg/providers/iam/resource_akamai_iam_group.go @@ -4,8 +4,8 @@ import ( "context" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/iam/resource_akamai_iam_group_test.go b/pkg/providers/iam/resource_akamai_iam_group_test.go index 0139637f2..e586a35ea 100644 --- a/pkg/providers/iam/resource_akamai_iam_group_test.go +++ b/pkg/providers/iam/resource_akamai_iam_group_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/iam/resource_akamai_iam_role.go b/pkg/providers/iam/resource_akamai_iam_role.go index 77830a8dd..c8d992d7b 100644 --- a/pkg/providers/iam/resource_akamai_iam_role.go +++ b/pkg/providers/iam/resource_akamai_iam_role.go @@ -5,8 +5,8 @@ import ( "sort" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/iam/resource_akamai_iam_role_test.go b/pkg/providers/iam/resource_akamai_iam_role_test.go index 437757d8c..ee6c2669d 100644 --- a/pkg/providers/iam/resource_akamai_iam_role_test.go +++ b/pkg/providers/iam/resource_akamai_iam_role_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/iam/resource_akamai_iam_user.go b/pkg/providers/iam/resource_akamai_iam_user.go index 9a50e0e32..e32cea2fc 100644 --- a/pkg/providers/iam/resource_akamai_iam_user.go +++ b/pkg/providers/iam/resource_akamai_iam_user.go @@ -9,8 +9,8 @@ import ( "sort" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/google/go-cmp/cmp" diff --git a/pkg/providers/iam/resource_akamai_iam_user_test.go b/pkg/providers/iam/resource_akamai_iam_user_test.go index 0737241e5..009b18686 100644 --- a/pkg/providers/iam/resource_akamai_iam_user_test.go +++ b/pkg/providers/iam/resource_akamai_iam_user_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/iam" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/imaging/data_akamai_imaging_policy_image.go b/pkg/providers/imaging/data_akamai_imaging_policy_image.go index 4677f6715..cffe5fb7c 100644 --- a/pkg/providers/imaging/data_akamai_imaging_policy_image.go +++ b/pkg/providers/imaging/data_akamai_imaging_policy_image.go @@ -7,7 +7,7 @@ import ( "encoding/json" "io" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/imaging" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/imaging" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/imaging/imagewriter" diff --git a/pkg/providers/imaging/data_akamai_imaging_policy_video.go b/pkg/providers/imaging/data_akamai_imaging_policy_video.go index 4dd91f8ad..49a5c7616 100644 --- a/pkg/providers/imaging/data_akamai_imaging_policy_video.go +++ b/pkg/providers/imaging/data_akamai_imaging_policy_video.go @@ -4,7 +4,7 @@ import ( "context" "encoding/json" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/imaging" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/imaging" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/imaging/videowriter" diff --git a/pkg/providers/imaging/imagewriter/convert-image.gen.go b/pkg/providers/imaging/imagewriter/convert-image.gen.go index b9b4cf46f..dce8df12f 100644 --- a/pkg/providers/imaging/imagewriter/convert-image.gen.go +++ b/pkg/providers/imaging/imagewriter/convert-image.gen.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/imaging" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/imaging" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/imaging/provider.go b/pkg/providers/imaging/provider.go index 9f97dadbf..8e44c931e 100644 --- a/pkg/providers/imaging/provider.go +++ b/pkg/providers/imaging/provider.go @@ -4,7 +4,7 @@ package imaging import ( "sync" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/imaging" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/imaging" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" "github.com/hashicorp/terraform-plugin-framework/datasource" diff --git a/pkg/providers/imaging/provider_test.go b/pkg/providers/imaging/provider_test.go index a657feeda..bbd35d4e7 100644 --- a/pkg/providers/imaging/provider_test.go +++ b/pkg/providers/imaging/provider_test.go @@ -4,7 +4,7 @@ import ( "sync" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/imaging" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/imaging" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" ) diff --git a/pkg/providers/imaging/resource_akamai_imaging_policy_image.go b/pkg/providers/imaging/resource_akamai_imaging_policy_image.go index 6d525010f..aeb31e758 100644 --- a/pkg/providers/imaging/resource_akamai_imaging_policy_image.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_image.go @@ -10,8 +10,8 @@ import ( "sort" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/imaging" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/imaging" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go b/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go index 0d8a4e776..5f9864648 100644 --- a/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go @@ -7,7 +7,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/imaging" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/imaging" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/imaging/resource_akamai_imaging_policy_set.go b/pkg/providers/imaging/resource_akamai_imaging_policy_set.go index fa696f3ab..21b978d0b 100644 --- a/pkg/providers/imaging/resource_akamai_imaging_policy_set.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_set.go @@ -5,8 +5,8 @@ import ( "fmt" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/imaging" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/imaging" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/imaging/resource_akamai_imaging_policy_set_test.go b/pkg/providers/imaging/resource_akamai_imaging_policy_set_test.go index 02cf1180a..a5ce36127 100644 --- a/pkg/providers/imaging/resource_akamai_imaging_policy_set_test.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_set_test.go @@ -6,7 +6,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/imaging" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/imaging" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/imaging/resource_akamai_imaging_policy_video.go b/pkg/providers/imaging/resource_akamai_imaging_policy_video.go index b060513eb..28c3bc6da 100644 --- a/pkg/providers/imaging/resource_akamai_imaging_policy_video.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_video.go @@ -10,8 +10,8 @@ import ( "sort" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/imaging" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/imaging" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go b/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go index 0f3b6586c..fcf5406ea 100644 --- a/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go @@ -7,7 +7,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/imaging" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/imaging" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/imaging/videowriter/convert-video.gen.go b/pkg/providers/imaging/videowriter/convert-video.gen.go index 0fd49ee3a..581331ffa 100644 --- a/pkg/providers/imaging/videowriter/convert-video.gen.go +++ b/pkg/providers/imaging/videowriter/convert-video.gen.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/imaging" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/imaging" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/networklists/data_akamai_network_network_lists.go b/pkg/providers/networklists/data_akamai_network_network_lists.go index 001509c62..2651aead0 100644 --- a/pkg/providers/networklists/data_akamai_network_network_lists.go +++ b/pkg/providers/networklists/data_akamai_network_network_lists.go @@ -6,7 +6,7 @@ import ( "errors" "fmt" - network "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/networklists" + network "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/networklists" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/networklists/data_akamai_networklist_network_lists_test.go b/pkg/providers/networklists/data_akamai_networklist_network_lists_test.go index 4cc6e90b0..efc685da5 100644 --- a/pkg/providers/networklists/data_akamai_networklist_network_lists_test.go +++ b/pkg/providers/networklists/data_akamai_networklist_network_lists_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - network "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/networklists" + network "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/networklists" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/networklists/provider.go b/pkg/providers/networklists/provider.go index 07e010b51..a1a7ed89e 100644 --- a/pkg/providers/networklists/provider.go +++ b/pkg/providers/networklists/provider.go @@ -4,7 +4,7 @@ package networklists import ( "sync" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/networklists" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/networklists" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" diff --git a/pkg/providers/networklists/provider_test.go b/pkg/providers/networklists/provider_test.go index fc2021f9d..95c0b1659 100644 --- a/pkg/providers/networklists/provider_test.go +++ b/pkg/providers/networklists/provider_test.go @@ -4,7 +4,7 @@ import ( "sync" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/networklists" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/networklists" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" ) diff --git a/pkg/providers/networklists/resource_akamai_networklist_activations.go b/pkg/providers/networklists/resource_akamai_networklist_activations.go index 53654d8c5..47af89537 100644 --- a/pkg/providers/networklists/resource_akamai_networklist_activations.go +++ b/pkg/providers/networklists/resource_akamai_networklist_activations.go @@ -8,7 +8,7 @@ import ( "sync" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/networklists" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/networklists" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/go-hclog" diff --git a/pkg/providers/networklists/resource_akamai_networklist_activations_test.go b/pkg/providers/networklists/resource_akamai_networklist_activations_test.go index b76536e9f..51cb225bd 100644 --- a/pkg/providers/networklists/resource_akamai_networklist_activations_test.go +++ b/pkg/providers/networklists/resource_akamai_networklist_activations_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/networklists" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/networklists" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/networklists/resource_akamai_networklist_network_list.go b/pkg/providers/networklists/resource_akamai_networklist_network_list.go index cf1720369..f1b1e9ecd 100644 --- a/pkg/providers/networklists/resource_akamai_networklist_network_list.go +++ b/pkg/providers/networklists/resource_akamai_networklist_network_list.go @@ -7,7 +7,7 @@ import ( "sort" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/networklists" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/networklists" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/networklists/resource_akamai_networklist_network_list_description.go b/pkg/providers/networklists/resource_akamai_networklist_network_list_description.go index 725b4d247..722fec903 100644 --- a/pkg/providers/networklists/resource_akamai_networklist_network_list_description.go +++ b/pkg/providers/networklists/resource_akamai_networklist_network_list_description.go @@ -4,7 +4,7 @@ import ( "context" "errors" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/networklists" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/networklists" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/networklists/resource_akamai_networklist_network_list_description_test.go b/pkg/providers/networklists/resource_akamai_networklist_network_list_description_test.go index cf90f7392..24dce370e 100644 --- a/pkg/providers/networklists/resource_akamai_networklist_network_list_description_test.go +++ b/pkg/providers/networklists/resource_akamai_networklist_network_list_description_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/networklists" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/networklists" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription.go b/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription.go index 036bbba0e..f2660cf7c 100644 --- a/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription.go +++ b/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/networklists" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/networklists" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription_test.go b/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription_test.go index 68aba3a0b..e4718813d 100644 --- a/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription_test.go +++ b/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/networklists" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/networklists" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/networklists/resource_akamai_networklist_network_list_test.go b/pkg/providers/networklists/resource_akamai_networklist_network_list_test.go index fc07e1e93..860014863 100644 --- a/pkg/providers/networklists/resource_akamai_networklist_network_list_test.go +++ b/pkg/providers/networklists/resource_akamai_networklist_network_list_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/networklists" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/networklists" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/property/data_akamai_contracts.go b/pkg/providers/property/data_akamai_contracts.go index 48f9fcb40..346a4b3cc 100644 --- a/pkg/providers/property/data_akamai_contracts.go +++ b/pkg/providers/property/data_akamai_contracts.go @@ -5,8 +5,8 @@ import ( "errors" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/cache" akameta "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/property/data_akamai_contracts_test.go b/pkg/providers/property/data_akamai_contracts_test.go index b00d7346b..3f2bd8399 100644 --- a/pkg/providers/property/data_akamai_contracts_test.go +++ b/pkg/providers/property/data_akamai_contracts_test.go @@ -3,7 +3,7 @@ package property import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/property/data_akamai_cp_code.go b/pkg/providers/property/data_akamai_cp_code.go index 8c0299710..7c61db016 100644 --- a/pkg/providers/property/data_akamai_cp_code.go +++ b/pkg/providers/property/data_akamai_cp_code.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" ) diff --git a/pkg/providers/property/data_akamai_cp_code_test.go b/pkg/providers/property/data_akamai_cp_code_test.go index 6b040ecbf..3179358a5 100644 --- a/pkg/providers/property/data_akamai_cp_code_test.go +++ b/pkg/providers/property/data_akamai_cp_code_test.go @@ -4,7 +4,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/property/data_akamai_properties.go b/pkg/providers/property/data_akamai_properties.go index c689dcf97..1bb3c183d 100644 --- a/pkg/providers/property/data_akamai_properties.go +++ b/pkg/providers/property/data_akamai_properties.go @@ -6,8 +6,8 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/property/data_akamai_properties_search.go b/pkg/providers/property/data_akamai_properties_search.go index 178da4aa1..41b84712a 100644 --- a/pkg/providers/property/data_akamai_properties_search.go +++ b/pkg/providers/property/data_akamai_properties_search.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" ) diff --git a/pkg/providers/property/data_akamai_properties_search_test.go b/pkg/providers/property/data_akamai_properties_search_test.go index 49cf2966f..ea5d073f5 100644 --- a/pkg/providers/property/data_akamai_properties_search_test.go +++ b/pkg/providers/property/data_akamai_properties_search_test.go @@ -4,7 +4,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/property/data_akamai_properties_test.go b/pkg/providers/property/data_akamai_properties_test.go index 425a7adfe..97f42402e 100644 --- a/pkg/providers/property/data_akamai_properties_test.go +++ b/pkg/providers/property/data_akamai_properties_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/property/data_akamai_property.go b/pkg/providers/property/data_akamai_property.go index b3cb3749a..a56899b85 100644 --- a/pkg/providers/property/data_akamai_property.go +++ b/pkg/providers/property/data_akamai_property.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" ) diff --git a/pkg/providers/property/data_akamai_property_activation.go b/pkg/providers/property/data_akamai_property_activation.go index 053dd7929..be96c0602 100644 --- a/pkg/providers/property/data_akamai_property_activation.go +++ b/pkg/providers/property/data_akamai_property_activation.go @@ -3,8 +3,8 @@ package property import ( "context" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/property/data_akamai_property_activation_test.go b/pkg/providers/property/data_akamai_property_activation_test.go index f46abf2b1..398d4801e 100644 --- a/pkg/providers/property/data_akamai_property_activation_test.go +++ b/pkg/providers/property/data_akamai_property_activation_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/property/data_akamai_property_hostnames.go b/pkg/providers/property/data_akamai_property_hostnames.go index 7e1efd81e..d572cf047 100644 --- a/pkg/providers/property/data_akamai_property_hostnames.go +++ b/pkg/providers/property/data_akamai_property_hostnames.go @@ -5,8 +5,8 @@ import ( "errors" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/property/data_akamai_property_hostnames_test.go b/pkg/providers/property/data_akamai_property_hostnames_test.go index 0de1ae4ea..f3fd089a8 100644 --- a/pkg/providers/property/data_akamai_property_hostnames_test.go +++ b/pkg/providers/property/data_akamai_property_hostnames_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/property/data_akamai_property_include.go b/pkg/providers/property/data_akamai_property_include.go index fb53f521d..dd57bca0c 100644 --- a/pkg/providers/property/data_akamai_property_include.go +++ b/pkg/providers/property/data_akamai_property_include.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/types" diff --git a/pkg/providers/property/data_akamai_property_include_activation.go b/pkg/providers/property/data_akamai_property_include_activation.go index 83ae4d7af..d6b9f9de1 100644 --- a/pkg/providers/property/data_akamai_property_include_activation.go +++ b/pkg/providers/property/data_akamai_property_include_activation.go @@ -6,7 +6,7 @@ import ( "sort" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/property/data_akamai_property_include_activation_test.go b/pkg/providers/property/data_akamai_property_include_activation_test.go index 80903ae12..3ed7b2721 100644 --- a/pkg/providers/property/data_akamai_property_include_activation_test.go +++ b/pkg/providers/property/data_akamai_property_include_activation_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/assert" diff --git a/pkg/providers/property/data_akamai_property_include_parents.go b/pkg/providers/property/data_akamai_property_include_parents.go index bc3af210e..bf5580b52 100644 --- a/pkg/providers/property/data_akamai_property_include_parents.go +++ b/pkg/providers/property/data_akamai_property_include_parents.go @@ -4,7 +4,7 @@ import ( "context" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/property/data_akamai_property_include_parents_test.go b/pkg/providers/property/data_akamai_property_include_parents_test.go index d28f86953..02ce50748 100644 --- a/pkg/providers/property/data_akamai_property_include_parents_test.go +++ b/pkg/providers/property/data_akamai_property_include_parents_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/property/data_akamai_property_include_rules.go b/pkg/providers/property/data_akamai_property_include_rules.go index 67eb22561..8f1fa9822 100644 --- a/pkg/providers/property/data_akamai_property_include_rules.go +++ b/pkg/providers/property/data_akamai_property_include_rules.go @@ -5,8 +5,8 @@ import ( "encoding/json" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/property/data_akamai_property_include_rules_test.go b/pkg/providers/property/data_akamai_property_include_rules_test.go index a8bd107e4..2a4b3831e 100644 --- a/pkg/providers/property/data_akamai_property_include_rules_test.go +++ b/pkg/providers/property/data_akamai_property_include_rules_test.go @@ -8,7 +8,7 @@ import ( "strconv" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/assert" diff --git a/pkg/providers/property/data_akamai_property_include_test.go b/pkg/providers/property/data_akamai_property_include_test.go index b6691feef..9e6d4dd7c 100644 --- a/pkg/providers/property/data_akamai_property_include_test.go +++ b/pkg/providers/property/data_akamai_property_include_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/property/data_akamai_property_includes.go b/pkg/providers/property/data_akamai_property_includes.go index 183803f45..d08cf01b5 100644 --- a/pkg/providers/property/data_akamai_property_includes.go +++ b/pkg/providers/property/data_akamai_property_includes.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/property/data_akamai_property_includes_test.go b/pkg/providers/property/data_akamai_property_includes_test.go index 3430be78f..ba0a5001d 100644 --- a/pkg/providers/property/data_akamai_property_includes_test.go +++ b/pkg/providers/property/data_akamai_property_includes_test.go @@ -8,7 +8,7 @@ import ( "strings" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/property/data_akamai_property_products.go b/pkg/providers/property/data_akamai_property_products.go index 8907326e9..728b15be5 100644 --- a/pkg/providers/property/data_akamai_property_products.go +++ b/pkg/providers/property/data_akamai_property_products.go @@ -5,8 +5,8 @@ import ( "encoding/json" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/property/data_akamai_property_products_test.go b/pkg/providers/property/data_akamai_property_products_test.go index 111cfec39..630057f19 100644 --- a/pkg/providers/property/data_akamai_property_products_test.go +++ b/pkg/providers/property/data_akamai_property_products_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/property/data_akamai_property_rule_formats_test.go b/pkg/providers/property/data_akamai_property_rule_formats_test.go index 087d18ad6..90abafd6e 100644 --- a/pkg/providers/property/data_akamai_property_rule_formats_test.go +++ b/pkg/providers/property/data_akamai_property_rule_formats_test.go @@ -3,7 +3,7 @@ package property import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/property/data_akamai_property_rules.go b/pkg/providers/property/data_akamai_property_rules.go index d40519b83..a0fc9f6d5 100644 --- a/pkg/providers/property/data_akamai_property_rules.go +++ b/pkg/providers/property/data_akamai_property_rules.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/property/data_akamai_property_rules_builder.go b/pkg/providers/property/data_akamai_property_rules_builder.go index 0538c6af4..1d03504b1 100644 --- a/pkg/providers/property/data_akamai_property_rules_builder.go +++ b/pkg/providers/property/data_akamai_property_rules_builder.go @@ -7,7 +7,7 @@ import ( "encoding/json" "errors" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/property/ruleformats" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/property/data_akamai_property_rules_template_test.go b/pkg/providers/property/data_akamai_property_rules_template_test.go index 85dda2727..437fcc209 100644 --- a/pkg/providers/property/data_akamai_property_rules_template_test.go +++ b/pkg/providers/property/data_akamai_property_rules_template_test.go @@ -6,7 +6,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/property/data_akamai_property_rules_test.go b/pkg/providers/property/data_akamai_property_rules_test.go index 110799ffb..aea33d64f 100644 --- a/pkg/providers/property/data_akamai_property_rules_test.go +++ b/pkg/providers/property/data_akamai_property_rules_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/property/data_akamai_property_test.go b/pkg/providers/property/data_akamai_property_test.go index 13c227c93..d3b9f7f7b 100644 --- a/pkg/providers/property/data_akamai_property_test.go +++ b/pkg/providers/property/data_akamai_property_test.go @@ -6,7 +6,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/property/data_property_akamai_contract.go b/pkg/providers/property/data_property_akamai_contract.go index e10ef4aea..76dfe2c71 100644 --- a/pkg/providers/property/data_property_akamai_contract.go +++ b/pkg/providers/property/data_property_akamai_contract.go @@ -4,8 +4,8 @@ import ( "context" "errors" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" akameta "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/property/data_property_akamai_contract_test.go b/pkg/providers/property/data_property_akamai_contract_test.go index 08ffb2314..4f8ca70df 100644 --- a/pkg/providers/property/data_property_akamai_contract_test.go +++ b/pkg/providers/property/data_property_akamai_contract_test.go @@ -4,7 +4,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) diff --git a/pkg/providers/property/data_property_akamai_group.go b/pkg/providers/property/data_property_akamai_group.go index 5ca4ec24d..dc5585ac9 100644 --- a/pkg/providers/property/data_property_akamai_group.go +++ b/pkg/providers/property/data_property_akamai_group.go @@ -6,8 +6,8 @@ import ( "fmt" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" akameta "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/property/data_property_akamai_group_test.go b/pkg/providers/property/data_property_akamai_group_test.go index e5b90e2d1..6ce95a742 100644 --- a/pkg/providers/property/data_property_akamai_group_test.go +++ b/pkg/providers/property/data_property_akamai_group_test.go @@ -4,7 +4,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/property/data_property_akamai_groups.go b/pkg/providers/property/data_property_akamai_groups.go index 846804613..5f07607b2 100644 --- a/pkg/providers/property/data_property_akamai_groups.go +++ b/pkg/providers/property/data_property_akamai_groups.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/property/data_property_akamai_groups_test.go b/pkg/providers/property/data_property_akamai_groups_test.go index 33626107e..38c7e19ee 100644 --- a/pkg/providers/property/data_property_akamai_groups_test.go +++ b/pkg/providers/property/data_property_akamai_groups_test.go @@ -4,7 +4,7 @@ import ( "log" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" diff --git a/pkg/providers/property/diff_suppress_funcs.go b/pkg/providers/property/diff_suppress_funcs.go index 1eab81dc6..a49e4fbed 100644 --- a/pkg/providers/property/diff_suppress_funcs.go +++ b/pkg/providers/property/diff_suppress_funcs.go @@ -6,7 +6,7 @@ import ( "reflect" "sort" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/property/diff_suppress_funcs_test.go b/pkg/providers/property/diff_suppress_funcs_test.go index 6ad79f331..1fe2ce66b 100644 --- a/pkg/providers/property/diff_suppress_funcs_test.go +++ b/pkg/providers/property/diff_suppress_funcs_test.go @@ -3,7 +3,7 @@ package property import ( "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/tj/assert" ) diff --git a/pkg/providers/property/helpers.go b/pkg/providers/property/helpers.go index c8a904708..2407a5c9d 100644 --- a/pkg/providers/property/helpers.go +++ b/pkg/providers/property/helpers.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/property/helpers_test.go b/pkg/providers/property/helpers_test.go index 11847d1f0..ce13f4591 100644 --- a/pkg/providers/property/helpers_test.go +++ b/pkg/providers/property/helpers_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/stretchr/testify/assert" ) diff --git a/pkg/providers/property/log_fields.go b/pkg/providers/property/log_fields.go index 592cdc077..d121e8639 100644 --- a/pkg/providers/property/log_fields.go +++ b/pkg/providers/property/log_fields.go @@ -5,7 +5,7 @@ import ( "github.com/apex/log" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" ) // Get loggable fields from given arguments diff --git a/pkg/providers/property/provider.go b/pkg/providers/property/provider.go index a434ac66b..35422711c 100644 --- a/pkg/providers/property/provider.go +++ b/pkg/providers/property/provider.go @@ -6,8 +6,8 @@ import ( "encoding/json" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/hapi" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/hapi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" diff --git a/pkg/providers/property/provider_test.go b/pkg/providers/property/provider_test.go index d01fb901c..2d837b27f 100644 --- a/pkg/providers/property/provider_test.go +++ b/pkg/providers/property/provider_test.go @@ -5,8 +5,8 @@ import ( "sync" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/hapi" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/hapi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/go-hclog" ) diff --git a/pkg/providers/property/resource_akamai_cp_code.go b/pkg/providers/property/resource_akamai_cp_code.go index 8dd79db7c..cf2205aa2 100644 --- a/pkg/providers/property/resource_akamai_cp_code.go +++ b/pkg/providers/property/resource_akamai_cp_code.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" diff --git a/pkg/providers/property/resource_akamai_cp_code_test.go b/pkg/providers/property/resource_akamai_cp_code_test.go index f07ca223f..6b6e82a1b 100644 --- a/pkg/providers/property/resource_akamai_cp_code_test.go +++ b/pkg/providers/property/resource_akamai_cp_code_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" diff --git a/pkg/providers/property/resource_akamai_edge_hostname.go b/pkg/providers/property/resource_akamai_edge_hostname.go index 1b77b15c3..4ae1e8825 100644 --- a/pkg/providers/property/resource_akamai_edge_hostname.go +++ b/pkg/providers/property/resource_akamai_edge_hostname.go @@ -8,8 +8,8 @@ import ( "strings" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/hapi" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/hapi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" diff --git a/pkg/providers/property/resource_akamai_edge_hostname_test.go b/pkg/providers/property/resource_akamai_edge_hostname_test.go index 366f20a9c..406cf0c82 100644 --- a/pkg/providers/property/resource_akamai_edge_hostname_test.go +++ b/pkg/providers/property/resource_akamai_edge_hostname_test.go @@ -8,8 +8,8 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/hapi" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/hapi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" diff --git a/pkg/providers/property/resource_akamai_property.go b/pkg/providers/property/resource_akamai_property.go index b8dc79f4a..cc436de2e 100644 --- a/pkg/providers/property/resource_akamai_property.go +++ b/pkg/providers/property/resource_akamai_property.go @@ -10,8 +10,8 @@ import ( "strconv" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/property/resource_akamai_property_activation.go b/pkg/providers/property/resource_akamai_property_activation.go index dbcd7405d..18c150ad2 100644 --- a/pkg/providers/property/resource_akamai_property_activation.go +++ b/pkg/providers/property/resource_akamai_property_activation.go @@ -9,8 +9,8 @@ import ( "strings" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/date" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" diff --git a/pkg/providers/property/resource_akamai_property_activation_schema_v0.go b/pkg/providers/property/resource_akamai_property_activation_schema_v0.go index f7823e49b..d4de1bced 100644 --- a/pkg/providers/property/resource_akamai_property_activation_schema_v0.go +++ b/pkg/providers/property/resource_akamai_property_activation_schema_v0.go @@ -1,7 +1,7 @@ package property import ( - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/property/resource_akamai_property_activation_test.go b/pkg/providers/property/resource_akamai_property_activation_test.go index 3bb6d59b8..9efb4f9da 100644 --- a/pkg/providers/property/resource_akamai_property_activation_test.go +++ b/pkg/providers/property/resource_akamai_property_activation_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/property/resource_akamai_property_activation_unit_test.go b/pkg/providers/property/resource_akamai_property_activation_unit_test.go index e7a9570f0..4baa6ee7f 100644 --- a/pkg/providers/property/resource_akamai_property_activation_unit_test.go +++ b/pkg/providers/property/resource_akamai_property_activation_unit_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/date" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/property/resource_akamai_property_bootstrap.go b/pkg/providers/property/resource_akamai_property_bootstrap.go index 29b894f0d..ddb3436c4 100644 --- a/pkg/providers/property/resource_akamai_property_bootstrap.go +++ b/pkg/providers/property/resource_akamai_property_bootstrap.go @@ -7,7 +7,7 @@ import ( "regexp" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/framework/modifiers" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/property/resource_akamai_property_bootstrap_test.go b/pkg/providers/property/resource_akamai_property_bootstrap_test.go index 49b26af70..09bc8ebbc 100644 --- a/pkg/providers/property/resource_akamai_property_bootstrap_test.go +++ b/pkg/providers/property/resource_akamai_property_bootstrap_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/property/resource_akamai_property_common.go b/pkg/providers/property/resource_akamai_property_common.go index f4c1a323e..9d6711610 100644 --- a/pkg/providers/property/resource_akamai_property_common.go +++ b/pkg/providers/property/resource_akamai_property_common.go @@ -7,7 +7,7 @@ import ( "fmt" "strconv" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/property/resource_akamai_property_helpers_test.go b/pkg/providers/property/resource_akamai_property_helpers_test.go index 9b44b5539..5d8fa1dc5 100644 --- a/pkg/providers/property/resource_akamai_property_helpers_test.go +++ b/pkg/providers/property/resource_akamai_property_helpers_test.go @@ -3,7 +3,7 @@ package property import ( "context" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/property/resource_akamai_property_include.go b/pkg/providers/property/resource_akamai_property_include.go index 8e969ee2f..8d259114b 100644 --- a/pkg/providers/property/resource_akamai_property_include.go +++ b/pkg/providers/property/resource_akamai_property_include.go @@ -10,8 +10,8 @@ import ( "strconv" "strings" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" diff --git a/pkg/providers/property/resource_akamai_property_include_activation.go b/pkg/providers/property/resource_akamai_property_include_activation.go index 7b53adebd..7c59a4bf0 100644 --- a/pkg/providers/property/resource_akamai_property_include_activation.go +++ b/pkg/providers/property/resource_akamai_property_include_activation.go @@ -11,8 +11,8 @@ import ( "strings" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/session" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" diff --git a/pkg/providers/property/resource_akamai_property_include_activation_test.go b/pkg/providers/property/resource_akamai_property_include_activation_test.go index 45b1c486f..0fe576acf 100644 --- a/pkg/providers/property/resource_akamai_property_include_activation_test.go +++ b/pkg/providers/property/resource_akamai_property_include_activation_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/assert" diff --git a/pkg/providers/property/resource_akamai_property_include_test.go b/pkg/providers/property/resource_akamai_property_include_test.go index 7455ab2f3..deba26abe 100644 --- a/pkg/providers/property/resource_akamai_property_include_test.go +++ b/pkg/providers/property/resource_akamai_property_include_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/hapi" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/hapi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/go-cty/cty" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/property/resource_akamai_property_test.go b/pkg/providers/property/resource_akamai_property_test.go index f36c531d1..7bb932b38 100644 --- a/pkg/providers/property/resource_akamai_property_test.go +++ b/pkg/providers/property/resource_akamai_property_test.go @@ -10,7 +10,7 @@ import ( "strings" "testing" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" "github.com/hashicorp/go-cty/cty" diff --git a/pkg/providers/property/ruleformats/builder.go b/pkg/providers/property/ruleformats/builder.go index 4d06bd39e..451f0bd1f 100644 --- a/pkg/providers/property/ruleformats/builder.go +++ b/pkg/providers/property/ruleformats/builder.go @@ -6,7 +6,7 @@ import ( "fmt" "reflect" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/property/ruleformats/rules_schema_reader.go b/pkg/providers/property/ruleformats/rules_schema_reader.go index d65160e98..f57c24259 100644 --- a/pkg/providers/property/ruleformats/rules_schema_reader.go +++ b/pkg/providers/property/ruleformats/rules_schema_reader.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v7/pkg/papi" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) From 4b68cf230f4f87a45767aeb6e5259b3f64aeefd4 Mon Sep 17 00:00:00 2001 From: "Zagrajczuk, Wojciech" Date: Wed, 20 Mar 2024 14:43:01 +0100 Subject: [PATCH 48/52] DXE-3571 Bump major version --- .goreleaser.yml | 2 +- README.md | 4 +-- go.mod | 2 +- main.go | 6 ++-- pkg/akamai/akamai.go | 2 +- pkg/akamai/akamai_test.go | 4 +-- pkg/akamai/configure_context.go | 8 +++--- pkg/akamai/framework_provider.go | 6 ++-- pkg/akamai/framework_provider_test.go | 8 +++--- pkg/akamai/sdk_provider.go | 8 +++--- pkg/akamai/sdk_provider_test.go | 8 +++--- pkg/cache/cache.go | 2 +- .../framework/modifiers/set_use_state_if.go | 2 +- .../framework/replacer/replacer_test.go | 4 +-- pkg/common/testutils/provider_factory.go | 4 +-- pkg/meta/meta.go | 2 +- pkg/providers/appsec/appsec.go | 2 +- pkg/providers/appsec/config_versions.go | 4 +-- pkg/providers/appsec/custom_validations.go | 4 +-- ...dvanced_settings_attack_payload_logging.go | 4 +-- ...ed_settings_attack_payload_logging_test.go | 2 +- ...ec_advanced_settings_evasive_path_match.go | 4 +-- ...vanced_settings_evasive_path_match_test.go | 2 +- ...akamai_appsec_advanced_settings_logging.go | 4 +-- ...i_appsec_advanced_settings_logging_test.go | 2 +- ...i_appsec_advanced_settings_pii_learning.go | 4 +-- ...sec_advanced_settings_pii_learning_test.go | 2 +- ..._appsec_advanced_settings_pragma_header.go | 4 +-- ...ai_appsec_advanced_settings_pragma_test.go | 2 +- ...kamai_appsec_advanced_settings_prefetch.go | 4 +-- ..._appsec_advanced_settings_prefetch_test.go | 2 +- ...i_appsec_advanced_settings_request_body.go | 4 +-- ...sec_advanced_settings_request_body_test.go | 2 +- .../data_akamai_appsec_api_endpoints.go | 4 +-- .../data_akamai_appsec_api_endpoints_test.go | 2 +- ...ata_akamai_appsec_api_hostname_coverage.go | 4 +-- ...sec_api_hostname_coverage_match_targets.go | 4 +-- ...pi_hostname_coverage_match_targets_test.go | 2 +- ...ppsec_api_hostname_coverage_overlapping.go | 4 +-- ..._api_hostname_coverage_overlapping_test.go | 2 +- ...kamai_appsec_api_hostname_coverage_test.go | 2 +- ...a_akamai_appsec_api_request_constraints.go | 4 +-- ...mai_appsec_api_request_constraints_test.go | 2 +- .../data_akamai_appsec_attack_groups.go | 4 +-- .../data_akamai_appsec_attack_groups_test.go | 2 +- ...data_akamai_appsec_bypass_network_lists.go | 4 +-- ...akamai_appsec_bypass_network_lists_test.go | 2 +- .../data_akamai_appsec_configuration.go | 4 +-- .../data_akamai_appsec_configuration_test.go | 2 +- ...ata_akamai_appsec_configuration_version.go | 4 +-- ...kamai_appsec_configuration_version_test.go | 2 +- .../data_akamai_appsec_contracts_groups.go | 4 +-- ...ata_akamai_appsec_contracts_groups_test.go | 2 +- .../appsec/data_akamai_appsec_custom_deny.go | 4 +-- .../data_akamai_appsec_custom_deny_test.go | 2 +- .../data_akamai_appsec_custom_rule_actions.go | 4 +-- ..._akamai_appsec_custom_rule_actions_test.go | 2 +- .../appsec/data_akamai_appsec_custom_rules.go | 4 +-- .../data_akamai_appsec_custom_rules_test.go | 2 +- .../appsec/data_akamai_appsec_eval.go | 4 +-- .../appsec/data_akamai_appsec_eval_groups.go | 4 +-- .../data_akamai_appsec_eval_groups_test.go | 2 +- .../data_akamai_appsec_eval_penalty_box.go | 4 +-- ...amai_appsec_eval_penalty_box_conditions.go | 4 +-- ...appsec_eval_penalty_box_conditions_test.go | 2 +- ...ata_akamai_appsec_eval_penalty_box_test.go | 2 +- .../appsec/data_akamai_appsec_eval_rules.go | 4 +-- .../data_akamai_appsec_eval_rules_test.go | 2 +- .../appsec/data_akamai_appsec_eval_test.go | 2 +- ...data_akamai_appsec_export_configuration.go | 4 +-- ...akamai_appsec_export_configuration_test.go | 2 +- .../data_akamai_appsec_failover_hostnames.go | 4 +-- ...a_akamai_appsec_failover_hostnames_test.go | 2 +- .../appsec/data_akamai_appsec_ip_geo.go | 4 +-- .../appsec/data_akamai_appsec_ip_geo_test.go | 2 +- ...ata_akamai_appsec_malware_content_types.go | 4 +-- ...kamai_appsec_malware_content_types_test.go | 2 +- .../data_akamai_appsec_malware_policies.go | 4 +-- ...ata_akamai_appsec_malware_policies_test.go | 2 +- ...ta_akamai_appsec_malware_policy_actions.go | 4 +-- ...amai_appsec_malware_policy_actions_test.go | 2 +- .../data_akamai_appsec_match_targets.go | 4 +-- .../data_akamai_appsec_match_targets_test.go | 2 +- .../appsec/data_akamai_appsec_penalty_box.go | 4 +-- ...ta_akamai_appsec_penalty_box_conditions.go | 4 +-- ...amai_appsec_penalty_box_conditions_test.go | 2 +- .../data_akamai_appsec_penalty_box_test.go | 2 +- .../data_akamai_appsec_rate_policies.go | 4 +-- .../data_akamai_appsec_rate_policies_test.go | 2 +- .../data_akamai_appsec_rate_policy_actions.go | 4 +-- ..._akamai_appsec_rate_policy_actions_test.go | 2 +- .../data_akamai_appsec_reputation_analysis.go | 4 +-- ..._akamai_appsec_reputation_analysis_test.go | 2 +- ...kamai_appsec_reputation_profile_actions.go | 4 +-- ..._appsec_reputation_profile_actions_test.go | 2 +- .../data_akamai_appsec_reputation_profiles.go | 4 +-- ..._akamai_appsec_reputation_profiles_test.go | 2 +- .../appsec/data_akamai_appsec_rule_upgrade.go | 4 +-- .../data_akamai_appsec_rule_upgrade_test.go | 2 +- .../appsec/data_akamai_appsec_rules.go | 4 +-- .../appsec/data_akamai_appsec_rules_test.go | 2 +- .../data_akamai_appsec_security_policy.go | 4 +-- ...amai_appsec_security_policy_protections.go | 4 +-- ...appsec_security_policy_protections_test.go | 2 +- ...data_akamai_appsec_security_policy_test.go | 2 +- ...data_akamai_appsec_selectable_hostnames.go | 4 +-- ...akamai_appsec_selectable_hostnames_test.go | 2 +- .../data_akamai_appsec_selected_hostnames.go | 4 +-- ...a_akamai_appsec_selected_hostnames_test.go | 2 +- .../data_akamai_appsec_siem_definitions.go | 4 +-- ...ata_akamai_appsec_siem_definitions_test.go | 2 +- .../data_akamai_appsec_siem_settings.go | 4 +-- .../data_akamai_appsec_siem_settings_test.go | 2 +- ...ai_appsec_slow_post_protection_settings.go | 4 +-- ...psec_slow_post_protection_settings_test.go | 2 +- .../appsec/data_akamai_appsec_threat_intel.go | 4 +-- .../data_akamai_appsec_threat_intel_test.go | 2 +- ...ta_akamai_appsec_tuning_recommendations.go | 4 +-- ...amai_appsec_tuning_recommendations_test.go | 2 +- .../data_akamai_appsec_version_notes.go | 4 +-- .../data_akamai_appsec_version_notes_test.go | 2 +- .../appsec/data_akamai_appsec_waf_mode.go | 4 +-- .../data_akamai_appsec_waf_mode_test.go | 2 +- ...ta_akamai_appsec_wap_selected_hostnames.go | 4 +-- ...amai_appsec_wap_selected_hostnames_test.go | 2 +- pkg/providers/appsec/diff_suppress_funcs.go | 2 +- pkg/providers/appsec/provider.go | 4 +-- pkg/providers/appsec/provider_test.go | 2 +- .../resource_akamai_appsec_activations.go | 4 +-- ...resource_akamai_appsec_activations_test.go | 2 +- ...dvanced_settings_attack_payload_logging.go | 4 +-- ...ed_settings_attack_payload_logging_test.go | 2 +- ...ec_advanced_settings_evasive_path_match.go | 4 +-- ...vanced_settings_evasive_path_match_test.go | 2 +- ...akamai_appsec_advanced_settings_logging.go | 4 +-- ...i_appsec_advanced_settings_logging_test.go | 2 +- ...i_appsec_advanced_settings_pii_learning.go | 4 +-- ...sec_advanced_settings_pii_learning_test.go | 2 +- ..._appsec_advanced_settings_pragma_header.go | 4 +-- ...ai_appsec_advanced_settings_pragma_test.go | 2 +- ...kamai_appsec_advanced_settings_prefetch.go | 4 +-- ..._appsec_advanced_settings_prefetch_test.go | 2 +- ...i_appsec_advanced_settings_request_body.go | 4 +-- ...sec_advanced_settings_request_body_test.go | 2 +- ...kamai_appsec_api_constraints_protection.go | 4 +-- ..._appsec_api_constraints_protection_test.go | 2 +- ...e_akamai_appsec_api_request_constraints.go | 4 +-- ...mai_appsec_api_request_constraints_test.go | 2 +- .../resource_akamai_appsec_attack_group.go | 4 +-- ...esource_akamai_appsec_attack_group_test.go | 2 +- ...urce_akamai_appsec_bypass_network_lists.go | 4 +-- ...akamai_appsec_bypass_network_lists_test.go | 2 +- .../resource_akamai_appsec_configuration.go | 4 +-- ...urce_akamai_appsec_configuration_rename.go | 4 +-- ...akamai_appsec_configuration_rename_test.go | 2 +- ...source_akamai_appsec_configuration_test.go | 2 +- .../resource_akamai_appsec_custom_deny.go | 4 +-- ...resource_akamai_appsec_custom_deny_test.go | 2 +- .../resource_akamai_appsec_custom_rule.go | 4 +-- ...source_akamai_appsec_custom_rule_action.go | 4 +-- ...e_akamai_appsec_custom_rule_action_test.go | 2 +- ...resource_akamai_appsec_custom_rule_test.go | 2 +- .../appsec/resource_akamai_appsec_eval.go | 4 +-- .../resource_akamai_appsec_eval_group.go | 4 +-- .../resource_akamai_appsec_eval_group_test.go | 2 +- ...resource_akamai_appsec_eval_penalty_box.go | 4 +-- ...amai_appsec_eval_penalty_box_conditions.go | 4 +-- ...appsec_eval_penalty_box_conditions_test.go | 2 +- ...rce_akamai_appsec_eval_penalty_box_test.go | 2 +- .../resource_akamai_appsec_eval_rule.go | 4 +-- .../resource_akamai_appsec_eval_rule_test.go | 2 +- .../resource_akamai_appsec_eval_test.go | 2 +- .../appsec/resource_akamai_appsec_ip_geo.go | 4 +-- ...esource_akamai_appsec_ip_geo_protection.go | 4 +-- ...ce_akamai_appsec_ip_geo_protection_test.go | 2 +- .../resource_akamai_appsec_ip_geo_test.go | 2 +- .../resource_akamai_appsec_malware_policy.go | 4 +-- ...rce_akamai_appsec_malware_policy_action.go | 4 +-- ...kamai_appsec_malware_policy_action_test.go | 2 +- ...ce_akamai_appsec_malware_policy_actions.go | 4 +-- ...amai_appsec_malware_policy_actions_test.go | 2 +- ...ource_akamai_appsec_malware_policy_test.go | 2 +- ...source_akamai_appsec_malware_protection.go | 4 +-- ...e_akamai_appsec_malware_protection_test.go | 2 +- .../resource_akamai_appsec_match_target.go | 4 +-- ...rce_akamai_appsec_match_target_sequence.go | 4 +-- ...kamai_appsec_match_target_sequence_test.go | 2 +- ...esource_akamai_appsec_match_target_test.go | 2 +- .../resource_akamai_appsec_penalty_box.go | 4 +-- ...ce_akamai_appsec_penalty_box_conditions.go | 4 +-- ...amai_appsec_penalty_box_conditions_test.go | 2 +- ...resource_akamai_appsec_penalty_box_test.go | 2 +- .../resource_akamai_appsec_rate_policy.go | 4 +-- ...source_akamai_appsec_rate_policy_action.go | 4 +-- ...e_akamai_appsec_rate_policy_action_test.go | 2 +- ...resource_akamai_appsec_rate_policy_test.go | 2 +- .../resource_akamai_appsec_rate_protection.go | 4 +-- ...urce_akamai_appsec_rate_protection_test.go | 2 +- ...ource_akamai_appsec_reputation_analysis.go | 4 +-- ..._akamai_appsec_reputation_analysis_test.go | 2 +- ...source_akamai_appsec_reputation_profile.go | 4 +-- ...akamai_appsec_reputation_profile_action.go | 4 +-- ...i_appsec_reputation_profile_action_test.go | 2 +- ...e_akamai_appsec_reputation_profile_test.go | 2 +- ...rce_akamai_appsec_reputation_protection.go | 4 +-- ...kamai_appsec_reputation_protection_test.go | 2 +- .../appsec/resource_akamai_appsec_rule.go | 6 ++-- .../resource_akamai_appsec_rule_test.go | 2 +- .../resource_akamai_appsec_rule_upgrade.go | 4 +-- ...esource_akamai_appsec_rule_upgrade_test.go | 2 +- .../resource_akamai_appsec_security_policy.go | 4 +-- ...sec_security_policy_default_protections.go | 4 +-- ...ecurity_policy_default_protections_test.go | 2 +- ...ce_akamai_appsec_security_policy_rename.go | 4 +-- ...amai_appsec_security_policy_rename_test.go | 2 +- ...urce_akamai_appsec_security_policy_test.go | 2 +- ...esource_akamai_appsec_selected_hostname.go | 4 +-- ...ce_akamai_appsec_selected_hostname_test.go | 2 +- .../resource_akamai_appsec_siem_settings.go | 4 +-- ...source_akamai_appsec_siem_settings_test.go | 2 +- ...mai_appsec_slow_post_protection_setting.go | 4 +-- ...ppsec_slow_post_protection_setting_test.go | 2 +- ...ource_akamai_appsec_slowpost_protection.go | 4 +-- ..._akamai_appsec_slowpost_protection_test.go | 2 +- .../resource_akamai_appsec_threat_intel.go | 4 +-- ...esource_akamai_appsec_threat_intel_test.go | 2 +- .../resource_akamai_appsec_version_notes.go | 4 +-- ...source_akamai_appsec_version_notes_test.go | 2 +- .../appsec/resource_akamai_appsec_waf_mode.go | 4 +-- .../resource_akamai_appsec_waf_mode_test.go | 2 +- .../resource_akamai_appsec_waf_protection.go | 4 +-- ...ource_akamai_appsec_waf_protection_test.go | 2 +- ...ce_akamai_appsec_wap_selected_hostnames.go | 4 +-- ...amai_appsec_wap_selected_hostnames_test.go | 2 +- pkg/providers/botman/botman.go | 2 +- pkg/providers/botman/cache.go | 4 +-- pkg/providers/botman/custom_validations.go | 6 ++-- .../data_akamai_botman_akamai_bot_category.go | 6 ++-- ...kamai_botman_akamai_bot_category_action.go | 4 +-- ..._botman_akamai_bot_category_action_test.go | 2 +- ..._akamai_botman_akamai_bot_category_test.go | 2 +- .../data_akamai_botman_akamai_defined_bot.go | 6 ++-- ...a_akamai_botman_akamai_defined_bot_test.go | 2 +- ...data_akamai_botman_bot_analytics_cookie.go | 4 +-- ...akamai_botman_bot_analytics_cookie_test.go | 2 +- ...amai_botman_bot_analytics_cookie_values.go | 6 ++-- ...botman_bot_analytics_cookie_values_test.go | 2 +- ...ta_akamai_botman_bot_category_exception.go | 4 +-- ...amai_botman_bot_category_exception_test.go | 2 +- .../data_akamai_botman_bot_detection.go | 6 ++-- ...data_akamai_botman_bot_detection_action.go | 4 +-- ...akamai_botman_bot_detection_action_test.go | 2 +- .../data_akamai_botman_bot_detection_test.go | 2 +- ...mai_botman_bot_endpoint_coverage_report.go | 6 ++-- ...otman_bot_endpoint_coverage_report_test.go | 2 +- ...a_akamai_botman_bot_management_settings.go | 4 +-- ...mai_botman_bot_management_settings_test.go | 2 +- .../data_akamai_botman_challenge_action.go | 4 +-- ...ata_akamai_botman_challenge_action_test.go | 2 +- ...akamai_botman_challenge_injection_rules.go | 4 +-- ...i_botman_challenge_injection_rules_test.go | 2 +- ...mai_botman_challenge_interception_rules.go | 4 +-- ...otman_challenge_interception_rules_test.go | 2 +- ...data_akamai_botman_client_side_security.go | 4 +-- ...akamai_botman_client_side_security_test.go | 2 +- .../data_akamai_botman_conditional_action.go | 4 +-- ...a_akamai_botman_conditional_action_test.go | 2 +- .../data_akamai_botman_custom_bot_category.go | 4 +-- ...kamai_botman_custom_bot_category_action.go | 4 +-- ..._botman_custom_bot_category_action_test.go | 2 +- ...mai_botman_custom_bot_category_sequence.go | 4 +-- ...otman_custom_bot_category_sequence_test.go | 2 +- ..._akamai_botman_custom_bot_category_test.go | 2 +- .../data_akamai_botman_custom_client.go | 4 +-- ...ta_akamai_botman_custom_client_sequence.go | 4 +-- ...amai_botman_custom_client_sequence_test.go | 2 +- .../data_akamai_botman_custom_client_test.go | 2 +- .../botman/data_akamai_botman_custom_code.go | 4 +-- .../data_akamai_botman_custom_code_test.go | 2 +- .../data_akamai_botman_custom_defined_bot.go | 4 +-- ...a_akamai_botman_custom_defined_bot_test.go | 2 +- .../data_akamai_botman_custom_deny_action.go | 4 +-- ...a_akamai_botman_custom_deny_action_test.go | 2 +- ...data_akamai_botman_javascript_injection.go | 4 +-- ...akamai_botman_javascript_injection_test.go | 2 +- ...botman_recategorized_akamai_defined_bot.go | 4 +-- ...n_recategorized_akamai_defined_bot_test.go | 2 +- .../data_akamai_botman_response_action.go | 4 +-- ...data_akamai_botman_response_action_test.go | 2 +- ...ta_akamai_botman_serve_alternate_action.go | 4 +-- ...amai_botman_serve_alternate_action_test.go | 2 +- ...ta_akamai_botman_transactional_endpoint.go | 4 +-- ...otman_transactional_endpoint_protection.go | 4 +-- ..._transactional_endpoint_protection_test.go | 2 +- ...amai_botman_transactional_endpoint_test.go | 2 +- pkg/providers/botman/provider.go | 6 ++-- pkg/providers/botman/provider_test.go | 2 +- ...kamai_botman_akamai_bot_category_action.go | 4 +-- ..._botman_akamai_bot_category_action_test.go | 2 +- ...urce_akamai_botman_bot_analytics_cookie.go | 4 +-- ...akamai_botman_bot_analytics_cookie_test.go | 2 +- ...ce_akamai_botman_bot_category_exception.go | 4 +-- ...amai_botman_bot_category_exception_test.go | 2 +- ...urce_akamai_botman_bot_detection_action.go | 4 +-- ...akamai_botman_bot_detection_action_test.go | 2 +- ...e_akamai_botman_bot_management_settings.go | 4 +-- ...mai_botman_bot_management_settings_test.go | 2 +- ...resource_akamai_botman_challenge_action.go | 6 ++-- ...rce_akamai_botman_challenge_action_test.go | 2 +- ...akamai_botman_challenge_injection_rules.go | 4 +-- ...i_botman_challenge_injection_rules_test.go | 2 +- ...mai_botman_challenge_interception_rules.go | 4 +-- ...otman_challenge_interception_rules_test.go | 2 +- ...urce_akamai_botman_client_side_security.go | 4 +-- ...akamai_botman_client_side_security_test.go | 2 +- ...source_akamai_botman_conditional_action.go | 6 ++-- ...e_akamai_botman_conditional_action_test.go | 2 +- ...ource_akamai_botman_custom_bot_category.go | 6 ++-- ...kamai_botman_custom_bot_category_action.go | 4 +-- ..._botman_custom_bot_category_action_test.go | 2 +- ...mai_botman_custom_bot_category_sequence.go | 4 +-- ...otman_custom_bot_category_sequence_test.go | 4 +-- ..._akamai_botman_custom_bot_category_test.go | 2 +- .../resource_akamai_botman_custom_client.go | 4 +-- ...ce_akamai_botman_custom_client_sequence.go | 4 +-- ...amai_botman_custom_client_sequence_test.go | 4 +-- ...source_akamai_botman_custom_client_test.go | 2 +- .../resource_akamai_botman_custom_code.go | 4 +-- ...resource_akamai_botman_custom_code_test.go | 2 +- ...source_akamai_botman_custom_defined_bot.go | 4 +-- ...e_akamai_botman_custom_defined_bot_test.go | 2 +- ...source_akamai_botman_custom_deny_action.go | 6 ++-- ...e_akamai_botman_custom_deny_action_test.go | 2 +- ...urce_akamai_botman_javascript_injection.go | 4 +-- ...akamai_botman_javascript_injection_test.go | 2 +- ...botman_recategorized_akamai_defined_bot.go | 4 +-- ...n_recategorized_akamai_defined_bot_test.go | 2 +- ...ce_akamai_botman_serve_alternate_action.go | 6 ++-- ...amai_botman_serve_alternate_action_test.go | 2 +- ...ce_akamai_botman_transactional_endpoint.go | 4 +-- ...otman_transactional_endpoint_protection.go | 4 +-- ..._transactional_endpoint_protection_test.go | 2 +- ...amai_botman_transactional_endpoint_test.go | 2 +- pkg/providers/clientlists/clientlists.go | 2 +- .../data_akamai_clientlist_lists.go | 6 ++-- .../data_akamai_clientlist_lists_test.go | 2 +- pkg/providers/clientlists/provider.go | 2 +- pkg/providers/clientlists/provider_test.go | 2 +- .../resource_akamai_clientlists_list.go | 4 +-- ...urce_akamai_clientlists_list_activation.go | 4 +-- ...akamai_clientlists_list_activation_test.go | 2 +- .../resource_akamai_clientlists_list_test.go | 2 +- pkg/providers/cloudlets/cloudlets.go | 2 +- ...cloudlets_api_prioritization_match_rule.go | 2 +- ...lets_api_prioritization_match_rule_test.go | 2 +- ...mai_cloudlets_application_load_balancer.go | 4 +-- ...ts_application_load_balancer_match_rule.go | 2 +- ...plication_load_balancer_match_rule_test.go | 2 +- ...loudlets_application_load_balancer_test.go | 4 +-- ...udlets_audience_segmentation_match_rule.go | 2 +- ...s_audience_segmentation_match_rule_test.go | 2 +- ...ai_cloudlets_edge_redirector_match_rule.go | 2 +- ...oudlets_edge_redirector_match_rule_test.go | 2 +- ...ai_cloudlets_forward_rewrite_match_rule.go | 2 +- ...oudlets_forward_rewrite_match_rule_test.go | 2 +- ...mai_cloudlets_phased_release_match_rule.go | 2 +- ...loudlets_phased_release_match_rule_test.go | 2 +- .../cloudlets/data_akamai_cloudlets_policy.go | 6 ++-- ...data_akamai_cloudlets_policy_activation.go | 4 +-- ...akamai_cloudlets_policy_activation_test.go | 4 +-- .../data_akamai_cloudlets_policy_test.go | 2 +- ...ai_cloudlets_request_control_match_rule.go | 2 +- ...oudlets_request_control_match_rule_test.go | 2 +- .../data_akamai_cloudlets_shared_policy.go | 2 +- ...ata_akamai_cloudlets_shared_policy_test.go | 4 +-- ...dlets_visitor_prioritization_match_rule.go | 2 +- ..._visitor_prioritization_match_rule_test.go | 2 +- pkg/providers/cloudlets/match_rules.go | 2 +- pkg/providers/cloudlets/policy_version.go | 4 +-- .../cloudlets/policy_version_test.go | 2 +- pkg/providers/cloudlets/provider.go | 4 +-- pkg/providers/cloudlets/provider_test.go | 2 +- ...mai_cloudlets_application_load_balancer.go | 4 +-- ...ts_application_load_balancer_activation.go | 6 ++-- ...plication_load_balancer_activation_test.go | 2 +- ...loudlets_application_load_balancer_test.go | 4 +-- .../resource_akamai_cloudlets_policy.go | 12 ++++---- ...urce_akamai_cloudlets_policy_activation.go | 6 ++-- ...i_cloudlets_policy_activation_schema_v0.go | 2 +- ...akamai_cloudlets_policy_activation_test.go | 2 +- ...e_akamai_cloudlets_policy_activation_v2.go | 2 +- ...e_akamai_cloudlets_policy_activation_v3.go | 2 +- .../resource_akamai_cloudlets_policy_test.go | 4 +-- .../resource_akamai_cloudlets_policy_v2.go | 4 +-- .../resource_akamai_cloudlets_policy_v3.go | 6 ++-- pkg/providers/cloudwrapper/cloudwrapper.go | 2 +- .../data_akamai_cloudwrapper_capacities.go | 4 +-- .../data_akamai_cloudwrapper_configuration.go | 2 +- ..._akamai_cloudwrapper_configuration_test.go | 4 +-- ...data_akamai_cloudwrapper_configurations.go | 2 +- ...akamai_cloudwrapper_configurations_test.go | 2 +- .../data_akamai_cloudwrapper_location.go | 2 +- .../data_akamai_cloudwrapper_location_test.go | 2 +- .../data_akamai_cloudwrapper_locations.go | 2 +- ...data_akamai_cloudwrapper_locations_test.go | 2 +- .../data_akamai_cloudwrapper_properties.go | 2 +- ...ata_akamai_cloudwrapper_properties_test.go | 2 +- pkg/providers/cloudwrapper/provider.go | 2 +- pkg/providers/cloudwrapper/provider_test.go | 4 +-- ...resource_akamai_cloudwrapper_activation.go | 2 +- ...rce_akamai_cloudwrapper_activation_test.go | 2 +- ...ource_akamai_cloudwrapper_configuration.go | 4 +-- ...akamai_cloudwrapper_configuration_model.go | 4 +-- ..._akamai_cloudwrapper_configuration_test.go | 2 +- pkg/providers/cps/cps.go | 2 +- pkg/providers/cps/data_akamai_cps_csr.go | 8 +++--- pkg/providers/cps/data_akamai_cps_csr_test.go | 4 +-- .../cps/data_akamai_cps_deployments.go | 4 +-- .../cps/data_akamai_cps_deployments_test.go | 2 +- .../cps/data_akamai_cps_enrollment.go | 6 ++-- .../cps/data_akamai_cps_enrollment_test.go | 4 +-- .../cps/data_akamai_cps_enrollments.go | 6 ++-- .../cps/data_akamai_cps_enrollments_test.go | 4 +-- pkg/providers/cps/data_akamai_cps_warnings.go | 2 +- .../cps/data_akamai_cps_warnings_test.go | 2 +- pkg/providers/cps/enrollments.go | 8 +++--- pkg/providers/cps/provider.go | 4 +-- pkg/providers/cps/provider_test.go | 2 +- .../cps/resource_akamai_cps_dv_enrollment.go | 10 +++---- .../resource_akamai_cps_dv_enrollment_test.go | 4 +-- .../cps/resource_akamai_cps_dv_validation.go | 8 +++--- .../resource_akamai_cps_dv_validation_test.go | 2 +- ...ource_akamai_cps_third_party_enrollment.go | 10 +++---- ..._akamai_cps_third_party_enrollment_test.go | 4 +-- .../resource_akamai_cps_upload_certificate.go | 8 +++--- ...urce_akamai_cps_upload_certificate_test.go | 4 +-- pkg/providers/cps/tools/enrollment.go | 2 +- pkg/providers/datastream/connectors.go | 2 +- ...ta_akamai_datastream_activation_history.go | 4 +-- ...amai_datastream_activation_history_test.go | 2 +- .../data_akamai_datastream_dataset_fields.go | 6 ++-- ...a_akamai_datastream_dataset_fields_test.go | 2 +- .../datastream/data_akamai_datastreams.go | 6 ++-- .../data_akamai_datastreams_test.go | 4 +-- pkg/providers/datastream/datastream.go | 2 +- pkg/providers/datastream/provider.go | 4 +-- pkg/providers/datastream/provider_test.go | 2 +- .../datastream/resource_akamai_datastream.go | 8 +++--- .../resource_akamai_datastream_test.go | 2 +- pkg/providers/dns/data_authorities_set.go | 4 +-- .../dns/data_authorities_set_test.go | 2 +- pkg/providers/dns/data_dns_record_set.go | 4 +-- pkg/providers/dns/data_dns_record_set_test.go | 2 +- pkg/providers/dns/dns.go | 2 +- pkg/providers/dns/provider.go | 4 +-- pkg/providers/dns/provider_test.go | 2 +- .../dns/resource_akamai_dns_record.go | 10 +++---- .../dns/resource_akamai_dns_record_test.go | 2 +- pkg/providers/dns/resource_akamai_dns_zone.go | 4 +-- .../dns/resource_akamai_dns_zone_test.go | 2 +- .../data_akamai_edgekv_group_items.go | 4 +-- .../data_akamai_edgekv_group_items_test.go | 2 +- .../edgeworkers/data_akamai_edgekv_groups.go | 4 +-- .../data_akamai_edgekv_groups_test.go | 2 +- .../edgeworkers/data_akamai_edgeworker.go | 4 +-- .../data_akamai_edgeworker_activation.go | 4 +-- .../data_akamai_edgeworker_activation_test.go | 2 +- .../data_akamai_edgeworker_test.go | 2 +- .../data_akamai_edgeworkers_property_rules.go | 4 +-- ..._akamai_edgeworkers_property_rules_test.go | 2 +- .../data_akamai_edgeworkers_resource_tier.go | 4 +-- ...a_akamai_edgeworkers_resource_tier_test.go | 2 +- pkg/providers/edgeworkers/edgeworkers.go | 2 +- pkg/providers/edgeworkers/provider.go | 4 +-- pkg/providers/edgeworkers/provider_test.go | 2 +- .../edgeworkers/resource_akamai_edgekv.go | 6 ++-- .../resource_akamai_edgekv_group_items.go | 8 +++--- ...resource_akamai_edgekv_group_items_test.go | 4 +-- .../resource_akamai_edgekv_test.go | 4 +-- .../edgeworkers/resource_akamai_edgeworker.go | 8 +++--- .../resource_akamai_edgeworker_test.go | 2 +- .../resource_akamai_edgeworkers_activation.go | 8 +++--- ...urce_akamai_edgeworkers_activation_test.go | 2 +- pkg/providers/gtm/data_akamai_gtm_asmap.go | 2 +- .../gtm/data_akamai_gtm_asmap_test.go | 2 +- pkg/providers/gtm/data_akamai_gtm_cidrmap.go | 2 +- .../gtm/data_akamai_gtm_cidrmap_test.go | 2 +- .../gtm/data_akamai_gtm_datacenter.go | 4 +-- .../gtm/data_akamai_gtm_datacenter_test.go | 2 +- .../gtm/data_akamai_gtm_datacenters.go | 4 +-- .../gtm/data_akamai_gtm_datacenters_test.go | 2 +- .../gtm/data_akamai_gtm_default_datacenter.go | 4 +-- ...data_akamai_gtm_default_datacenter_test.go | 2 +- pkg/providers/gtm/data_akamai_gtm_domain.go | 2 +- .../gtm/data_akamai_gtm_domain_test.go | 4 +-- pkg/providers/gtm/data_akamai_gtm_domains.go | 2 +- .../gtm/data_akamai_gtm_domains_test.go | 2 +- pkg/providers/gtm/data_akamai_gtm_resource.go | 2 +- .../gtm/data_akamai_gtm_resource_test.go | 2 +- .../gtm/data_akamai_gtm_resources.go | 2 +- .../gtm/data_akamai_gtm_resources_test.go | 2 +- pkg/providers/gtm/gtm.go | 2 +- pkg/providers/gtm/provider.go | 4 +-- pkg/providers/gtm/provider_test.go | 2 +- .../gtm/resource_akamai_gtm_asmap.go | 6 ++-- .../gtm/resource_akamai_gtm_asmap_test.go | 2 +- .../gtm/resource_akamai_gtm_cidrmap.go | 6 ++-- .../gtm/resource_akamai_gtm_cidrmap_test.go | 2 +- .../gtm/resource_akamai_gtm_datacenter.go | 4 +-- .../resource_akamai_gtm_datacenter_test.go | 2 +- .../gtm/resource_akamai_gtm_domain.go | 6 ++-- .../gtm/resource_akamai_gtm_domain_test.go | 4 +-- .../gtm/resource_akamai_gtm_geomap.go | 6 ++-- .../gtm/resource_akamai_gtm_geomap_test.go | 2 +- .../gtm/resource_akamai_gtm_property.go | 8 +++--- .../gtm/resource_akamai_gtm_property_test.go | 4 +-- .../gtm/resource_akamai_gtm_resource.go | 6 ++-- .../gtm/resource_akamai_gtm_resource_test.go | 2 +- .../iam/data_akamai_iam_contact_types.go | 2 +- .../iam/data_akamai_iam_contact_types_test.go | 2 +- .../iam/data_akamai_iam_countries.go | 2 +- .../iam/data_akamai_iam_countries_test.go | 2 +- .../iam/data_akamai_iam_grantable_roles.go | 2 +- .../data_akamai_iam_grantable_roles_test.go | 2 +- pkg/providers/iam/data_akamai_iam_groups.go | 2 +- .../iam/data_akamai_iam_groups_test.go | 2 +- pkg/providers/iam/data_akamai_iam_roles.go | 2 +- .../iam/data_akamai_iam_roles_test.go | 2 +- pkg/providers/iam/data_akamai_iam_states.go | 2 +- .../iam/data_akamai_iam_states_test.go | 2 +- .../iam/data_akamai_iam_supported_langs.go | 2 +- .../data_akamai_iam_supported_langs_test.go | 2 +- .../iam/data_akamai_iam_timeout_policies.go | 2 +- .../data_akamai_iam_timeout_policies_test.go | 2 +- .../iam/data_akamai_iam_timezones.go | 2 +- .../iam/data_akamai_iam_timezones_test.go | 2 +- pkg/providers/iam/iam.go | 2 +- pkg/providers/iam/provider.go | 4 +-- pkg/providers/iam/provider_test.go | 2 +- ...urce_akamai_iam_blocked_user_properties.go | 4 +-- ...akamai_iam_blocked_user_properties_test.go | 2 +- .../iam/resource_akamai_iam_group.go | 4 +-- .../iam/resource_akamai_iam_group_test.go | 2 +- pkg/providers/iam/resource_akamai_iam_role.go | 4 +-- .../iam/resource_akamai_iam_role_test.go | 2 +- pkg/providers/iam/resource_akamai_iam_user.go | 4 +-- .../iam/resource_akamai_iam_user_test.go | 4 +-- .../data_akamai_imaging_policy_image.go | 6 ++-- .../data_akamai_imaging_policy_image_test.go | 2 +- .../data_akamai_imaging_policy_video.go | 6 ++-- .../data_akamai_imaging_policy_video_test.go | 2 +- .../imaging/imagewriter/convert-image.gen.go | 2 +- pkg/providers/imaging/imaging.go | 2 +- pkg/providers/imaging/provider.go | 4 +-- pkg/providers/imaging/provider_test.go | 2 +- .../resource_akamai_imaging_policy_image.go | 6 ++-- ...source_akamai_imaging_policy_image_test.go | 4 +-- .../resource_akamai_imaging_policy_set.go | 4 +-- ...resource_akamai_imaging_policy_set_test.go | 2 +- .../resource_akamai_imaging_policy_video.go | 6 ++-- ...source_akamai_imaging_policy_video_test.go | 4 +-- .../imaging/videowriter/convert-video.gen.go | 2 +- .../data_akamai_network_network_lists.go | 4 +-- ...a_akamai_networklist_network_lists_test.go | 2 +- pkg/providers/networklists/networklists.go | 2 +- pkg/providers/networklists/provider.go | 4 +-- pkg/providers/networklists/provider_test.go | 2 +- ...resource_akamai_networklist_activations.go | 4 +-- ...rce_akamai_networklist_activations_test.go | 2 +- ...esource_akamai_networklist_network_list.go | 4 +-- ...ai_networklist_network_list_description.go | 4 +-- ...tworklist_network_list_description_test.go | 2 +- ...i_networklist_network_list_subscription.go | 4 +-- ...worklist_network_list_subscription_test.go | 2 +- ...ce_akamai_networklist_network_list_test.go | 2 +- .../property/data_akamai_contracts.go | 4 +-- .../property/data_akamai_contracts_test.go | 2 +- pkg/providers/property/data_akamai_cp_code.go | 4 +-- .../property/data_akamai_cp_code_test.go | 2 +- .../property/data_akamai_properties.go | 6 ++-- .../property/data_akamai_properties_search.go | 4 +-- .../data_akamai_properties_search_test.go | 2 +- .../property/data_akamai_properties_test.go | 2 +- .../property/data_akamai_property.go | 4 +-- .../data_akamai_property_activation.go | 4 +-- .../data_akamai_property_activation_test.go | 2 +- .../data_akamai_property_hostnames.go | 6 ++-- .../data_akamai_property_hostnames_test.go | 2 +- .../property/data_akamai_property_include.go | 2 +- ...data_akamai_property_include_activation.go | 4 +-- ...akamai_property_include_activation_test.go | 2 +- .../data_akamai_property_include_parents.go | 4 +-- ...ta_akamai_property_include_parents_test.go | 4 +-- .../data_akamai_property_include_rules.go | 4 +-- ...data_akamai_property_include_rules_test.go | 2 +- .../data_akamai_property_include_test.go | 4 +-- .../property/data_akamai_property_includes.go | 4 +-- .../data_akamai_property_includes_test.go | 4 +-- .../property/data_akamai_property_products.go | 6 ++-- .../data_akamai_property_products_test.go | 2 +- .../data_akamai_property_rule_formats.go | 2 +- .../data_akamai_property_rule_formats_test.go | 2 +- .../property/data_akamai_property_rules.go | 6 ++-- .../data_akamai_property_rules_builder.go | 4 +-- ...data_akamai_property_rules_builder_test.go | 2 +- .../data_akamai_property_rules_template.go | 4 +-- ...ata_akamai_property_rules_template_test.go | 4 +-- .../data_akamai_property_rules_test.go | 2 +- .../property/data_akamai_property_test.go | 4 +-- .../property/data_property_akamai_contract.go | 6 ++-- .../data_property_akamai_contract_test.go | 2 +- .../property/data_property_akamai_group.go | 4 +-- .../data_property_akamai_group_test.go | 2 +- .../property/data_property_akamai_groups.go | 6 ++-- .../data_property_akamai_groups_test.go | 2 +- pkg/providers/property/diff_suppress_funcs.go | 2 +- .../property/diff_suppress_funcs_test.go | 2 +- pkg/providers/property/property.go | 2 +- pkg/providers/property/provider.go | 6 ++-- pkg/providers/property/provider_test.go | 2 +- .../property/resource_akamai_cp_code.go | 8 +++--- .../property/resource_akamai_cp_code_test.go | 2 +- .../property/resource_akamai_edge_hostname.go | 10 +++---- .../resource_akamai_edge_hostname_test.go | 2 +- .../property/resource_akamai_property.go | 6 ++-- .../resource_akamai_property_activation.go | 10 +++---- ...esource_akamai_property_activation_test.go | 2 +- ...ce_akamai_property_activation_unit_test.go | 4 +-- .../resource_akamai_property_bootstrap.go | 6 ++-- ...resource_akamai_property_bootstrap_test.go | 4 +-- .../resource_akamai_property_common.go | 6 ++-- .../resource_akamai_property_helpers_test.go | 2 +- .../resource_akamai_property_include.go | 6 ++-- ...urce_akamai_property_include_activation.go | 10 +++---- ...akamai_property_include_activation_test.go | 2 +- .../resource_akamai_property_include_test.go | 2 +- .../resource_akamai_property_schema_v0.go | 2 +- .../property/resource_akamai_property_test.go | 4 +-- pkg/providers/property/ruleformats/builder.go | 4 +-- .../ruleformats/rules_schema_reader.go | 2 +- .../property/ruleformats/validations.go | 2 +- pkg/providers/providers.go | 28 +++++++++---------- pkg/providers/registry/registry.go | 2 +- 643 files changed, 1061 insertions(+), 1061 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index bbfcdc403..e8ae5fa75 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -15,7 +15,7 @@ builds: - -trimpath - -tags=all ldflags: - - -s -w -X github.com/akamai/terraform-provider-akamai/v5/version.ProviderVersion={{.Version}} + - -s -w -X github.com/akamai/terraform-provider-akamai/v6/version.ProviderVersion={{.Version}} goos: - windows - linux diff --git a/README.md b/README.md index 605fd7731..eea5ced60 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,10 @@ Akamai Provider for Terraform ================== ![Build Status](https://github.com/akamai/terraform-provider-akamai/actions/workflows/checks.yml/badge.svg) -[![Go Report Card](https://goreportcard.com/badge/github.com/akamai/terraform-provider-akamai/v5)](https://goreportcard.com/report/github.com/akamai/terraform-provider-akamai/v5) +[![Go Report Card](https://goreportcard.com/badge/github.com/akamai/terraform-provider-akamai/v6)](https://goreportcard.com/report/github.com/akamai/terraform-provider-akamai/v6) ![GitHub release (latest by date)](https://img.shields.io/github/v/release/akamai/terraform-provider-akamai) [![License: MPL 2.0](https://img.shields.io/badge/License-MPL_2.0-blue.svg)](https://opensource.org/licenses/MPL-2.0) -[![GoDoc](https://godoc.org/github.com/akamai/terraform-provider-akamai?status.svg)](https://pkg.go.dev/github.com/akamai/terraform-provider-akamai/v5) +[![GoDoc](https://godoc.org/github.com/akamai/terraform-provider-akamai?status.svg)](https://pkg.go.dev/github.com/akamai/terraform-provider-akamai/v6) Use the Akamai Provider to manage and provision your Akamai configurations in Terraform. You can use the Akamai Provider for many Akamai products. diff --git a/go.mod b/go.mod index 39ce955cc..ec39c6280 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/akamai/terraform-provider-akamai/v5 +module github.com/akamai/terraform-provider-akamai/v6 go 1.21 diff --git a/main.go b/main.go index e5f1c953a..32a6bec05 100644 --- a/main.go +++ b/main.go @@ -6,9 +6,9 @@ import ( "flag" "log" - "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" - _ "github.com/akamai/terraform-provider-akamai/v5/pkg/providers" // Load the providers - "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" + "github.com/akamai/terraform-provider-akamai/v6/pkg/akamai" + _ "github.com/akamai/terraform-provider-akamai/v6/pkg/providers" // Load the providers + "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/registry" "github.com/hashicorp/go-hclog" "github.com/hashicorp/terraform-plugin-framework/providerserver" "github.com/hashicorp/terraform-plugin-go/tfprotov6" diff --git a/pkg/akamai/akamai.go b/pkg/akamai/akamai.go index 003e0fdb8..ff1208089 100644 --- a/pkg/akamai/akamai.go +++ b/pkg/akamai/akamai.go @@ -4,7 +4,7 @@ package akamai import ( "fmt" - "github.com/akamai/terraform-provider-akamai/v5/version" + "github.com/akamai/terraform-provider-akamai/v6/version" ) const ( diff --git a/pkg/akamai/akamai_test.go b/pkg/akamai/akamai_test.go index a0e208654..b4a1ed3ec 100644 --- a/pkg/akamai/akamai_test.go +++ b/pkg/akamai/akamai_test.go @@ -5,8 +5,8 @@ import ( "os" "testing" - "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" - "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/akamai/terraform-provider-akamai/v6/pkg/akamai" + "github.com/akamai/terraform-provider-akamai/v6/pkg/subprovider" "github.com/hashicorp/terraform-plugin-framework/datasource" dataschema "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/resource" diff --git a/pkg/akamai/configure_context.go b/pkg/akamai/configure_context.go index f81565522..3f9670753 100644 --- a/pkg/akamai/configure_context.go +++ b/pkg/akamai/configure_context.go @@ -11,10 +11,10 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgegrid" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/cache" - "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/retryablehttp" + "github.com/akamai/terraform-provider-akamai/v6/pkg/cache" + "github.com/akamai/terraform-provider-akamai/v6/pkg/logger" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/retryablehttp" "github.com/google/uuid" "github.com/spf13/cast" ) diff --git a/pkg/akamai/framework_provider.go b/pkg/akamai/framework_provider.go index 157f45ffe..b0cb6b4af 100644 --- a/pkg/akamai/framework_provider.go +++ b/pkg/akamai/framework_provider.go @@ -6,9 +6,9 @@ import ( "strconv" "time" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf/validators" - "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" - "github.com/akamai/terraform-provider-akamai/v5/version" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf/validators" + "github.com/akamai/terraform-provider-akamai/v6/pkg/subprovider" + "github.com/akamai/terraform-provider-akamai/v6/version" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/diag" "github.com/hashicorp/terraform-plugin-framework/provider" diff --git a/pkg/akamai/framework_provider_test.go b/pkg/akamai/framework_provider_test.go index fec502a1a..5fac76e74 100644 --- a/pkg/akamai/framework_provider_test.go +++ b/pkg/akamai/framework_provider_test.go @@ -6,10 +6,10 @@ import ( "regexp" "testing" - "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" - "github.com/akamai/terraform-provider-akamai/v5/pkg/cache" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" + "github.com/akamai/terraform-provider-akamai/v6/pkg/akamai" + "github.com/akamai/terraform-provider-akamai/v6/pkg/cache" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/registry" "github.com/hashicorp/terraform-plugin-framework/provider" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/assert" diff --git a/pkg/akamai/sdk_provider.go b/pkg/akamai/sdk_provider.go index 3f85db3af..40c7e137d 100644 --- a/pkg/akamai/sdk_provider.go +++ b/pkg/akamai/sdk_provider.go @@ -8,10 +8,10 @@ import ( "strconv" "time" - "github.com/akamai/terraform-provider-akamai/v5/pkg/cache" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/collections" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/akamai/terraform-provider-akamai/v6/pkg/cache" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/collections" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/subprovider" "github.com/hashicorp/terraform-plugin-go/tfprotov6" "github.com/hashicorp/terraform-plugin-mux/tf5to6server" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/akamai/sdk_provider_test.go b/pkg/akamai/sdk_provider_test.go index 644f1f882..b4497c7b3 100644 --- a/pkg/akamai/sdk_provider_test.go +++ b/pkg/akamai/sdk_provider_test.go @@ -6,12 +6,12 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgegrid" - "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" - "github.com/akamai/terraform-provider-akamai/v5/pkg/cache" + "github.com/akamai/terraform-provider-akamai/v6/pkg/akamai" + "github.com/akamai/terraform-provider-akamai/v6/pkg/cache" // Load the providers - _ "github.com/akamai/terraform-provider-akamai/v5/pkg/providers" - "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" + _ "github.com/akamai/terraform-provider-akamai/v6/pkg/providers" + "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/registry" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/stretchr/testify/assert" diff --git a/pkg/cache/cache.go b/pkg/cache/cache.go index 8fed10c9b..d4e634aaf 100644 --- a/pkg/cache/cache.go +++ b/pkg/cache/cache.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" + "github.com/akamai/terraform-provider-akamai/v6/pkg/logger" "github.com/allegro/bigcache/v2" ) diff --git a/pkg/common/framework/modifiers/set_use_state_if.go b/pkg/common/framework/modifiers/set_use_state_if.go index 8286b39e6..64e5aa139 100644 --- a/pkg/common/framework/modifiers/set_use_state_if.go +++ b/pkg/common/framework/modifiers/set_use_state_if.go @@ -3,7 +3,7 @@ package modifiers import ( "context" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/framework/replacer" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/framework/replacer" "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" "github.com/hashicorp/terraform-plugin-framework/types" ) diff --git a/pkg/common/framework/replacer/replacer_test.go b/pkg/common/framework/replacer/replacer_test.go index 8f250324f..a9821e7eb 100644 --- a/pkg/common/framework/replacer/replacer_test.go +++ b/pkg/common/framework/replacer/replacer_test.go @@ -4,8 +4,8 @@ package replacer_test import ( "testing" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/framework/modifiers" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/framework/replacer" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/framework/modifiers" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/framework/replacer" "github.com/stretchr/testify/assert" ) diff --git a/pkg/common/testutils/provider_factory.go b/pkg/common/testutils/provider_factory.go index 631f6d836..bcebad08c 100644 --- a/pkg/common/testutils/provider_factory.go +++ b/pkg/common/testutils/provider_factory.go @@ -3,8 +3,8 @@ package testutils import ( "context" - "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" - "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/akamai/terraform-provider-akamai/v6/pkg/akamai" + "github.com/akamai/terraform-provider-akamai/v6/pkg/subprovider" "github.com/hashicorp/terraform-plugin-framework/providerserver" "github.com/hashicorp/terraform-plugin-go/tfprotov6" "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" diff --git a/pkg/meta/meta.go b/pkg/meta/meta.go index 5a04d5d18..76cbc177f 100644 --- a/pkg/meta/meta.go +++ b/pkg/meta/meta.go @@ -6,7 +6,7 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" + "github.com/akamai/terraform-provider-akamai/v6/pkg/logger" "github.com/apex/log" "github.com/hashicorp/go-hclog" ) diff --git a/pkg/providers/appsec/appsec.go b/pkg/providers/appsec/appsec.go index eb5388e8a..1d92d36ae 100644 --- a/pkg/providers/appsec/appsec.go +++ b/pkg/providers/appsec/appsec.go @@ -1,7 +1,7 @@ package appsec import ( - "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" + "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/registry" ) // SubproviderName defines name of the appsec subprovider diff --git a/pkg/providers/appsec/config_versions.go b/pkg/providers/appsec/config_versions.go index de6d08eab..b4c59ea3c 100644 --- a/pkg/providers/appsec/config_versions.go +++ b/pkg/providers/appsec/config_versions.go @@ -7,8 +7,8 @@ import ( "sync" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/cache" - akameta "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/cache" + akameta "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" ) // Utility functions for determining current and latest versions of a security diff --git a/pkg/providers/appsec/custom_validations.go b/pkg/providers/appsec/custom_validations.go index 3f6e2b43b..577986943 100644 --- a/pkg/providers/appsec/custom_validations.go +++ b/pkg/providers/appsec/custom_validations.go @@ -5,8 +5,8 @@ import ( "fmt" "strings" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/go-cty/cty" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_attack_payload_logging.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_attack_payload_logging.go index 23075b4d9..0059da090 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_attack_payload_logging.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_attack_payload_logging.go @@ -7,8 +7,8 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_attack_payload_logging_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_attack_payload_logging_test.go index 57f055884..acbf3e564 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_attack_payload_logging_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_attack_payload_logging_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_evasive_path_match.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_evasive_path_match.go index 6082ec50d..2d8b5a209 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_evasive_path_match.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_evasive_path_match.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_evasive_path_match_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_evasive_path_match_test.go index d8ecdf7ce..a55045e22 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_evasive_path_match_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_evasive_path_match_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_logging.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_logging.go index 27eae2662..c032586af 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_logging.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_logging.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_logging_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_logging_test.go index 30fbbf9fc..fa2b7bc48 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_logging_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_logging_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pii_learning.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pii_learning.go index 3625052a8..2a3b68249 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pii_learning.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pii_learning.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pii_learning_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pii_learning_test.go index 3d9eb745b..a2b30ab36 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pii_learning_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pii_learning_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pragma_header.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pragma_header.go index 4ed4053f8..e4b3d33f0 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pragma_header.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pragma_header.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pragma_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pragma_test.go index b747a3696..45f26d296 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pragma_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_pragma_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_prefetch.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_prefetch.go index f33c10325..92ae835f1 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_prefetch.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_prefetch.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_prefetch_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_prefetch_test.go index 4f27a505d..b831f214a 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_prefetch_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_prefetch_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_request_body.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_request_body.go index 40153c233..f094c431a 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_request_body.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_request_body.go @@ -7,8 +7,8 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_request_body_test.go b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_request_body_test.go index 561586b8d..8ad47ce50 100644 --- a/pkg/providers/appsec/data_akamai_appsec_advanced_settings_request_body_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_advanced_settings_request_body_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_api_endpoints.go b/pkg/providers/appsec/data_akamai_appsec_api_endpoints.go index 5fb56f401..0f6ee9df8 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_endpoints.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_endpoints.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_api_endpoints_test.go b/pkg/providers/appsec/data_akamai_appsec_api_endpoints_test.go index 811b7a5e3..73e79124b 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_endpoints_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_endpoints_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage.go b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage.go index 9b1963431..c524aacf7 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_match_targets.go b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_match_targets.go index 5ce9dd18d..a97832f3e 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_match_targets.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_match_targets.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_match_targets_test.go b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_match_targets_test.go index 46aced7be..0a72b1cb5 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_match_targets_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_match_targets_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_overlapping.go b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_overlapping.go index c246cc3a1..d34a5d146 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_overlapping.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_overlapping.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_overlapping_test.go b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_overlapping_test.go index 929350d67..5d8cc00ae 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_overlapping_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_overlapping_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_test.go b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_test.go index 75753d00c..e3e6a7e9e 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_hostname_coverage_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_api_request_constraints.go b/pkg/providers/appsec/data_akamai_appsec_api_request_constraints.go index 94d11061b..c4455a1d5 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_request_constraints.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_request_constraints.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_api_request_constraints_test.go b/pkg/providers/appsec/data_akamai_appsec_api_request_constraints_test.go index d8d56c2d7..b21d66065 100644 --- a/pkg/providers/appsec/data_akamai_appsec_api_request_constraints_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_api_request_constraints_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_attack_groups.go b/pkg/providers/appsec/data_akamai_appsec_attack_groups.go index 7ec156aef..201575bc3 100644 --- a/pkg/providers/appsec/data_akamai_appsec_attack_groups.go +++ b/pkg/providers/appsec/data_akamai_appsec_attack_groups.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_attack_groups_test.go b/pkg/providers/appsec/data_akamai_appsec_attack_groups_test.go index 81e8242fe..5b94af02c 100644 --- a/pkg/providers/appsec/data_akamai_appsec_attack_groups_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_attack_groups_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_bypass_network_lists.go b/pkg/providers/appsec/data_akamai_appsec_bypass_network_lists.go index cdd0cb30b..bf637a83b 100644 --- a/pkg/providers/appsec/data_akamai_appsec_bypass_network_lists.go +++ b/pkg/providers/appsec/data_akamai_appsec_bypass_network_lists.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_bypass_network_lists_test.go b/pkg/providers/appsec/data_akamai_appsec_bypass_network_lists_test.go index b727855c0..ec93517a2 100644 --- a/pkg/providers/appsec/data_akamai_appsec_bypass_network_lists_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_bypass_network_lists_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_configuration.go b/pkg/providers/appsec/data_akamai_appsec_configuration.go index 92c3d49fc..41fb044af 100644 --- a/pkg/providers/appsec/data_akamai_appsec_configuration.go +++ b/pkg/providers/appsec/data_akamai_appsec_configuration.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_configuration_test.go b/pkg/providers/appsec/data_akamai_appsec_configuration_test.go index 71653c1f0..47a643910 100644 --- a/pkg/providers/appsec/data_akamai_appsec_configuration_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_configuration_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_configuration_version.go b/pkg/providers/appsec/data_akamai_appsec_configuration_version.go index 1cf53ff87..905c64741 100644 --- a/pkg/providers/appsec/data_akamai_appsec_configuration_version.go +++ b/pkg/providers/appsec/data_akamai_appsec_configuration_version.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_configuration_version_test.go b/pkg/providers/appsec/data_akamai_appsec_configuration_version_test.go index a3a8acc90..7b6775734 100644 --- a/pkg/providers/appsec/data_akamai_appsec_configuration_version_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_configuration_version_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_contracts_groups.go b/pkg/providers/appsec/data_akamai_appsec_contracts_groups.go index 45669b255..11be6ebda 100644 --- a/pkg/providers/appsec/data_akamai_appsec_contracts_groups.go +++ b/pkg/providers/appsec/data_akamai_appsec_contracts_groups.go @@ -6,8 +6,8 @@ import ( "errors" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_contracts_groups_test.go b/pkg/providers/appsec/data_akamai_appsec_contracts_groups_test.go index 874ca3925..1abab46ff 100644 --- a/pkg/providers/appsec/data_akamai_appsec_contracts_groups_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_contracts_groups_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_custom_deny.go b/pkg/providers/appsec/data_akamai_appsec_custom_deny.go index 836c2d6bb..7b20f0751 100644 --- a/pkg/providers/appsec/data_akamai_appsec_custom_deny.go +++ b/pkg/providers/appsec/data_akamai_appsec_custom_deny.go @@ -6,8 +6,8 @@ import ( "errors" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_custom_deny_test.go b/pkg/providers/appsec/data_akamai_appsec_custom_deny_test.go index 371d0745f..c95c70482 100644 --- a/pkg/providers/appsec/data_akamai_appsec_custom_deny_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_custom_deny_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_custom_rule_actions.go b/pkg/providers/appsec/data_akamai_appsec_custom_rule_actions.go index c7971363c..88c2a8a2b 100644 --- a/pkg/providers/appsec/data_akamai_appsec_custom_rule_actions.go +++ b/pkg/providers/appsec/data_akamai_appsec_custom_rule_actions.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_custom_rule_actions_test.go b/pkg/providers/appsec/data_akamai_appsec_custom_rule_actions_test.go index 55ac2e225..42a878928 100644 --- a/pkg/providers/appsec/data_akamai_appsec_custom_rule_actions_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_custom_rule_actions_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_custom_rules.go b/pkg/providers/appsec/data_akamai_appsec_custom_rules.go index 4ce550bfc..b527763f3 100644 --- a/pkg/providers/appsec/data_akamai_appsec_custom_rules.go +++ b/pkg/providers/appsec/data_akamai_appsec_custom_rules.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_custom_rules_test.go b/pkg/providers/appsec/data_akamai_appsec_custom_rules_test.go index 65b839566..d345516f9 100644 --- a/pkg/providers/appsec/data_akamai_appsec_custom_rules_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_custom_rules_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_eval.go b/pkg/providers/appsec/data_akamai_appsec_eval.go index d9446ea29..9196520fa 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval.go @@ -5,8 +5,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_groups.go b/pkg/providers/appsec/data_akamai_appsec_eval_groups.go index b8e433f89..a5f611aa3 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval_groups.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval_groups.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_groups_test.go b/pkg/providers/appsec/data_akamai_appsec_eval_groups_test.go index 15449d0f1..da0b089c1 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval_groups_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval_groups_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box.go b/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box.go index 19f5d00b3..f444b972d 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box.go @@ -5,8 +5,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions.go b/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions.go index 3da8b93cf..fca28e254 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions.go @@ -6,8 +6,8 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions_test.go b/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions_test.go index 0168887f1..06f82ecb5 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_conditions_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_test.go b/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_test.go index 11db5f086..26434f7f8 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval_penalty_box_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_rules.go b/pkg/providers/appsec/data_akamai_appsec_eval_rules.go index f27adcf81..414daef14 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval_rules.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval_rules.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_rules_test.go b/pkg/providers/appsec/data_akamai_appsec_eval_rules_test.go index 7aceb7a8c..dcb61b08e 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval_rules_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval_rules_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_eval_test.go b/pkg/providers/appsec/data_akamai_appsec_eval_test.go index 7bd096ed9..779f539fe 100644 --- a/pkg/providers/appsec/data_akamai_appsec_eval_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_eval_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_export_configuration.go b/pkg/providers/appsec/data_akamai_appsec_export_configuration.go index 849f4d021..ccda47ba2 100644 --- a/pkg/providers/appsec/data_akamai_appsec_export_configuration.go +++ b/pkg/providers/appsec/data_akamai_appsec_export_configuration.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_export_configuration_test.go b/pkg/providers/appsec/data_akamai_appsec_export_configuration_test.go index 3cb782723..b8f38f21c 100644 --- a/pkg/providers/appsec/data_akamai_appsec_export_configuration_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_export_configuration_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_failover_hostnames.go b/pkg/providers/appsec/data_akamai_appsec_failover_hostnames.go index 29729e047..3b4dfadbd 100644 --- a/pkg/providers/appsec/data_akamai_appsec_failover_hostnames.go +++ b/pkg/providers/appsec/data_akamai_appsec_failover_hostnames.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_failover_hostnames_test.go b/pkg/providers/appsec/data_akamai_appsec_failover_hostnames_test.go index ef6f371de..1954366b4 100644 --- a/pkg/providers/appsec/data_akamai_appsec_failover_hostnames_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_failover_hostnames_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_ip_geo.go b/pkg/providers/appsec/data_akamai_appsec_ip_geo.go index 19d0e7e9d..2da6c313e 100644 --- a/pkg/providers/appsec/data_akamai_appsec_ip_geo.go +++ b/pkg/providers/appsec/data_akamai_appsec_ip_geo.go @@ -5,8 +5,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_ip_geo_test.go b/pkg/providers/appsec/data_akamai_appsec_ip_geo_test.go index 39e2e922b..9be2ac16b 100644 --- a/pkg/providers/appsec/data_akamai_appsec_ip_geo_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_ip_geo_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_malware_content_types.go b/pkg/providers/appsec/data_akamai_appsec_malware_content_types.go index ef4228c0f..a2342968c 100644 --- a/pkg/providers/appsec/data_akamai_appsec_malware_content_types.go +++ b/pkg/providers/appsec/data_akamai_appsec_malware_content_types.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_malware_content_types_test.go b/pkg/providers/appsec/data_akamai_appsec_malware_content_types_test.go index 9f32d9c53..b9d8d10fb 100644 --- a/pkg/providers/appsec/data_akamai_appsec_malware_content_types_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_malware_content_types_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_malware_policies.go b/pkg/providers/appsec/data_akamai_appsec_malware_policies.go index a9f872972..31c049c76 100644 --- a/pkg/providers/appsec/data_akamai_appsec_malware_policies.go +++ b/pkg/providers/appsec/data_akamai_appsec_malware_policies.go @@ -8,8 +8,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_malware_policies_test.go b/pkg/providers/appsec/data_akamai_appsec_malware_policies_test.go index 3b7ff22f2..390479f7e 100644 --- a/pkg/providers/appsec/data_akamai_appsec_malware_policies_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_malware_policies_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_malware_policy_actions.go b/pkg/providers/appsec/data_akamai_appsec_malware_policy_actions.go index db9a8bc54..71bf04f53 100644 --- a/pkg/providers/appsec/data_akamai_appsec_malware_policy_actions.go +++ b/pkg/providers/appsec/data_akamai_appsec_malware_policy_actions.go @@ -6,8 +6,8 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_malware_policy_actions_test.go b/pkg/providers/appsec/data_akamai_appsec_malware_policy_actions_test.go index ccaf66e8e..bd0108dae 100644 --- a/pkg/providers/appsec/data_akamai_appsec_malware_policy_actions_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_malware_policy_actions_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_match_targets.go b/pkg/providers/appsec/data_akamai_appsec_match_targets.go index 435ecca66..866d69c36 100644 --- a/pkg/providers/appsec/data_akamai_appsec_match_targets.go +++ b/pkg/providers/appsec/data_akamai_appsec_match_targets.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_match_targets_test.go b/pkg/providers/appsec/data_akamai_appsec_match_targets_test.go index e23aa920c..333876b2d 100644 --- a/pkg/providers/appsec/data_akamai_appsec_match_targets_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_match_targets_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_penalty_box.go b/pkg/providers/appsec/data_akamai_appsec_penalty_box.go index acc0a0123..f33bd8662 100644 --- a/pkg/providers/appsec/data_akamai_appsec_penalty_box.go +++ b/pkg/providers/appsec/data_akamai_appsec_penalty_box.go @@ -5,8 +5,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions.go b/pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions.go index baf189b1a..a909942d7 100644 --- a/pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions.go +++ b/pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions.go @@ -6,8 +6,8 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions_test.go b/pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions_test.go index c3ceb9baa..52a5c5e38 100644 --- a/pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_penalty_box_conditions_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_penalty_box_test.go b/pkg/providers/appsec/data_akamai_appsec_penalty_box_test.go index 491301bd1..6713f6e00 100644 --- a/pkg/providers/appsec/data_akamai_appsec_penalty_box_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_penalty_box_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_rate_policies.go b/pkg/providers/appsec/data_akamai_appsec_rate_policies.go index c355d5f07..17a4c6022 100644 --- a/pkg/providers/appsec/data_akamai_appsec_rate_policies.go +++ b/pkg/providers/appsec/data_akamai_appsec_rate_policies.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_rate_policies_test.go b/pkg/providers/appsec/data_akamai_appsec_rate_policies_test.go index bb49fbdf9..5fd4984ad 100644 --- a/pkg/providers/appsec/data_akamai_appsec_rate_policies_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_rate_policies_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_rate_policy_actions.go b/pkg/providers/appsec/data_akamai_appsec_rate_policy_actions.go index fca4045d7..d69c4d3a7 100644 --- a/pkg/providers/appsec/data_akamai_appsec_rate_policy_actions.go +++ b/pkg/providers/appsec/data_akamai_appsec_rate_policy_actions.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_rate_policy_actions_test.go b/pkg/providers/appsec/data_akamai_appsec_rate_policy_actions_test.go index d5ff54c10..a58b8597b 100644 --- a/pkg/providers/appsec/data_akamai_appsec_rate_policy_actions_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_rate_policy_actions_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_reputation_analysis.go b/pkg/providers/appsec/data_akamai_appsec_reputation_analysis.go index f60c8e39c..2b642e287 100644 --- a/pkg/providers/appsec/data_akamai_appsec_reputation_analysis.go +++ b/pkg/providers/appsec/data_akamai_appsec_reputation_analysis.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_reputation_analysis_test.go b/pkg/providers/appsec/data_akamai_appsec_reputation_analysis_test.go index 0771f7c2b..121032441 100644 --- a/pkg/providers/appsec/data_akamai_appsec_reputation_analysis_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_reputation_analysis_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_reputation_profile_actions.go b/pkg/providers/appsec/data_akamai_appsec_reputation_profile_actions.go index d2e3f691d..6698f1b07 100644 --- a/pkg/providers/appsec/data_akamai_appsec_reputation_profile_actions.go +++ b/pkg/providers/appsec/data_akamai_appsec_reputation_profile_actions.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_reputation_profile_actions_test.go b/pkg/providers/appsec/data_akamai_appsec_reputation_profile_actions_test.go index c645e0853..ba7d82cef 100644 --- a/pkg/providers/appsec/data_akamai_appsec_reputation_profile_actions_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_reputation_profile_actions_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_reputation_profiles.go b/pkg/providers/appsec/data_akamai_appsec_reputation_profiles.go index 89a09fd96..05a6b7f62 100644 --- a/pkg/providers/appsec/data_akamai_appsec_reputation_profiles.go +++ b/pkg/providers/appsec/data_akamai_appsec_reputation_profiles.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_reputation_profiles_test.go b/pkg/providers/appsec/data_akamai_appsec_reputation_profiles_test.go index d8b776a0d..cc3fe5850 100644 --- a/pkg/providers/appsec/data_akamai_appsec_reputation_profiles_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_reputation_profiles_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_rule_upgrade.go b/pkg/providers/appsec/data_akamai_appsec_rule_upgrade.go index 2242b8595..85e24fb57 100644 --- a/pkg/providers/appsec/data_akamai_appsec_rule_upgrade.go +++ b/pkg/providers/appsec/data_akamai_appsec_rule_upgrade.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_rule_upgrade_test.go b/pkg/providers/appsec/data_akamai_appsec_rule_upgrade_test.go index 7defd3360..67f06acf9 100644 --- a/pkg/providers/appsec/data_akamai_appsec_rule_upgrade_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_rule_upgrade_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_rules.go b/pkg/providers/appsec/data_akamai_appsec_rules.go index 8ec27b37f..617620e7d 100644 --- a/pkg/providers/appsec/data_akamai_appsec_rules.go +++ b/pkg/providers/appsec/data_akamai_appsec_rules.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_rules_test.go b/pkg/providers/appsec/data_akamai_appsec_rules_test.go index 6d25c00d8..a411e216f 100644 --- a/pkg/providers/appsec/data_akamai_appsec_rules_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_rules_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_security_policy.go b/pkg/providers/appsec/data_akamai_appsec_security_policy.go index 50df965eb..1048a472c 100644 --- a/pkg/providers/appsec/data_akamai_appsec_security_policy.go +++ b/pkg/providers/appsec/data_akamai_appsec_security_policy.go @@ -7,8 +7,8 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_security_policy_protections.go b/pkg/providers/appsec/data_akamai_appsec_security_policy_protections.go index 9917d07b0..9de5ffb44 100644 --- a/pkg/providers/appsec/data_akamai_appsec_security_policy_protections.go +++ b/pkg/providers/appsec/data_akamai_appsec_security_policy_protections.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_security_policy_protections_test.go b/pkg/providers/appsec/data_akamai_appsec_security_policy_protections_test.go index 5ec05060c..eee52f61e 100644 --- a/pkg/providers/appsec/data_akamai_appsec_security_policy_protections_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_security_policy_protections_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_security_policy_test.go b/pkg/providers/appsec/data_akamai_appsec_security_policy_test.go index 472e5aaa7..4b7f9c0c5 100644 --- a/pkg/providers/appsec/data_akamai_appsec_security_policy_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_security_policy_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_selectable_hostnames.go b/pkg/providers/appsec/data_akamai_appsec_selectable_hostnames.go index 1ad88b47c..bdcf7523b 100644 --- a/pkg/providers/appsec/data_akamai_appsec_selectable_hostnames.go +++ b/pkg/providers/appsec/data_akamai_appsec_selectable_hostnames.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_selectable_hostnames_test.go b/pkg/providers/appsec/data_akamai_appsec_selectable_hostnames_test.go index 3a5ec1d32..22d81cf45 100644 --- a/pkg/providers/appsec/data_akamai_appsec_selectable_hostnames_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_selectable_hostnames_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_selected_hostnames.go b/pkg/providers/appsec/data_akamai_appsec_selected_hostnames.go index 2ea73d005..7b000e1e3 100644 --- a/pkg/providers/appsec/data_akamai_appsec_selected_hostnames.go +++ b/pkg/providers/appsec/data_akamai_appsec_selected_hostnames.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_selected_hostnames_test.go b/pkg/providers/appsec/data_akamai_appsec_selected_hostnames_test.go index 92b6e91ef..5b2259bea 100644 --- a/pkg/providers/appsec/data_akamai_appsec_selected_hostnames_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_selected_hostnames_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_siem_definitions.go b/pkg/providers/appsec/data_akamai_appsec_siem_definitions.go index 6157f3367..421463425 100644 --- a/pkg/providers/appsec/data_akamai_appsec_siem_definitions.go +++ b/pkg/providers/appsec/data_akamai_appsec_siem_definitions.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_siem_definitions_test.go b/pkg/providers/appsec/data_akamai_appsec_siem_definitions_test.go index 84681e438..be79b2797 100644 --- a/pkg/providers/appsec/data_akamai_appsec_siem_definitions_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_siem_definitions_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_siem_settings.go b/pkg/providers/appsec/data_akamai_appsec_siem_settings.go index ce1001047..1db282c82 100644 --- a/pkg/providers/appsec/data_akamai_appsec_siem_settings.go +++ b/pkg/providers/appsec/data_akamai_appsec_siem_settings.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_siem_settings_test.go b/pkg/providers/appsec/data_akamai_appsec_siem_settings_test.go index 9597c41a5..ec1107c73 100644 --- a/pkg/providers/appsec/data_akamai_appsec_siem_settings_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_siem_settings_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_slow_post_protection_settings.go b/pkg/providers/appsec/data_akamai_appsec_slow_post_protection_settings.go index ed5b828b6..2e46f7635 100644 --- a/pkg/providers/appsec/data_akamai_appsec_slow_post_protection_settings.go +++ b/pkg/providers/appsec/data_akamai_appsec_slow_post_protection_settings.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_slow_post_protection_settings_test.go b/pkg/providers/appsec/data_akamai_appsec_slow_post_protection_settings_test.go index af391ca33..9145d68b0 100644 --- a/pkg/providers/appsec/data_akamai_appsec_slow_post_protection_settings_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_slow_post_protection_settings_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_threat_intel.go b/pkg/providers/appsec/data_akamai_appsec_threat_intel.go index e1866c6bb..e16bd039a 100644 --- a/pkg/providers/appsec/data_akamai_appsec_threat_intel.go +++ b/pkg/providers/appsec/data_akamai_appsec_threat_intel.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_threat_intel_test.go b/pkg/providers/appsec/data_akamai_appsec_threat_intel_test.go index 46dd6e5c4..09307073d 100644 --- a/pkg/providers/appsec/data_akamai_appsec_threat_intel_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_threat_intel_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_tuning_recommendations.go b/pkg/providers/appsec/data_akamai_appsec_tuning_recommendations.go index c36249bda..e35263b38 100644 --- a/pkg/providers/appsec/data_akamai_appsec_tuning_recommendations.go +++ b/pkg/providers/appsec/data_akamai_appsec_tuning_recommendations.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/appsec/data_akamai_appsec_tuning_recommendations_test.go b/pkg/providers/appsec/data_akamai_appsec_tuning_recommendations_test.go index 9745eacc4..015567996 100644 --- a/pkg/providers/appsec/data_akamai_appsec_tuning_recommendations_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_tuning_recommendations_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_version_notes.go b/pkg/providers/appsec/data_akamai_appsec_version_notes.go index 8dbd2217b..f727bc8ca 100644 --- a/pkg/providers/appsec/data_akamai_appsec_version_notes.go +++ b/pkg/providers/appsec/data_akamai_appsec_version_notes.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_version_notes_test.go b/pkg/providers/appsec/data_akamai_appsec_version_notes_test.go index 2a3236842..a04829a97 100644 --- a/pkg/providers/appsec/data_akamai_appsec_version_notes_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_version_notes_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_waf_mode.go b/pkg/providers/appsec/data_akamai_appsec_waf_mode.go index e75f93694..392ef79bd 100644 --- a/pkg/providers/appsec/data_akamai_appsec_waf_mode.go +++ b/pkg/providers/appsec/data_akamai_appsec_waf_mode.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_waf_mode_test.go b/pkg/providers/appsec/data_akamai_appsec_waf_mode_test.go index 2847fb28d..8a4e973ae 100644 --- a/pkg/providers/appsec/data_akamai_appsec_waf_mode_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_waf_mode_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/data_akamai_appsec_wap_selected_hostnames.go b/pkg/providers/appsec/data_akamai_appsec_wap_selected_hostnames.go index 7739fc8df..216676649 100644 --- a/pkg/providers/appsec/data_akamai_appsec_wap_selected_hostnames.go +++ b/pkg/providers/appsec/data_akamai_appsec_wap_selected_hostnames.go @@ -6,8 +6,8 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/data_akamai_appsec_wap_selected_hostnames_test.go b/pkg/providers/appsec/data_akamai_appsec_wap_selected_hostnames_test.go index c96cf5102..682c7323e 100644 --- a/pkg/providers/appsec/data_akamai_appsec_wap_selected_hostnames_test.go +++ b/pkg/providers/appsec/data_akamai_appsec_wap_selected_hostnames_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/diff_suppress_funcs.go b/pkg/providers/appsec/diff_suppress_funcs.go index 9a14f9fa8..f3ec4df2e 100644 --- a/pkg/providers/appsec/diff_suppress_funcs.go +++ b/pkg/providers/appsec/diff_suppress_funcs.go @@ -10,7 +10,7 @@ import ( "strings" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" + "github.com/akamai/terraform-provider-akamai/v6/pkg/logger" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/provider.go b/pkg/providers/appsec/provider.go index 93410de04..eb1b9fb71 100644 --- a/pkg/providers/appsec/provider.go +++ b/pkg/providers/appsec/provider.go @@ -5,8 +5,8 @@ import ( "sync" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/subprovider" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/provider_test.go b/pkg/providers/appsec/provider_test.go index 2e8f36ae3..127884fac 100644 --- a/pkg/providers/appsec/provider_test.go +++ b/pkg/providers/appsec/provider_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" ) func TestMain(m *testing.M) { diff --git a/pkg/providers/appsec/resource_akamai_appsec_activations.go b/pkg/providers/appsec/resource_akamai_appsec_activations.go index 96131d352..924508cf3 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_activations.go +++ b/pkg/providers/appsec/resource_akamai_appsec_activations.go @@ -8,8 +8,8 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/go-hclog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" diff --git a/pkg/providers/appsec/resource_akamai_appsec_activations_test.go b/pkg/providers/appsec/resource_akamai_appsec_activations_test.go index 9945ec5be..1d022e2ee 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_activations_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_activations_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_attack_payload_logging.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_attack_payload_logging.go index f26375779..8f5c6a060 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_attack_payload_logging.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_attack_payload_logging.go @@ -9,8 +9,8 @@ import ( "strings" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_attack_payload_logging_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_attack_payload_logging_test.go index 95d2b296b..a358dee8d 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_attack_payload_logging_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_attack_payload_logging_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_evasive_path_match.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_evasive_path_match.go index bebf50faf..2a1896c58 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_evasive_path_match.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_evasive_path_match.go @@ -8,8 +8,8 @@ import ( "strings" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_evasive_path_match_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_evasive_path_match_test.go index a90300334..36d77dc77 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_evasive_path_match_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_evasive_path_match_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_logging.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_logging.go index d81ca3231..65d44f25b 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_logging.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_logging.go @@ -9,8 +9,8 @@ import ( "strings" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_logging_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_logging_test.go index e03f66d54..60a2f14a8 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_logging_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_logging_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pii_learning.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pii_learning.go index 319dd6c36..8bc291d33 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pii_learning.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pii_learning.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pii_learning_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pii_learning_test.go index ff6b44e32..808773cf5 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pii_learning_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pii_learning_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pragma_header.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pragma_header.go index e13bfdbb1..9a1844df8 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pragma_header.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pragma_header.go @@ -9,8 +9,8 @@ import ( "strings" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pragma_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pragma_test.go index dc0eda514..7b8f7f5f0 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pragma_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_pragma_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_prefetch.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_prefetch.go index f7724efcf..f553f5e13 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_prefetch.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_prefetch.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_prefetch_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_prefetch_test.go index 0d90901da..0132428e0 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_prefetch_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_prefetch_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_request_body.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_request_body.go index 67680f7d6..16fcae98d 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_request_body.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_request_body.go @@ -8,8 +8,8 @@ import ( "strings" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_request_body_test.go b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_request_body_test.go index ddf3ad95a..df61f36fc 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_request_body_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_advanced_settings_request_body_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_api_constraints_protection.go b/pkg/providers/appsec/resource_akamai_appsec_api_constraints_protection.go index f3e59c692..b542bfca8 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_api_constraints_protection.go +++ b/pkg/providers/appsec/resource_akamai_appsec_api_constraints_protection.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_api_constraints_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_api_constraints_protection_test.go index 68afc3dcc..a1d32ae90 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_api_constraints_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_api_constraints_protection_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_api_request_constraints.go b/pkg/providers/appsec/resource_akamai_appsec_api_request_constraints.go index 3cde60cdd..6af5ab00a 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_api_request_constraints.go +++ b/pkg/providers/appsec/resource_akamai_appsec_api_request_constraints.go @@ -8,8 +8,8 @@ import ( "strings" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_api_request_constraints_test.go b/pkg/providers/appsec/resource_akamai_appsec_api_request_constraints_test.go index 79561fbfe..cd033b414 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_api_request_constraints_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_api_request_constraints_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_attack_group.go b/pkg/providers/appsec/resource_akamai_appsec_attack_group.go index 5b175adc3..96f3c845c 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_attack_group.go +++ b/pkg/providers/appsec/resource_akamai_appsec_attack_group.go @@ -8,8 +8,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_attack_group_test.go b/pkg/providers/appsec/resource_akamai_appsec_attack_group_test.go index 7f93dcfb2..4b1cd8adc 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_attack_group_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_attack_group_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_bypass_network_lists.go b/pkg/providers/appsec/resource_akamai_appsec_bypass_network_lists.go index ad989690c..37faa9689 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_bypass_network_lists.go +++ b/pkg/providers/appsec/resource_akamai_appsec_bypass_network_lists.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_bypass_network_lists_test.go b/pkg/providers/appsec/resource_akamai_appsec_bypass_network_lists_test.go index d1229bfc6..05c69e463 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_bypass_network_lists_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_bypass_network_lists_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_configuration.go b/pkg/providers/appsec/resource_akamai_appsec_configuration.go index 8d61c71fa..f8a335fd4 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_configuration.go +++ b/pkg/providers/appsec/resource_akamai_appsec_configuration.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/appsec/resource_akamai_appsec_configuration_rename.go b/pkg/providers/appsec/resource_akamai_appsec_configuration_rename.go index a2a4e5f12..24bedfbf8 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_configuration_rename.go +++ b/pkg/providers/appsec/resource_akamai_appsec_configuration_rename.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_configuration_rename_test.go b/pkg/providers/appsec/resource_akamai_appsec_configuration_rename_test.go index 535ae677d..5d763d34e 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_configuration_rename_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_configuration_rename_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_configuration_test.go b/pkg/providers/appsec/resource_akamai_appsec_configuration_test.go index dc55769cf..2fec878f8 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_configuration_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_configuration_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_custom_deny.go b/pkg/providers/appsec/resource_akamai_appsec_custom_deny.go index 9f3be5fdc..dfbb5b5e9 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_custom_deny.go +++ b/pkg/providers/appsec/resource_akamai_appsec_custom_deny.go @@ -8,8 +8,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_custom_deny_test.go b/pkg/providers/appsec/resource_akamai_appsec_custom_deny_test.go index b6ed8a68d..d0bf1ceb6 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_custom_deny_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_custom_deny_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_custom_rule.go b/pkg/providers/appsec/resource_akamai_appsec_custom_rule.go index f8e23cadd..89dc81e26 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_custom_rule.go +++ b/pkg/providers/appsec/resource_akamai_appsec_custom_rule.go @@ -8,8 +8,8 @@ import ( "strings" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_custom_rule_action.go b/pkg/providers/appsec/resource_akamai_appsec_custom_rule_action.go index ecd16b7c5..cf2bbac0e 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_custom_rule_action.go +++ b/pkg/providers/appsec/resource_akamai_appsec_custom_rule_action.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_custom_rule_action_test.go b/pkg/providers/appsec/resource_akamai_appsec_custom_rule_action_test.go index cc7c33143..b477d01d3 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_custom_rule_action_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_custom_rule_action_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_custom_rule_test.go b/pkg/providers/appsec/resource_akamai_appsec_custom_rule_test.go index 72484089b..e7f2a20ef 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_custom_rule_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_custom_rule_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval.go b/pkg/providers/appsec/resource_akamai_appsec_eval.go index 3b3d75cb1..5f59dcbe8 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_group.go b/pkg/providers/appsec/resource_akamai_appsec_eval_group.go index b7e69facc..fa6e98011 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval_group.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_group.go @@ -8,8 +8,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_group_test.go b/pkg/providers/appsec/resource_akamai_appsec_eval_group_test.go index 2b88f0b14..fcc848e5b 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval_group_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_group_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box.go b/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box.go index 8bbfb9a5f..2e3fd869f 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions.go b/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions.go index 83feb5576..8d7932082 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions_test.go b/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions_test.go index e36a45f50..51f3c5180 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_conditions_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_test.go b/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_test.go index 8ddd23a6d..2e167e49d 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_penalty_box_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_rule.go b/pkg/providers/appsec/resource_akamai_appsec_eval_rule.go index a45436fcc..c0c2b5aa1 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval_rule.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_rule.go @@ -8,8 +8,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_rule_test.go b/pkg/providers/appsec/resource_akamai_appsec_eval_rule_test.go index 4655fad35..aad6f047b 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval_rule_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_rule_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_eval_test.go b/pkg/providers/appsec/resource_akamai_appsec_eval_test.go index b7b839825..b6cb1ade1 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_eval_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_eval_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_ip_geo.go b/pkg/providers/appsec/resource_akamai_appsec_ip_geo.go index 1cc5fc8fa..11e3dd7c1 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_ip_geo.go +++ b/pkg/providers/appsec/resource_akamai_appsec_ip_geo.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_ip_geo_protection.go b/pkg/providers/appsec/resource_akamai_appsec_ip_geo_protection.go index 1d6fa9617..5f4d03cd5 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_ip_geo_protection.go +++ b/pkg/providers/appsec/resource_akamai_appsec_ip_geo_protection.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_ip_geo_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_ip_geo_protection_test.go index 4d2c7b324..0257710ee 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_ip_geo_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_ip_geo_protection_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_ip_geo_test.go b/pkg/providers/appsec/resource_akamai_appsec_ip_geo_test.go index cf88477c4..9faa1deec 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_ip_geo_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_ip_geo_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_malware_policy.go b/pkg/providers/appsec/resource_akamai_appsec_malware_policy.go index 9dcf59552..6f7e5fc62 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_malware_policy.go +++ b/pkg/providers/appsec/resource_akamai_appsec_malware_policy.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_action.go b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_action.go index 8f13c6700..e2b766969 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_action.go +++ b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_action.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_action_test.go b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_action_test.go index 579f59cc8..5f28c1feb 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_action_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_action_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_actions.go b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_actions.go index eb6fef726..0b429acd0 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_actions.go +++ b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_actions.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_actions_test.go b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_actions_test.go index 67dfdb066..6d551242c 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_actions_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_actions_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_test.go b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_test.go index cd521599f..deb4c7042 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_malware_policy_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_malware_policy_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_malware_protection.go b/pkg/providers/appsec/resource_akamai_appsec_malware_protection.go index 7eb2f1151..7461797a0 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_malware_protection.go +++ b/pkg/providers/appsec/resource_akamai_appsec_malware_protection.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_malware_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_malware_protection_test.go index f77b91536..e8b472ea2 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_malware_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_malware_protection_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_match_target.go b/pkg/providers/appsec/resource_akamai_appsec_match_target.go index 685b2e2b9..33b4803de 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_match_target.go +++ b/pkg/providers/appsec/resource_akamai_appsec_match_target.go @@ -9,8 +9,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_match_target_sequence.go b/pkg/providers/appsec/resource_akamai_appsec_match_target_sequence.go index 9b0dc384e..60938a8e0 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_match_target_sequence.go +++ b/pkg/providers/appsec/resource_akamai_appsec_match_target_sequence.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_match_target_sequence_test.go b/pkg/providers/appsec/resource_akamai_appsec_match_target_sequence_test.go index 712126fef..485133a1a 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_match_target_sequence_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_match_target_sequence_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_match_target_test.go b/pkg/providers/appsec/resource_akamai_appsec_match_target_test.go index f5a93cbde..c2c931834 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_match_target_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_match_target_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_penalty_box.go b/pkg/providers/appsec/resource_akamai_appsec_penalty_box.go index c4ff4c831..79432ab8a 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_penalty_box.go +++ b/pkg/providers/appsec/resource_akamai_appsec_penalty_box.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions.go b/pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions.go index 69d0b7030..0e0ab7772 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions.go +++ b/pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions_test.go b/pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions_test.go index 01c5dafdf..7e90f2e87 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_penalty_box_conditions_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_penalty_box_test.go b/pkg/providers/appsec/resource_akamai_appsec_penalty_box_test.go index a49e654ef..1560545dc 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_penalty_box_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_penalty_box_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_rate_policy.go b/pkg/providers/appsec/resource_akamai_appsec_rate_policy.go index 75ab893af..65c84c36c 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rate_policy.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rate_policy.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_rate_policy_action.go b/pkg/providers/appsec/resource_akamai_appsec_rate_policy_action.go index 0e1bb0517..899c7b739 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rate_policy_action.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rate_policy_action.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_rate_policy_action_test.go b/pkg/providers/appsec/resource_akamai_appsec_rate_policy_action_test.go index e98c220e8..b2c219434 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rate_policy_action_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rate_policy_action_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_rate_policy_test.go b/pkg/providers/appsec/resource_akamai_appsec_rate_policy_test.go index ec6662864..1b50980c9 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rate_policy_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rate_policy_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_rate_protection.go b/pkg/providers/appsec/resource_akamai_appsec_rate_protection.go index f2214440e..3534a8c45 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rate_protection.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rate_protection.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_rate_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_rate_protection_test.go index 45f1e8e52..0d4777187 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rate_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rate_protection_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_reputation_analysis.go b/pkg/providers/appsec/resource_akamai_appsec_reputation_analysis.go index a1e6886e8..d767ac40c 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_reputation_analysis.go +++ b/pkg/providers/appsec/resource_akamai_appsec_reputation_analysis.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_reputation_analysis_test.go b/pkg/providers/appsec/resource_akamai_appsec_reputation_analysis_test.go index 3c674ca01..c65798db7 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_reputation_analysis_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_reputation_analysis_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_reputation_profile.go b/pkg/providers/appsec/resource_akamai_appsec_reputation_profile.go index d9ddb8083..d6da76651 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_reputation_profile.go +++ b/pkg/providers/appsec/resource_akamai_appsec_reputation_profile.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_action.go b/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_action.go index 5d9472a78..9e2f7e9ce 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_action.go +++ b/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_action.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_action_test.go b/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_action_test.go index d58c9b81b..d5559ba9d 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_action_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_action_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_test.go b/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_test.go index 27bc2a9d1..a6cf6b892 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_reputation_profile_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_reputation_protection.go b/pkg/providers/appsec/resource_akamai_appsec_reputation_protection.go index b0d7b1d38..55f18093a 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_reputation_protection.go +++ b/pkg/providers/appsec/resource_akamai_appsec_reputation_protection.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_reputation_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_reputation_protection_test.go index 348e3de59..7c189e4c9 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_reputation_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_reputation_protection_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_rule.go b/pkg/providers/appsec/resource_akamai_appsec_rule.go index 5608f7356..82c20d75a 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rule.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rule.go @@ -9,9 +9,9 @@ import ( "sync" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/cache" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - akameta "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/cache" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + akameta "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_rule_test.go b/pkg/providers/appsec/resource_akamai_appsec_rule_test.go index 54616e040..3a18b4783 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rule_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rule_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_rule_upgrade.go b/pkg/providers/appsec/resource_akamai_appsec_rule_upgrade.go index b0f29aded..70e13fddc 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rule_upgrade.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rule_upgrade.go @@ -9,8 +9,8 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_rule_upgrade_test.go b/pkg/providers/appsec/resource_akamai_appsec_rule_upgrade_test.go index e8a6c70af..47828d12b 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_rule_upgrade_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_rule_upgrade_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_security_policy.go b/pkg/providers/appsec/resource_akamai_appsec_security_policy.go index c04c86d45..2aec6397d 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_security_policy.go +++ b/pkg/providers/appsec/resource_akamai_appsec_security_policy.go @@ -8,8 +8,8 @@ import ( "strings" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_security_policy_default_protections.go b/pkg/providers/appsec/resource_akamai_appsec_security_policy_default_protections.go index 538f1a40e..8ee6db539 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_security_policy_default_protections.go +++ b/pkg/providers/appsec/resource_akamai_appsec_security_policy_default_protections.go @@ -8,8 +8,8 @@ import ( "strings" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_security_policy_default_protections_test.go b/pkg/providers/appsec/resource_akamai_appsec_security_policy_default_protections_test.go index afd64b725..0b7a2a31a 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_security_policy_default_protections_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_security_policy_default_protections_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_security_policy_rename.go b/pkg/providers/appsec/resource_akamai_appsec_security_policy_rename.go index a447a2102..849491dfe 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_security_policy_rename.go +++ b/pkg/providers/appsec/resource_akamai_appsec_security_policy_rename.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_security_policy_rename_test.go b/pkg/providers/appsec/resource_akamai_appsec_security_policy_rename_test.go index 6648fd554..2404aa27c 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_security_policy_rename_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_security_policy_rename_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_security_policy_test.go b/pkg/providers/appsec/resource_akamai_appsec_security_policy_test.go index 473be6c5a..22a2bb143 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_security_policy_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_security_policy_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_selected_hostname.go b/pkg/providers/appsec/resource_akamai_appsec_selected_hostname.go index 379c98a3f..3fa8a24f2 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_selected_hostname.go +++ b/pkg/providers/appsec/resource_akamai_appsec_selected_hostname.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_selected_hostname_test.go b/pkg/providers/appsec/resource_akamai_appsec_selected_hostname_test.go index c0c834a08..7ce77b312 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_selected_hostname_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_selected_hostname_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_siem_settings.go b/pkg/providers/appsec/resource_akamai_appsec_siem_settings.go index 3d70ba938..d06130ee4 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_siem_settings.go +++ b/pkg/providers/appsec/resource_akamai_appsec_siem_settings.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_siem_settings_test.go b/pkg/providers/appsec/resource_akamai_appsec_siem_settings_test.go index b10bdf0af..fbc5a1983 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_siem_settings_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_siem_settings_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_slow_post_protection_setting.go b/pkg/providers/appsec/resource_akamai_appsec_slow_post_protection_setting.go index 7b6f03653..d54c3657e 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_slow_post_protection_setting.go +++ b/pkg/providers/appsec/resource_akamai_appsec_slow_post_protection_setting.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_slow_post_protection_setting_test.go b/pkg/providers/appsec/resource_akamai_appsec_slow_post_protection_setting_test.go index e15a39eff..3ab426ad3 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_slow_post_protection_setting_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_slow_post_protection_setting_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_slowpost_protection.go b/pkg/providers/appsec/resource_akamai_appsec_slowpost_protection.go index 7014258c6..e25243e4b 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_slowpost_protection.go +++ b/pkg/providers/appsec/resource_akamai_appsec_slowpost_protection.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_slowpost_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_slowpost_protection_test.go index 25adb2686..4f35777e1 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_slowpost_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_slowpost_protection_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_threat_intel.go b/pkg/providers/appsec/resource_akamai_appsec_threat_intel.go index bd88070c6..f5fc76565 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_threat_intel.go +++ b/pkg/providers/appsec/resource_akamai_appsec_threat_intel.go @@ -5,8 +5,8 @@ import ( "fmt" "strconv" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" diff --git a/pkg/providers/appsec/resource_akamai_appsec_threat_intel_test.go b/pkg/providers/appsec/resource_akamai_appsec_threat_intel_test.go index 70455fd28..db5f7717a 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_threat_intel_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_threat_intel_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_version_notes.go b/pkg/providers/appsec/resource_akamai_appsec_version_notes.go index b9b75ea15..1faeab356 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_version_notes.go +++ b/pkg/providers/appsec/resource_akamai_appsec_version_notes.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_version_notes_test.go b/pkg/providers/appsec/resource_akamai_appsec_version_notes_test.go index 0badc6bb0..176506dfd 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_version_notes_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_version_notes_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_waf_mode.go b/pkg/providers/appsec/resource_akamai_appsec_waf_mode.go index 67429a979..8beb5a89b 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_waf_mode.go +++ b/pkg/providers/appsec/resource_akamai_appsec_waf_mode.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_waf_mode_test.go b/pkg/providers/appsec/resource_akamai_appsec_waf_mode_test.go index 51aa6012f..3445e40a3 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_waf_mode_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_waf_mode_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_waf_protection.go b/pkg/providers/appsec/resource_akamai_appsec_waf_protection.go index 5166db82f..4e219be88 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_waf_protection.go +++ b/pkg/providers/appsec/resource_akamai_appsec_waf_protection.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_waf_protection_test.go b/pkg/providers/appsec/resource_akamai_appsec_waf_protection_test.go index 021f7af88..f95235531 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_waf_protection_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_waf_protection_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/appsec/resource_akamai_appsec_wap_selected_hostnames.go b/pkg/providers/appsec/resource_akamai_appsec_wap_selected_hostnames.go index d337f948f..e3f0dddec 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_wap_selected_hostnames.go +++ b/pkg/providers/appsec/resource_akamai_appsec_wap_selected_hostnames.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/appsec/resource_akamai_appsec_wap_selected_hostnames_test.go b/pkg/providers/appsec/resource_akamai_appsec_wap_selected_hostnames_test.go index 5e3eea6f8..6dd5eed83 100644 --- a/pkg/providers/appsec/resource_akamai_appsec_wap_selected_hostnames_test.go +++ b/pkg/providers/appsec/resource_akamai_appsec_wap_selected_hostnames_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/botman/botman.go b/pkg/providers/botman/botman.go index fca4e13c3..58aff5b1f 100644 --- a/pkg/providers/botman/botman.go +++ b/pkg/providers/botman/botman.go @@ -1,6 +1,6 @@ package botman -import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" +import "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/registry" // SubproviderName defines name of the botman subprovider const SubproviderName = "botman" diff --git a/pkg/providers/botman/cache.go b/pkg/providers/botman/cache.go index 3db035a27..e69aaf6d9 100644 --- a/pkg/providers/botman/cache.go +++ b/pkg/providers/botman/cache.go @@ -7,8 +7,8 @@ import ( "sync" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/cache" - akameta "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/cache" + akameta "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/apex/log" ) diff --git a/pkg/providers/botman/custom_validations.go b/pkg/providers/botman/custom_validations.go index 05355a9f4..b742efdb8 100644 --- a/pkg/providers/botman/custom_validations.go +++ b/pkg/providers/botman/custom_validations.go @@ -6,9 +6,9 @@ import ( "fmt" "strings" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/str" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_akamai_bot_category.go b/pkg/providers/botman/data_akamai_botman_akamai_bot_category.go index 681e698eb..3abf4a51a 100644 --- a/pkg/providers/botman/data_akamai_botman_akamai_bot_category.go +++ b/pkg/providers/botman/data_akamai_botman_akamai_bot_category.go @@ -6,9 +6,9 @@ import ( "errors" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/hash" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action.go b/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action.go index 7a0f38eda..26aa2e916 100644 --- a/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action.go +++ b/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action.go @@ -7,8 +7,8 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action_test.go b/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action_test.go index 37060a1ab..eb78c4191 100644 --- a/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_akamai_bot_category_action_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_akamai_bot_category_test.go b/pkg/providers/botman/data_akamai_botman_akamai_bot_category_test.go index 1e1c0ef78..f3a24ee7f 100644 --- a/pkg/providers/botman/data_akamai_botman_akamai_bot_category_test.go +++ b/pkg/providers/botman/data_akamai_botman_akamai_bot_category_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_akamai_defined_bot.go b/pkg/providers/botman/data_akamai_botman_akamai_defined_bot.go index 08fda0811..f082a6aa4 100644 --- a/pkg/providers/botman/data_akamai_botman_akamai_defined_bot.go +++ b/pkg/providers/botman/data_akamai_botman_akamai_defined_bot.go @@ -6,9 +6,9 @@ import ( "errors" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/hash" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_akamai_defined_bot_test.go b/pkg/providers/botman/data_akamai_botman_akamai_defined_bot_test.go index e6818c3e1..f485d6955 100644 --- a/pkg/providers/botman/data_akamai_botman_akamai_defined_bot_test.go +++ b/pkg/providers/botman/data_akamai_botman_akamai_defined_bot_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie.go b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie.go index 3ed5166e7..6d2804ba3 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie.go +++ b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_test.go b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_test.go index fcf899321..627f08352 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values.go b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values.go index d6b4f65a2..4898546f4 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values.go +++ b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values.go @@ -4,9 +4,9 @@ import ( "context" "encoding/json" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/hash" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values_test.go b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values_test.go index 742b7dcb3..2948a0c30 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_analytics_cookie_values_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_bot_category_exception.go b/pkg/providers/botman/data_akamai_botman_bot_category_exception.go index f5de5cf43..329a6a120 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_category_exception.go +++ b/pkg/providers/botman/data_akamai_botman_bot_category_exception.go @@ -6,8 +6,8 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_bot_category_exception_test.go b/pkg/providers/botman/data_akamai_botman_bot_category_exception_test.go index 9359c0b51..48a51550d 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_category_exception_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_category_exception_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_bot_detection.go b/pkg/providers/botman/data_akamai_botman_bot_detection.go index ae4538601..cc508a594 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_detection.go +++ b/pkg/providers/botman/data_akamai_botman_bot_detection.go @@ -6,9 +6,9 @@ import ( "errors" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/hash" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_bot_detection_action.go b/pkg/providers/botman/data_akamai_botman_bot_detection_action.go index c92af9114..ec3e5cc6c 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_detection_action.go +++ b/pkg/providers/botman/data_akamai_botman_bot_detection_action.go @@ -7,8 +7,8 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_bot_detection_action_test.go b/pkg/providers/botman/data_akamai_botman_bot_detection_action_test.go index 067bc0278..c44af60f8 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_detection_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_detection_action_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_bot_detection_test.go b/pkg/providers/botman/data_akamai_botman_bot_detection_test.go index 8a05b6c05..da0828d0b 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_detection_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_detection_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report.go b/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report.go index 47c823cd2..7975203a1 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report.go +++ b/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report.go @@ -7,9 +7,9 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/hash" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report_test.go b/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report_test.go index 33fa3481d..38d0a3069 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_endpoint_coverage_report_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_bot_management_settings.go b/pkg/providers/botman/data_akamai_botman_bot_management_settings.go index 1873d5b9a..ed76cc249 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_management_settings.go +++ b/pkg/providers/botman/data_akamai_botman_bot_management_settings.go @@ -6,8 +6,8 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_bot_management_settings_test.go b/pkg/providers/botman/data_akamai_botman_bot_management_settings_test.go index 1b98063f2..272335b1f 100644 --- a/pkg/providers/botman/data_akamai_botman_bot_management_settings_test.go +++ b/pkg/providers/botman/data_akamai_botman_bot_management_settings_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_challenge_action.go b/pkg/providers/botman/data_akamai_botman_challenge_action.go index 19fcd7e05..a9e1e9c14 100644 --- a/pkg/providers/botman/data_akamai_botman_challenge_action.go +++ b/pkg/providers/botman/data_akamai_botman_challenge_action.go @@ -8,8 +8,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_challenge_action_test.go b/pkg/providers/botman/data_akamai_botman_challenge_action_test.go index 7ae2c073f..718276d43 100644 --- a/pkg/providers/botman/data_akamai_botman_challenge_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_challenge_action_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_challenge_injection_rules.go b/pkg/providers/botman/data_akamai_botman_challenge_injection_rules.go index 0f4245604..7ce1726ab 100644 --- a/pkg/providers/botman/data_akamai_botman_challenge_injection_rules.go +++ b/pkg/providers/botman/data_akamai_botman_challenge_injection_rules.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_challenge_injection_rules_test.go b/pkg/providers/botman/data_akamai_botman_challenge_injection_rules_test.go index 18705c995..4703a1061 100644 --- a/pkg/providers/botman/data_akamai_botman_challenge_injection_rules_test.go +++ b/pkg/providers/botman/data_akamai_botman_challenge_injection_rules_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_challenge_interception_rules.go b/pkg/providers/botman/data_akamai_botman_challenge_interception_rules.go index 9f8988daa..81df446c4 100644 --- a/pkg/providers/botman/data_akamai_botman_challenge_interception_rules.go +++ b/pkg/providers/botman/data_akamai_botman_challenge_interception_rules.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_challenge_interception_rules_test.go b/pkg/providers/botman/data_akamai_botman_challenge_interception_rules_test.go index c3f9e16df..71bedf62b 100644 --- a/pkg/providers/botman/data_akamai_botman_challenge_interception_rules_test.go +++ b/pkg/providers/botman/data_akamai_botman_challenge_interception_rules_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_client_side_security.go b/pkg/providers/botman/data_akamai_botman_client_side_security.go index 57cc9e97f..b80146ef9 100644 --- a/pkg/providers/botman/data_akamai_botman_client_side_security.go +++ b/pkg/providers/botman/data_akamai_botman_client_side_security.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_client_side_security_test.go b/pkg/providers/botman/data_akamai_botman_client_side_security_test.go index a6021eaa7..e505ca011 100644 --- a/pkg/providers/botman/data_akamai_botman_client_side_security_test.go +++ b/pkg/providers/botman/data_akamai_botman_client_side_security_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_conditional_action.go b/pkg/providers/botman/data_akamai_botman_conditional_action.go index e297a5d25..7d9af97d7 100644 --- a/pkg/providers/botman/data_akamai_botman_conditional_action.go +++ b/pkg/providers/botman/data_akamai_botman_conditional_action.go @@ -8,8 +8,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_conditional_action_test.go b/pkg/providers/botman/data_akamai_botman_conditional_action_test.go index 847375044..f096479d6 100644 --- a/pkg/providers/botman/data_akamai_botman_conditional_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_conditional_action_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_custom_bot_category.go b/pkg/providers/botman/data_akamai_botman_custom_bot_category.go index 301f4fd90..2277afe26 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_bot_category.go +++ b/pkg/providers/botman/data_akamai_botman_custom_bot_category.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_custom_bot_category_action.go b/pkg/providers/botman/data_akamai_botman_custom_bot_category_action.go index bd32ebb22..cf55dee6a 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_bot_category_action.go +++ b/pkg/providers/botman/data_akamai_botman_custom_bot_category_action.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_custom_bot_category_action_test.go b/pkg/providers/botman/data_akamai_botman_custom_bot_category_action_test.go index d65a5120e..7c0aff92c 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_bot_category_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_bot_category_action_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence.go b/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence.go index 7b9a07828..23e704157 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence.go +++ b/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence.go @@ -5,8 +5,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence_test.go b/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence_test.go index c10250e00..182dcd04a 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_bot_category_sequence_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_custom_bot_category_test.go b/pkg/providers/botman/data_akamai_botman_custom_bot_category_test.go index eb5e7d4d3..0943327d4 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_bot_category_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_bot_category_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_custom_client.go b/pkg/providers/botman/data_akamai_botman_custom_client.go index 3261b1290..bf8f4ea57 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_client.go +++ b/pkg/providers/botman/data_akamai_botman_custom_client.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_custom_client_sequence.go b/pkg/providers/botman/data_akamai_botman_custom_client_sequence.go index 3816ed40a..4e1ff2de1 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_client_sequence.go +++ b/pkg/providers/botman/data_akamai_botman_custom_client_sequence.go @@ -5,8 +5,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_custom_client_sequence_test.go b/pkg/providers/botman/data_akamai_botman_custom_client_sequence_test.go index 20ca72f57..35555a7d2 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_client_sequence_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_client_sequence_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_custom_client_test.go b/pkg/providers/botman/data_akamai_botman_custom_client_test.go index 98971f12b..f45bcd2ef 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_client_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_client_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_custom_code.go b/pkg/providers/botman/data_akamai_botman_custom_code.go index 5ff0c5c59..cabce58e6 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_code.go +++ b/pkg/providers/botman/data_akamai_botman_custom_code.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_custom_code_test.go b/pkg/providers/botman/data_akamai_botman_custom_code_test.go index 8e9dade07..efff5f4ca 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_code_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_code_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_custom_defined_bot.go b/pkg/providers/botman/data_akamai_botman_custom_defined_bot.go index 9c1370932..790dd31ee 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_defined_bot.go +++ b/pkg/providers/botman/data_akamai_botman_custom_defined_bot.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_custom_defined_bot_test.go b/pkg/providers/botman/data_akamai_botman_custom_defined_bot_test.go index 4fc3f5e2a..15fe9cbba 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_defined_bot_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_defined_bot_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_custom_deny_action.go b/pkg/providers/botman/data_akamai_botman_custom_deny_action.go index 60dfbbab4..b9dcb4211 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_deny_action.go +++ b/pkg/providers/botman/data_akamai_botman_custom_deny_action.go @@ -8,8 +8,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_custom_deny_action_test.go b/pkg/providers/botman/data_akamai_botman_custom_deny_action_test.go index dc437c75e..60662baf3 100644 --- a/pkg/providers/botman/data_akamai_botman_custom_deny_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_custom_deny_action_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_javascript_injection.go b/pkg/providers/botman/data_akamai_botman_javascript_injection.go index 610cb9992..a90ee731a 100644 --- a/pkg/providers/botman/data_akamai_botman_javascript_injection.go +++ b/pkg/providers/botman/data_akamai_botman_javascript_injection.go @@ -6,8 +6,8 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_javascript_injection_test.go b/pkg/providers/botman/data_akamai_botman_javascript_injection_test.go index fac6383b9..046a8222d 100644 --- a/pkg/providers/botman/data_akamai_botman_javascript_injection_test.go +++ b/pkg/providers/botman/data_akamai_botman_javascript_injection_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot.go b/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot.go index c7feba821..3270fab58 100644 --- a/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot.go +++ b/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot_test.go b/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot_test.go index 5db05836b..2abbd003d 100644 --- a/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot_test.go +++ b/pkg/providers/botman/data_akamai_botman_recategorized_akamai_defined_bot_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_response_action.go b/pkg/providers/botman/data_akamai_botman_response_action.go index 58d8fe01a..0f7e02833 100644 --- a/pkg/providers/botman/data_akamai_botman_response_action.go +++ b/pkg/providers/botman/data_akamai_botman_response_action.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_response_action_test.go b/pkg/providers/botman/data_akamai_botman_response_action_test.go index 14b71bec0..06313b324 100644 --- a/pkg/providers/botman/data_akamai_botman_response_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_response_action_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_serve_alternate_action.go b/pkg/providers/botman/data_akamai_botman_serve_alternate_action.go index 00c6761ab..2a2c694a3 100644 --- a/pkg/providers/botman/data_akamai_botman_serve_alternate_action.go +++ b/pkg/providers/botman/data_akamai_botman_serve_alternate_action.go @@ -8,8 +8,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_serve_alternate_action_test.go b/pkg/providers/botman/data_akamai_botman_serve_alternate_action_test.go index 696e851fb..f2ab04cc4 100644 --- a/pkg/providers/botman/data_akamai_botman_serve_alternate_action_test.go +++ b/pkg/providers/botman/data_akamai_botman_serve_alternate_action_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_transactional_endpoint.go b/pkg/providers/botman/data_akamai_botman_transactional_endpoint.go index b88fd303c..ac72e8c1c 100644 --- a/pkg/providers/botman/data_akamai_botman_transactional_endpoint.go +++ b/pkg/providers/botman/data_akamai_botman_transactional_endpoint.go @@ -7,8 +7,8 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection.go b/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection.go index 184e82805..27ac84a4a 100644 --- a/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection.go +++ b/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection_test.go b/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection_test.go index c1144a6fb..3b514c60d 100644 --- a/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection_test.go +++ b/pkg/providers/botman/data_akamai_botman_transactional_endpoint_protection_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/data_akamai_botman_transactional_endpoint_test.go b/pkg/providers/botman/data_akamai_botman_transactional_endpoint_test.go index 1ce64b524..e26bd5981 100644 --- a/pkg/providers/botman/data_akamai_botman_transactional_endpoint_test.go +++ b/pkg/providers/botman/data_akamai_botman_transactional_endpoint_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/provider.go b/pkg/providers/botman/provider.go index d64859a05..a29eec4c0 100644 --- a/pkg/providers/botman/provider.go +++ b/pkg/providers/botman/provider.go @@ -5,9 +5,9 @@ import ( "sync" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/appsec" - "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/appsec" + "github.com/akamai/terraform-provider-akamai/v6/pkg/subprovider" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/botman/provider_test.go b/pkg/providers/botman/provider_test.go index 5a7b6010a..c32a19fce 100644 --- a/pkg/providers/botman/provider_test.go +++ b/pkg/providers/botman/provider_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" ) func TestMain(m *testing.M) { diff --git a/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action.go b/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action.go index 08116c6f1..00bfc5f3e 100644 --- a/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action.go +++ b/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action_test.go b/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action_test.go index 1d60e9447..a21a3596e 100644 --- a/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_akamai_bot_category_action_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie.go b/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie.go index 9d278c61f..bc3bd9c95 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie_test.go b/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie_test.go index 238097bcf..35f143ab5 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie_test.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_analytics_cookie_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/resource_akamai_botman_bot_category_exception.go b/pkg/providers/botman/resource_akamai_botman_bot_category_exception.go index efcf659a6..458f45c47 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_category_exception.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_category_exception.go @@ -9,8 +9,8 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/botman/resource_akamai_botman_bot_category_exception_test.go b/pkg/providers/botman/resource_akamai_botman_bot_category_exception_test.go index b1ea31833..4fe13310c 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_category_exception_test.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_category_exception_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/resource_akamai_botman_bot_detection_action.go b/pkg/providers/botman/resource_akamai_botman_bot_detection_action.go index 2175162a4..1525b9d06 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_detection_action.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_detection_action.go @@ -9,8 +9,8 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/botman/resource_akamai_botman_bot_detection_action_test.go b/pkg/providers/botman/resource_akamai_botman_bot_detection_action_test.go index 7a1fb59e7..1d4f0c1f4 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_detection_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_detection_action_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/resource_akamai_botman_bot_management_settings.go b/pkg/providers/botman/resource_akamai_botman_bot_management_settings.go index 631c8d794..853af02cf 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_management_settings.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_management_settings.go @@ -9,8 +9,8 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/botman/resource_akamai_botman_bot_management_settings_test.go b/pkg/providers/botman/resource_akamai_botman_bot_management_settings_test.go index cb27dd2bd..7f8e70c46 100644 --- a/pkg/providers/botman/resource_akamai_botman_bot_management_settings_test.go +++ b/pkg/providers/botman/resource_akamai_botman_bot_management_settings_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/resource_akamai_botman_challenge_action.go b/pkg/providers/botman/resource_akamai_botman_challenge_action.go index 1e216d0d8..f89a53cd6 100644 --- a/pkg/providers/botman/resource_akamai_botman_challenge_action.go +++ b/pkg/providers/botman/resource_akamai_botman_challenge_action.go @@ -7,9 +7,9 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/str" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" diff --git a/pkg/providers/botman/resource_akamai_botman_challenge_action_test.go b/pkg/providers/botman/resource_akamai_botman_challenge_action_test.go index e35201721..fbb3d7986 100644 --- a/pkg/providers/botman/resource_akamai_botman_challenge_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_challenge_action_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules.go b/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules.go index b3a763a5a..790480eb0 100644 --- a/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules.go +++ b/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules.go @@ -8,8 +8,8 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules_test.go b/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules_test.go index 3c6a094d4..3978be2fa 100644 --- a/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules_test.go +++ b/pkg/providers/botman/resource_akamai_botman_challenge_injection_rules_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules.go b/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules.go index 1f93efd12..a7d3d6a31 100644 --- a/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules.go +++ b/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules_test.go b/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules_test.go index 5fef0ebc9..3c536ddcb 100644 --- a/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules_test.go +++ b/pkg/providers/botman/resource_akamai_botman_challenge_interception_rules_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/resource_akamai_botman_client_side_security.go b/pkg/providers/botman/resource_akamai_botman_client_side_security.go index 3f6dffe07..ba1fede3c 100644 --- a/pkg/providers/botman/resource_akamai_botman_client_side_security.go +++ b/pkg/providers/botman/resource_akamai_botman_client_side_security.go @@ -8,8 +8,8 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/botman/resource_akamai_botman_client_side_security_test.go b/pkg/providers/botman/resource_akamai_botman_client_side_security_test.go index 8ea9d86c3..94af3ddbb 100644 --- a/pkg/providers/botman/resource_akamai_botman_client_side_security_test.go +++ b/pkg/providers/botman/resource_akamai_botman_client_side_security_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/resource_akamai_botman_conditional_action.go b/pkg/providers/botman/resource_akamai_botman_conditional_action.go index 7a706d227..cce2dc185 100644 --- a/pkg/providers/botman/resource_akamai_botman_conditional_action.go +++ b/pkg/providers/botman/resource_akamai_botman_conditional_action.go @@ -7,9 +7,9 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/str" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" diff --git a/pkg/providers/botman/resource_akamai_botman_conditional_action_test.go b/pkg/providers/botman/resource_akamai_botman_conditional_action_test.go index 8566eafa4..eb4891cbc 100644 --- a/pkg/providers/botman/resource_akamai_botman_conditional_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_conditional_action_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/resource_akamai_botman_custom_bot_category.go b/pkg/providers/botman/resource_akamai_botman_custom_bot_category.go index 531c735ff..03edf2e63 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_bot_category.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_bot_category.go @@ -7,9 +7,9 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/str" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" diff --git a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action.go b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action.go index d38bb8187..c386b19f9 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action.go @@ -10,8 +10,8 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action_test.go b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action_test.go index eee427d5f..b709df334 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_action_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence.go b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence.go index e8cbc0ebb..7eaf9029e 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence.go @@ -5,8 +5,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence_test.go b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence_test.go index 98e3c02ac..c779f666a 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_sequence_test.go @@ -4,8 +4,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/str" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_test.go b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_test.go index a456f2ac6..c01bc21e8 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_bot_category_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_bot_category_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/resource_akamai_botman_custom_client.go b/pkg/providers/botman/resource_akamai_botman_custom_client.go index 0a418042d..1d506e0ca 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_client.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_client.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/botman/resource_akamai_botman_custom_client_sequence.go b/pkg/providers/botman/resource_akamai_botman_custom_client_sequence.go index 080b0d77e..ba320cd03 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_client_sequence.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_client_sequence.go @@ -5,8 +5,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/botman/resource_akamai_botman_custom_client_sequence_test.go b/pkg/providers/botman/resource_akamai_botman_custom_client_sequence_test.go index cdd7007c1..e9b4636b2 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_client_sequence_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_client_sequence_test.go @@ -4,8 +4,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/str" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/resource_akamai_botman_custom_client_test.go b/pkg/providers/botman/resource_akamai_botman_custom_client_test.go index 74a311c6a..a532abb44 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_client_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_client_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/resource_akamai_botman_custom_code.go b/pkg/providers/botman/resource_akamai_botman_custom_code.go index 8536f16f5..a48ebf5d5 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_code.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_code.go @@ -8,8 +8,8 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/botman/resource_akamai_botman_custom_code_test.go b/pkg/providers/botman/resource_akamai_botman_custom_code_test.go index 0efe09d79..4fbc0d76a 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_code_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_code_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/resource_akamai_botman_custom_defined_bot.go b/pkg/providers/botman/resource_akamai_botman_custom_defined_bot.go index 348a04e8b..ba2270009 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_defined_bot.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_defined_bot.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/botman/resource_akamai_botman_custom_defined_bot_test.go b/pkg/providers/botman/resource_akamai_botman_custom_defined_bot_test.go index e6b010559..2057479dc 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_defined_bot_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_defined_bot_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/resource_akamai_botman_custom_deny_action.go b/pkg/providers/botman/resource_akamai_botman_custom_deny_action.go index cafd5926b..ab6f7ec9f 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_deny_action.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_deny_action.go @@ -7,9 +7,9 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/str" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" diff --git a/pkg/providers/botman/resource_akamai_botman_custom_deny_action_test.go b/pkg/providers/botman/resource_akamai_botman_custom_deny_action_test.go index 6511d236e..81c54cfc8 100644 --- a/pkg/providers/botman/resource_akamai_botman_custom_deny_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_custom_deny_action_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/resource_akamai_botman_javascript_injection.go b/pkg/providers/botman/resource_akamai_botman_javascript_injection.go index 31aafb851..285a0e2ac 100644 --- a/pkg/providers/botman/resource_akamai_botman_javascript_injection.go +++ b/pkg/providers/botman/resource_akamai_botman_javascript_injection.go @@ -9,8 +9,8 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/botman/resource_akamai_botman_javascript_injection_test.go b/pkg/providers/botman/resource_akamai_botman_javascript_injection_test.go index 5fda8379b..45af0ce5b 100644 --- a/pkg/providers/botman/resource_akamai_botman_javascript_injection_test.go +++ b/pkg/providers/botman/resource_akamai_botman_javascript_injection_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot.go b/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot.go index 199518637..c086d2858 100644 --- a/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot.go +++ b/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot_test.go b/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot_test.go index 2f3b20678..61a7276d8 100644 --- a/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot_test.go +++ b/pkg/providers/botman/resource_akamai_botman_recategorized_akamai_defined_bot_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/resource_akamai_botman_serve_alternate_action.go b/pkg/providers/botman/resource_akamai_botman_serve_alternate_action.go index 75b993ef0..65e376c37 100644 --- a/pkg/providers/botman/resource_akamai_botman_serve_alternate_action.go +++ b/pkg/providers/botman/resource_akamai_botman_serve_alternate_action.go @@ -7,9 +7,9 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/str" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" diff --git a/pkg/providers/botman/resource_akamai_botman_serve_alternate_action_test.go b/pkg/providers/botman/resource_akamai_botman_serve_alternate_action_test.go index 559030fec..eedbcb72b 100644 --- a/pkg/providers/botman/resource_akamai_botman_serve_alternate_action_test.go +++ b/pkg/providers/botman/resource_akamai_botman_serve_alternate_action_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint.go b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint.go index 04f575bc8..df8fe4fec 100644 --- a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint.go +++ b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection.go b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection.go index 26ebc1893..373f426ca 100644 --- a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection.go +++ b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection.go @@ -8,8 +8,8 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection_test.go b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection_test.go index cb9931381..50d44e065 100644 --- a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection_test.go +++ b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_protection_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_test.go b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_test.go index 7270f6e85..195d05570 100644 --- a/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_test.go +++ b/pkg/providers/botman/resource_akamai_botman_transactional_endpoint_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/botman" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/clientlists/clientlists.go b/pkg/providers/clientlists/clientlists.go index e5108b998..146a2df72 100644 --- a/pkg/providers/clientlists/clientlists.go +++ b/pkg/providers/clientlists/clientlists.go @@ -1,6 +1,6 @@ package clientlists -import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" +import "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/registry" func init() { registry.RegisterSubprovider(NewSubprovider()) diff --git a/pkg/providers/clientlists/data_akamai_clientlist_lists.go b/pkg/providers/clientlists/data_akamai_clientlist_lists.go index 805b6b7d6..f72b19235 100644 --- a/pkg/providers/clientlists/data_akamai_clientlist_lists.go +++ b/pkg/providers/clientlists/data_akamai_clientlist_lists.go @@ -6,9 +6,9 @@ import ( "errors" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/clientlists" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/hash" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" diff --git a/pkg/providers/clientlists/data_akamai_clientlist_lists_test.go b/pkg/providers/clientlists/data_akamai_clientlist_lists_test.go index 047f99a70..8fe05d39d 100644 --- a/pkg/providers/clientlists/data_akamai_clientlist_lists_test.go +++ b/pkg/providers/clientlists/data_akamai_clientlist_lists_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/clientlists" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/clientlists/provider.go b/pkg/providers/clientlists/provider.go index d0b16c381..3ee537bc5 100644 --- a/pkg/providers/clientlists/provider.go +++ b/pkg/providers/clientlists/provider.go @@ -5,7 +5,7 @@ import ( "sync" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/clientlists" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/resource" diff --git a/pkg/providers/clientlists/provider_test.go b/pkg/providers/clientlists/provider_test.go index 707422251..8e9e5be15 100644 --- a/pkg/providers/clientlists/provider_test.go +++ b/pkg/providers/clientlists/provider_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/clientlists" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" ) func TestMain(m *testing.M) { diff --git a/pkg/providers/clientlists/resource_akamai_clientlists_list.go b/pkg/providers/clientlists/resource_akamai_clientlists_list.go index 86c783bca..9fb1fc6f8 100644 --- a/pkg/providers/clientlists/resource_akamai_clientlists_list.go +++ b/pkg/providers/clientlists/resource_akamai_clientlists_list.go @@ -9,8 +9,8 @@ import ( "sort" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/clientlists" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/clientlists/resource_akamai_clientlists_list_activation.go b/pkg/providers/clientlists/resource_akamai_clientlists_list_activation.go index 1ae0613cf..2ad7ceb4d 100644 --- a/pkg/providers/clientlists/resource_akamai_clientlists_list_activation.go +++ b/pkg/providers/clientlists/resource_akamai_clientlists_list_activation.go @@ -9,8 +9,8 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/clientlists" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/clientlists/resource_akamai_clientlists_list_activation_test.go b/pkg/providers/clientlists/resource_akamai_clientlists_list_activation_test.go index f4fe326e2..4c0fb0be7 100644 --- a/pkg/providers/clientlists/resource_akamai_clientlists_list_activation_test.go +++ b/pkg/providers/clientlists/resource_akamai_clientlists_list_activation_test.go @@ -8,7 +8,7 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/clientlists" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/clientlists/resource_akamai_clientlists_list_test.go b/pkg/providers/clientlists/resource_akamai_clientlists_list_test.go index b727e5efe..8654d8f67 100644 --- a/pkg/providers/clientlists/resource_akamai_clientlists_list_test.go +++ b/pkg/providers/clientlists/resource_akamai_clientlists_list_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/clientlists" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/cloudlets/cloudlets.go b/pkg/providers/cloudlets/cloudlets.go index b609daa06..0d40128fe 100644 --- a/pkg/providers/cloudlets/cloudlets.go +++ b/pkg/providers/cloudlets/cloudlets.go @@ -1,6 +1,6 @@ package cloudlets -import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" +import "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/registry" func init() { registry.RegisterSubprovider(NewSubprovider()) diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule.go b/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule.go index 9c03fae7d..e67c55f3d 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule.go @@ -6,7 +6,7 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule_test.go index 12fa543f7..e28040cfb 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_api_prioritization_match_rule_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer.go b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer.go index ee89ba7b7..a5aef0417 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer.go @@ -8,8 +8,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule.go b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule.go index d289a8249..efbb31055 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule.go @@ -5,7 +5,7 @@ import ( "encoding/json" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule_test.go index e1374658a..7f16052a7 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_match_rule_test.go @@ -4,7 +4,7 @@ import ( "regexp" "testing" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_test.go index 5c8e88a58..857670952 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_application_load_balancer_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule.go b/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule.go index bb5327a5d..2c83fd712 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule.go @@ -6,7 +6,7 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule_test.go index 8951d586b..c0fc2f69d 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_audience_segmentation_match_rule_test.go @@ -4,7 +4,7 @@ import ( "regexp" "testing" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule.go b/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule.go index 68d53bfba..c90704920 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule.go @@ -6,7 +6,7 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule_test.go index 28e639790..dd5dd0af7 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_edge_redirector_match_rule_test.go @@ -5,7 +5,7 @@ import ( "strconv" "testing" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule.go b/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule.go index 60512218e..d933b3e9a 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule.go @@ -6,7 +6,7 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule_test.go index f42c58e3e..6ba634abf 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_forward_rewrite_match_rule_test.go @@ -4,7 +4,7 @@ import ( "regexp" "testing" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule.go b/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule.go index 50ad9a601..1ce886f52 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule.go @@ -6,7 +6,7 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule_test.go index b029e5b77..dff2ccf15 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_phased_release_match_rule_test.go @@ -4,7 +4,7 @@ import ( "regexp" "testing" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_policy.go b/pkg/providers/cloudlets/data_akamai_cloudlets_policy.go index cb79345c2..a46b502ed 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_policy.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_policy.go @@ -6,9 +6,9 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_policy_activation.go b/pkg/providers/cloudlets/data_akamai_cloudlets_policy_activation.go index 347609fc5..1667d5ba3 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_policy_activation.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_policy_activation.go @@ -7,8 +7,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets/v3" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_policy_activation_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_policy_activation_test.go index 8ef47a053..a4653a89e 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_policy_activation_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_policy_activation_test.go @@ -9,8 +9,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets/v3" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_policy_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_policy_test.go index 867dc30c4..e35a397c2 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_policy_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_policy_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule.go b/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule.go index 4ef6c7c5a..da88021e8 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule.go @@ -6,7 +6,7 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule_test.go index f20f23ce0..f42ffe94d 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_request_control_match_rule_test.go @@ -4,7 +4,7 @@ import ( "regexp" "testing" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_shared_policy.go b/pkg/providers/cloudlets/data_akamai_cloudlets_shared_policy.go index fd4cb5817..8b4e0a7dc 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_shared_policy.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_shared_policy.go @@ -7,7 +7,7 @@ import ( "fmt" v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets/v3" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/types" diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_shared_policy_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_shared_policy_test.go index 476af8e03..062c31e59 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_shared_policy_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_shared_policy_test.go @@ -9,8 +9,8 @@ import ( "time" v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets/v3" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule.go b/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule.go index aa495d281..edd473f76 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule.go @@ -6,7 +6,7 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" diff --git a/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule_test.go b/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule_test.go index 54545cb5c..3352c6cc5 100644 --- a/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule_test.go +++ b/pkg/providers/cloudlets/data_akamai_cloudlets_visitor_prioritization_match_rule_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) diff --git a/pkg/providers/cloudlets/match_rules.go b/pkg/providers/cloudlets/match_rules.go index 0775cce3d..778798c38 100644 --- a/pkg/providers/cloudlets/match_rules.go +++ b/pkg/providers/cloudlets/match_rules.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/cloudlets/policy_version.go b/pkg/providers/cloudlets/policy_version.go index e1b50fa6e..5aa52adf4 100644 --- a/pkg/providers/cloudlets/policy_version.go +++ b/pkg/providers/cloudlets/policy_version.go @@ -3,8 +3,8 @@ package cloudlets import ( "context" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/cloudlets/policy_version_test.go b/pkg/providers/cloudlets/policy_version_test.go index c078c3488..ddd0fc58c 100644 --- a/pkg/providers/cloudlets/policy_version_test.go +++ b/pkg/providers/cloudlets/policy_version_test.go @@ -7,7 +7,7 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets/v3" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "github.com/tj/assert" diff --git a/pkg/providers/cloudlets/provider.go b/pkg/providers/cloudlets/provider.go index 400285657..4820b8709 100644 --- a/pkg/providers/cloudlets/provider.go +++ b/pkg/providers/cloudlets/provider.go @@ -8,8 +8,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets/v3" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/subprovider" ) type ( diff --git a/pkg/providers/cloudlets/provider_test.go b/pkg/providers/cloudlets/provider_test.go index 9bb9097af..62c8a3995 100644 --- a/pkg/providers/cloudlets/provider_test.go +++ b/pkg/providers/cloudlets/provider_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets/v3" ) diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer.go index da49d68bc..ab50e7caa 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer.go @@ -10,8 +10,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" ozzo "github.com/go-ozzo/ozzo-validation/v4" "github.com/go-ozzo/ozzo-validation/v4/is" "github.com/hashicorp/go-cty/cty" diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_activation.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_activation.go index f0f29d460..be11d0f98 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_activation.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_activation.go @@ -10,9 +10,9 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/timeouts" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/apex/log" "github.com/hashicorp/go-cty/cty" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_activation_test.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_activation_test.go index 8f3523518..2869f5b89 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_activation_test.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_activation_test.go @@ -7,7 +7,7 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_test.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_test.go index 4c7974ca7..80d04de78 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_test.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_application_load_balancer_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/jinzhu/copier" diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy.go index 6cfa581bf..5da6246d0 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy.go @@ -13,12 +13,12 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets/v3" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" - "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/str" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/timeouts" + "github.com/akamai/terraform-provider-akamai/v6/pkg/logger" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation.go index eeb6f26a1..c0f83a32f 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation.go @@ -15,9 +15,9 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets/v3" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/timeouts" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_schema_v0.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_schema_v0.go index bebf77aec..a9868a7b7 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_schema_v0.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_schema_v0.go @@ -1,7 +1,7 @@ package cloudlets import ( - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_test.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_test.go index 3040c63d8..2d01b0e55 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_test.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_test.go @@ -9,7 +9,7 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets/v3" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_v2.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_v2.go index 13871a9b6..6bd672448 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_v2.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_v2.go @@ -9,7 +9,7 @@ import ( "strings" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" "github.com/apex/log" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_v3.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_v3.go index cd7254f57..e5ed14488 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_v3.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_activation_v3.go @@ -9,7 +9,7 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets/v3" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" "github.com/apex/log" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go index 1f12c8ecd..85f37ef1e 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_test.go @@ -7,8 +7,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets/v3" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/jinzhu/copier" diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_v2.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_v2.go index 2ba43f2a8..710a8bcab 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_v2.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_v2.go @@ -10,8 +10,8 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_v3.go b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_v3.go index b42482bf3..6abcf9802 100644 --- a/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_v3.go +++ b/pkg/providers/cloudlets/resource_akamai_cloudlets_policy_v3.go @@ -8,9 +8,9 @@ import ( "time" v3 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudlets/v3" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/cloudwrapper/cloudwrapper.go b/pkg/providers/cloudwrapper/cloudwrapper.go index a75241894..6a12108a1 100644 --- a/pkg/providers/cloudwrapper/cloudwrapper.go +++ b/pkg/providers/cloudwrapper/cloudwrapper.go @@ -1,6 +1,6 @@ package cloudwrapper -import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" +import "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/registry" func init() { registry.RegisterSubprovider(NewSubprovider()) diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_capacities.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_capacities.go index bf7d9917d..7cf66fb53 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_capacities.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_capacities.go @@ -6,8 +6,8 @@ import ( "strings" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/collections" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/collections" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configuration.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configuration.go index 9471b72ee..f0b21d246 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configuration.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configuration.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configuration_test.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configuration_test.go index 2e9d0fe83..0674d502f 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configuration_test.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configuration_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configurations.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configurations.go index 8e88015e7..8216a5f1c 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configurations.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configurations.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/types" diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configurations_test.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configurations_test.go index 28ee9327b..0b8c5e462 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configurations_test.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_configurations_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_location.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_location.go index 39a765a75..391f45ff3 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_location.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_location.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_location_test.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_location_test.go index 24af6bc6d..54a2aae1f 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_location_test.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_location_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_locations.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_locations.go index 84768001a..1dbb44cdf 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_locations.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_locations.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/types" diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_locations_test.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_locations_test.go index 3c0fd83ff..dcf55d90c 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_locations_test.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_locations_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_properties.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_properties.go index ad85e0950..eb63fc2c4 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_properties.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_properties.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/types" diff --git a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_properties_test.go b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_properties_test.go index 14fbb4e93..b801beeb0 100644 --- a/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_properties_test.go +++ b/pkg/providers/cloudwrapper/data_akamai_cloudwrapper_properties_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/cloudwrapper/provider.go b/pkg/providers/cloudwrapper/provider.go index 9c959b4bf..2b8ca535f 100644 --- a/pkg/providers/cloudwrapper/provider.go +++ b/pkg/providers/cloudwrapper/provider.go @@ -2,7 +2,7 @@ package cloudwrapper import ( - "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/akamai/terraform-provider-akamai/v6/pkg/subprovider" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/cloudwrapper/provider_test.go b/pkg/providers/cloudwrapper/provider_test.go index 337a6afc4..5764867ff 100644 --- a/pkg/providers/cloudwrapper/provider_test.go +++ b/pkg/providers/cloudwrapper/provider_test.go @@ -6,8 +6,8 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" - "github.com/akamai/terraform-provider-akamai/v5/pkg/akamai" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/akamai" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/providerserver" "github.com/hashicorp/terraform-plugin-framework/resource" diff --git a/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_activation.go b/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_activation.go index e06533c20..79b5bf22d 100644 --- a/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_activation.go +++ b/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_activation.go @@ -7,7 +7,7 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/diag" diff --git a/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_activation_test.go b/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_activation_test.go index db54300b0..4a5e6c932 100644 --- a/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_activation_test.go +++ b/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_activation_test.go @@ -6,7 +6,7 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration.go b/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration.go index 5769d65e6..7def24d00 100644 --- a/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration.go +++ b/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration.go @@ -8,8 +8,8 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/framework/modifiers" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/framework/modifiers" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts" "github.com/hashicorp/terraform-plugin-framework-validators/int64validator" "github.com/hashicorp/terraform-plugin-framework-validators/objectvalidator" diff --git a/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration_model.go b/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration_model.go index 2e460cfb9..a20f080de 100644 --- a/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration_model.go +++ b/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration_model.go @@ -10,8 +10,8 @@ import ( "strings" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/framework/modifiers" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/framework/replacer" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/framework/modifiers" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/framework/replacer" "github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts" "github.com/hashicorp/terraform-plugin-framework/diag" "github.com/hashicorp/terraform-plugin-framework/types" diff --git a/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration_test.go b/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration_test.go index 01f6bde8e..92e61f0a8 100644 --- a/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration_test.go +++ b/pkg/providers/cloudwrapper/resource_akamai_cloudwrapper_configuration_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cloudwrapper" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/jinzhu/copier" "github.com/stretchr/testify/assert" diff --git a/pkg/providers/cps/cps.go b/pkg/providers/cps/cps.go index 93faa7f2d..949f1eeed 100644 --- a/pkg/providers/cps/cps.go +++ b/pkg/providers/cps/cps.go @@ -1,6 +1,6 @@ package cps -import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" +import "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/registry" func init() { registry.RegisterSubprovider(NewSubprovider()) diff --git a/pkg/providers/cps/data_akamai_cps_csr.go b/pkg/providers/cps/data_akamai_cps_csr.go index 5ddf10321..1536d49da 100644 --- a/pkg/providers/cps/data_akamai_cps_csr.go +++ b/pkg/providers/cps/data_akamai_cps_csr.go @@ -7,10 +7,10 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/collections" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - toolsCPS "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/cps/tools" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/collections" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" + toolsCPS "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/cps/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/cps/data_akamai_cps_csr_test.go b/pkg/providers/cps/data_akamai_cps_csr_test.go index 15f5daf85..bb7a05988 100644 --- a/pkg/providers/cps/data_akamai_cps_csr_test.go +++ b/pkg/providers/cps/data_akamai_cps_csr_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/cps/tools" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/cps/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/cps/data_akamai_cps_deployments.go b/pkg/providers/cps/data_akamai_cps_deployments.go index 2d6464ce1..6c150aea3 100644 --- a/pkg/providers/cps/data_akamai_cps_deployments.go +++ b/pkg/providers/cps/data_akamai_cps_deployments.go @@ -6,8 +6,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/cps/data_akamai_cps_deployments_test.go b/pkg/providers/cps/data_akamai_cps_deployments_test.go index baa859d8b..6e100b3f9 100644 --- a/pkg/providers/cps/data_akamai_cps_deployments_test.go +++ b/pkg/providers/cps/data_akamai_cps_deployments_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/cps/data_akamai_cps_enrollment.go b/pkg/providers/cps/data_akamai_cps_enrollment.go index 578d29655..9728e21f4 100644 --- a/pkg/providers/cps/data_akamai_cps_enrollment.go +++ b/pkg/providers/cps/data_akamai_cps_enrollment.go @@ -6,9 +6,9 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - cpstools "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/cps/tools" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" + cpstools "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/cps/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/cps/data_akamai_cps_enrollment_test.go b/pkg/providers/cps/data_akamai_cps_enrollment_test.go index cbe3d9a6f..08d8e8481 100644 --- a/pkg/providers/cps/data_akamai_cps_enrollment_test.go +++ b/pkg/providers/cps/data_akamai_cps_enrollment_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/cps/data_akamai_cps_enrollments.go b/pkg/providers/cps/data_akamai_cps_enrollments.go index 6d3407acc..ec41e8510 100644 --- a/pkg/providers/cps/data_akamai_cps_enrollments.go +++ b/pkg/providers/cps/data_akamai_cps_enrollments.go @@ -5,9 +5,9 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - cpstools "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/cps/tools" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" + cpstools "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/cps/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/cps/data_akamai_cps_enrollments_test.go b/pkg/providers/cps/data_akamai_cps_enrollments_test.go index f710219b1..2b8f018e7 100644 --- a/pkg/providers/cps/data_akamai_cps_enrollments_test.go +++ b/pkg/providers/cps/data_akamai_cps_enrollments_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/cps/tools" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/cps/tools" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/cps/data_akamai_cps_warnings.go b/pkg/providers/cps/data_akamai_cps_warnings.go index cf86795bd..b38140d88 100644 --- a/pkg/providers/cps/data_akamai_cps_warnings.go +++ b/pkg/providers/cps/data_akamai_cps_warnings.go @@ -3,7 +3,7 @@ package cps import ( "context" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/cps/data_akamai_cps_warnings_test.go b/pkg/providers/cps/data_akamai_cps_warnings_test.go index a83c7927a..319a91569 100644 --- a/pkg/providers/cps/data_akamai_cps_warnings_test.go +++ b/pkg/providers/cps/data_akamai_cps_warnings_test.go @@ -3,7 +3,7 @@ package cps import ( "testing" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) diff --git a/pkg/providers/cps/enrollments.go b/pkg/providers/cps/enrollments.go index e0fee01d2..3d6a93237 100644 --- a/pkg/providers/cps/enrollments.go +++ b/pkg/providers/cps/enrollments.go @@ -11,10 +11,10 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - cpstools "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/cps/tools" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" + cpstools "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/cps/tools" "github.com/apex/log" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/cps/provider.go b/pkg/providers/cps/provider.go index 4369b5a64..759156a4c 100644 --- a/pkg/providers/cps/provider.go +++ b/pkg/providers/cps/provider.go @@ -9,8 +9,8 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/subprovider" ) type ( diff --git a/pkg/providers/cps/provider_test.go b/pkg/providers/cps/provider_test.go index e8f5a7940..394c9e14e 100644 --- a/pkg/providers/cps/provider_test.go +++ b/pkg/providers/cps/provider_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" ) func TestMain(m *testing.M) { diff --git a/pkg/providers/cps/resource_akamai_cps_dv_enrollment.go b/pkg/providers/cps/resource_akamai_cps_dv_enrollment.go index a231e8c18..33fc4bd3c 100644 --- a/pkg/providers/cps/resource_akamai_cps_dv_enrollment.go +++ b/pkg/providers/cps/resource_akamai_cps_dv_enrollment.go @@ -10,11 +10,11 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - cpstools "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/cps/tools" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/timeouts" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" + cpstools "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/cps/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/cps/resource_akamai_cps_dv_enrollment_test.go b/pkg/providers/cps/resource_akamai_cps_dv_enrollment_test.go index 87ff1cd1a..40ed2cab5 100644 --- a/pkg/providers/cps/resource_akamai_cps_dv_enrollment_test.go +++ b/pkg/providers/cps/resource_akamai_cps_dv_enrollment_test.go @@ -7,8 +7,8 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/jinzhu/copier" diff --git a/pkg/providers/cps/resource_akamai_cps_dv_validation.go b/pkg/providers/cps/resource_akamai_cps_dv_validation.go index 8828dadba..eb4160cfc 100644 --- a/pkg/providers/cps/resource_akamai_cps_dv_validation.go +++ b/pkg/providers/cps/resource_akamai_cps_dv_validation.go @@ -10,10 +10,10 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - cpstools "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/cps/tools" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/timeouts" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" + cpstools "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/cps/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/cps/resource_akamai_cps_dv_validation_test.go b/pkg/providers/cps/resource_akamai_cps_dv_validation_test.go index 20bc054c8..0c287c046 100644 --- a/pkg/providers/cps/resource_akamai_cps_dv_validation_test.go +++ b/pkg/providers/cps/resource_akamai_cps_dv_validation_test.go @@ -7,7 +7,7 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/cps/resource_akamai_cps_third_party_enrollment.go b/pkg/providers/cps/resource_akamai_cps_third_party_enrollment.go index a6107875b..974e489e2 100644 --- a/pkg/providers/cps/resource_akamai_cps_third_party_enrollment.go +++ b/pkg/providers/cps/resource_akamai_cps_third_party_enrollment.go @@ -9,11 +9,11 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - cpstools "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/cps/tools" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/timeouts" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" + cpstools "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/cps/tools" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/cps/resource_akamai_cps_third_party_enrollment_test.go b/pkg/providers/cps/resource_akamai_cps_third_party_enrollment_test.go index f24826916..131203fbb 100644 --- a/pkg/providers/cps/resource_akamai_cps_third_party_enrollment_test.go +++ b/pkg/providers/cps/resource_akamai_cps_third_party_enrollment_test.go @@ -7,8 +7,8 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/jinzhu/copier" diff --git a/pkg/providers/cps/resource_akamai_cps_upload_certificate.go b/pkg/providers/cps/resource_akamai_cps_upload_certificate.go index 3945bffc5..8855d9f6b 100644 --- a/pkg/providers/cps/resource_akamai_cps_upload_certificate.go +++ b/pkg/providers/cps/resource_akamai_cps_upload_certificate.go @@ -10,10 +10,10 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - toolsCPS "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/cps/tools" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/timeouts" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" + toolsCPS "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/cps/tools" "github.com/apex/log" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/cps/resource_akamai_cps_upload_certificate_test.go b/pkg/providers/cps/resource_akamai_cps_upload_certificate_test.go index 9fc6d6318..f66d50e91 100644 --- a/pkg/providers/cps/resource_akamai_cps_upload_certificate_test.go +++ b/pkg/providers/cps/resource_akamai_cps_upload_certificate_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/stretchr/testify/assert" diff --git a/pkg/providers/cps/tools/enrollment.go b/pkg/providers/cps/tools/enrollment.go index 4002ecf18..c08596633 100644 --- a/pkg/providers/cps/tools/enrollment.go +++ b/pkg/providers/cps/tools/enrollment.go @@ -9,7 +9,7 @@ import ( "strings" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/cps" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/datastream/connectors.go b/pkg/providers/datastream/connectors.go index a6665a5d9..a903a9a36 100644 --- a/pkg/providers/datastream/connectors.go +++ b/pkg/providers/datastream/connectors.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/datastream" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/datastream/data_akamai_datastream_activation_history.go b/pkg/providers/datastream/data_akamai_datastream_activation_history.go index 70a83b950..ccfb27059 100644 --- a/pkg/providers/datastream/data_akamai_datastream_activation_history.go +++ b/pkg/providers/datastream/data_akamai_datastream_activation_history.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/datastream/data_akamai_datastream_activation_history_test.go b/pkg/providers/datastream/data_akamai_datastream_activation_history_test.go index c4b5b2a25..929030739 100644 --- a/pkg/providers/datastream/data_akamai_datastream_activation_history_test.go +++ b/pkg/providers/datastream/data_akamai_datastream_activation_history_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/datastream" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/datastream/data_akamai_datastream_dataset_fields.go b/pkg/providers/datastream/data_akamai_datastream_dataset_fields.go index db5527002..b0f45290a 100644 --- a/pkg/providers/datastream/data_akamai_datastream_dataset_fields.go +++ b/pkg/providers/datastream/data_akamai_datastream_dataset_fields.go @@ -7,9 +7,9 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/datastream" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/hash" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/datastream/data_akamai_datastream_dataset_fields_test.go b/pkg/providers/datastream/data_akamai_datastream_dataset_fields_test.go index 89fd0a7e0..d5e26b9f4 100644 --- a/pkg/providers/datastream/data_akamai_datastream_dataset_fields_test.go +++ b/pkg/providers/datastream/data_akamai_datastream_dataset_fields_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/datastream" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/datastream/data_akamai_datastreams.go b/pkg/providers/datastream/data_akamai_datastreams.go index 585dc82ca..3ec3ceaf5 100644 --- a/pkg/providers/datastream/data_akamai_datastreams.go +++ b/pkg/providers/datastream/data_akamai_datastreams.go @@ -6,9 +6,9 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/datastream" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/datastream/data_akamai_datastreams_test.go b/pkg/providers/datastream/data_akamai_datastreams_test.go index faba021af..12528dff8 100644 --- a/pkg/providers/datastream/data_akamai_datastreams_test.go +++ b/pkg/providers/datastream/data_akamai_datastreams_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/datastream" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/datastream/datastream.go b/pkg/providers/datastream/datastream.go index 9094abe3a..7a7b65fef 100644 --- a/pkg/providers/datastream/datastream.go +++ b/pkg/providers/datastream/datastream.go @@ -1,6 +1,6 @@ package datastream -import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" +import "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/registry" func init() { registry.RegisterSubprovider(NewSubprovider()) diff --git a/pkg/providers/datastream/provider.go b/pkg/providers/datastream/provider.go index 6432e8ec0..627ec01c7 100644 --- a/pkg/providers/datastream/provider.go +++ b/pkg/providers/datastream/provider.go @@ -5,8 +5,8 @@ import ( "sync" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/datastream" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/subprovider" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/datastream/provider_test.go b/pkg/providers/datastream/provider_test.go index 1574b0c15..14cfe4791 100644 --- a/pkg/providers/datastream/provider_test.go +++ b/pkg/providers/datastream/provider_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/datastream" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" ) func TestMain(m *testing.M) { diff --git a/pkg/providers/datastream/resource_akamai_datastream.go b/pkg/providers/datastream/resource_akamai_datastream.go index 82fdc408a..92922aa21 100644 --- a/pkg/providers/datastream/resource_akamai_datastream.go +++ b/pkg/providers/datastream/resource_akamai_datastream.go @@ -10,10 +10,10 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/datastream" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/collections" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/collections" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/logger" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/apex/log" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" diff --git a/pkg/providers/datastream/resource_akamai_datastream_test.go b/pkg/providers/datastream/resource_akamai_datastream_test.go index 728ef5d16..d47b8736c 100644 --- a/pkg/providers/datastream/resource_akamai_datastream_test.go +++ b/pkg/providers/datastream/resource_akamai_datastream_test.go @@ -9,7 +9,7 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/datastream" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/dns/data_authorities_set.go b/pkg/providers/dns/data_authorities_set.go index d062ebd4c..04fa16cf3 100644 --- a/pkg/providers/dns/data_authorities_set.go +++ b/pkg/providers/dns/data_authorities_set.go @@ -7,8 +7,8 @@ import ( "strings" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/dns/data_authorities_set_test.go b/pkg/providers/dns/data_authorities_set_test.go index ac1977027..bb1ce65af 100644 --- a/pkg/providers/dns/data_authorities_set_test.go +++ b/pkg/providers/dns/data_authorities_set_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/dns" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/dns/data_dns_record_set.go b/pkg/providers/dns/data_dns_record_set.go index cdf83c38b..8275de8b6 100644 --- a/pkg/providers/dns/data_dns_record_set.go +++ b/pkg/providers/dns/data_dns_record_set.go @@ -8,8 +8,8 @@ import ( "github.com/apex/log" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/dns/data_dns_record_set_test.go b/pkg/providers/dns/data_dns_record_set_test.go index 5684f069d..300d53377 100644 --- a/pkg/providers/dns/data_dns_record_set_test.go +++ b/pkg/providers/dns/data_dns_record_set_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/dns" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/dns/dns.go b/pkg/providers/dns/dns.go index bae8dd391..aaf4cbc4e 100644 --- a/pkg/providers/dns/dns.go +++ b/pkg/providers/dns/dns.go @@ -1,6 +1,6 @@ package dns -import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" +import "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/registry" func init() { registry.RegisterSubprovider(NewSubprovider()) diff --git a/pkg/providers/dns/provider.go b/pkg/providers/dns/provider.go index 835ee54ad..354484dd0 100644 --- a/pkg/providers/dns/provider.go +++ b/pkg/providers/dns/provider.go @@ -5,8 +5,8 @@ import ( "sync" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/dns" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/subprovider" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/dns/provider_test.go b/pkg/providers/dns/provider_test.go index c4764cfad..49fb59aba 100644 --- a/pkg/providers/dns/provider_test.go +++ b/pkg/providers/dns/provider_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/dns" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" ) func TestMain(m *testing.M) { diff --git a/pkg/providers/dns/resource_akamai_dns_record.go b/pkg/providers/dns/resource_akamai_dns_record.go index bbfa4dff8..c313b081c 100644 --- a/pkg/providers/dns/resource_akamai_dns_record.go +++ b/pkg/providers/dns/resource_akamai_dns_record.go @@ -17,12 +17,12 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/dns" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" - "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/dns/internal/txtrecord" + "github.com/akamai/terraform-provider-akamai/v6/pkg/logger" + "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/dns/internal/txtrecord" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/hash" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/apex/log" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/dns/resource_akamai_dns_record_test.go b/pkg/providers/dns/resource_akamai_dns_record_test.go index fafbac3e4..dcf84da71 100644 --- a/pkg/providers/dns/resource_akamai_dns_record_test.go +++ b/pkg/providers/dns/resource_akamai_dns_record_test.go @@ -9,7 +9,7 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/dns" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/assert" diff --git a/pkg/providers/dns/resource_akamai_dns_zone.go b/pkg/providers/dns/resource_akamai_dns_zone.go index ad7f69205..eb9931895 100644 --- a/pkg/providers/dns/resource_akamai_dns_zone.go +++ b/pkg/providers/dns/resource_akamai_dns_zone.go @@ -15,8 +15,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/dns" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/go-cty/cty" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/dns/resource_akamai_dns_zone_test.go b/pkg/providers/dns/resource_akamai_dns_zone_test.go index 93d19c9cc..9b240356c 100644 --- a/pkg/providers/dns/resource_akamai_dns_zone_test.go +++ b/pkg/providers/dns/resource_akamai_dns_zone_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/dns" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/edgeworkers/data_akamai_edgekv_group_items.go b/pkg/providers/edgeworkers/data_akamai_edgekv_group_items.go index cfa465136..32ddae962 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgekv_group_items.go +++ b/pkg/providers/edgeworkers/data_akamai_edgekv_group_items.go @@ -6,8 +6,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" diff --git a/pkg/providers/edgeworkers/data_akamai_edgekv_group_items_test.go b/pkg/providers/edgeworkers/data_akamai_edgekv_group_items_test.go index a24e6cd5e..97e115215 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgekv_group_items_test.go +++ b/pkg/providers/edgeworkers/data_akamai_edgekv_group_items_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/edgeworkers/data_akamai_edgekv_groups.go b/pkg/providers/edgeworkers/data_akamai_edgekv_groups.go index 4606db863..6b30789ab 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgekv_groups.go +++ b/pkg/providers/edgeworkers/data_akamai_edgekv_groups.go @@ -6,8 +6,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" diff --git a/pkg/providers/edgeworkers/data_akamai_edgekv_groups_test.go b/pkg/providers/edgeworkers/data_akamai_edgekv_groups_test.go index 46f0324b0..5c8535d44 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgekv_groups_test.go +++ b/pkg/providers/edgeworkers/data_akamai_edgekv_groups_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/edgeworkers/data_akamai_edgeworker.go b/pkg/providers/edgeworkers/data_akamai_edgeworker.go index a1216750b..ada40cd81 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgeworker.go +++ b/pkg/providers/edgeworkers/data_akamai_edgeworker.go @@ -12,8 +12,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/edgeworkers/data_akamai_edgeworker_activation.go b/pkg/providers/edgeworkers/data_akamai_edgeworker_activation.go index c0b63249c..b912abc93 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgeworker_activation.go +++ b/pkg/providers/edgeworkers/data_akamai_edgeworker_activation.go @@ -7,8 +7,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" diff --git a/pkg/providers/edgeworkers/data_akamai_edgeworker_activation_test.go b/pkg/providers/edgeworkers/data_akamai_edgeworker_activation_test.go index da3056271..c045bbba4 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgeworker_activation_test.go +++ b/pkg/providers/edgeworkers/data_akamai_edgeworker_activation_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/edgeworkers/data_akamai_edgeworker_test.go b/pkg/providers/edgeworkers/data_akamai_edgeworker_test.go index f63891ceb..67dc916e6 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgeworker_test.go +++ b/pkg/providers/edgeworkers/data_akamai_edgeworker_test.go @@ -10,7 +10,7 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/edgeworkers/data_akamai_edgeworkers_property_rules.go b/pkg/providers/edgeworkers/data_akamai_edgeworkers_property_rules.go index 1a8784ded..0976580da 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgeworkers_property_rules.go +++ b/pkg/providers/edgeworkers/data_akamai_edgeworkers_property_rules.go @@ -6,8 +6,8 @@ import ( "encoding/json" "strconv" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/edgeworkers/data_akamai_edgeworkers_property_rules_test.go b/pkg/providers/edgeworkers/data_akamai_edgeworkers_property_rules_test.go index 64c1967ce..048efe267 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgeworkers_property_rules_test.go +++ b/pkg/providers/edgeworkers/data_akamai_edgeworkers_property_rules_test.go @@ -3,7 +3,7 @@ package edgeworkers import ( "testing" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) diff --git a/pkg/providers/edgeworkers/data_akamai_edgeworkers_resource_tier.go b/pkg/providers/edgeworkers/data_akamai_edgeworkers_resource_tier.go index ea94424c9..7a016c639 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgeworkers_resource_tier.go +++ b/pkg/providers/edgeworkers/data_akamai_edgeworkers_resource_tier.go @@ -7,8 +7,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/edgeworkers/data_akamai_edgeworkers_resource_tier_test.go b/pkg/providers/edgeworkers/data_akamai_edgeworkers_resource_tier_test.go index 33203efdc..1d614e8f1 100644 --- a/pkg/providers/edgeworkers/data_akamai_edgeworkers_resource_tier_test.go +++ b/pkg/providers/edgeworkers/data_akamai_edgeworkers_resource_tier_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/edgeworkers/edgeworkers.go b/pkg/providers/edgeworkers/edgeworkers.go index 2f616dd52..23c62f1b4 100644 --- a/pkg/providers/edgeworkers/edgeworkers.go +++ b/pkg/providers/edgeworkers/edgeworkers.go @@ -1,6 +1,6 @@ package edgeworkers -import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" +import "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/registry" func init() { registry.RegisterSubprovider(NewSubprovider()) diff --git a/pkg/providers/edgeworkers/provider.go b/pkg/providers/edgeworkers/provider.go index 4115197ff..6f09bff54 100644 --- a/pkg/providers/edgeworkers/provider.go +++ b/pkg/providers/edgeworkers/provider.go @@ -5,8 +5,8 @@ import ( "sync" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/subprovider" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/edgeworkers/provider_test.go b/pkg/providers/edgeworkers/provider_test.go index 9077ce616..f3193de45 100644 --- a/pkg/providers/edgeworkers/provider_test.go +++ b/pkg/providers/edgeworkers/provider_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" ) func TestMain(m *testing.M) { diff --git a/pkg/providers/edgeworkers/resource_akamai_edgekv.go b/pkg/providers/edgeworkers/resource_akamai_edgekv.go index d2dc6f443..7cd88a75d 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgekv.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgekv.go @@ -9,9 +9,9 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/go-cty/cty" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items.go b/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items.go index bf5630eb3..1e1717176 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items.go @@ -9,10 +9,10 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/collections" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/collections" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/timeouts" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" diff --git a/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items_test.go b/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items_test.go index 53e681424..5674f6fe1 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items_test.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgekv_group_items_test.go @@ -8,8 +8,8 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/edgeworkers/resource_akamai_edgekv_test.go b/pkg/providers/edgeworkers/resource_akamai_edgekv_test.go index 215a2286b..ac62ed9a0 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgekv_test.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgekv_test.go @@ -10,8 +10,8 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/edgeworkers/resource_akamai_edgeworker.go b/pkg/providers/edgeworkers/resource_akamai_edgeworker.go index d1b76bd72..fabf16cf7 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgeworker.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgeworker.go @@ -16,10 +16,10 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/str" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/timeouts" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/edgeworkers/resource_akamai_edgeworker_test.go b/pkg/providers/edgeworkers/resource_akamai_edgeworker_test.go index 9fb875ed2..bdecb17bb 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgeworker_test.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgeworker_test.go @@ -14,7 +14,7 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation.go b/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation.go index 9a586ffb7..dfdf2d9a5 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation.go @@ -11,10 +11,10 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/collections" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/collections" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/timeouts" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation_test.go b/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation_test.go index eb90f5f59..f8e5d68fa 100644 --- a/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation_test.go +++ b/pkg/providers/edgeworkers/resource_akamai_edgeworkers_activation_test.go @@ -7,7 +7,7 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/edgeworkers" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/gtm/data_akamai_gtm_asmap.go b/pkg/providers/gtm/data_akamai_gtm_asmap.go index 250666a0e..d28f45496 100644 --- a/pkg/providers/gtm/data_akamai_gtm_asmap.go +++ b/pkg/providers/gtm/data_akamai_gtm_asmap.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/types" diff --git a/pkg/providers/gtm/data_akamai_gtm_asmap_test.go b/pkg/providers/gtm/data_akamai_gtm_asmap_test.go index 248e66927..41f22fb4e 100644 --- a/pkg/providers/gtm/data_akamai_gtm_asmap_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_asmap_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/gtm/data_akamai_gtm_cidrmap.go b/pkg/providers/gtm/data_akamai_gtm_cidrmap.go index 852672b2d..f835bae6d 100644 --- a/pkg/providers/gtm/data_akamai_gtm_cidrmap.go +++ b/pkg/providers/gtm/data_akamai_gtm_cidrmap.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/diag" diff --git a/pkg/providers/gtm/data_akamai_gtm_cidrmap_test.go b/pkg/providers/gtm/data_akamai_gtm_cidrmap_test.go index 4599d8eb9..3b2f3faa8 100644 --- a/pkg/providers/gtm/data_akamai_gtm_cidrmap_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_cidrmap_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/gtm/data_akamai_gtm_datacenter.go b/pkg/providers/gtm/data_akamai_gtm_datacenter.go index 4e62872aa..553e29103 100644 --- a/pkg/providers/gtm/data_akamai_gtm_datacenter.go +++ b/pkg/providers/gtm/data_akamai_gtm_datacenter.go @@ -6,8 +6,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/gtm/data_akamai_gtm_datacenter_test.go b/pkg/providers/gtm/data_akamai_gtm_datacenter_test.go index 27114643c..5e50649fa 100644 --- a/pkg/providers/gtm/data_akamai_gtm_datacenter_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_datacenter_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/gtm/data_akamai_gtm_datacenters.go b/pkg/providers/gtm/data_akamai_gtm_datacenters.go index 86cb15839..fe767d684 100644 --- a/pkg/providers/gtm/data_akamai_gtm_datacenters.go +++ b/pkg/providers/gtm/data_akamai_gtm_datacenters.go @@ -4,8 +4,8 @@ import ( "context" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/gtm/data_akamai_gtm_datacenters_test.go b/pkg/providers/gtm/data_akamai_gtm_datacenters_test.go index 7604fee34..fa2bb0b5f 100644 --- a/pkg/providers/gtm/data_akamai_gtm_datacenters_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_datacenters_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/gtm/data_akamai_gtm_default_datacenter.go b/pkg/providers/gtm/data_akamai_gtm_default_datacenter.go index a11e4cd41..ee983598e 100644 --- a/pkg/providers/gtm/data_akamai_gtm_default_datacenter.go +++ b/pkg/providers/gtm/data_akamai_gtm_default_datacenter.go @@ -7,8 +7,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/apex/log" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go b/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go index bc88827af..423fe225a 100644 --- a/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_default_datacenter_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/gtm/data_akamai_gtm_domain.go b/pkg/providers/gtm/data_akamai_gtm_domain.go index ea4978901..6cb9a58b5 100644 --- a/pkg/providers/gtm/data_akamai_gtm_domain.go +++ b/pkg/providers/gtm/data_akamai_gtm_domain.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/diag" diff --git a/pkg/providers/gtm/data_akamai_gtm_domain_test.go b/pkg/providers/gtm/data_akamai_gtm_domain_test.go index 59b483159..07688d3b8 100644 --- a/pkg/providers/gtm/data_akamai_gtm_domain_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_domain_test.go @@ -5,10 +5,10 @@ import ( "regexp" "testing" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/gtm/data_akamai_gtm_domains.go b/pkg/providers/gtm/data_akamai_gtm_domains.go index 94f05643e..1da3f6c08 100644 --- a/pkg/providers/gtm/data_akamai_gtm_domains.go +++ b/pkg/providers/gtm/data_akamai_gtm_domains.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/types" diff --git a/pkg/providers/gtm/data_akamai_gtm_domains_test.go b/pkg/providers/gtm/data_akamai_gtm_domains_test.go index 5938d6bec..483f20a12 100644 --- a/pkg/providers/gtm/data_akamai_gtm_domains_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_domains_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/gtm/data_akamai_gtm_resource.go b/pkg/providers/gtm/data_akamai_gtm_resource.go index b1b143b81..fe86d6d79 100644 --- a/pkg/providers/gtm/data_akamai_gtm_resource.go +++ b/pkg/providers/gtm/data_akamai_gtm_resource.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/types" diff --git a/pkg/providers/gtm/data_akamai_gtm_resource_test.go b/pkg/providers/gtm/data_akamai_gtm_resource_test.go index a2b972e0f..04a22adad 100644 --- a/pkg/providers/gtm/data_akamai_gtm_resource_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_resource_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/gtm/data_akamai_gtm_resources.go b/pkg/providers/gtm/data_akamai_gtm_resources.go index 4393340df..7199dfc1c 100644 --- a/pkg/providers/gtm/data_akamai_gtm_resources.go +++ b/pkg/providers/gtm/data_akamai_gtm_resources.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/types" diff --git a/pkg/providers/gtm/data_akamai_gtm_resources_test.go b/pkg/providers/gtm/data_akamai_gtm_resources_test.go index dd4524d02..5e24c8a16 100644 --- a/pkg/providers/gtm/data_akamai_gtm_resources_test.go +++ b/pkg/providers/gtm/data_akamai_gtm_resources_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/gtm/gtm.go b/pkg/providers/gtm/gtm.go index 857ee875e..1843fcd9b 100644 --- a/pkg/providers/gtm/gtm.go +++ b/pkg/providers/gtm/gtm.go @@ -1,6 +1,6 @@ package gtm -import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" +import "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/registry" func init() { registry.RegisterSubprovider(NewSubprovider()) diff --git a/pkg/providers/gtm/provider.go b/pkg/providers/gtm/provider.go index c8ae8b91e..e260184ee 100644 --- a/pkg/providers/gtm/provider.go +++ b/pkg/providers/gtm/provider.go @@ -3,8 +3,8 @@ package gtm import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/subprovider" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/gtm/provider_test.go b/pkg/providers/gtm/provider_test.go index 217359a55..31d3b3921 100644 --- a/pkg/providers/gtm/provider_test.go +++ b/pkg/providers/gtm/provider_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" ) func TestMain(m *testing.M) { diff --git a/pkg/providers/gtm/resource_akamai_gtm_asmap.go b/pkg/providers/gtm/resource_akamai_gtm_asmap.go index 64c053e2c..347fbc97c 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_asmap.go +++ b/pkg/providers/gtm/resource_akamai_gtm_asmap.go @@ -8,9 +8,9 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/logger" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go b/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go index 6c5208a48..0a0f45a7c 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_asmap_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/gtm/resource_akamai_gtm_cidrmap.go b/pkg/providers/gtm/resource_akamai_gtm_cidrmap.go index 9de68fdae..d4c868905 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_cidrmap.go +++ b/pkg/providers/gtm/resource_akamai_gtm_cidrmap.go @@ -6,10 +6,10 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" + "github.com/akamai/terraform-provider-akamai/v6/pkg/logger" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go b/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go index b172089c8..5f6600176 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_cidrmap_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/gtm/resource_akamai_gtm_datacenter.go b/pkg/providers/gtm/resource_akamai_gtm_datacenter.go index b416c7f16..df415cbfc 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_datacenter.go +++ b/pkg/providers/gtm/resource_akamai_gtm_datacenter.go @@ -11,8 +11,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go b/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go index 99aceee89..c1f0b32f1 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_datacenter_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/gtm/resource_akamai_gtm_domain.go b/pkg/providers/gtm/resource_akamai_gtm_domain.go index 55bc32898..af1233a79 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_domain.go +++ b/pkg/providers/gtm/resource_akamai_gtm_domain.go @@ -10,9 +10,9 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/go-cty/cty" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/gtm/resource_akamai_gtm_domain_test.go b/pkg/providers/gtm/resource_akamai_gtm_domain_test.go index 46011ecf5..8a16a73a3 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_domain_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_domain_test.go @@ -5,10 +5,10 @@ import ( "regexp" "testing" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/gtm/resource_akamai_gtm_geomap.go b/pkg/providers/gtm/resource_akamai_gtm_geomap.go index 6a63549d6..0313252ca 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_geomap.go +++ b/pkg/providers/gtm/resource_akamai_gtm_geomap.go @@ -7,10 +7,10 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" + "github.com/akamai/terraform-provider-akamai/v6/pkg/logger" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go b/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go index 8cb3beb52..f211c6bf0 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_geomap_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/gtm/resource_akamai_gtm_property.go b/pkg/providers/gtm/resource_akamai_gtm_property.go index 28c4104bb..495ee47a3 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_property.go +++ b/pkg/providers/gtm/resource_akamai_gtm_property.go @@ -9,10 +9,10 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/logger" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/go-cty/cty" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/gtm/resource_akamai_gtm_property_test.go b/pkg/providers/gtm/resource_akamai_gtm_property_test.go index aa4794b12..b1b1b982f 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_property_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_property_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/gtm/resource_akamai_gtm_resource.go b/pkg/providers/gtm/resource_akamai_gtm_resource.go index 76b61457d..cba5470a0 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_resource.go +++ b/pkg/providers/gtm/resource_akamai_gtm_resource.go @@ -8,9 +8,9 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/logger" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/gtm/resource_akamai_gtm_resource_test.go b/pkg/providers/gtm/resource_akamai_gtm_resource_test.go index c5424d74a..22490a62d 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_resource_test.go +++ b/pkg/providers/gtm/resource_akamai_gtm_resource_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/gtm" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/iam/data_akamai_iam_contact_types.go b/pkg/providers/iam/data_akamai_iam_contact_types.go index 64912c533..eb949d9cb 100644 --- a/pkg/providers/iam/data_akamai_iam_contact_types.go +++ b/pkg/providers/iam/data_akamai_iam_contact_types.go @@ -4,7 +4,7 @@ import ( "context" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/iam/data_akamai_iam_contact_types_test.go b/pkg/providers/iam/data_akamai_iam_contact_types_test.go index 1f588f18a..f5b9a60ff 100644 --- a/pkg/providers/iam/data_akamai_iam_contact_types_test.go +++ b/pkg/providers/iam/data_akamai_iam_contact_types_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/iam/data_akamai_iam_countries.go b/pkg/providers/iam/data_akamai_iam_countries.go index d01c0223d..b0ea4e5c5 100644 --- a/pkg/providers/iam/data_akamai_iam_countries.go +++ b/pkg/providers/iam/data_akamai_iam_countries.go @@ -4,7 +4,7 @@ import ( "context" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/iam/data_akamai_iam_countries_test.go b/pkg/providers/iam/data_akamai_iam_countries_test.go index f7d8c1829..fd50aa7e9 100644 --- a/pkg/providers/iam/data_akamai_iam_countries_test.go +++ b/pkg/providers/iam/data_akamai_iam_countries_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/iam/data_akamai_iam_grantable_roles.go b/pkg/providers/iam/data_akamai_iam_grantable_roles.go index b58242d15..8cea4d54c 100644 --- a/pkg/providers/iam/data_akamai_iam_grantable_roles.go +++ b/pkg/providers/iam/data_akamai_iam_grantable_roles.go @@ -5,7 +5,7 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/iam/data_akamai_iam_grantable_roles_test.go b/pkg/providers/iam/data_akamai_iam_grantable_roles_test.go index 69c08fa70..c2fdc20d0 100644 --- a/pkg/providers/iam/data_akamai_iam_grantable_roles_test.go +++ b/pkg/providers/iam/data_akamai_iam_grantable_roles_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/iam/data_akamai_iam_groups.go b/pkg/providers/iam/data_akamai_iam_groups.go index 4207253f4..df7dc79e8 100644 --- a/pkg/providers/iam/data_akamai_iam_groups.go +++ b/pkg/providers/iam/data_akamai_iam_groups.go @@ -6,7 +6,7 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/iam/data_akamai_iam_groups_test.go b/pkg/providers/iam/data_akamai_iam_groups_test.go index b1822363c..1d788b168 100644 --- a/pkg/providers/iam/data_akamai_iam_groups_test.go +++ b/pkg/providers/iam/data_akamai_iam_groups_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/assert" diff --git a/pkg/providers/iam/data_akamai_iam_roles.go b/pkg/providers/iam/data_akamai_iam_roles.go index 9d9463d1a..a849239a5 100644 --- a/pkg/providers/iam/data_akamai_iam_roles.go +++ b/pkg/providers/iam/data_akamai_iam_roles.go @@ -6,7 +6,7 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/iam/data_akamai_iam_roles_test.go b/pkg/providers/iam/data_akamai_iam_roles_test.go index 455dcff55..d181214ca 100644 --- a/pkg/providers/iam/data_akamai_iam_roles_test.go +++ b/pkg/providers/iam/data_akamai_iam_roles_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/iam/data_akamai_iam_states.go b/pkg/providers/iam/data_akamai_iam_states.go index 8f306826f..12b3342a3 100644 --- a/pkg/providers/iam/data_akamai_iam_states.go +++ b/pkg/providers/iam/data_akamai_iam_states.go @@ -5,7 +5,7 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/iam/data_akamai_iam_states_test.go b/pkg/providers/iam/data_akamai_iam_states_test.go index 9f7fe59b1..e9f2323c0 100644 --- a/pkg/providers/iam/data_akamai_iam_states_test.go +++ b/pkg/providers/iam/data_akamai_iam_states_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/iam/data_akamai_iam_supported_langs.go b/pkg/providers/iam/data_akamai_iam_supported_langs.go index 9b380dfa3..cbe1c984f 100644 --- a/pkg/providers/iam/data_akamai_iam_supported_langs.go +++ b/pkg/providers/iam/data_akamai_iam_supported_langs.go @@ -4,7 +4,7 @@ import ( "context" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/iam/data_akamai_iam_supported_langs_test.go b/pkg/providers/iam/data_akamai_iam_supported_langs_test.go index 8a1047f49..1ec1a02b5 100644 --- a/pkg/providers/iam/data_akamai_iam_supported_langs_test.go +++ b/pkg/providers/iam/data_akamai_iam_supported_langs_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/iam/data_akamai_iam_timeout_policies.go b/pkg/providers/iam/data_akamai_iam_timeout_policies.go index 35f29819c..3fa7b1ee8 100644 --- a/pkg/providers/iam/data_akamai_iam_timeout_policies.go +++ b/pkg/providers/iam/data_akamai_iam_timeout_policies.go @@ -4,7 +4,7 @@ import ( "context" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/iam/data_akamai_iam_timeout_policies_test.go b/pkg/providers/iam/data_akamai_iam_timeout_policies_test.go index f8cb67f9c..03ecacdc8 100644 --- a/pkg/providers/iam/data_akamai_iam_timeout_policies_test.go +++ b/pkg/providers/iam/data_akamai_iam_timeout_policies_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/iam/data_akamai_iam_timezones.go b/pkg/providers/iam/data_akamai_iam_timezones.go index e5638d67a..c5281e1b8 100644 --- a/pkg/providers/iam/data_akamai_iam_timezones.go +++ b/pkg/providers/iam/data_akamai_iam_timezones.go @@ -5,7 +5,7 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/apex/log" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/iam/data_akamai_iam_timezones_test.go b/pkg/providers/iam/data_akamai_iam_timezones_test.go index 0c50b45b9..da5316c72 100644 --- a/pkg/providers/iam/data_akamai_iam_timezones_test.go +++ b/pkg/providers/iam/data_akamai_iam_timezones_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/iam/iam.go b/pkg/providers/iam/iam.go index 9f852beb5..a642ff40d 100644 --- a/pkg/providers/iam/iam.go +++ b/pkg/providers/iam/iam.go @@ -1,6 +1,6 @@ package iam -import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" +import "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/registry" func init() { registry.RegisterSubprovider(NewSubprovider()) diff --git a/pkg/providers/iam/provider.go b/pkg/providers/iam/provider.go index 50cbedf75..01141e313 100644 --- a/pkg/providers/iam/provider.go +++ b/pkg/providers/iam/provider.go @@ -5,8 +5,8 @@ import ( "sync" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/subprovider" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/iam/provider_test.go b/pkg/providers/iam/provider_test.go index 85c6111ec..9651be230 100644 --- a/pkg/providers/iam/provider_test.go +++ b/pkg/providers/iam/provider_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" ) func TestMain(m *testing.M) { diff --git a/pkg/providers/iam/resource_akamai_iam_blocked_user_properties.go b/pkg/providers/iam/resource_akamai_iam_blocked_user_properties.go index 866be9e48..d0efa325f 100644 --- a/pkg/providers/iam/resource_akamai_iam_blocked_user_properties.go +++ b/pkg/providers/iam/resource_akamai_iam_blocked_user_properties.go @@ -8,8 +8,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/iam/resource_akamai_iam_blocked_user_properties_test.go b/pkg/providers/iam/resource_akamai_iam_blocked_user_properties_test.go index 1a29e049c..e162e98bd 100644 --- a/pkg/providers/iam/resource_akamai_iam_blocked_user_properties_test.go +++ b/pkg/providers/iam/resource_akamai_iam_blocked_user_properties_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/iam/resource_akamai_iam_group.go b/pkg/providers/iam/resource_akamai_iam_group.go index 489af1e20..0b78047f6 100644 --- a/pkg/providers/iam/resource_akamai_iam_group.go +++ b/pkg/providers/iam/resource_akamai_iam_group.go @@ -6,8 +6,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/iam/resource_akamai_iam_group_test.go b/pkg/providers/iam/resource_akamai_iam_group_test.go index e586a35ea..26dac8031 100644 --- a/pkg/providers/iam/resource_akamai_iam_group_test.go +++ b/pkg/providers/iam/resource_akamai_iam_group_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/iam/resource_akamai_iam_role.go b/pkg/providers/iam/resource_akamai_iam_role.go index c8d992d7b..6bd90d2aa 100644 --- a/pkg/providers/iam/resource_akamai_iam_role.go +++ b/pkg/providers/iam/resource_akamai_iam_role.go @@ -7,8 +7,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/iam/resource_akamai_iam_role_test.go b/pkg/providers/iam/resource_akamai_iam_role_test.go index ee6c2669d..f058ac26c 100644 --- a/pkg/providers/iam/resource_akamai_iam_role_test.go +++ b/pkg/providers/iam/resource_akamai_iam_role_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/iam/resource_akamai_iam_user.go b/pkg/providers/iam/resource_akamai_iam_user.go index e32cea2fc..20ac511e3 100644 --- a/pkg/providers/iam/resource_akamai_iam_user.go +++ b/pkg/providers/iam/resource_akamai_iam_user.go @@ -11,8 +11,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/hashicorp/go-cty/cty" diff --git a/pkg/providers/iam/resource_akamai_iam_user_test.go b/pkg/providers/iam/resource_akamai_iam_user_test.go index 009b18686..a42cb6c8c 100644 --- a/pkg/providers/iam/resource_akamai_iam_user_test.go +++ b/pkg/providers/iam/resource_akamai_iam_user_test.go @@ -8,8 +8,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/iam" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/imaging/data_akamai_imaging_policy_image.go b/pkg/providers/imaging/data_akamai_imaging_policy_image.go index cffe5fb7c..513f29f38 100644 --- a/pkg/providers/imaging/data_akamai_imaging_policy_image.go +++ b/pkg/providers/imaging/data_akamai_imaging_policy_image.go @@ -8,9 +8,9 @@ import ( "io" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/imaging" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/imaging/imagewriter" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/imaging/imagewriter" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/imaging/data_akamai_imaging_policy_image_test.go b/pkg/providers/imaging/data_akamai_imaging_policy_image_test.go index 346a10bb3..53bcc4e14 100644 --- a/pkg/providers/imaging/data_akamai_imaging_policy_image_test.go +++ b/pkg/providers/imaging/data_akamai_imaging_policy_image_test.go @@ -3,7 +3,7 @@ package imaging import ( "testing" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) diff --git a/pkg/providers/imaging/data_akamai_imaging_policy_video.go b/pkg/providers/imaging/data_akamai_imaging_policy_video.go index 49a5c7616..72a5150ea 100644 --- a/pkg/providers/imaging/data_akamai_imaging_policy_video.go +++ b/pkg/providers/imaging/data_akamai_imaging_policy_video.go @@ -5,9 +5,9 @@ import ( "encoding/json" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/imaging" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/imaging/videowriter" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/imaging/videowriter" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/imaging/data_akamai_imaging_policy_video_test.go b/pkg/providers/imaging/data_akamai_imaging_policy_video_test.go index c3d4b7a3a..94d4306b6 100644 --- a/pkg/providers/imaging/data_akamai_imaging_policy_video_test.go +++ b/pkg/providers/imaging/data_akamai_imaging_policy_video_test.go @@ -3,7 +3,7 @@ package imaging import ( "testing" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) diff --git a/pkg/providers/imaging/imagewriter/convert-image.gen.go b/pkg/providers/imaging/imagewriter/convert-image.gen.go index dce8df12f..a448a62bd 100644 --- a/pkg/providers/imaging/imagewriter/convert-image.gen.go +++ b/pkg/providers/imaging/imagewriter/convert-image.gen.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/imaging" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/imaging/imaging.go b/pkg/providers/imaging/imaging.go index 49b529094..0bde9d408 100644 --- a/pkg/providers/imaging/imaging.go +++ b/pkg/providers/imaging/imaging.go @@ -1,6 +1,6 @@ package imaging -import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" +import "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/registry" func init() { registry.RegisterSubprovider(NewSubprovider()) diff --git a/pkg/providers/imaging/provider.go b/pkg/providers/imaging/provider.go index 8e44c931e..3040aa9e8 100644 --- a/pkg/providers/imaging/provider.go +++ b/pkg/providers/imaging/provider.go @@ -5,8 +5,8 @@ import ( "sync" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/imaging" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/subprovider" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/imaging/provider_test.go b/pkg/providers/imaging/provider_test.go index bbd35d4e7..3dfd74400 100644 --- a/pkg/providers/imaging/provider_test.go +++ b/pkg/providers/imaging/provider_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/imaging" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" ) func TestMain(m *testing.M) { diff --git a/pkg/providers/imaging/resource_akamai_imaging_policy_image.go b/pkg/providers/imaging/resource_akamai_imaging_policy_image.go index aeb31e758..08c7c6ee1 100644 --- a/pkg/providers/imaging/resource_akamai_imaging_policy_image.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_image.go @@ -12,9 +12,9 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/imaging" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/logger" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go b/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go index 5f9864648..b5a3840f1 100644 --- a/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_image_test.go @@ -8,8 +8,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/imaging" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/tj/assert" diff --git a/pkg/providers/imaging/resource_akamai_imaging_policy_set.go b/pkg/providers/imaging/resource_akamai_imaging_policy_set.go index 21b978d0b..5199da58f 100644 --- a/pkg/providers/imaging/resource_akamai_imaging_policy_set.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_set.go @@ -7,8 +7,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/imaging" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" diff --git a/pkg/providers/imaging/resource_akamai_imaging_policy_set_test.go b/pkg/providers/imaging/resource_akamai_imaging_policy_set_test.go index a5ce36127..c08755eec 100644 --- a/pkg/providers/imaging/resource_akamai_imaging_policy_set_test.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_set_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/imaging" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/tj/assert" diff --git a/pkg/providers/imaging/resource_akamai_imaging_policy_video.go b/pkg/providers/imaging/resource_akamai_imaging_policy_video.go index 28c3bc6da..2c9538a1a 100644 --- a/pkg/providers/imaging/resource_akamai_imaging_policy_video.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_video.go @@ -12,9 +12,9 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/imaging" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/logger" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go b/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go index fcf5406ea..b301b1cf0 100644 --- a/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go +++ b/pkg/providers/imaging/resource_akamai_imaging_policy_video_test.go @@ -8,8 +8,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/imaging" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/imaging/videowriter/convert-video.gen.go b/pkg/providers/imaging/videowriter/convert-video.gen.go index 581331ffa..9490a3ba6 100644 --- a/pkg/providers/imaging/videowriter/convert-video.gen.go +++ b/pkg/providers/imaging/videowriter/convert-video.gen.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/imaging" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/networklists/data_akamai_network_network_lists.go b/pkg/providers/networklists/data_akamai_network_network_lists.go index 2651aead0..f0509b466 100644 --- a/pkg/providers/networklists/data_akamai_network_network_lists.go +++ b/pkg/providers/networklists/data_akamai_network_network_lists.go @@ -7,8 +7,8 @@ import ( "fmt" network "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/networklists" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" diff --git a/pkg/providers/networklists/data_akamai_networklist_network_lists_test.go b/pkg/providers/networklists/data_akamai_networklist_network_lists_test.go index efc685da5..231907a33 100644 --- a/pkg/providers/networklists/data_akamai_networklist_network_lists_test.go +++ b/pkg/providers/networklists/data_akamai_networklist_network_lists_test.go @@ -5,7 +5,7 @@ import ( "testing" network "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/networklists" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/networklists/networklists.go b/pkg/providers/networklists/networklists.go index cd8b274ff..7f0ecabf6 100644 --- a/pkg/providers/networklists/networklists.go +++ b/pkg/providers/networklists/networklists.go @@ -1,6 +1,6 @@ package networklists -import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" +import "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/registry" func init() { registry.RegisterSubprovider(NewSubprovider()) diff --git a/pkg/providers/networklists/provider.go b/pkg/providers/networklists/provider.go index a1a7ed89e..ebe59f29c 100644 --- a/pkg/providers/networklists/provider.go +++ b/pkg/providers/networklists/provider.go @@ -5,8 +5,8 @@ import ( "sync" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/networklists" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/subprovider" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/resource" diff --git a/pkg/providers/networklists/provider_test.go b/pkg/providers/networklists/provider_test.go index 95c0b1659..904b12db2 100644 --- a/pkg/providers/networklists/provider_test.go +++ b/pkg/providers/networklists/provider_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/networklists" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" ) func TestMain(m *testing.M) { diff --git a/pkg/providers/networklists/resource_akamai_networklist_activations.go b/pkg/providers/networklists/resource_akamai_networklist_activations.go index 47af89537..c983c7eb1 100644 --- a/pkg/providers/networklists/resource_akamai_networklist_activations.go +++ b/pkg/providers/networklists/resource_akamai_networklist_activations.go @@ -9,8 +9,8 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/networklists" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/go-hclog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/networklists/resource_akamai_networklist_activations_test.go b/pkg/providers/networklists/resource_akamai_networklist_activations_test.go index 51cb225bd..4dd9c6139 100644 --- a/pkg/providers/networklists/resource_akamai_networklist_activations_test.go +++ b/pkg/providers/networklists/resource_akamai_networklist_activations_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/networklists" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/networklists/resource_akamai_networklist_network_list.go b/pkg/providers/networklists/resource_akamai_networklist_network_list.go index f1b1e9ecd..be3d91ae2 100644 --- a/pkg/providers/networklists/resource_akamai_networklist_network_list.go +++ b/pkg/providers/networklists/resource_akamai_networklist_network_list.go @@ -8,8 +8,8 @@ import ( "strings" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/networklists" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/networklists/resource_akamai_networklist_network_list_description.go b/pkg/providers/networklists/resource_akamai_networklist_network_list_description.go index 722fec903..9d9bc4866 100644 --- a/pkg/providers/networklists/resource_akamai_networklist_network_list_description.go +++ b/pkg/providers/networklists/resource_akamai_networklist_network_list_description.go @@ -5,8 +5,8 @@ import ( "errors" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/networklists" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/networklists/resource_akamai_networklist_network_list_description_test.go b/pkg/providers/networklists/resource_akamai_networklist_network_list_description_test.go index 24dce370e..fe93f21b1 100644 --- a/pkg/providers/networklists/resource_akamai_networklist_network_list_description_test.go +++ b/pkg/providers/networklists/resource_akamai_networklist_network_list_description_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/networklists" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription.go b/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription.go index f2660cf7c..0e3e4c2ae 100644 --- a/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription.go +++ b/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription.go @@ -6,8 +6,8 @@ import ( "strings" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/networklists" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/hash" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription_test.go b/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription_test.go index e4718813d..23c3bf211 100644 --- a/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription_test.go +++ b/pkg/providers/networklists/resource_akamai_networklist_network_list_subscription_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/networklists" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/networklists/resource_akamai_networklist_network_list_test.go b/pkg/providers/networklists/resource_akamai_networklist_network_list_test.go index 860014863..dfc701bc5 100644 --- a/pkg/providers/networklists/resource_akamai_networklist_network_list_test.go +++ b/pkg/providers/networklists/resource_akamai_networklist_network_list_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/networklists" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/providers/property/data_akamai_contracts.go b/pkg/providers/property/data_akamai_contracts.go index 346a4b3cc..060778649 100644 --- a/pkg/providers/property/data_akamai_contracts.go +++ b/pkg/providers/property/data_akamai_contracts.go @@ -7,8 +7,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/cache" - akameta "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/cache" + akameta "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/property/data_akamai_contracts_test.go b/pkg/providers/property/data_akamai_contracts_test.go index 3f2bd8399..254351705 100644 --- a/pkg/providers/property/data_akamai_contracts_test.go +++ b/pkg/providers/property/data_akamai_contracts_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/property/data_akamai_cp_code.go b/pkg/providers/property/data_akamai_cp_code.go index 7c61db016..59793f073 100644 --- a/pkg/providers/property/data_akamai_cp_code.go +++ b/pkg/providers/property/data_akamai_cp_code.go @@ -9,8 +9,8 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" ) func dataSourceCPCode() *schema.Resource { diff --git a/pkg/providers/property/data_akamai_cp_code_test.go b/pkg/providers/property/data_akamai_cp_code_test.go index 3179358a5..2f093cca3 100644 --- a/pkg/providers/property/data_akamai_cp_code_test.go +++ b/pkg/providers/property/data_akamai_cp_code_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/property/data_akamai_properties.go b/pkg/providers/property/data_akamai_properties.go index 1bb3c183d..aa41c0bcb 100644 --- a/pkg/providers/property/data_akamai_properties.go +++ b/pkg/providers/property/data_akamai_properties.go @@ -8,9 +8,9 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/str" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" ) func dataSourceProperties() *schema.Resource { diff --git a/pkg/providers/property/data_akamai_properties_search.go b/pkg/providers/property/data_akamai_properties_search.go index 41b84712a..000ca6f22 100644 --- a/pkg/providers/property/data_akamai_properties_search.go +++ b/pkg/providers/property/data_akamai_properties_search.go @@ -8,8 +8,8 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" ) func dataSourcePropertiesSearch() *schema.Resource { diff --git a/pkg/providers/property/data_akamai_properties_search_test.go b/pkg/providers/property/data_akamai_properties_search_test.go index ea5d073f5..a7937aac8 100644 --- a/pkg/providers/property/data_akamai_properties_search_test.go +++ b/pkg/providers/property/data_akamai_properties_search_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/property/data_akamai_properties_test.go b/pkg/providers/property/data_akamai_properties_test.go index 97f42402e..18a53e459 100644 --- a/pkg/providers/property/data_akamai_properties_test.go +++ b/pkg/providers/property/data_akamai_properties_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/property/data_akamai_property.go b/pkg/providers/property/data_akamai_property.go index a56899b85..7dd03f897 100644 --- a/pkg/providers/property/data_akamai_property.go +++ b/pkg/providers/property/data_akamai_property.go @@ -10,8 +10,8 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" ) func dataSourceProperty() *schema.Resource { diff --git a/pkg/providers/property/data_akamai_property_activation.go b/pkg/providers/property/data_akamai_property_activation.go index be96c0602..6a8a2921c 100644 --- a/pkg/providers/property/data_akamai_property_activation.go +++ b/pkg/providers/property/data_akamai_property_activation.go @@ -5,8 +5,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/property/data_akamai_property_activation_test.go b/pkg/providers/property/data_akamai_property_activation_test.go index 398d4801e..dd5ea7fac 100644 --- a/pkg/providers/property/data_akamai_property_activation_test.go +++ b/pkg/providers/property/data_akamai_property_activation_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/property/data_akamai_property_hostnames.go b/pkg/providers/property/data_akamai_property_hostnames.go index d572cf047..f48b17318 100644 --- a/pkg/providers/property/data_akamai_property_hostnames.go +++ b/pkg/providers/property/data_akamai_property_hostnames.go @@ -7,9 +7,9 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/str" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/property/data_akamai_property_hostnames_test.go b/pkg/providers/property/data_akamai_property_hostnames_test.go index f3fd089a8..9a9a1304f 100644 --- a/pkg/providers/property/data_akamai_property_hostnames_test.go +++ b/pkg/providers/property/data_akamai_property_hostnames_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/property/data_akamai_property_include.go b/pkg/providers/property/data_akamai_property_include.go index dd57bca0c..6eb26424f 100644 --- a/pkg/providers/property/data_akamai_property_include.go +++ b/pkg/providers/property/data_akamai_property_include.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-log/tflog" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" ) var _ datasource.DataSource = &includeDataSource{} diff --git a/pkg/providers/property/data_akamai_property_include_activation.go b/pkg/providers/property/data_akamai_property_include_activation.go index d6b9f9de1..78585cfbe 100644 --- a/pkg/providers/property/data_akamai_property_include_activation.go +++ b/pkg/providers/property/data_akamai_property_include_activation.go @@ -7,8 +7,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/property/data_akamai_property_include_activation_test.go b/pkg/providers/property/data_akamai_property_include_activation_test.go index 3ed7b2721..e5e9c27ee 100644 --- a/pkg/providers/property/data_akamai_property_include_activation_test.go +++ b/pkg/providers/property/data_akamai_property_include_activation_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/property/data_akamai_property_include_parents.go b/pkg/providers/property/data_akamai_property_include_parents.go index bf5580b52..3d77e0c73 100644 --- a/pkg/providers/property/data_akamai_property_include_parents.go +++ b/pkg/providers/property/data_akamai_property_include_parents.go @@ -5,8 +5,8 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/property/data_akamai_property_include_parents_test.go b/pkg/providers/property/data_akamai_property_include_parents_test.go index 02ce50748..8a1870993 100644 --- a/pkg/providers/property/data_akamai_property_include_parents_test.go +++ b/pkg/providers/property/data_akamai_property_include_parents_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/property/data_akamai_property_include_rules.go b/pkg/providers/property/data_akamai_property_include_rules.go index 8f1fa9822..18bc41e7b 100644 --- a/pkg/providers/property/data_akamai_property_include_rules.go +++ b/pkg/providers/property/data_akamai_property_include_rules.go @@ -7,8 +7,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/property/data_akamai_property_include_rules_test.go b/pkg/providers/property/data_akamai_property_include_rules_test.go index 2a4b3831e..9a5746294 100644 --- a/pkg/providers/property/data_akamai_property_include_rules_test.go +++ b/pkg/providers/property/data_akamai_property_include_rules_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/property/data_akamai_property_include_test.go b/pkg/providers/property/data_akamai_property_include_test.go index 9e6d4dd7c..fb4428f37 100644 --- a/pkg/providers/property/data_akamai_property_include_test.go +++ b/pkg/providers/property/data_akamai_property_include_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/property/data_akamai_property_includes.go b/pkg/providers/property/data_akamai_property_includes.go index d08cf01b5..4d416ed4a 100644 --- a/pkg/providers/property/data_akamai_property_includes.go +++ b/pkg/providers/property/data_akamai_property_includes.go @@ -8,8 +8,8 @@ import ( "strings" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/property/data_akamai_property_includes_test.go b/pkg/providers/property/data_akamai_property_includes_test.go index ba0a5001d..ea9b9b069 100644 --- a/pkg/providers/property/data_akamai_property_includes_test.go +++ b/pkg/providers/property/data_akamai_property_includes_test.go @@ -9,8 +9,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/property/data_akamai_property_products.go b/pkg/providers/property/data_akamai_property_products.go index 728b15be5..7284d58cf 100644 --- a/pkg/providers/property/data_akamai_property_products.go +++ b/pkg/providers/property/data_akamai_property_products.go @@ -7,9 +7,9 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/hash" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/property/data_akamai_property_products_test.go b/pkg/providers/property/data_akamai_property_products_test.go index 630057f19..0e0a4ac08 100644 --- a/pkg/providers/property/data_akamai_property_products_test.go +++ b/pkg/providers/property/data_akamai_property_products_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/property/data_akamai_property_rule_formats.go b/pkg/providers/property/data_akamai_property_rule_formats.go index 2dee037e8..b5e4aa7bf 100644 --- a/pkg/providers/property/data_akamai_property_rule_formats.go +++ b/pkg/providers/property/data_akamai_property_rule_formats.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/property/data_akamai_property_rule_formats_test.go b/pkg/providers/property/data_akamai_property_rule_formats_test.go index 90abafd6e..163c75103 100644 --- a/pkg/providers/property/data_akamai_property_rule_formats_test.go +++ b/pkg/providers/property/data_akamai_property_rule_formats_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/property/data_akamai_property_rules.go b/pkg/providers/property/data_akamai_property_rules.go index a0fc9f6d5..8be464d67 100644 --- a/pkg/providers/property/data_akamai_property_rules.go +++ b/pkg/providers/property/data_akamai_property_rules.go @@ -8,9 +8,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/str" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" ) func dataSourcePropertyRules() *schema.Resource { diff --git a/pkg/providers/property/data_akamai_property_rules_builder.go b/pkg/providers/property/data_akamai_property_rules_builder.go index 1d03504b1..cef4a9b3d 100644 --- a/pkg/providers/property/data_akamai_property_rules_builder.go +++ b/pkg/providers/property/data_akamai_property_rules_builder.go @@ -8,8 +8,8 @@ import ( "errors" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/property/ruleformats" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/property/ruleformats" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/property/data_akamai_property_rules_builder_test.go b/pkg/providers/property/data_akamai_property_rules_builder_test.go index cf918a5eb..02deda5c7 100644 --- a/pkg/providers/property/data_akamai_property_rules_builder_test.go +++ b/pkg/providers/property/data_akamai_property_rules_builder_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/google/go-cmp/cmp" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" diff --git a/pkg/providers/property/data_akamai_property_rules_template.go b/pkg/providers/property/data_akamai_property_rules_template.go index e9821be6a..582a28aba 100644 --- a/pkg/providers/property/data_akamai_property_rules_template.go +++ b/pkg/providers/property/data_akamai_property_rules_template.go @@ -21,8 +21,8 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" ) func dataSourcePropertyRulesTemplate() *schema.Resource { diff --git a/pkg/providers/property/data_akamai_property_rules_template_test.go b/pkg/providers/property/data_akamai_property_rules_template_test.go index 437fcc209..b2ed28935 100644 --- a/pkg/providers/property/data_akamai_property_rules_template_test.go +++ b/pkg/providers/property/data_akamai_property_rules_template_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/require" "github.com/tj/assert" diff --git a/pkg/providers/property/data_akamai_property_rules_test.go b/pkg/providers/property/data_akamai_property_rules_test.go index aea33d64f..eb29a24f9 100644 --- a/pkg/providers/property/data_akamai_property_rules_test.go +++ b/pkg/providers/property/data_akamai_property_rules_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/property/data_akamai_property_test.go b/pkg/providers/property/data_akamai_property_test.go index d3b9f7f7b..146b5af77 100644 --- a/pkg/providers/property/data_akamai_property_test.go +++ b/pkg/providers/property/data_akamai_property_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/property/data_property_akamai_contract.go b/pkg/providers/property/data_property_akamai_contract.go index 76dfe2c71..80a79bbbf 100644 --- a/pkg/providers/property/data_property_akamai_contract.go +++ b/pkg/providers/property/data_property_akamai_contract.go @@ -6,9 +6,9 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - akameta "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/str" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + akameta "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/property/data_property_akamai_contract_test.go b/pkg/providers/property/data_property_akamai_contract_test.go index 4f8ca70df..cb65d2fb2 100644 --- a/pkg/providers/property/data_property_akamai_contract_test.go +++ b/pkg/providers/property/data_property_akamai_contract_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) diff --git a/pkg/providers/property/data_property_akamai_group.go b/pkg/providers/property/data_property_akamai_group.go index dc5585ac9..ad4373fea 100644 --- a/pkg/providers/property/data_property_akamai_group.go +++ b/pkg/providers/property/data_property_akamai_group.go @@ -8,8 +8,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - akameta "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + akameta "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "golang.org/x/exp/slices" diff --git a/pkg/providers/property/data_property_akamai_group_test.go b/pkg/providers/property/data_property_akamai_group_test.go index 6ce95a742..7ca83034d 100644 --- a/pkg/providers/property/data_property_akamai_group_test.go +++ b/pkg/providers/property/data_property_akamai_group_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/property/data_property_akamai_groups.go b/pkg/providers/property/data_property_akamai_groups.go index 5f07607b2..3bcb7e836 100644 --- a/pkg/providers/property/data_property_akamai_groups.go +++ b/pkg/providers/property/data_property_akamai_groups.go @@ -9,9 +9,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/hash" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/hash" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" ) func dataSourcePropertyMultipleGroups() *schema.Resource { diff --git a/pkg/providers/property/data_property_akamai_groups_test.go b/pkg/providers/property/data_property_akamai_groups_test.go index 38c7e19ee..04dbc264b 100644 --- a/pkg/providers/property/data_property_akamai_groups_test.go +++ b/pkg/providers/property/data_property_akamai_groups_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" ) diff --git a/pkg/providers/property/diff_suppress_funcs.go b/pkg/providers/property/diff_suppress_funcs.go index a49e4fbed..4961856b8 100644 --- a/pkg/providers/property/diff_suppress_funcs.go +++ b/pkg/providers/property/diff_suppress_funcs.go @@ -7,7 +7,7 @@ import ( "sort" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" + "github.com/akamai/terraform-provider-akamai/v6/pkg/logger" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/property/diff_suppress_funcs_test.go b/pkg/providers/property/diff_suppress_funcs_test.go index 1fe2ce66b..cb59e3934 100644 --- a/pkg/providers/property/diff_suppress_funcs_test.go +++ b/pkg/providers/property/diff_suppress_funcs_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" "github.com/tj/assert" ) diff --git a/pkg/providers/property/property.go b/pkg/providers/property/property.go index 14378b527..aa2a73d8b 100644 --- a/pkg/providers/property/property.go +++ b/pkg/providers/property/property.go @@ -1,6 +1,6 @@ package property -import "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/registry" +import "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/registry" // SubproviderName defines name of the property subprovider const SubproviderName = "property" diff --git a/pkg/providers/property/provider.go b/pkg/providers/property/provider.go index 35422711c..0e2d32a5f 100644 --- a/pkg/providers/property/provider.go +++ b/pkg/providers/property/provider.go @@ -8,9 +8,9 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/hapi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" - "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/str" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/subprovider" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/property/provider_test.go b/pkg/providers/property/provider_test.go index 2d837b27f..5c4147f5e 100644 --- a/pkg/providers/property/provider_test.go +++ b/pkg/providers/property/provider_test.go @@ -7,7 +7,7 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/hapi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/go-hclog" ) diff --git a/pkg/providers/property/resource_akamai_cp_code.go b/pkg/providers/property/resource_akamai_cp_code.go index cf2205aa2..15a79c4b3 100644 --- a/pkg/providers/property/resource_akamai_cp_code.go +++ b/pkg/providers/property/resource_akamai_cp_code.go @@ -12,10 +12,10 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/str" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/timeouts" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" ) // PAPI CP Code diff --git a/pkg/providers/property/resource_akamai_cp_code_test.go b/pkg/providers/property/resource_akamai_cp_code_test.go index 6b6e82a1b..f7285c8ea 100644 --- a/pkg/providers/property/resource_akamai_cp_code_test.go +++ b/pkg/providers/property/resource_akamai_cp_code_test.go @@ -9,7 +9,7 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/property/resource_akamai_edge_hostname.go b/pkg/providers/property/resource_akamai_edge_hostname.go index 4ae1e8825..8bcb8a41b 100644 --- a/pkg/providers/property/resource_akamai_edge_hostname.go +++ b/pkg/providers/property/resource_akamai_edge_hostname.go @@ -11,11 +11,11 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/hapi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" - "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/str" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/timeouts" + "github.com/akamai/terraform-provider-akamai/v6/pkg/logger" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" diff --git a/pkg/providers/property/resource_akamai_edge_hostname_test.go b/pkg/providers/property/resource_akamai_edge_hostname_test.go index 406cf0c82..c2a230d32 100644 --- a/pkg/providers/property/resource_akamai_edge_hostname_test.go +++ b/pkg/providers/property/resource_akamai_edge_hostname_test.go @@ -10,7 +10,7 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/hapi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/stretchr/testify/assert" diff --git a/pkg/providers/property/resource_akamai_property.go b/pkg/providers/property/resource_akamai_property.go index cc436de2e..5f76a44cf 100644 --- a/pkg/providers/property/resource_akamai_property.go +++ b/pkg/providers/property/resource_akamai_property.go @@ -12,9 +12,9 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/str" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/apex/log" "github.com/hashicorp/go-cty/cty" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/property/resource_akamai_property_activation.go b/pkg/providers/property/resource_akamai_property_activation.go index 18c150ad2..402a789bf 100644 --- a/pkg/providers/property/resource_akamai_property_activation.go +++ b/pkg/providers/property/resource_akamai_property_activation.go @@ -11,11 +11,11 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/date" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/date" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/str" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/timeouts" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/apex/log" "github.com/hashicorp/go-hclog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/pkg/providers/property/resource_akamai_property_activation_test.go b/pkg/providers/property/resource_akamai_property_activation_test.go index 9efb4f9da..4b706d3fd 100644 --- a/pkg/providers/property/resource_akamai_property_activation_test.go +++ b/pkg/providers/property/resource_akamai_property_activation_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/property/resource_akamai_property_activation_unit_test.go b/pkg/providers/property/resource_akamai_property_activation_unit_test.go index 4baa6ee7f..ba0acbb5c 100644 --- a/pkg/providers/property/resource_akamai_property_activation_unit_test.go +++ b/pkg/providers/property/resource_akamai_property_activation_unit_test.go @@ -8,8 +8,8 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/date" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/date" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/property/resource_akamai_property_bootstrap.go b/pkg/providers/property/resource_akamai_property_bootstrap.go index ddb3436c4..ec564dc40 100644 --- a/pkg/providers/property/resource_akamai_property_bootstrap.go +++ b/pkg/providers/property/resource_akamai_property_bootstrap.go @@ -8,9 +8,9 @@ import ( "strings" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/framework/modifiers" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/framework/modifiers" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/str" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" diff --git a/pkg/providers/property/resource_akamai_property_bootstrap_test.go b/pkg/providers/property/resource_akamai_property_bootstrap_test.go index 09bc8ebbc..117380237 100644 --- a/pkg/providers/property/resource_akamai_property_bootstrap_test.go +++ b/pkg/providers/property/resource_akamai_property_bootstrap_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/str" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) diff --git a/pkg/providers/property/resource_akamai_property_common.go b/pkg/providers/property/resource_akamai_property_common.go index 9d6711610..c7e158f15 100644 --- a/pkg/providers/property/resource_akamai_property_common.go +++ b/pkg/providers/property/resource_akamai_property_common.go @@ -8,9 +8,9 @@ import ( "strconv" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" - "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/str" + "github.com/akamai/terraform-provider-akamai/v6/pkg/logger" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" ) func getGroup(ctx context.Context, client papi.PAPI, groupID string) (*papi.Group, error) { diff --git a/pkg/providers/property/resource_akamai_property_helpers_test.go b/pkg/providers/property/resource_akamai_property_helpers_test.go index 5d8fa1dc5..366a5d349 100644 --- a/pkg/providers/property/resource_akamai_property_helpers_test.go +++ b/pkg/providers/property/resource_akamai_property_helpers_test.go @@ -4,7 +4,7 @@ import ( "context" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" "github.com/stretchr/testify/mock" ) diff --git a/pkg/providers/property/resource_akamai_property_include.go b/pkg/providers/property/resource_akamai_property_include.go index 8d259114b..1c48a0947 100644 --- a/pkg/providers/property/resource_akamai_property_include.go +++ b/pkg/providers/property/resource_akamai_property_include.go @@ -12,9 +12,9 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/logger" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/pkg/providers/property/resource_akamai_property_include_activation.go b/pkg/providers/property/resource_akamai_property_include_activation.go index 7c59a4bf0..544a09123 100644 --- a/pkg/providers/property/resource_akamai_property_include_activation.go +++ b/pkg/providers/property/resource_akamai_property_include_activation.go @@ -13,11 +13,11 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/timeouts" - "github.com/akamai/terraform-provider-akamai/v5/pkg/logger" - "github.com/akamai/terraform-provider-akamai/v5/pkg/meta" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/str" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/timeouts" + "github.com/akamai/terraform-provider-akamai/v6/pkg/logger" + "github.com/akamai/terraform-provider-akamai/v6/pkg/meta" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" diff --git a/pkg/providers/property/resource_akamai_property_include_activation_test.go b/pkg/providers/property/resource_akamai_property_include_activation_test.go index 0fe576acf..19287f24c 100644 --- a/pkg/providers/property/resource_akamai_property_include_activation_test.go +++ b/pkg/providers/property/resource_akamai_property_include_activation_test.go @@ -9,7 +9,7 @@ import ( "time" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/pkg/providers/property/resource_akamai_property_include_test.go b/pkg/providers/property/resource_akamai_property_include_test.go index deba26abe..39993de5a 100644 --- a/pkg/providers/property/resource_akamai_property_include_test.go +++ b/pkg/providers/property/resource_akamai_property_include_test.go @@ -10,7 +10,7 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/hapi" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/go-cty/cty" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/property/resource_akamai_property_schema_v0.go b/pkg/providers/property/resource_akamai_property_schema_v0.go index e48b2bd3c..20bb77de8 100644 --- a/pkg/providers/property/resource_akamai_property_schema_v0.go +++ b/pkg/providers/property/resource_akamai_property_schema_v0.go @@ -3,7 +3,7 @@ package property import ( "context" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/str" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/str" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/property/resource_akamai_property_test.go b/pkg/providers/property/resource_akamai_property_test.go index 7bb932b38..14592b385 100644 --- a/pkg/providers/property/resource_akamai_property_test.go +++ b/pkg/providers/property/resource_akamai_property_test.go @@ -11,8 +11,8 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/testutils" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/testutils" "github.com/hashicorp/go-cty/cty" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-testing/helper/resource" diff --git a/pkg/providers/property/ruleformats/builder.go b/pkg/providers/property/ruleformats/builder.go index 451f0bd1f..dd4d523c1 100644 --- a/pkg/providers/property/ruleformats/builder.go +++ b/pkg/providers/property/ruleformats/builder.go @@ -7,8 +7,8 @@ import ( "reflect" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/ptr" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/ptr" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/iancoleman/strcase" ) diff --git a/pkg/providers/property/ruleformats/rules_schema_reader.go b/pkg/providers/property/ruleformats/rules_schema_reader.go index f57c24259..09a1131d6 100644 --- a/pkg/providers/property/ruleformats/rules_schema_reader.go +++ b/pkg/providers/property/ruleformats/rules_schema_reader.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/papi" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/pkg/providers/property/ruleformats/validations.go b/pkg/providers/property/ruleformats/validations.go index d1acc0fb0..c3211dd46 100644 --- a/pkg/providers/property/ruleformats/validations.go +++ b/pkg/providers/property/ruleformats/validations.go @@ -3,7 +3,7 @@ package ruleformats import ( "fmt" - "github.com/akamai/terraform-provider-akamai/v5/pkg/common/tf" + "github.com/akamai/terraform-provider-akamai/v6/pkg/common/tf" "github.com/dlclark/regexp2" "github.com/hashicorp/go-cty/cty" diff --git a/pkg/providers/providers.go b/pkg/providers/providers.go index ee4fa83a8..10e0bca8e 100644 --- a/pkg/providers/providers.go +++ b/pkg/providers/providers.go @@ -3,18 +3,18 @@ package providers import ( // This is where providers are imported, so they can register themselves - _ "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/appsec" - _ "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/botman" - _ "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/clientlists" - _ "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/cloudlets" - _ "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/cloudwrapper" - _ "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/cps" - _ "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/datastream" - _ "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/dns" - _ "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/edgeworkers" - _ "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/gtm" - _ "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/iam" - _ "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/imaging" - _ "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/networklists" - _ "github.com/akamai/terraform-provider-akamai/v5/pkg/providers/property" + _ "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/appsec" + _ "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/botman" + _ "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/clientlists" + _ "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/cloudlets" + _ "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/cloudwrapper" + _ "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/cps" + _ "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/datastream" + _ "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/dns" + _ "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/edgeworkers" + _ "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/gtm" + _ "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/iam" + _ "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/imaging" + _ "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/networklists" + _ "github.com/akamai/terraform-provider-akamai/v6/pkg/providers/property" ) diff --git a/pkg/providers/registry/registry.go b/pkg/providers/registry/registry.go index e14b2a281..0f0a11c05 100644 --- a/pkg/providers/registry/registry.go +++ b/pkg/providers/registry/registry.go @@ -4,7 +4,7 @@ package registry import ( "sync" - "github.com/akamai/terraform-provider-akamai/v5/pkg/subprovider" + "github.com/akamai/terraform-provider-akamai/v6/pkg/subprovider" ) var ( From 6d1b8d604e3036a4a823c21f7e473d8f28bea239 Mon Sep 17 00:00:00 2001 From: "Zagrajczuk, Wojciech" Date: Wed, 20 Mar 2024 15:57:56 +0100 Subject: [PATCH 49/52] DXE-3571 Update documentation links and changelog for release --- CHANGELOG.md | 111 +++++++----------------------- docs/data-sources/data-sources.md | 28 ++++---- docs/guides/get-started.md | 30 ++++---- docs/index.md | 28 ++++---- docs/resources/resources.md | 28 ++++---- 5 files changed, 80 insertions(+), 145 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5757bf7b..ecdd13849 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,100 +1,56 @@ # RELEASE NOTES -## X.X.X (X X, X) +## 6.0.0 (Mar 26, 2024) #### BREAKING CHANGES: - +* General + * Migrated to terraform protocol version 6, hence minimal required terraform version is 1.0 * PAPI * Added validation to raise an error if the creation of the `akamai_edge_hostname` resource is attempted with an existing edge hostname. * Added validation to raise an error during the update of `akamai_edge_hostname` resource for the immutable fields: 'product_id' and 'certificate'. - - - - - -* General - * Migrated to terraform protocol version 6, hence minimal required terraform version is 1.0 - - - - - - - - - - - - - - - - #### FEATURES/ENHANCEMENTS: -* Appsec - * Added resource: - * `akamai_appsec_penalty_box_conditions` - read and update - * `akamai_appsec_eval_penalty_box_conditions` - read and update - * Added new data source: - * `akamai_appsec_penalty_box_conditions` - read - * `akamai_appsec_eval_penalty_box_conditions` - read - -* PAPI - * Added attributes to akamai_property datasource: - * `contract_id`, `group_id`, `latest_version`, `note`, `production_version`, `product_id`, `property_id`, `rule_format`, `staging_version` - -* IMAGING - * In the event of an API failure during a policy update, reverting to the previous state. - * When performing the read operation, if `activate_on_production` is true, fetch the policy state from the production network; otherwise, obtain it from the staging environment. - - -* Migrated to go 1.21 - - -* Bumped various dependencies - -* PAPI - * `data_akamai_property_rules_builder` is now supporting `v2024-02-12` [rule format](https://techdocs.akamai.com/terraform/reference/rule-format-changes#v2024-02-12) - * Global - * Requests limit value is configurable via field `request_limit` or environment variable `AKAMAI_REQUEST_LIMIT` - * Added retryable logic for all GET requests to the API. + * Requests limit value is configurable via field `request_limit` or environment variable `AKAMAI_REQUEST_LIMIT` + * Added retryable logic for all GET requests to the API. This behavior can be disabled using `retry_disabled` field from `akamai` provider configuration or via environment variable `AKAMAI_RETRY_DISABLED`. It can be fine-tuned using following fields or environment variables: * `retry_max` or `AKAMAI_RETRY_MAX` - The maximum number retires of API requests, default is 10 * `retry_wait_min` or `AKAMAI_RETRY_WAIT_MIN` - The minimum wait time in seconds between API requests retries, default is 1 sec * `retry_wait_max` or `AKAMAI_RETRY_WAIT_MAX` - The maximum wait time in minutes between API requests retries, default is 30 sec + * Migrated to go 1.21 + * Bumped various dependencies - +* Appsec + * Added resource: + * `akamai_appsec_penalty_box_conditions` - read and update + * `akamai_appsec_eval_penalty_box_conditions` - read and update + * Added new data source: + * `akamai_appsec_penalty_box_conditions` - read + * `akamai_appsec_eval_penalty_box_conditions` - read * CPS - * Added fields: `org_id`, `assigned_slots`, `staging_slots` and `production_slots` to `data_akamai_cps_enrollment` and `data_akamai_cps_enrollments` data sources - - - - - - - - - - - - + * Added fields: `org_id`, `assigned_slots`, `staging_slots` and `production_slots` to `data_akamai_cps_enrollment` and `data_akamai_cps_enrollments` data sources * GTM * Added fields: * `precedence` inside `traffic_target` in `akamai_gtm_property` resource and `akamai_gtm_domain` data source * `sign_and_serve` and `sign_and_serve_algorithm` in `akamai_gtm_domain` data source and resource - * `http_method`, `http_request_body`, `alternate_ca_certificates` and `pre_2023_security_posture` inside `liveness_test` in `akamai_gtm_property` resource and `akamai_gtm_domain` data source + * `http_method`, `http_request_body`, `alternate_ca_certificates` and `pre_2023_security_posture` inside `liveness_test` in `akamai_gtm_property` resource and `akamai_gtm_domain` data source * Added support for `ranked-failover` properties in `akamai_gtm_property` resource * Enhanced error handling in `akamai_gtm_asmap`, `akamai_gtm_domain`, `akamai_gtm_geomap`, `akamai_gtm_property` and `akamai_gtm_resource` resources +* IMAGING + * In the event of an API failure during a policy update, reverting to the previous state. + * When performing the read operation, if `activate_on_production` is true, fetch the policy state from the production network; otherwise, obtain it from the staging environment. +* PAPI + * Added attributes to akamai_property datasource: + * `contract_id`, `group_id`, `latest_version`, `note`, `production_version`, `product_id`, `property_id`, `rule_format`, `staging_version` + * `data_akamai_property_rules_builder` is now supporting `v2024-02-12` [rule format](https://techdocs.akamai.com/terraform/reference/rule-format-changes#v2024-02-12) #### BUG FIXES: @@ -122,30 +78,9 @@ * `postal_code` * `country_code` - - - - - - - - - - - - - - - - - - * PAPI * Fixed case when `origin_certs_to_honor` field from `origin` behavior mandates presence of empty `custom_certificate_authorities` and/or `custom_certificates` options inside `origin` behavior for `akamai_property_rules_builder` datasource ([I#515](https://github.com/akamai/terraform-provider-akamai/issues/515)) - - - #### DEPRECATIONS * Appsec diff --git a/docs/data-sources/data-sources.md b/docs/data-sources/data-sources.md index 119f576f9..a2305c0d8 100644 --- a/docs/data-sources/data-sources.md +++ b/docs/data-sources/data-sources.md @@ -8,17 +8,17 @@ We’ve moved our documentation to the Akamai TechDocs site. Use the table to fi | Subprovider | Description | |---------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------| -| [Application Security](https://techdocs.akamai.com/terraform/v5.6/docs/appsec-datasources) | Manage security configurations, security policies, match targets, rate policies, and firewall rules. | -| [Bot Manager](https://techdocs.akamai.com/terraform/v5.6/docs/botman-datasources) | Identify, track, and respond to bot activity on your domain or in your app. | -| [Certificates](https://techdocs.akamai.com/terraform/v5.6/docs/cps-datasources) | Full life cycle management of SSL certificates for your ​Akamai​ CDN applications. | -| [Client Lists](https://techdocs.akamai.com/terraform/v5.6/docs/cli-data-sources) | Reduce harmful security attacks by allowing only trusted IP/CIDRs, locations, autonomous system numbers, and TLS fingerprints to access your services and content.| -| [Cloud Wrapper](https://techdocs.akamai.com/terraform/v5.6/docs/cw-data-sources) | Provide your customers with a more consistent user experience by adding a custom caching layer that improves the connection between your cloud infrastructure and the Akamai platform.| -| [Cloudlets](https://techdocs.akamai.com/terraform/v5.6/docs/cl-datasources) | Solve specific business challenges using value-added apps that complement ​Akamai​'s core solutions. | -| [DataStream](https://techdocs.akamai.com/terraform/v5.6/docs/ds-datasources) | Monitor activity on the ​Akamai​ platform and send live log data to a destination of your choice. | -| [Edge DNS](https://techdocs.akamai.com/terraform/v5.6/docs/edns-datasources) | Replace or augment your DNS infrastructure with a cloud-based authoritative DNS solution. | -| [EdgeWorkers](https://techdocs.akamai.com/terraform/v5.6/docs/ew-datasources) | Execute JavaScript functions at the edge to optimize site performance and customize web experiences. | -| [Global Traffic Management](https://techdocs.akamai.com/terraform/v5.6/docs/gtm-datasources) | Use load balancing to manage website and mobile performance demands. | -| [Identity and Access Management](https://techdocs.akamai.com/terraform/v5.6/docs/iam-datasources) | Create users and groups, and define policies that manage access to your Akamai applications. | -| [Image and Video Manager](https://techdocs.akamai.com/terraform/v5.6/docs/ivm-datasources) | Automate image and video delivery optimizations for your website visitors. | -| [Network Lists](https://techdocs.akamai.com/terraform/v5.6/docs/nl-datasources) | Automate the creation, deployment, and management of lists used in ​Akamai​ security products. | -| [Property](https://techdocs.akamai.com/terraform/v5.6/docs/pm-datasources) | Define rules and behaviors that govern your website delivery based on match criteria. | +| [Application Security](https://techdocs.akamai.com/terraform/v6.0/docs/appsec-datasources) | Manage security configurations, security policies, match targets, rate policies, and firewall rules. | +| [Bot Manager](https://techdocs.akamai.com/terraform/v6.0/docs/botman-datasources) | Identify, track, and respond to bot activity on your domain or in your app. | +| [Certificates](https://techdocs.akamai.com/terraform/v6.0/docs/cps-datasources) | Full life cycle management of SSL certificates for your ​Akamai​ CDN applications. | +| [Client Lists](https://techdocs.akamai.com/terraform/v6.0/docs/cli-data-sources) | Reduce harmful security attacks by allowing only trusted IP/CIDRs, locations, autonomous system numbers, and TLS fingerprints to access your services and content.| +| [Cloud Wrapper](https://techdocs.akamai.com/terraform/v6.0/docs/cw-data-sources) | Provide your customers with a more consistent user experience by adding a custom caching layer that improves the connection between your cloud infrastructure and the Akamai platform.| +| [Cloudlets](https://techdocs.akamai.com/terraform/v6.0/docs/cl-datasources) | Solve specific business challenges using value-added apps that complement ​Akamai​'s core solutions. | +| [DataStream](https://techdocs.akamai.com/terraform/v6.0/docs/ds-datasources) | Monitor activity on the ​Akamai​ platform and send live log data to a destination of your choice. | +| [Edge DNS](https://techdocs.akamai.com/terraform/v6.0/docs/edns-datasources) | Replace or augment your DNS infrastructure with a cloud-based authoritative DNS solution. | +| [EdgeWorkers](https://techdocs.akamai.com/terraform/v6.0/docs/ew-datasources) | Execute JavaScript functions at the edge to optimize site performance and customize web experiences. | +| [Global Traffic Management](https://techdocs.akamai.com/terraform/v6.0/docs/gtm-datasources) | Use load balancing to manage website and mobile performance demands. | +| [Identity and Access Management](https://techdocs.akamai.com/terraform/v6.0/docs/iam-datasources) | Create users and groups, and define policies that manage access to your Akamai applications. | +| [Image and Video Manager](https://techdocs.akamai.com/terraform/v6.0/docs/ivm-datasources) | Automate image and video delivery optimizations for your website visitors. | +| [Network Lists](https://techdocs.akamai.com/terraform/v6.0/docs/nl-datasources) | Automate the creation, deployment, and management of lists used in ​Akamai​ security products. | +| [Property](https://techdocs.akamai.com/terraform/v6.0/docs/pm-datasources) | Define rules and behaviors that govern your website delivery based on match criteria. | diff --git a/docs/guides/get-started.md b/docs/guides/get-started.md index c53875fbb..f4e25ef15 100644 --- a/docs/guides/get-started.md +++ b/docs/guides/get-started.md @@ -21,7 +21,7 @@ Your Akamai Terraform configuration starts with listing us as a required provide required_providers { akamai = { source = "akamai/akamai" - version = "5.6.0" + version = "6.0.0" } } } @@ -99,20 +99,20 @@ Use the table to find information about the subprovider you’re using. | Subprovider | Description | |----------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------| -| [Application Security](https://techdocs.akamai.com/terraform/v5.6/docs/configure-appsec) | Manage security configurations, security policies, match targets, rate policies, and firewall rules. | -| [Bot Manager](https://techdocs.akamai.com/terraform/v5.6/docs/set-up-botman) | Identify, track, and respond to bot activity on your domain or in your app. | -| [Certificates](https://techdocs.akamai.com/terraform/v5.6/docs/cps-integration-guide) | Full life cycle management of SSL certificates for your ​Akamai​ CDN applications. | -| [Client Lists](https://techdocs.akamai.com/terraform/v5.6/docs/set-up-client-lists) | Reduce harmful security attacks by allowing only trusted IP/CIDRs, locations, autonomous system numbers, and TLS fingerprints to access your services and content.| -| [Cloud Wrapper](https://techdocs.akamai.com/terraform/v5.6/docs/set-up-cloud-wrapper) | Provide your customers with a more consistent user experience by adding a custom caching layer that improves the connection between your cloud infrastructure and the Akamai platform.| -| [Cloudlets](https://techdocs.akamai.com/terraform/v5.6/docs/set-up-cloudlets) | Solve specific business challenges using value-added apps that complement ​Akamai​'s core solutions. | -| [DataStream](https://techdocs.akamai.com/terraform/v5.6/docs/set-up-datastream) | Monitor activity on the ​Akamai​ platform and send live log data to a destination of your choice. | -| [Edge DNS](https://techdocs.akamai.com/terraform/v5.6/docs/set-up-edgedns) | Replace or augment your DNS infrastructure with a cloud-based authoritative DNS solution. | -| [EdgeWorkers](https://techdocs.akamai.com/terraform/v5.6/docs/set-up-edgeworkers) | Execute JavaScript functions at the edge to optimize site performance and customize web experiences. | -| [Global Traffic Management](https://techdocs.akamai.com/terraform/v5.6/docs/set-up-gtm) | Use load balancing to manage website and mobile performance demands. | -| [Identity and Access Management](https://techdocs.akamai.com/terraform/v5.6/docs/set-up-iam) | Create users and groups, and define policies that manage access to your Akamai applications. | -| [Image and Video Manager](https://techdocs.akamai.com/terraform/v5.6/docs/set-up-ivm) | Automate image and video delivery optimizations for your website visitors. | -| [Network Lists](https://techdocs.akamai.com/terraform/v5.6/docs/set-up-network-lists) | Automate the creation, deployment, and management of lists used in ​Akamai​ security products. | -| [Property](https://techdocs.akamai.com/terraform/v5.6/docs/set-up-property-provisioning) | Define rules and behaviors that govern your website delivery based on match criteria. | +| [Application Security](https://techdocs.akamai.com/terraform/v6.0/docs/configure-appsec) | Manage security configurations, security policies, match targets, rate policies, and firewall rules. | +| [Bot Manager](https://techdocs.akamai.com/terraform/v6.0/docs/set-up-botman) | Identify, track, and respond to bot activity on your domain or in your app. | +| [Certificates](https://techdocs.akamai.com/terraform/v6.0/docs/cps-integration-guide) | Full life cycle management of SSL certificates for your ​Akamai​ CDN applications. | +| [Client Lists](https://techdocs.akamai.com/terraform/v6.0/docs/set-up-client-lists) | Reduce harmful security attacks by allowing only trusted IP/CIDRs, locations, autonomous system numbers, and TLS fingerprints to access your services and content.| +| [Cloud Wrapper](https://techdocs.akamai.com/terraform/v6.0/docs/set-up-cloud-wrapper) | Provide your customers with a more consistent user experience by adding a custom caching layer that improves the connection between your cloud infrastructure and the Akamai platform.| +| [Cloudlets](https://techdocs.akamai.com/terraform/v6.0/docs/set-up-cloudlets) | Solve specific business challenges using value-added apps that complement ​Akamai​'s core solutions. | +| [DataStream](https://techdocs.akamai.com/terraform/v6.0/docs/set-up-datastream) | Monitor activity on the ​Akamai​ platform and send live log data to a destination of your choice. | +| [Edge DNS](https://techdocs.akamai.com/terraform/v6.0/docs/set-up-edgedns) | Replace or augment your DNS infrastructure with a cloud-based authoritative DNS solution. | +| [EdgeWorkers](https://techdocs.akamai.com/terraform/v6.0/docs/set-up-edgeworkers) | Execute JavaScript functions at the edge to optimize site performance and customize web experiences. | +| [Global Traffic Management](https://techdocs.akamai.com/terraform/v6.0/docs/set-up-gtm) | Use load balancing to manage website and mobile performance demands. | +| [Identity and Access Management](https://techdocs.akamai.com/terraform/v6.0/docs/set-up-iam) | Create users and groups, and define policies that manage access to your Akamai applications. | +| [Image and Video Manager](https://techdocs.akamai.com/terraform/v6.0/docs/set-up-ivm) | Automate image and video delivery optimizations for your website visitors. | +| [Network Lists](https://techdocs.akamai.com/terraform/v6.0/docs/set-up-network-lists) | Automate the creation, deployment, and management of lists used in ​Akamai​ security products. | +| [Property](https://techdocs.akamai.com/terraform/v6.0/docs/set-up-property-provisioning) | Define rules and behaviors that govern your website delivery based on match criteria. | ### Get contract and group IDs diff --git a/docs/index.md b/docs/index.md index f37ba3c93..9308b1186 100644 --- a/docs/index.md +++ b/docs/index.md @@ -35,20 +35,20 @@ We’ve moved our documentation to the Akamai TechDocs site. Use the table to fi | Subprovider | Description | |----------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------| -| [Application Security](https://techdocs.akamai.com/terraform/v5.6/docs/configure-appsec) | Manage security configurations, security policies, match targets, rate policies, and firewall rules. | -| [Bot Manager](https://techdocs.akamai.com/terraform/v5.6/docs/set-up-botman) | Identify, track, and respond to bot activity on your domain or in your app. | -| [Certificates](https://techdocs.akamai.com/terraform/v5.6/docs/cps-integration-guide) | Full life cycle management of SSL certificates for your ​Akamai​ CDN applications. | -| [Client Lists](https://techdocs.akamai.com/terraform/v5.6/docs/set-up-client-lists) | Reduce harmful security attacks by allowing only trusted IP/CIDRs, locations, autonomous system numbers, and TLS fingerprints to access your services and content.| -| [Cloud Wrapper](https://techdocs.akamai.com/terraform/v5.6/docs/set-up-cloud-wrapper) | Provide your customers with a more consistent user experience by adding a custom caching layer that improves the connection between your cloud infrastructure and the Akamai platform.| -| [Cloudlets](https://techdocs.akamai.com/terraform/v5.6/docs/set-up-cloudlets) | Solve specific business challenges using value-added apps that complement ​Akamai​'s core solutions. | -| [DataStream](https://techdocs.akamai.com/terraform/v5.6/docs/set-up-datastream) | Monitor activity on the ​Akamai​ platform and send live log data to a destination of your choice. | -| [Edge DNS](https://techdocs.akamai.com/terraform/v5.6/docs/set-up-edgedns) | Replace or augment your DNS infrastructure with a cloud-based authoritative DNS solution. | -| [EdgeWorkers](https://techdocs.akamai.com/terraform/v5.6/docs/set-up-edgeworkers) | Execute JavaScript functions at the edge to optimize site performance and customize web experiences. | -| [Global Traffic Management](https://techdocs.akamai.com/terraform/v5.6/docs/set-up-gtm) | Use load balancing to manage website and mobile performance demands. | -| [Identity and Access Management](https://techdocs.akamai.com/terraform/v5.6/docs/set-up-iam) | Create users and groups, and define policies that manage access to your Akamai applications. | -| [Image and Video Manager](https://techdocs.akamai.com/terraform/v5.6/docs/set-up-ivm) | Automate image and video delivery optimizations for your website visitors. | -| [Network Lists](https://techdocs.akamai.com/terraform/v5.6/docs/set-up-network-lists) | Automate the creation, deployment, and management of lists used in ​Akamai​ security products. | -| [Property](https://techdocs.akamai.com/terraform/v5.6/docs/set-up-property-provisioning) | Define rules and behaviors that govern your website delivery based on match criteria. | +| [Application Security](https://techdocs.akamai.com/terraform/v6.0/docs/configure-appsec) | Manage security configurations, security policies, match targets, rate policies, and firewall rules. | +| [Bot Manager](https://techdocs.akamai.com/terraform/v6.0/docs/set-up-botman) | Identify, track, and respond to bot activity on your domain or in your app. | +| [Certificates](https://techdocs.akamai.com/terraform/v6.0/docs/cps-integration-guide) | Full life cycle management of SSL certificates for your ​Akamai​ CDN applications. | +| [Client Lists](https://techdocs.akamai.com/terraform/v6.0/docs/set-up-client-lists) | Reduce harmful security attacks by allowing only trusted IP/CIDRs, locations, autonomous system numbers, and TLS fingerprints to access your services and content.| +| [Cloud Wrapper](https://techdocs.akamai.com/terraform/v6.0/docs/set-up-cloud-wrapper) | Provide your customers with a more consistent user experience by adding a custom caching layer that improves the connection between your cloud infrastructure and the Akamai platform.| +| [Cloudlets](https://techdocs.akamai.com/terraform/v6.0/docs/set-up-cloudlets) | Solve specific business challenges using value-added apps that complement ​Akamai​'s core solutions. | +| [DataStream](https://techdocs.akamai.com/terraform/v6.0/docs/set-up-datastream) | Monitor activity on the ​Akamai​ platform and send live log data to a destination of your choice. | +| [Edge DNS](https://techdocs.akamai.com/terraform/v6.0/docs/set-up-edgedns) | Replace or augment your DNS infrastructure with a cloud-based authoritative DNS solution. | +| [EdgeWorkers](https://techdocs.akamai.com/terraform/v6.0/docs/set-up-edgeworkers) | Execute JavaScript functions at the edge to optimize site performance and customize web experiences. | +| [Global Traffic Management](https://techdocs.akamai.com/terraform/v6.0/docs/set-up-gtm) | Use load balancing to manage website and mobile performance demands. | +| [Identity and Access Management](https://techdocs.akamai.com/terraform/v6.0/docs/set-up-iam) | Create users and groups, and define policies that manage access to your Akamai applications. | +| [Image and Video Manager](https://techdocs.akamai.com/terraform/v6.0/docs/set-up-ivm) | Automate image and video delivery optimizations for your website visitors. | +| [Network Lists](https://techdocs.akamai.com/terraform/v6.0/docs/set-up-network-lists) | Automate the creation, deployment, and management of lists used in ​Akamai​ security products. | +| [Property](https://techdocs.akamai.com/terraform/v6.0/docs/set-up-property-provisioning) | Define rules and behaviors that govern your website delivery based on match criteria. | ## Links to resources diff --git a/docs/resources/resources.md b/docs/resources/resources.md index 784475c48..6441fea54 100644 --- a/docs/resources/resources.md +++ b/docs/resources/resources.md @@ -8,17 +8,17 @@ We’ve moved our documentation to the Akamai TechDocs site. Use the table to fi | Subprovider | Description | |-------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------| -| [Application Security](https://techdocs.akamai.com/terraform/v5.6/docs/appsec-resources) | Manage security configurations, security policies, match targets, rate policies, and firewall rules. | -| [Bot Manager](https://techdocs.akamai.com/terraform/v5.6/docs/botman-resources) | Identify, track, and respond to bot activity on your domain or in your app. | -| [Certificates](https://techdocs.akamai.com/terraform/v5.6/docs/cps-resources) | Full life cycle management of SSL certificates for your ​Akamai​ CDN applications. | -| [Client Lists](https://techdocs.akamai.com/terraform/v5.6/docs/cli-resources) |Reduce harmful security attacks by allowing only trusted IP/CIDRs, locations, autonomous system numbers, and TLS fingerprints to access your services and content.| -| [Cloud Wrapper](https://techdocs.akamai.com/terraform/v5.6/docs/cw-resources) | Provide your customers with a more consistent user experience by adding a custom caching layer that improves the connection between your cloud infrastructure and the Akamai platform.| -| [Cloudlets](https://techdocs.akamai.com/terraform/v5.6/docs/cl-resources) | Solve specific business challenges using value-added apps that complement ​Akamai​'s core solutions. | -| [DataStream](https://techdocs.akamai.com/terraform/v5.6/docs/ds-resources) | Monitor activity on the ​Akamai​ platform and send live log data to a destination of your choice. | -| [Edge DNS](https://techdocs.akamai.com/terraform/v5.6/docs/edns-resources) | Replace or augment your DNS infrastructure with a cloud-based authoritative DNS solution. | -| [EdgeWorkers](https://techdocs.akamai.com/terraform/v5.6/docs/ew-resources) | Execute JavaScript functions at the edge to optimize site performance and customize web experiences. | -| [Global Traffic Management](https://techdocs.akamai.com/terraform/v5.6/docs/gtm-resources) | Use load balancing to manage website and mobile performance demands. | -| [Identity and Access Management](https://techdocs.akamai.com/terraform/v5.6/docs/iam-resources) | Create users and groups, and define policies that manage access to your Akamai applications. | -| [Image and Video Manager](https://techdocs.akamai.com/terraform/v5.6/docs/ivm-resources) | Automate image and video delivery optimizations for your website visitors. | -| [Network Lists](https://techdocs.akamai.com/terraform/v5.6/docs/nl-resources) | Automate the creation, deployment, and management of lists used in ​Akamai​ security products. | -| [Property](https://techdocs.akamai.com/terraform/v5.6/docs/pm-resources) | Define rules and behaviors that govern your website delivery based on match criteria. | +| [Application Security](https://techdocs.akamai.com/terraform/v6.0/docs/appsec-resources) | Manage security configurations, security policies, match targets, rate policies, and firewall rules. | +| [Bot Manager](https://techdocs.akamai.com/terraform/v6.0/docs/botman-resources) | Identify, track, and respond to bot activity on your domain or in your app. | +| [Certificates](https://techdocs.akamai.com/terraform/v6.0/docs/cps-resources) | Full life cycle management of SSL certificates for your ​Akamai​ CDN applications. | +| [Client Lists](https://techdocs.akamai.com/terraform/v6.0/docs/cli-resources) |Reduce harmful security attacks by allowing only trusted IP/CIDRs, locations, autonomous system numbers, and TLS fingerprints to access your services and content.| +| [Cloud Wrapper](https://techdocs.akamai.com/terraform/v6.0/docs/cw-resources) | Provide your customers with a more consistent user experience by adding a custom caching layer that improves the connection between your cloud infrastructure and the Akamai platform.| +| [Cloudlets](https://techdocs.akamai.com/terraform/v6.0/docs/cl-resources) | Solve specific business challenges using value-added apps that complement ​Akamai​'s core solutions. | +| [DataStream](https://techdocs.akamai.com/terraform/v6.0/docs/ds-resources) | Monitor activity on the ​Akamai​ platform and send live log data to a destination of your choice. | +| [Edge DNS](https://techdocs.akamai.com/terraform/v6.0/docs/edns-resources) | Replace or augment your DNS infrastructure with a cloud-based authoritative DNS solution. | +| [EdgeWorkers](https://techdocs.akamai.com/terraform/v6.0/docs/ew-resources) | Execute JavaScript functions at the edge to optimize site performance and customize web experiences. | +| [Global Traffic Management](https://techdocs.akamai.com/terraform/v6.0/docs/gtm-resources) | Use load balancing to manage website and mobile performance demands. | +| [Identity and Access Management](https://techdocs.akamai.com/terraform/v6.0/docs/iam-resources) | Create users and groups, and define policies that manage access to your Akamai applications. | +| [Image and Video Manager](https://techdocs.akamai.com/terraform/v6.0/docs/ivm-resources) | Automate image and video delivery optimizations for your website visitors. | +| [Network Lists](https://techdocs.akamai.com/terraform/v6.0/docs/nl-resources) | Automate the creation, deployment, and management of lists used in ​Akamai​ security products. | +| [Property](https://techdocs.akamai.com/terraform/v6.0/docs/pm-resources) | Define rules and behaviors that govern your website delivery based on match criteria. | From ca549157b9c61d0792d29f7f39e7a4ae9487c55a Mon Sep 17 00:00:00 2001 From: "Zagrajczuk, Wojciech" Date: Wed, 20 Mar 2024 16:01:44 +0100 Subject: [PATCH 50/52] DXE-3571 Add missing tickets link --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ecdd13849..8e7e0a6ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,7 +44,7 @@ * Enhanced error handling in `akamai_gtm_asmap`, `akamai_gtm_domain`, `akamai_gtm_geomap`, `akamai_gtm_property` and `akamai_gtm_resource` resources * IMAGING - * In the event of an API failure during a policy update, reverting to the previous state. + * In the event of an API failure during a policy update, reverting to the previous state ([I#491](https://github.com/akamai/terraform-provider-akamai/issues/491), [I#493](https://github.com/akamai/terraform-provider-akamai/issues/493)) * When performing the read operation, if `activate_on_production` is true, fetch the policy state from the production network; otherwise, obtain it from the staging environment. * PAPI From 765f279e8124c365b4880edd0b7179f53b725fb8 Mon Sep 17 00:00:00 2001 From: "Zagrajczuk, Wojciech" Date: Wed, 20 Mar 2024 16:06:38 +0100 Subject: [PATCH 51/52] DXE-3693 Update field description --- pkg/providers/gtm/data_akamai_gtm_domain.go | 3 ++- pkg/providers/gtm/resource_akamai_gtm_property.go | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/providers/gtm/data_akamai_gtm_domain.go b/pkg/providers/gtm/data_akamai_gtm_domain.go index 6cb9a58b5..5d1f445df 100644 --- a/pkg/providers/gtm/data_akamai_gtm_domain.go +++ b/pkg/providers/gtm/data_akamai_gtm_domain.go @@ -472,7 +472,8 @@ var ( ElementType: types.StringType, }, "pre_2023_security_posture": schema.BoolAttribute{ - Computed: true, + Computed: true, + Description: "Whether to enable backwards compatibility for liveness endpoints that use older TLS protocols", }, }, Blocks: map[string]schema.Block{ diff --git a/pkg/providers/gtm/resource_akamai_gtm_property.go b/pkg/providers/gtm/resource_akamai_gtm_property.go index 495ee47a3..82d1c5971 100644 --- a/pkg/providers/gtm/resource_akamai_gtm_property.go +++ b/pkg/providers/gtm/resource_akamai_gtm_property.go @@ -348,8 +348,9 @@ func resourceGTMv1Property() *schema.Resource { Optional: true, }, "pre_2023_security_posture": { - Type: schema.TypeBool, - Optional: true, + Type: schema.TypeBool, + Optional: true, + Description: "Whether to enable backwards compatibility for liveness endpoints that use older TLS protocols", }, "alternate_ca_certificates": { Type: schema.TypeList, From 9457632edd2c5ab2c7e9caed78d272ad4359612a Mon Sep 17 00:00:00 2001 From: "Zagrajczuk, Wojciech" Date: Thu, 21 Mar 2024 08:55:32 +0100 Subject: [PATCH 52/52] DXE-3358 Add missing changelog entry --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e7e0a6ae..acb6b338d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,10 @@ * CPS * Added fields: `org_id`, `assigned_slots`, `staging_slots` and `production_slots` to `data_akamai_cps_enrollment` and `data_akamai_cps_enrollments` data sources +* Edgeworkers + * Improved error handling in `akamai_edgeworkers_activation` and `resource_akamai_edgeworker` resources + * Improved error handling in `akamai_edgeworker_activation` datasource + * GTM * Added fields: * `precedence` inside `traffic_target` in `akamai_gtm_property` resource and `akamai_gtm_domain` data source