Skip to content

Commit 9961167

Browse files
committed
init/updateFortiADCTerraform: 1.3.1
Signed-off-by: FTNT-HQCM <hq-devops-admin@fortinet.com>
1 parent 14b36b7 commit 9961167

12 files changed

Lines changed: 703 additions & 30 deletions

.goreleaser.yml

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,39 @@
11
# Visit https://goreleaser.com for documentation on how to customize this
22
# behavior.
3+
version: 2
34
before:
45
hooks:
56
# this is just an example and not a requirement for provider building/publishing
67
- go mod tidy
78
project_name: terraform-provider-fortiadc
89
builds:
9-
- env:
10-
# goreleaser does not work with CGO, it could also complicate
11-
# usage by users in CI/CD systems like Terraform Cloud where
12-
# they are unable to install libraries.
13-
- CGO_ENABLED=0
14-
mod_timestamp: '{{ .CommitTimestamp }}'
15-
flags:
16-
- -trimpath
17-
ldflags:
18-
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
19-
goos:
20-
- freebsd
21-
- windows
22-
- linux
23-
- darwin
24-
goarch:
25-
- amd64
26-
- '386'
27-
- arm
28-
- arm64
29-
ignore:
30-
- goos: darwin
31-
goarch: '386'
32-
binary: '{{ .ProjectName }}_v{{ .Version }}'
10+
- env:
11+
# goreleaser does not work with CGO, it could also complicate
12+
# usage by users in CI/CD systems like Terraform Cloud where
13+
# they are unable to install libraries.
14+
- CGO_ENABLED=0
15+
mod_timestamp: '{{ .CommitTimestamp }}'
16+
flags:
17+
- -trimpath
18+
ldflags:
19+
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
20+
goos:
21+
- freebsd
22+
- windows
23+
- linux
24+
- darwin
25+
goarch:
26+
- amd64
27+
- '386'
28+
- arm
29+
- arm64
30+
ignore:
31+
- goos: darwin
32+
goarch: '386'
33+
binary: '{{ .ProjectName }}_v{{ .Version }}'
3334
archives:
34-
- format: zip
35-
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
35+
- format: zip
36+
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
3637
checksum:
3738
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
3839
algorithm: sha256
@@ -52,4 +53,4 @@ release:
5253
# Visit your project's GitHub Releases page to publish this release.
5354
draft: true
5455
changelog:
55-
skip: true
56+
disable: true

GNUmakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PKG_NAME=fortiadc
66
default: build
77

88
build: fmtcheck
9-
go install -buildvcs=false
9+
CGO_ENABLED=0 go install -buildvcs=false
1010

1111
test: fmtcheck
1212
go test -i $(TEST) || exit 1

adc-sdk/sdkcore/act_func.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3489,6 +3489,25 @@ func (c *FortiSDKClient) ReadLoadBalanceVirtualServer(mkey string, vdom string)
34893489
return
34903490
}
34913491

