Skip to content

Commit

Permalink
Merge pull request #1181 from citrix/1167-bug-httpsredirecturl-missin…
Browse files Browse the repository at this point in the history
…g-in-the-terraform-provider-for-cs-vserver

Added additional attribute "httpsredirecturl" to csvserver resource
  • Loading branch information
rohit-myali authored Jul 10, 2024
2 parents 649dd25 + 85ec16c commit 3b9ddec
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 2 deletions.
12 changes: 12 additions & 0 deletions citrixadc/resource_citrixadc_csvserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ func resourceCitrixAdcCsvserver() *schema.Resource {
Optional: true,
Computed: true,
},
"httpsredirecturl": {
Type: schema.TypeString,
Optional: true,
Computed: true,
},
"icmpvsrresponse": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -485,6 +490,7 @@ func createCsvserverFunc(d *schema.ResourceData, meta interface{}) error {
Domainname: d.Get("domainname").(string),
Downstateflush: d.Get("downstateflush").(string),
Httpprofilename: d.Get("httpprofilename").(string),
Httpsredirecturl: d.Get("httpsredirecturl").(string),
Icmpvsrresponse: d.Get("icmpvsrresponse").(string),
Insertvserveripport: d.Get("insertvserveripport").(string),
Ipmask: d.Get("ipmask").(string),
Expand Down Expand Up @@ -658,6 +664,7 @@ func readCsvserverFunc(d *schema.ResourceData, meta interface{}) error {
d.Set("domainname", data["domainname"])
d.Set("downstateflush", data["downstateflush"])
d.Set("httpprofilename", data["httpprofilename"])
d.Set("httpsredirecturl", data["httpsredirecturl"])
d.Set("icmpvsrresponse", data["icmpvsrresponse"])
d.Set("insertvserveripport", data["insertvserveripport"])
d.Set("ipmask", data["ipmask"])
Expand Down Expand Up @@ -856,6 +863,11 @@ func updateCsvserverFunc(d *schema.ResourceData, meta interface{}) error {
csvserver.Httpprofilename = d.Get("httpprofilename").(string)
hasChange = true
}
if d.HasChange("httpsredirecturl") {
log.Printf("[DEBUG] netscaler-provider: Httpsredirecturl has changed for csvserver %s, starting update", csvserverName)
csvserver.Httpsredirecturl = d.Get("httpsredirecturl").(string)
hasChange = true
}
if d.HasChange("icmpvsrresponse") {
log.Printf("[DEBUG] netscaler-provider: Icmpvsrresponse has changed for csvserver %s, starting update", csvserverName)
csvserver.Icmpvsrresponse = d.Get("icmpvsrresponse").(string)
Expand Down
1 change: 1 addition & 0 deletions docs/resources/csvserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ resource "citrixadc_csvserver" "tf_csvserver1" {
* `pushlabel` - (Optional) Expression for extracting the label from the response received from server. This string can be either an existing rule name or an inline expression. The service type of the virtual server should be either HTTP or SSL.
* `pushmulticlients` - (Optional) Allow multiple Web 2.0 connections from the same client to connect to the virtual server and expect updates. Possible values: [ YES, NO ]
* `httpprofilename` - (Optional) Name of the HTTP profile containing HTTP configuration settings for the virtual server. The service type of the virtual server should be either HTTP or SSL.
* `httpsredirecturl` - (Optional) URL to which all HTTP traffic received on the port specified in the -redirectFromPort parameter is redirected.
* `dbprofilename` - (Optional) Name of the DB profile.
* `oracleserverversion` - (Optional) Oracle server version. Possible values: [ 10G, 11G ]
* `comment` - (Optional) Information about this virtual server.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/citrix/terraform-provider-citrixadc
go 1.18

require (
github.com/citrix/adc-nitro-go v0.0.0-20240508064526-011d10c8e5b4
github.com/citrix/adc-nitro-go v0.0.0-20240709171840-0d3d1079d092
github.com/gruntwork-io/terratest v0.41.9
github.com/hashicorp/terraform-plugin-sdk v1.17.2
github.com/mitchellh/mapstructure v1.5.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/citrix/adc-nitro-go v0.0.0-20240508064526-011d10c8e5b4 h1:z2BCKSwFOYTy4rkI34lfVuMCmFqOBNzGjL6DzYs8GS4=
github.com/citrix/adc-nitro-go v0.0.0-20240508064526-011d10c8e5b4/go.mod h1:DL1n+MgO15981ahrt+CsQVv43yyUrTdigPq3dIxydD8=
github.com/citrix/adc-nitro-go v0.0.0-20240709171840-0d3d1079d092 h1:PI50Bynj9RIBzg2GK9r3jXQBhtAX21SSYdMB5VgOYFo=
github.com/citrix/adc-nitro-go v0.0.0-20240709171840-0d3d1079d092/go.mod h1:DL1n+MgO15981ahrt+CsQVv43yyUrTdigPq3dIxydD8=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ github.com/bgentry/go-netrc/netrc
# github.com/bgentry/speakeasy v0.1.0
## explicit
github.com/bgentry/speakeasy
# github.com/citrix/adc-nitro-go v0.0.0-20240508064526-011d10c8e5b4
# github.com/citrix/adc-nitro-go v0.0.0-20240709171840-0d3d1079d092
## explicit; go 1.14
github.com/citrix/adc-nitro-go/resource/config/aaa
github.com/citrix/adc-nitro-go/resource/config/adm
Expand Down

0 comments on commit 3b9ddec

Please sign in to comment.