From 5d3d3b3f7bfe5a7681db373690719dd1d69ca9e5 Mon Sep 17 00:00:00 2001 From: GitHub Terraform Date: Thu, 15 Aug 2024 11:26:39 -0700 Subject: [PATCH] fix: Fixed application segment match_style validation --- CHANGELOG.md | 14 +++++ GNUmakefile | 6 +- .../zpa_service_edge_assistant_schedule.md | 52 ++++++++++++++++ docs/guides/release-notes.md | 16 ++++- docs/index.md | 33 +++++----- .../zpa_service_edge_assistant_schedule.md | 61 +++++++++++++++++++ go.mod | 6 +- go.sum | 12 ++-- zpa/resource_zpa_application_segment.go | 15 +++++ ..._zpa_application_segment_browser_access.go | 11 ---- ...urce_zpa_application_segment_inspection.go | 11 ---- zpa/resource_zpa_application_segment_pra.go | 11 ---- 12 files changed, 186 insertions(+), 62 deletions(-) create mode 100644 docs/data-sources/zpa_service_edge_assistant_schedule.md create mode 100644 docs/resources/zpa_service_edge_assistant_schedule.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 0524a67f..ff3f1466 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 3.32.2 (August, 16 2024) + +### Notes + +- Release date: **(August, 16 2024)** +- Supported Terraform version: **v1.x** + +### Bug Fixes +- [PR #476](https://github.com/zscaler/terraform-provider-zpa/pull/476) - Fixed validation for the `match_style` attribute in the resource `zpa_application_segment`. + **NOTE**: Notice that `match_style` also known as [Multimatch](https://help.zscaler.com/zpa/using-app-segment-multimatch) cannot be configured when `ip_anchored` is enabled. Also, `match_style` is NOT supported for the following application segment resources: `zpa_application_segment_browser_access`, `zpa_application_segment_inspection` or `zpa_application_segment_pra`. + +### Documentation +- [PR #476](https://github.com/zscaler/terraform-provider-zpa/pull/476) - Added documentation for resource and datasource: `zpa_service_edge_assistant_schedule` + ## 3.32.1 (July, 31 2024) ### Notes diff --git a/GNUmakefile b/GNUmakefile index 96d9fc3e..2d348ced 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -55,14 +55,14 @@ test\:integration\:zpa: build13: GOOS=$(shell go env GOOS) build13: GOARCH=$(shell go env GOARCH) ifeq ($(OS),Windows_NT) # is Windows_NT on XP, 2000, 7, Vista, 10... -build13: DESTINATION=$(APPDATA)/terraform.d/plugins/$(ZPA_PROVIDER_NAMESPACE)/3.321.0/$(GOOS)_$(GOARCH) +build13: DESTINATION=$(APPDATA)/terraform.d/plugins/$(ZPA_PROVIDER_NAMESPACE)/3.32.2/$(GOOS)_$(GOARCH) else -build13: DESTINATION=$(HOME)/.terraform.d/plugins/$(ZPA_PROVIDER_NAMESPACE)/3.321.0/$(GOOS)_$(GOARCH) +build13: DESTINATION=$(HOME)/.terraform.d/plugins/$(ZPA_PROVIDER_NAMESPACE)/3.32.2/$(GOOS)_$(GOARCH) endif build13: fmtcheck @echo "==> Installing plugin to $(DESTINATION)" @mkdir -p $(DESTINATION) - go build -o $(DESTINATION)/terraform-provider-zpa_v3.321.0 + go build -o $(DESTINATION)/terraform-provider-zpa_v3.32.2 vet: @echo "==> Checking source code against go vet and staticcheck" diff --git a/docs/data-sources/zpa_service_edge_assistant_schedule.md b/docs/data-sources/zpa_service_edge_assistant_schedule.md new file mode 100644 index 00000000..e1232da2 --- /dev/null +++ b/docs/data-sources/zpa_service_edge_assistant_schedule.md @@ -0,0 +1,52 @@ +--- +page_title: "zpa_service_edge_assistant_schedule Data Source - terraform-provider-zpa" +subcategory: "Service Edge Controller" +description: |- + Official documentation https://help.zscaler.com/zpa/deleting-disconnected-app-connectors + documentation https://help.zscaler.com/zpa/configuring-auto-delete-disconnected-app-connectors-using-api + Get information about ZPA Service Edge Controller Assistant Schedule in Zscaler Private Access cloud. +--- + +# zpa_service_edge_assistant_schedule (Data Source) + +* [Official documentation](https://help.zscaler.com/zpa/deleting-disconnected-app-connectors) +* [API documentation](https://help.zscaler.com/zpa/configuring-auto-delete-disconnected-app-connectors-using-api) + +Use the **zpa_service_edge_assistant_schedule** data source to get information about Auto Delete frequency of the Service Edge for the specified customer in the Zscaler Private Access cloud. + +~> **NOTE** - The `customer_id` attribute is optional and not required during the configuration. + +## Example Usage + +```terraform +// Retrieve All Assistant Schedules +data "zpa_service_edge_assistant_schedule" "this" {} + +// Retrieve A Specific Assistant Schedule by ID +data "zpa_service_edge_assistant_schedule" "this" { + id = "1" +} + +// Retrieve A Specific Assistant Schedule by the Customer ID +data "zpa_service_edge_assistant_schedule" "this" { + customer_id = "1234567891012" +} +``` + +## Schema + +### Required + +The following arguments are supported: + +* `id` - (Number) The unique identifier for the Service Edge auto deletion configuration for a customer. This field is only required for the PUT request to update the frequency of the Service Edge Settings. +* `customer_id` - (Number) The unique identifier of the ZPA tenant. + +### Read-Only + +In addition to all arguments above, the following attributes are exported: + +* `enabled` (Boolean) - Indicates if the setting for deleting Service Edge is enabled or disabled. +* `delete_disabled` (Boolean) - Indicates if the Service Edge are included for deletion if they are in a disconnected state based on frequencyInterval and frequency values. +* `frequency` (String) - The scheduled frequency at which the disconnected Service Edge are deleted. Supported value is: `days` +* `frequency_interval` - (String) - The interval for the configured frequency value. The minimum supported value is 5. Supported values are: `5`, `7`, `14`, `30`, `60` and `90` diff --git a/docs/guides/release-notes.md b/docs/guides/release-notes.md index e0626946..c7fbb7c8 100644 --- a/docs/guides/release-notes.md +++ b/docs/guides/release-notes.md @@ -12,10 +12,24 @@ Track all ZPA Terraform provider's releases. New resources, features, and bug fi --- -``Last updated: v3.32.1`` +``Last updated: v3.32.2`` --- +## 3.32.2 (August, 16 2024) + +### Notes + +- Release date: **(August, 16 2024)** +- Supported Terraform version: **v1.x** + +### Bug Fixes +- [PR #476](https://github.com/zscaler/terraform-provider-zpa/pull/476) - Fixed validation for the `match_style` attribute in the resource `zpa_application_segment`. + **NOTE**: Notice that `match_style` also known as [Multimatch](https://help.zscaler.com/zpa/using-app-segment-multimatch) cannot be configured when `ip_anchored` is enabled. Also, `match_style` is NOT supported for the following application segment resources: `zpa_application_segment_browser_access`, `zpa_application_segment_inspection` or `zpa_application_segment_pra`. + +### Documentation +- [PR #476](https://github.com/zscaler/terraform-provider-zpa/pull/476) - Added documentation for resource and datasource: `zpa_service_edge_assistant_schedule` + ## 3.32.1 (July, 31 2024) ### Notes diff --git a/docs/index.md b/docs/index.md index d02f28bf..4b6760dd 100644 --- a/docs/index.md +++ b/docs/index.md @@ -177,7 +177,7 @@ The following arguments are supported: * ``zpa_client_id`` - (Required) ZPA client ID, is equivalent to a username. * ``zpa_client_secret`` - (Required) ZPA client secret, is equivalent to a secret password. * ``zpa_customer_id`` - (Required) ZPA customer ID, is equivalent to your ZPA tenant identification. -* ``zpa_cloud`` - (Required) ZPA Cloud name `BETA`, `GOV`, `GOVUS` or `PREVIEW`. +* ``zpa_cloud`` - (Required) ZPA Cloud name `BETA`, `GOV`, `GOVUS`, `PREVIEW` or `ZPATWO` clouds. ### Optional @@ -185,18 +185,19 @@ The following arguments are supported: ### Zscaler Private Access Microtenant -## Support - -This template/solution is released under an as-is, best effort, support -policy. These scripts should be seen as community supported and Zscaler -Technology Alliances Team will contribute our expertise as and when possible. -We do not provide technical support or help in using or troubleshooting the components -of the project through our normal support options such as Zscaler support teams, -or ASC (Authorized Support Centers) partners and backline -support options. The underlying product used (Zscaler Private Access API) but the -scripts or templates are still supported, but the support is only for the -product functionality and not for help in deploying or using the template or -script itself. Unless explicitly tagged, all projects or work posted in our -[GitHub repository](https://github.com/zscaler) or sites other -than our official [Downloads page](https://help.zscaler.com/login-tickets) -are provided under the best effort policy. +A Microtenant is a delegated administrator responsibility that is assigned to an admin by an admin with Microtenant administrator privileges. Microtenants are defined by an authentication domain and assigned to admins based on country, department, and company for role-based administration control. A Microtenant is created within a tenant and is used when departments or subsidiaries within an organization want to manage their configurations independently.[Read More](https://help.zscaler.com/zpa/about-microtenants) + +To manage a microtenant using the ZPA Terraform provider, the administrator for the parent or default tenant, must first provision the microtenant using the resource `zpa_microtenant_controller`. The resource will output the administrator credentials for the new microtenant, which can then be provided to the microtenant administrator. + +The microtenant administrator can then create his own microtenant API credentials required to authenticate via API to the ZPA platform. From that point, the administrator can then individually manage his own resources in an isolated manner. +When authenticating to microtenant via API using the ZPA Terraform provider, the administrator must provide the following environment variable credentials: `ZPA_CLIENT_ID`, `ZPA_CLIENT_SECRET`, `ZPA_CUSTOMER_ID`, `ZPA_CLOUD`, `ZPA_MICROTENANT_ID` + +~> **NOTE 1** Only environment variables are currently supported when authenticating to a Microtenant. + +~> **NOTE 2** The environment variable `ZPA_MICROTENANT_ID` is mandatory when provisioning/managing resources exclusively within a Microtenant. + +~> **NOTE 3** `ZPA_CLOUD` environment variable is an optional parameter when running this provider in production; however, this parameter is required to provision resources in the `BETA`, `GOV`, `GOVUS`, `PREVIEW` or `ZPATWO` clouds. + +## Support Disclaimer + +-> **Disclaimer:** Please refer to our [General Support Statement](guides/support.md) before proceeding with the use of this provider. You can also refer to our [troubleshooting guide](guides/troubleshooting.md) for guidance on typical problems. diff --git a/docs/resources/zpa_service_edge_assistant_schedule.md b/docs/resources/zpa_service_edge_assistant_schedule.md new file mode 100644 index 00000000..83a3a5c2 --- /dev/null +++ b/docs/resources/zpa_service_edge_assistant_schedule.md @@ -0,0 +1,61 @@ +--- +page_title: "zpa_service_edge_assistant_schedule Resource - terraform-provider-zpa" +subcategory: "Service Edge Controller" +description: |- + Official documentation https://help.zscaler.com/zpa/configuring-app-connectors-settings + documentation https://help.zscaler.com/zpa/configuring-auto-delete-disconnected-app-connectors-using-api + Configures Auto Delete for the specified disconnected Service Edge. +--- + +# zpa_service_edge_assistant_schedule (Resource) + +* [Official documentation](https://help.zscaler.com/zpa/configuring-app-connectors-settings) +* [API documentation](https://help.zscaler.com/zpa/configuring-auto-delete-disconnected-app-connectors-using-api) + +Use the **zpa_service_edge_assistant_schedule** resource sets the scheduled frequency at which the disconnected Service Edges are eligible for deletion. The supported value for frequency is days. The frequencyInterval field is the number of days after an Service Edge disconnects for it to become eligible for deletion. The minimum supported value for frequencyInterval is 5. + +~> **NOTE** - When enabling the Assistant Schedule for the first time, you must provide the `customer_id` information. If you authenticated using environment variables and used `ZPA_CUSTOMER_ID` environment variable, you don't have to define the customer_id attribute in the HCL configuration, and the provider will automatically use the value from the environment variable `ZPA_CUSTOMER_ID` + +## Example Usage - Defined Customer ID Value + +```terraform +resource "zpa_service_edge_assistant_schedule" "this" { + customer_id = "123456789101112" + frequency = "days" + frequency_interval = "5" + enabled = true + delete_disabled = true +} +``` + +## Example Usage - Customer ID Via Environment Variable + +```terraform +resource "zpa_service_edge_assistant_schedule" "this" { + frequency = "days" + frequency_interval = "5" + enabled = true + delete_disabled = true +} +``` + +## Schema + +### Required + +The following arguments are supported: + +- `customer_id` - (String) - When enabling the Assistant Schedule for the first time, you must provide the `customer_id` information. If you authenticated using environment variables and used `ZPA_CUSTOMER_ID` environment variable, you don't have to define the customer_id attribute in the HCL configuration, and the provider will automatically use the value from the environment variable `ZPA_CUSTOMER_ID` +- `frequency_interval` - (String) - The interval for the configured frequency value. The minimum supported value is 5. Supported values are: `5`, `7`, `14`, `30`, `60` and `90` +- `frequency` (String) - The scheduled frequency at which the disconnected Service Edges are deleted. Supported value is: `days` + +### Optional + +In addition to all arguments above, the following attributes are exported: + +- `enabled` (Boolean) - Indicates if the setting for deleting Service Edges is enabled or disabled. Supported values are: `true` or `false` +- `delete_disabled` (Boolean) - Indicates if the Service Edges are included for deletion if they are in a disconnected state based on frequencyInterval and frequency values. Supported values are: `true` or `false` + +## Import + +Import is not currently supported for this resource. \ No newline at end of file diff --git a/go.mod b/go.mod index 40306002..a08a3fdf 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/hashicorp/terraform-plugin-docs v0.19.4 github.com/hashicorp/terraform-plugin-sdk v1.17.2 github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 - github.com/zscaler/zscaler-sdk-go/v2 v2.70.0 + github.com/zscaler/zscaler-sdk-go/v2 v2.72.0 ) require ( @@ -79,9 +79,9 @@ require ( golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect golang.org/x/mod v0.17.0 // indirect golang.org/x/net v0.25.0 // indirect - golang.org/x/sync v0.7.0 // indirect + golang.org/x/sync v0.8.0 // indirect golang.org/x/sys v0.20.0 // indirect - golang.org/x/text v0.16.0 // indirect + golang.org/x/text v0.17.0 // indirect golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect diff --git a/go.sum b/go.sum index a2ea9c0b..90859bef 100644 --- a/go.sum +++ b/go.sum @@ -441,8 +441,8 @@ github.com/zclconf/go-cty v1.14.4/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgr github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b h1:FosyBZYxY34Wul7O/MSKey3txpPYyCqVO5ZyceuQJEI= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= github.com/zclconf/go-cty-yaml v1.0.2/go.mod h1:IP3Ylp0wQpYm50IHK8OZWKMu6sPJIUgKa8XhiVHura0= -github.com/zscaler/zscaler-sdk-go/v2 v2.70.0 h1:pabyVnCNIs+EOSqDK6ROR+8H9HHhrmFfzZPUTdbZ3GY= -github.com/zscaler/zscaler-sdk-go/v2 v2.70.0/go.mod h1:GDYmG+wN13d/chGX6r6T95Gqbqq3UejMxfDud6FORJc= +github.com/zscaler/zscaler-sdk-go/v2 v2.72.0 h1:VJNdLcZjd806cgVLrjvBVOhiNUTO6LC0HTwA/GiIDZw= +github.com/zscaler/zscaler-sdk-go/v2 v2.72.0/go.mod h1:dgtdfvnrFyuv1X3Knv5cjW1DNnQ3z/a4lU3uoYnxwcE= go.abhg.dev/goldmark/frontmatter v0.2.0 h1:P8kPG0YkL12+aYk2yU3xHv4tcXzeVnN+gU0tJ5JnxRw= go.abhg.dev/goldmark/frontmatter v0.2.0/go.mod h1:XqrEkZuM57djk7zrlRUB02x8I5J0px76YjkOzhB4YlU= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -551,8 +551,8 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -613,8 +613,8 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/zpa/resource_zpa_application_segment.go b/zpa/resource_zpa_application_segment.go index fefd63f9..8e38bc50 100644 --- a/zpa/resource_zpa_application_segment.go +++ b/zpa/resource_zpa_application_segment.go @@ -1,6 +1,7 @@ package zpa import ( + "context" "fmt" "log" "strconv" @@ -23,6 +24,20 @@ func resourceApplicationSegment() *schema.Resource { Read: resourceApplicationSegmentRead, Update: resourceApplicationSegmentUpdate, Delete: resourceApplicationSegmentDelete, + CustomizeDiff: func(ctx context.Context, d *schema.ResourceDiff, meta interface{}) error { + // Get the value of the ip_anchored attribute + ipAnchored := d.Get("ip_anchored").(bool) + + // Check if match_style is set + if matchStyle, ok := d.GetOk("match_style"); ok { + // If ip_anchored is true and match_style is set, return an error + if ipAnchored && matchStyle != "" { + return fmt.Errorf("match_style cannot be set when ip_anchored is true") + } + } + + return nil + }, Importer: &schema.ResourceImporter{ State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { client := meta.(*Client) diff --git a/zpa/resource_zpa_application_segment_browser_access.go b/zpa/resource_zpa_application_segment_browser_access.go index 11860c91..badbd07c 100644 --- a/zpa/resource_zpa_application_segment_browser_access.go +++ b/zpa/resource_zpa_application_segment_browser_access.go @@ -148,15 +148,6 @@ func resourceApplicationSegmentBrowserAccess() *schema.Resource { "CONTINUOUS", }, false), }, - "match_style": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringInSlice([]string{ - "EXCLUSIVE", - "INCLUSIVE", - }, false), - }, "icmp_access_type": { Type: schema.TypeString, Optional: true, @@ -357,7 +348,6 @@ func resourceApplicationSegmentBrowserAccessRead(d *schema.ResourceData, meta in _ = d.Set("health_check_type", resp.HealthCheckType) _ = d.Set("is_cname_enabled", resp.IsCnameEnabled) _ = d.Set("ip_anchored", resp.IPAnchored) - _ = d.Set("match_style", resp.MatchStyle) _ = d.Set("microtenant_id", resp.MicroTenantID) _ = d.Set("select_connector_close_to_app", resp.SelectConnectorCloseToApp) _ = d.Set("use_in_dr_mode", resp.UseInDrMode) @@ -462,7 +452,6 @@ func expandBrowserAccess(d *schema.ResourceData, zClient *Client, id string) bro ConfigSpace: d.Get("config_space").(string), ICMPAccessType: d.Get("icmp_access_type").(string), Description: d.Get("description").(string), - MatchStyle: d.Get("match_style").(string), MicroTenantID: d.Get("microtenant_id").(string), DomainNames: SetToStringList(d, "domain_names"), HealthCheckType: d.Get("health_check_type").(string), diff --git a/zpa/resource_zpa_application_segment_inspection.go b/zpa/resource_zpa_application_segment_inspection.go index 173ea073..a2e62402 100644 --- a/zpa/resource_zpa_application_segment_inspection.go +++ b/zpa/resource_zpa_application_segment_inspection.go @@ -131,15 +131,6 @@ func resourceApplicationSegmentInspection() *schema.Resource { "CONTINUOUS", }, false), }, - "match_style": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringInSlice([]string{ - "EXCLUSIVE", - "INCLUSIVE", - }, false), - }, "passive_health_enabled": { Type: schema.TypeBool, Optional: true, @@ -330,7 +321,6 @@ func resourceApplicationSegmentInspectionRead(d *schema.ResourceData, meta inter _ = d.Set("enabled", resp.Enabled) _ = d.Set("passive_health_enabled", resp.PassiveHealthEnabled) _ = d.Set("double_encrypt", resp.DoubleEncrypt) - _ = d.Set("match_style", resp.MatchStyle) _ = d.Set("health_check_type", resp.HealthCheckType) _ = d.Set("is_cname_enabled", resp.IsCnameEnabled) _ = d.Set("icmp_access_type", resp.ICMPAccessType) @@ -437,7 +427,6 @@ func expandInspectionApplicationSegment(d *schema.ResourceData, zClient *Client, Description: d.Get("description").(string), HealthReporting: d.Get("health_reporting").(string), HealthCheckType: d.Get("health_check_type").(string), - MatchStyle: d.Get("match_style").(string), PassiveHealthEnabled: d.Get("passive_health_enabled").(bool), DoubleEncrypt: d.Get("double_encrypt").(bool), Enabled: d.Get("enabled").(bool), diff --git a/zpa/resource_zpa_application_segment_pra.go b/zpa/resource_zpa_application_segment_pra.go index c7fb1682..4278d09b 100644 --- a/zpa/resource_zpa_application_segment_pra.go +++ b/zpa/resource_zpa_application_segment_pra.go @@ -198,15 +198,6 @@ func resourceApplicationSegmentPRA() *schema.Resource { "0", "1", }, false), }, - "match_style": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringInSlice([]string{ - "EXCLUSIVE", - "INCLUSIVE", - }, false), - }, "common_apps_dto": { Type: schema.TypeSet, Optional: true, @@ -366,7 +357,6 @@ func resourceApplicationSegmentPRARead(d *schema.ResourceData, meta interface{}) _ = d.Set("health_check_type", resp.HealthCheckType) _ = d.Set("is_cname_enabled", resp.IsCnameEnabled) _ = d.Set("icmp_access_type", resp.IcmpAccessType) - _ = d.Set("match_style", resp.MatchStyle) _ = d.Set("microtenant_id", resp.MicroTenantID) _ = d.Set("select_connector_close_to_app", resp.SelectConnectorCloseToApp) _ = d.Set("use_in_dr_mode", resp.UseInDrMode) @@ -506,7 +496,6 @@ func expandSRAApplicationSegment(d *schema.ResourceData, client *Client, id stri SelectConnectorCloseToApp: d.Get("select_connector_close_to_app").(bool), UseInDrMode: d.Get("use_in_dr_mode").(bool), TCPKeepAlive: d.Get("tcp_keep_alive").(string), - MatchStyle: d.Get("match_style").(string), IsIncompleteDRConfig: d.Get("is_incomplete_dr_config").(bool), DomainNames: SetToStringList(d, "domain_names"), TCPAppPortRange: []common.NetworkPorts{},