3492+
func (c *FortiSDKClient) UpdateLoadBalanceVirtualServerContentRoutingAttach(params *map[string]interface{}, mkey string, vdom string) (output map[string]interface{}, err error) {
3493+
HTTPMethod := "PUT"
3494+
path := "/api/load_balance_virtual_server"
3495+
path += "?mkey=" + escapeURLString(mkey)
3496+
output = make(map[string]interface{})
3497+
3498+
err = createUpdate(c, HTTPMethod, path, params, output, vdom)
3499+
return
3500+
}
3501+
3502+
func (c *FortiSDKClient) ReadLoadBalanceVirtualServerContentRoutingAttach(mkey string, vdom string) (mapTmp map[string]interface{}, err error) {
3503+
HTTPMethod := "GET"
3504+
path := "/api/load_balance_virtual_server"
3505+
path += "?mkey=" + escapeURLString(mkey)
3506+
3507+
mapTmp, err = read(c, HTTPMethod, path, false, vdom)
3508+
return
3509+
}
3510+
34923511
func (c *FortiSDKClient) CreateLoadBalanceProfileChildMysqlUserPassword(pkey string, params *map[string]interface{}, vdom string) (output map[string]interface{}, err error) {
34933512
HTTPMethod := "POST"
34943513
path := "/api/load_balance_profile_child_mysql_user_password"

fadc/data_source_load_balance_http2_profile.go

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,36 @@ func dataSourceLoadBalanceHttp2Profile() *schema.Resource {
5050
Type: schema.TypeString,
5151
Computed: true,
5252
},
53+
"backend_http2": &schema.Schema{
54+
Type: schema.TypeString,
55+
Computed: true,
56+
Optional: true,
57+
},
58+
"backend_max_receive_window": &schema.Schema{
59+
Type: schema.TypeString,
60+
Computed: true,
61+
Optional: true,
62+
},
63+
"backend_concurrent_stream": &schema.Schema{
64+
Type: schema.TypeString,
65+
Computed: true,
66+
Optional: true,
67+
},
68+
"backend_proto_mode_https": &schema.Schema{
69+
Type: schema.TypeString,
70+
Computed: true,
71+
Optional: true,
72+
},
73+
"backend_proto_mode_http": &schema.Schema{
74+
Type: schema.TypeString,
75+
Computed: true,
76+
Optional: true,
77+
},
78+
"backend_multiplex_mode": &schema.Schema{
79+
Type: schema.TypeString,
80+
Computed: true,
81+
Optional: true,
82+
},
5383
"vdom": &schema.Schema{
5484
Type: schema.TypeString,
5585
Optional: true,
@@ -134,6 +164,30 @@ func dataSourceFlattenLoadBalanceHttp2ProfileMaxHeaderListSize(v interface{}, d
134164
return v
135165
}
136166

167+
func dataSourceFlattenLoadBalanceHttp2ProfileBackendHttp2(v interface{}, d *schema.ResourceData, pre string) interface{} {
168+
return v
169+
}
170+
171+
func dataSourceFlattenLoadBalanceHttp2ProfileBackendMaxReceiveWindow(v interface{}, d *schema.ResourceData, pre string) interface{} {
172+
return v
173+
}
174+
175+
func dataSourceFlattenLoadBalanceHttp2ProfileBackendConcurrentStream(v interface{}, d *schema.ResourceData, pre string) interface{} {
176+
return v
177+
}
178+
179+
func dataSourceFlattenLoadBalanceHttp2ProfileBackendProtoModeHttps(v interface{}, d *schema.ResourceData, pre string) interface{} {
180+
return v
181+
}
182+
183+
func dataSourceFlattenLoadBalanceHttp2ProfileBackendProtoModeHttp(v interface{}, d *schema.ResourceData, pre string) interface{} {
184+
return v
185+
}
186+
187+
func dataSourceFlattenLoadBalanceHttp2ProfileBackendMultiplexMode(v interface{}, d *schema.ResourceData, pre string) interface{} {
188+
return v
189+
}
190+
137191
func dataSourceRefreshObjectLoadBalanceHttp2Profile(d *schema.ResourceData, o map[string]interface{}) error {
138192
var err error
139193

@@ -191,5 +245,41 @@ func dataSourceRefreshObjectLoadBalanceHttp2Profile(d *schema.ResourceData, o ma
191245
}
192246
}
193247

248+
if err = d.Set("backend_http2", dataSourceFlattenLoadBalanceHttp2ProfileBackendHttp2(o["backend_http2"], d, "backend_http2")); err != nil {
249+
if !fortiAPIPatch(o["backend_http2"]) {
250+
return fmt.Errorf("Error reading backend_http2: %v", err)
251+
}
252+
}
253+
254+
if err = d.Set("backend_max_receive_window", dataSourceFlattenLoadBalanceHttp2ProfileBackendMaxReceiveWindow(o["backend_max_receive_window"], d, "backend_max_receive_window")); err != nil {
255+
if !fortiAPIPatch(o["backend_max_receive_window"]) {
256+
return fmt.Errorf("Error reading backend_max_receive_window: %v", err)
257+
}
258+
}
259+
260+
if err = d.Set("backend_concurrent_stream", dataSourceFlattenLoadBalanceHttp2ProfileBackendConcurrentStream(o["backend_concurrent_stream"], d, "backend_concurrent_stream")); err != nil {
261+
if !fortiAPIPatch(o["backend_concurrent_stream"]) {
262+
return fmt.Errorf("Error reading backend_concurrent_stream: %v", err)
263+
}
264+
}
265+
266+
if err = d.Set("backend_proto_mode_https", dataSourceFlattenLoadBalanceHttp2ProfileBackendProtoModeHttps(o["backend_proto_mode_https"], d, "backend_proto_mode_https")); err != nil {
267+
if !fortiAPIPatch(o["backend_proto_mode_https"]) {
268+
return fmt.Errorf("Error reading backend_proto_mode_https: %v", err)
269+
}
270+
}
271+
272+
if err = d.Set("backend_proto_mode_http", dataSourceFlattenLoadBalanceHttp2ProfileBackendProtoModeHttp(o["backend_proto_mode_http"], d, "backend_proto_mode_http")); err != nil {
273+
if !fortiAPIPatch(o["backend_proto_mode_http"]) {
274+
return fmt.Errorf("Error reading backend_proto_mode_http: %v", err)
275+
}
276+
}
277+
278+
if err = d.Set("backend_multiplex_mode", dataSourceFlattenLoadBalanceHttp2ProfileBackendMultiplexMode(o["backend_multiplex_mode"], d, "backend_multiplex_mode")); err != nil {
279+
if !fortiAPIPatch(o["backend_multiplex_mode"]) {
280+
return fmt.Errorf("Error reading backend_multiplex_mode: %v", err)
281+
}
282+
}
283+
194284
return nil
195285
}

fadc/provider.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ func Provider() *schema.Provider {
522522
"fortiadc_load_balance_content_rewriting": resourceLoadBalanceContentRewriting(),
523523
"fortiadc_user_adfs_publish": resourceUserAdfsPublish(),
524524
"fortiadc_load_balance_virtual_server": resourceLoadBalanceVirtualServer(),
525+
"fortiadc_load_balance_virtual_server_content_routing_attach": resourceLoadBalanceVirtualServerContentRoutingAttach(),
525526
"fortiadc_load_balance_profile_child_mysql_user_password": resourceLoadBalanceProfileChildMysqlUserPassword(),
526527
"fortiadc_load_balance_caching": resourceLoadBalanceCaching(),
527528
"fortiadc_router_md5_ospf": resourceRouterMd5Ospf(),

0 commit comments

Comments
 (0)