From 3d7dc388053fd690268f835c4c4d44f8eabaef51 Mon Sep 17 00:00:00 2001 From: Iain Adams Date: Sun, 3 Jul 2022 19:28:17 +0100 Subject: [PATCH] fixes #134 --- docs/resources/application_resource.md | 1 - .../pingaccess_application_resource/resource.tf | 1 - func-tests/application_resource.tf | 5 ----- .../resource_pingaccess_application_resource.go | 1 + ...resource_pingaccess_application_resource_test.go | 13 +------------ 5 files changed, 2 insertions(+), 19 deletions(-) diff --git a/docs/resources/application_resource.md b/docs/resources/application_resource.md index 4d50658b..a7fad3e2 100644 --- a/docs/resources/application_resource.md +++ b/docs/resources/application_resource.md @@ -16,7 +16,6 @@ Provides configuration for Application Resources within PingAccess. resource "pingaccess_application_resource" "app_res_test_root_resource" { name = "Root Resource" methods = ["*"] - path_prefixes = ["/*"] audit_level = "ON" anonymous = false enabled = true diff --git a/examples/resources/pingaccess_application_resource/resource.tf b/examples/resources/pingaccess_application_resource/resource.tf index f3cd3ef4..e3383e82 100644 --- a/examples/resources/pingaccess_application_resource/resource.tf +++ b/examples/resources/pingaccess_application_resource/resource.tf @@ -1,7 +1,6 @@ resource "pingaccess_application_resource" "app_res_test_root_resource" { name = "Root Resource" methods = ["*"] - path_prefixes = ["/*"] audit_level = "ON" anonymous = false enabled = true diff --git a/func-tests/application_resource.tf b/func-tests/application_resource.tf index 316c236c..537c088b 100644 --- a/func-tests/application_resource.tf +++ b/func-tests/application_resource.tf @@ -15,11 +15,6 @@ resource "pingaccess_application_resource" "demo_application_resource" { type = "WILDCARD" } - path_prefixes = [ - "/as/token.oauth2", - "/foo", - ] - audit_level = "OFF" anonymous = false enabled = true diff --git a/internal/sdkv2provider/resource_pingaccess_application_resource.go b/internal/sdkv2provider/resource_pingaccess_application_resource.go index 56338b01..66b455b5 100644 --- a/internal/sdkv2provider/resource_pingaccess_application_resource.go +++ b/internal/sdkv2provider/resource_pingaccess_application_resource.go @@ -95,6 +95,7 @@ func resourcePingAccessApplicationResourceSchema() map[string]*schema.Schema { "path_prefixes": { Type: schema.TypeSet, Optional: true, + Computed: true, Deprecated: "To be removed in a future release; please use 'path_patterns' instead", Elem: &schema.Schema{ Type: schema.TypeString, diff --git a/internal/sdkv2provider/resource_pingaccess_application_resource_test.go b/internal/sdkv2provider/resource_pingaccess_application_resource_test.go index 662ec791..5ce1f2e7 100644 --- a/internal/sdkv2provider/resource_pingaccess_application_resource_test.go +++ b/internal/sdkv2provider/resource_pingaccess_application_resource_test.go @@ -128,10 +128,6 @@ resource "pingaccess_application_resource" "app_res_test_resource" { type = "WILDCARD" } - path_prefixes = [ - "/as/token.oauth2", - "%s" - ] audit_level = "OFF" anonymous = false enabled = true @@ -157,9 +153,6 @@ resource "pingaccess_application_resource" "app_res_virtual_resource" { type = "WILDCARD" } - path_prefixes = [ - "/virtual" - ] audit_level = "OFF" anonymous = false enabled = true @@ -190,10 +183,6 @@ resource "pingaccess_application_resource" "app_res_test_root_resource" { "*" ] - path_prefixes = [ - "/*" - ] - path_patterns { pattern = "/*" type = "WILDCARD" @@ -259,7 +248,7 @@ resource "pingaccess_rule" "acc_test_resource_rule_two" { } EOF } - `, name, context, context, policy) + `, name, context, policy) } func testAccCheckPingAccessApplicationResourceExists(n string) resource.TestCheckFunc {