Skip to content

Commit

Permalink
feat: Added Application Segment By Type data Source and Fixes (#455)
Browse files Browse the repository at this point in the history
  • Loading branch information
willguibr authored May 18, 2024
1 parent e98e8f8 commit 75a6e17
Show file tree
Hide file tree
Showing 15 changed files with 403 additions and 54 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## 3.3.0 (May, 17 2024)

### Notes

- Release date: **(May, 17 2024)**
- Supported Terraform version: **v1.x**

### ENHACEMENTS
- [PR #455](https://github.com/zscaler/terraform-provider-zpa/pull/455) Added new data source `zpa_application_segment_by_type`. The data source allows for querying of application segments by type. The ``application_type`` attribute supports the following values: `BROWSER_ACCESS`, `INSPECT`, and `SECURE_REMOTE_ACCESS`

### Bug Fixes
- [PR #455](https://github.com/zscaler/terraform-provider-zpa/pull/455) Fixed resource `zpa_service_edge_group` due to misconfiguration in the importing function.

### Internal Changes
- [PR #454](https://github.com/zscaler/terraform-provider-zpa/pull/454) - Added Support to arbitrary clouds for testing purposes

## 3.2.11 (May, 3 2024)

### Notes
Expand Down
6 changes: 3 additions & 3 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,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.2.11/$(GOOS)_$(GOARCH)
build13: DESTINATION=$(APPDATA)/terraform.d/plugins/$(ZPA_PROVIDER_NAMESPACE)/3.3.0/$(GOOS)_$(GOARCH)
else
build13: DESTINATION=$(HOME)/.terraform.d/plugins/$(ZPA_PROVIDER_NAMESPACE)/3.2.11/$(GOOS)_$(GOARCH)
build13: DESTINATION=$(HOME)/.terraform.d/plugins/$(ZPA_PROVIDER_NAMESPACE)/3.3.0/$(GOOS)_$(GOARCH)
endif
build13: fmtcheck
@echo "==> Installing plugin to $(DESTINATION)"
@mkdir -p $(DESTINATION)
go build -o $(DESTINATION)/terraform-provider-zpa_v3.2.11
go build -o $(DESTINATION)/terraform-provider-zpa_v3.3.0

vet:
@echo "==> Checking source code against go vet and staticcheck"
Expand Down
57 changes: 57 additions & 0 deletions docs/data-sources/zpa_application_segment_by_type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
page_title: "zpa_application_segment_by_type Data Source - terraform-provider-zpa"
subcategory: "Application Segment By Type"
description: |-
Official documentation https://help.zscaler.com/zpa/about-applications
API documentation https://help.zscaler.com/zpa/configuring-application-segments-using-api
Get information about all configured enrollment certificate details.
---

# zpa_application_segment_by_type (Data Source)

* [Official documentation](https://help.zscaler.com/zpa/about-applications)
* [API documentation](https://help.zscaler.com/zpa/configuring-application-segments-using-api)

Use the **zpa_application_segment_by_type** data source to get all configured Application Segments by Access Type (e.g., ``BROWSER_ACCESS``, ``INSPECT``, or ``SECURE_REMOTE_ACCESS``) for the specified customer.

## Example Usage

```terraform
data "zpa_application_segment_by_type" "this" {
application_type = "BROWSER_ACCESS"
}
data "zpa_application_segment_by_type" "this" {
application_type = "INSPECT"
}
data "zpa_application_segment_by_type" "this" {
application_type = "SECURE_REMOTE_ACCESS"
}
```

## Schema

### Required

The following arguments are supported:

* `application_type` - (String) The name of the enrollment certificate to be exported.

### Read-Only

In addition to all arguments above, the following attributes are exported:

* `id` - (String) The unique identifier of the Browser Access, inspection or secure remote access application.
* `app_id` - (String) The unique identifier of the application.
* `name` - (String) The name of the Browser Access, inspection or secure remote access application.
* `enabled` - (bool) Whether the Browser Access, inspection or secure remote access application is enabled or not
* `domain` - (string) The domain of the Browser Access, inspection or secure remote access application
* `application_port` - (string) The port for the Browser Access, inspection or secure remote access application
* `application_protocol` - (string) The protocol for the Browser Access, inspection or secure remote access application

* `certificate_id` - (string) The unique identifier of the Browser Access certificate
* `certificate_name` - (string) The name of the Browser Access certificate
* `microtenant_id` - (string) The unique identifier of the Microtenant for the ZPA tenant. If you are within the Default Microtenant, pass microtenantId as 0 when making requests to retrieve data from the Default Microtenant. Pass microtenantId as null to retrieve data from all customers associated with the tenant
* `microtenant_name` - (string) The name of the Microtenant

18 changes: 17 additions & 1 deletion docs/guides/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,26 @@ Track all ZPA Terraform provider's releases. New resources, features, and bug fi

---

``Last updated: v3.2.11``
``Last updated: v3.3.0``

---

## 3.3.0 (May, 17 2024)

### Notes

- Release date: **(May, 17 2024)**
- Supported Terraform version: **v1.x**

### ENHACEMENTS
- [PR #455](https://github.com/zscaler/terraform-provider-zpa/pull/455) Added new data source `zpa_application_segment_by_type`. The data source allows for querying of application segments by type. The ``application_type`` attribute supports the following values: `BROWSER_ACCESS`, `INSPECT`, and `SECURE_REMOTE_ACCESS`

### Bug Fixes
- [PR #455](https://github.com/zscaler/terraform-provider-zpa/pull/455) Fixed resource `zpa_service_edge_group` due to misconfiguration in the importing function.

### Internal Changes
- [PR #454](https://github.com/zscaler/terraform-provider-zpa/pull/454) - Added Support to arbitrary clouds for testing purposes

## 3.2.11 (May, 3 2024)

### Notes
Expand Down
28 changes: 28 additions & 0 deletions examples/zpa_application_segment_by_type/datasource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Retrieves ALL application segments by type
data "zpa_application_segment_by_type" "this" {
application_type = "BROWSER_ACCESS"
}

data "zpa_application_segment_by_type" "this" {
application_type = "INSPECT"
}

data "zpa_application_segment_by_type" "this" {
application_type = "SECURE_REMOTE_ACCESS"
}

# Retrieves ALL application segment names by type
data "zpa_application_segment_by_type" "this" {
application_type = "BROWSER_ACCESS"
name = "ba_app01"
}

data "zpa_application_segment_by_type" "this" {
application_type = "INSPECT"
name = "inspect_app01"
}

data "zpa_application_segment_by_type" "this" {
application_type = "SECURE_REMOTE_ACCESS"
name = "pra_app01"
}
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ require (
github.com/fabiotavarespr/iso3166 v0.0.2
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
github.com/hashicorp/go-hclog v1.6.3
github.com/hashicorp/terraform-plugin-docs v0.19.2
github.com/hashicorp/terraform-plugin-docs v0.19.1
github.com/hashicorp/terraform-plugin-sdk v1.17.2
github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0
github.com/zscaler/zscaler-sdk-go/v2 v2.5.0
github.com/zscaler/zscaler-sdk-go/v2 v2.5.2
)

require (
Expand Down Expand Up @@ -43,7 +43,7 @@ require (
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.6.0 // indirect
github.com/hashicorp/go-retryablehttp v0.7.5 // indirect
github.com/hashicorp/go-retryablehttp v0.7.6 // 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.6.4 // indirect
Expand Down Expand Up @@ -73,15 +73,15 @@ require (
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/yuin/goldmark v1.7.1 // indirect
github.com/yuin/goldmark v1.7.0 // indirect
github.com/yuin/goldmark-meta v1.1.0 // indirect
github.com/zclconf/go-cty v1.14.4 // indirect
go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/tools v0.13.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
Expand Down
20 changes: 10 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9
github.com/hashicorp/go-plugin v1.3.0/go.mod h1:F9eH4LrE/ZsRdbwhfjs9k9HoDUwAHnYtXdgmf1AVNs0=
github.com/hashicorp/go-plugin v1.6.0 h1:wgd4KxHJTVGGqWBq4QPB1i5BZNEx9BR8+OFmHDmTk8A=
github.com/hashicorp/go-plugin v1.6.0/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI=
github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT9yvm0e+Nd5M=
github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8=
github.com/hashicorp/go-retryablehttp v0.7.6 h1:TwRYfx2z2C4cLbXmT8I5PgP/xmuqASDyiVuGYfs9GZM=
github.com/hashicorp/go-retryablehttp v0.7.6/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk=
github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I=
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
Expand Down Expand Up @@ -260,8 +260,8 @@ github.com/hashicorp/terraform-exec v0.20.0/go.mod h1:ckKGkJWbsNqFKV1itgMnE0hY9I
github.com/hashicorp/terraform-json v0.10.0/go.mod h1:3defM4kkMfttwiE7VakJDwCd4R+umhSQnvJwORXbprE=
github.com/hashicorp/terraform-json v0.21.0 h1:9NQxbLNqPbEMze+S6+YluEdXgJmhQykRyRNd+zTI05U=
github.com/hashicorp/terraform-json v0.21.0/go.mod h1:qdeBs11ovMzo5puhrRibdD6d2Dq6TyE/28JiU4tIQxk=
github.com/hashicorp/terraform-plugin-docs v0.19.2 h1:YjdKa1vuqt9EnPYkkrv9HnGZz175HhSJ7Vsn8yZeWus=
github.com/hashicorp/terraform-plugin-docs v0.19.2/go.mod h1:gad2aP6uObFKhgNE8DR9nsEuEQnibp7il0jZYYOunWY=
github.com/hashicorp/terraform-plugin-docs v0.19.1 h1:XYIlGCfnUDVTyKPIHFKRDfB4INU+pyPKk6VZ/1apPIc=
github.com/hashicorp/terraform-plugin-docs v0.19.1/go.mod h1:NPfKCSfzTtq+YCFHr2qTAMknWUxR8C4KgTbGkHULSV8=
github.com/hashicorp/terraform-plugin-go v0.22.0 h1:1OS1Jk5mO0f5hrziWJGXXIxBrMe2j/B8E+DVGw43Xmc=
github.com/hashicorp/terraform-plugin-go v0.22.0/go.mod h1:mPULV91VKss7sik6KFEcEu7HuTogMLLO/EvWCuFkRVE=
github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0=
Expand Down Expand Up @@ -428,8 +428,8 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yuin/goldmark v1.7.1 h1:3bajkSilaCbjdKVsKdZjZCLBNPL9pYzrCakKaf4U49U=
github.com/yuin/goldmark v1.7.1/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=
github.com/yuin/goldmark v1.7.0 h1:EfOIvIMZIzHdB/R/zVrikYLPPwJlfMcNczJFMs1m6sA=
github.com/yuin/goldmark v1.7.0/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=
github.com/yuin/goldmark-meta v1.1.0 h1:pWw+JLHGZe8Rk0EGsMVssiNb/AaPMHfSRszZeUeiOUc=
github.com/yuin/goldmark-meta v1.1.0/go.mod h1:U4spWENafuA7Zyg+Lj5RqK/MF+ovMYtBvXi1lBb2VP0=
github.com/zclconf/go-cty v1.0.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s=
Expand All @@ -441,8 +441,8 @@ github.com/zclconf/go-cty v1.14.4 h1:uXXczd9QDGsgu0i/QFR/hzI5NYCHLf6NQw/atrbnhq8
github.com/zclconf/go-cty v1.14.4/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE=
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.5.0 h1:HMbSSdsdtOpbSXw7+zvgqeRVLu888Ofasm7/IiFiFWI=
github.com/zscaler/zscaler-sdk-go/v2 v2.5.0/go.mod h1:fg09cxBT9mpphzOPpE0iGBpOudhbwPtFAtNkBoXTJ54=
github.com/zscaler/zscaler-sdk-go/v2 v2.5.2 h1:R6BSrfVPptaJAAU8o2ZxIOWsA6WDvh7PsKX5gF6GNcY=
github.com/zscaler/zscaler-sdk-go/v2 v2.5.2/go.mod h1:ORk1VkYcUqRb5Ipg3h3kKacdwbbPydKL43Ku+AQjAr0=
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=
Expand Down Expand Up @@ -597,8 +597,8 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
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/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
Expand Down
3 changes: 3 additions & 0 deletions zpa/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/zscaler/zscaler-sdk-go/v2/zpa/services/appconnectorcontroller"
"github.com/zscaler/zscaler-sdk-go/v2/zpa/services/appconnectorgroup"
"github.com/zscaler/zscaler-sdk-go/v2/zpa/services/applicationsegment"
"github.com/zscaler/zscaler-sdk-go/v2/zpa/services/applicationsegmentbytype"
"github.com/zscaler/zscaler-sdk-go/v2/zpa/services/applicationsegmentinspection"
"github.com/zscaler/zscaler-sdk-go/v2/zpa/services/applicationsegmentpra"
"github.com/zscaler/zscaler-sdk-go/v2/zpa/services/appservercontroller"
Expand Down Expand Up @@ -60,6 +61,7 @@ type Client struct {
applicationsegment applicationsegment.Service
applicationsegmentpra applicationsegmentpra.Service
applicationsegmentinspection applicationsegmentinspection.Service
applicationsegmentbytype applicationsegmentbytype.Service
appservercontroller appservercontroller.Service
bacertificate bacertificate.Service
browseraccess browseraccess.Service
Expand Down Expand Up @@ -129,6 +131,7 @@ func (c *Config) Client() (*Client, error) {
applicationsegment: *applicationsegment.New(zpaClient),
applicationsegmentpra: *applicationsegmentpra.New(zpaClient),
applicationsegmentinspection: *applicationsegmentinspection.New(zpaClient),
applicationsegmentbytype: *applicationsegmentbytype.New(zpaClient),
appservercontroller: *appservercontroller.New(zpaClient),
bacertificate: *bacertificate.New(zpaClient),
browseraccess: *browseraccess.New(zpaClient),
Expand Down
119 changes: 119 additions & 0 deletions zpa/data_source_zpa_application_segment_by_type.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
package zpa

import (
"fmt"
"log"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

func dataSourceApplicationSegmentByType() *schema.Resource {
return &schema.Resource{
Read: dataSourceApplicationSegmentByTypeRead,
Schema: map[string]*schema.Schema{
"id": {
Type: schema.TypeString,
Computed: true,
Description: "The unique identifier of the Browser Access application",
},
"app_id": {
Type: schema.TypeString,
Computed: true,
Description: "The unique identifier of the application",
},
"name": {
Type: schema.TypeString,
Optional: true,
Description: "The name of the Browser Access application",
},
"application_type": {
Type: schema.TypeString,
Required: true,
Description: "The type of application, BROWSER_ACCESS, INSPECT or SECURE_REMOTE_ACCESS",
},
"enabled": {
Type: schema.TypeBool,
Computed: true,
Description: "Whether the Browser Access application is enabled or not",
},
"domain": {
Type: schema.TypeString,
Computed: true,
Description: "The domain of the Browser Access application",
},
"application_port": {
Type: schema.TypeString,
Computed: true,
Description: "The port for the Browser Access application",
},
"application_protocol": {
Type: schema.TypeString,
Computed: true,
Description: "The protocol for the Browser Access application",
},
"certificate_id": {
Type: schema.TypeString,
Computed: true,
Description: "The unique identifier of the Browser Access certificate",
},
"certificate_name": {
Type: schema.TypeString,
Computed: true,
Description: "The name of the Browser Access certificate",
},
"microtenant_id": {
Type: schema.TypeString,
Optional: true,
Description: "The unique identifier of the Microtenant for the ZPA tenant. If you are within the Default Microtenant, pass microtenantId as 0 when making requests to retrieve data from the Default Microtenant. Pass microtenantId as null to retrieve data from all customers associated with the tenant",
},
"microtenant_name": {
Type: schema.TypeString,
Computed: true,
Description: "The name of the Microtenant",
},
},
}
}

func dataSourceApplicationSegmentByTypeRead(d *schema.ResourceData, m interface{}) error {
client := m.(*Client)
service := client.applicationsegmentbytype.WithMicroTenant(GetString(d.Get("microtenant_id")))

applicationType := d.Get("application_type").(string)
if applicationType != "BROWSER_ACCESS" && applicationType != "SECURE_REMOTE_ACCESS" && applicationType != "INSPECT" {
return fmt.Errorf("invalid application_type '%s'. Valid types are 'BROWSER_ACCESS', 'SECURE_REMOTE_ACCESS', 'INSPECT'", applicationType)
}

name := d.Get("name").(string)
log.Printf("[INFO] Getting data for application segment with type %s", applicationType)
if name != "" {
log.Printf("[INFO] Getting data for application segment with name %s and type %s", name, applicationType)
}

// Call the SDK function
resp, _, err := service.GetByApplicationType(name, applicationType, true)
if err != nil {
return err
}

if len(resp) == 0 {
return fmt.Errorf("no application segment found for name '%s' and type '%s'", name, applicationType)
}

// Assuming we are only interested in the first result for simplicity
appSegment := resp[0]

d.SetId(appSegment.ID)
_ = d.Set("app_id", appSegment.AppID)
_ = d.Set("name", appSegment.Name)
_ = d.Set("enabled", appSegment.Enabled)
_ = d.Set("domain", appSegment.Domain)
_ = d.Set("application_port", appSegment.ApplicationPort)
_ = d.Set("application_protocol", appSegment.ApplicationProtocol)
_ = d.Set("certificate_id", appSegment.CertificateID)
_ = d.Set("certificate_name", appSegment.CertificateName)
_ = d.Set("microtenant_id", appSegment.MicroTenantID)
_ = d.Set("microtenant_name", appSegment.MicroTenantName)

return nil
}
Loading

0 comments on commit 75a6e17

Please sign in to comment.