From 888f063d4787028ea6e0fa6f81b4a9496a97d991 Mon Sep 17 00:00:00 2001 From: George Nikolopoulos Date: Wed, 29 Sep 2021 11:30:28 +0300 Subject: [PATCH 1/3] Update nshttpprofile resource --- citrixadc/resource_citrixadc_nshttpprofile.go | 272 +++++++++++++++--- 1 file changed, 232 insertions(+), 40 deletions(-) diff --git a/citrixadc/resource_citrixadc_nshttpprofile.go b/citrixadc/resource_citrixadc_nshttpprofile.go index 4af69edf1..c06db3ba9 100644 --- a/citrixadc/resource_citrixadc_nshttpprofile.go +++ b/citrixadc/resource_citrixadc_nshttpprofile.go @@ -21,11 +21,6 @@ func resourceCitrixAdcNshttpprofile() *schema.Resource { State: schema.ImportStatePassthrough, }, Schema: map[string]*schema.Schema{ - "name": &schema.Schema{ - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, "adpttimeout": &schema.Schema{ Type: schema.TypeString, Optional: true, @@ -36,6 +31,11 @@ func resourceCitrixAdcNshttpprofile() *schema.Resource { Optional: true, Computed: true, }, + "altsvcvalue": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "apdexcltresptimethreshold": &schema.Schema{ Type: schema.TypeInt, Optional: true, @@ -71,11 +71,31 @@ func resourceCitrixAdcNshttpprofile() *schema.Resource { Optional: true, Computed: true, }, + "grpcholdlimit": &schema.Schema{ + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + "grpcholdtimeout": &schema.Schema{ + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + "grpclengthdelimitation": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "http2": &schema.Schema{ Type: schema.TypeString, Optional: true, Computed: true, }, + "http2altsvcframe": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "http2direct": &schema.Schema{ Type: schema.TypeString, Optional: true, @@ -86,6 +106,11 @@ func resourceCitrixAdcNshttpprofile() *schema.Resource { Optional: true, Computed: true, }, + "http2initialconnwindowsize": &schema.Schema{ + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, "http2initialwindowsize": &schema.Schema{ Type: schema.TypeInt, Optional: true, @@ -96,6 +121,11 @@ func resourceCitrixAdcNshttpprofile() *schema.Resource { Optional: true, Computed: true, }, + "http2maxemptyframespermin": &schema.Schema{ + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, "http2maxframesize": &schema.Schema{ Type: schema.TypeInt, Optional: true, @@ -106,6 +136,21 @@ func resourceCitrixAdcNshttpprofile() *schema.Resource { Optional: true, Computed: true, }, + "http2maxpingframespermin": &schema.Schema{ + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + "http2maxresetframespermin": &schema.Schema{ + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + "http2maxsettingsframespermin": &schema.Schema{ + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, "http2minseverconn": &schema.Schema{ Type: schema.TypeInt, Optional: true, @@ -116,6 +161,26 @@ func resourceCitrixAdcNshttpprofile() *schema.Resource { Optional: true, Computed: true, }, + "http3": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "http3maxheaderblockedstreams": &schema.Schema{ + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + "http3maxheaderfieldsectionsize": &schema.Schema{ + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + "http3maxheadertablesize": &schema.Schema{ + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, "incomphdrdelay": &schema.Schema{ Type: schema.TypeInt, Optional: true, @@ -131,6 +196,16 @@ func resourceCitrixAdcNshttpprofile() *schema.Resource { Optional: true, Computed: true, }, + "markhttpheaderextrawserror": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "markrfc7230noncompliantinval": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "marktracereqinval": &schema.Schema{ Type: schema.TypeString, Optional: true, @@ -156,6 +231,11 @@ func resourceCitrixAdcNshttpprofile() *schema.Resource { Optional: true, Computed: true, }, + "name": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, "persistentetag": &schema.Schema{ Type: schema.TypeString, Optional: true, @@ -206,41 +286,57 @@ func createNshttpprofileFunc(d *schema.ResourceData, meta interface{}) error { nshttpprofileName := d.Get("name").(string) nshttpprofile := ns.Nshttpprofile{ - Name: nshttpprofileName, - Adpttimeout: d.Get("adpttimeout").(string), - Altsvc: d.Get("altsvc").(string), - Apdexcltresptimethreshold: d.Get("apdexcltresptimethreshold").(int), - Clientiphdrexpr: d.Get("clientiphdrexpr").(string), - Cmponpush: d.Get("cmponpush").(string), - Conmultiplex: d.Get("conmultiplex").(string), - Dropextracrlf: d.Get("dropextracrlf").(string), - Dropextradata: d.Get("dropextradata").(string), - Dropinvalreqs: d.Get("dropinvalreqs").(string), - Http2: d.Get("http2").(string), - Http2direct: d.Get("http2direct").(string), - Http2headertablesize: d.Get("http2headertablesize").(int), - Http2initialwindowsize: d.Get("http2initialwindowsize").(int), - Http2maxconcurrentstreams: d.Get("http2maxconcurrentstreams").(int), - Http2maxframesize: d.Get("http2maxframesize").(int), - Http2maxheaderlistsize: d.Get("http2maxheaderlistsize").(int), - Http2minseverconn: d.Get("http2minseverconn").(int), - Http2strictcipher: d.Get("http2strictcipher").(string), - Incomphdrdelay: d.Get("incomphdrdelay").(int), - Markconnreqinval: d.Get("markconnreqinval").(string), - Markhttp09inval: d.Get("markhttp09inval").(string), - Marktracereqinval: d.Get("marktracereqinval").(string), - Maxheaderlen: d.Get("maxheaderlen").(int), - Maxreq: d.Get("maxreq").(int), - Maxreusepool: d.Get("maxreusepool").(int), - Minreusepool: d.Get("minreusepool").(int), - Persistentetag: d.Get("persistentetag").(string), - Reqtimeout: d.Get("reqtimeout").(int), - Reqtimeoutaction: d.Get("reqtimeoutaction").(string), - Reusepooltimeout: d.Get("reusepooltimeout").(int), - Rtsptunnel: d.Get("rtsptunnel").(string), - Spdy: d.Get("spdy").(string), - Weblog: d.Get("weblog").(string), - Websocket: d.Get("websocket").(string), + Adpttimeout: d.Get("adpttimeout").(string), + Altsvc: d.Get("altsvc").(string), + Altsvcvalue: d.Get("altsvcvalue").(string), + Apdexcltresptimethreshold: d.Get("apdexcltresptimethreshold").(int), + Clientiphdrexpr: d.Get("clientiphdrexpr").(string), + Cmponpush: d.Get("cmponpush").(string), + Conmultiplex: d.Get("conmultiplex").(string), + Dropextracrlf: d.Get("dropextracrlf").(string), + Dropextradata: d.Get("dropextradata").(string), + Dropinvalreqs: d.Get("dropinvalreqs").(string), + Grpcholdlimit: d.Get("grpcholdlimit").(int), + Grpcholdtimeout: d.Get("grpcholdtimeout").(int), + Grpclengthdelimitation: d.Get("grpclengthdelimitation").(string), + Http2: d.Get("http2").(string), + Http2altsvcframe: d.Get("http2altsvcframe").(string), + Http2direct: d.Get("http2direct").(string), + Http2headertablesize: d.Get("http2headertablesize").(int), + Http2initialconnwindowsize: d.Get("http2initialconnwindowsize").(int), + Http2initialwindowsize: d.Get("http2initialwindowsize").(int), + Http2maxconcurrentstreams: d.Get("http2maxconcurrentstreams").(int), + Http2maxemptyframespermin: d.Get("http2maxemptyframespermin").(int), + Http2maxframesize: d.Get("http2maxframesize").(int), + Http2maxheaderlistsize: d.Get("http2maxheaderlistsize").(int), + Http2maxpingframespermin: d.Get("http2maxpingframespermin").(int), + Http2maxresetframespermin: d.Get("http2maxresetframespermin").(int), + Http2maxsettingsframespermin: d.Get("http2maxsettingsframespermin").(int), + Http2minseverconn: d.Get("http2minseverconn").(int), + Http2strictcipher: d.Get("http2strictcipher").(string), + Http3: d.Get("http3").(string), + Http3maxheaderblockedstreams: d.Get("http3maxheaderblockedstreams").(int), + Http3maxheaderfieldsectionsize: d.Get("http3maxheaderfieldsectionsize").(int), + Http3maxheadertablesize: d.Get("http3maxheadertablesize").(int), + Incomphdrdelay: d.Get("incomphdrdelay").(int), + Markconnreqinval: d.Get("markconnreqinval").(string), + Markhttp09inval: d.Get("markhttp09inval").(string), + Markhttpheaderextrawserror: d.Get("markhttpheaderextrawserror").(string), + Markrfc7230noncompliantinval: d.Get("markrfc7230noncompliantinval").(string), + Marktracereqinval: d.Get("marktracereqinval").(string), + Maxheaderlen: d.Get("maxheaderlen").(int), + Maxreq: d.Get("maxreq").(int), + Maxreusepool: d.Get("maxreusepool").(int), + Minreusepool: d.Get("minreusepool").(int), + Name: d.Get("name").(string), + Persistentetag: d.Get("persistentetag").(string), + Reqtimeout: d.Get("reqtimeout").(int), + Reqtimeoutaction: d.Get("reqtimeoutaction").(string), + Reusepooltimeout: d.Get("reusepooltimeout").(int), + Rtsptunnel: d.Get("rtsptunnel").(string), + Spdy: d.Get("spdy").(string), + Weblog: d.Get("weblog").(string), + Websocket: d.Get("websocket").(string), } _, err := client.AddResource(service.Nshttpprofile.Type(), nshttpprofileName, &nshttpprofile) @@ -272,6 +368,7 @@ func readNshttpprofileFunc(d *schema.ResourceData, meta interface{}) error { d.Set("name", data["name"]) d.Set("adpttimeout", data["adpttimeout"]) d.Set("altsvc", data["altsvc"]) + d.Set("altsvcvalue", data["altsvcvalue"]) d.Set("apdexcltresptimethreshold", data["apdexcltresptimethreshold"]) d.Set("clientiphdrexpr", data["clientiphdrexpr"]) d.Set("cmponpush", data["cmponpush"]) @@ -279,18 +376,33 @@ func readNshttpprofileFunc(d *schema.ResourceData, meta interface{}) error { d.Set("dropextracrlf", data["dropextracrlf"]) d.Set("dropextradata", data["dropextradata"]) d.Set("dropinvalreqs", data["dropinvalreqs"]) + d.Set("grpcholdlimit", data["grpcholdlimit"]) + d.Set("grpcholdtimeout", data["grpcholdtimeout"]) + d.Set("grpclengthdelimitation", data["grpclengthdelimitation"]) d.Set("http2", data["http2"]) + d.Set("http2altsvcframe", data["http2altsvcframe"]) d.Set("http2direct", data["http2direct"]) d.Set("http2headertablesize", data["http2headertablesize"]) + d.Set("http2initialconnwindowsize", data["http2initialconnwindowsize"]) d.Set("http2initialwindowsize", data["http2initialwindowsize"]) d.Set("http2maxconcurrentstreams", data["http2maxconcurrentstreams"]) + d.Set("http2maxemptyframespermin", data["http2maxemptyframespermin"]) d.Set("http2maxframesize", data["http2maxframesize"]) d.Set("http2maxheaderlistsize", data["http2maxheaderlistsize"]) + d.Set("http2maxpingframespermin", data["http2maxpingframespermin"]) + d.Set("http2maxresetframespermin", data["http2maxresetframespermin"]) + d.Set("http2maxsettingsframespermin", data["http2maxsettingsframespermin"]) d.Set("http2minseverconn", data["http2minseverconn"]) d.Set("http2strictcipher", data["http2strictcipher"]) + d.Set("http3", data["http3"]) + d.Set("http3maxheaderblockedstreams", data["http3maxheaderblockedstreams"]) + d.Set("http3maxheaderfieldsectionsize", data["http3maxheaderfieldsectionsize"]) + d.Set("http3maxheadertablesize", data["http3maxheadertablesize"]) d.Set("incomphdrdelay", data["incomphdrdelay"]) d.Set("markconnreqinval", data["markconnreqinval"]) d.Set("markhttp09inval", data["markhttp09inval"]) + d.Set("markhttpheaderextrawserror", data["markhttpheaderextrawserror"]) + d.Set("markrfc7230noncompliantinval", data["markrfc7230noncompliantinval"]) d.Set("marktracereqinval", data["marktracereqinval"]) d.Set("maxheaderlen", data["maxheaderlen"]) d.Set("maxreq", data["maxreq"]) @@ -329,6 +441,11 @@ func updateNshttpprofileFunc(d *schema.ResourceData, meta interface{}) error { nshttpprofile.Altsvc = d.Get("altsvc").(string) hasChange = true } + if d.HasChange("altsvcvalue") { + log.Printf("[DEBUG] citrixadc-provider: Altsvcvalue has changed for nshttpprofile %s, starting update", nshttpprofileName) + nshttpprofile.Altsvcvalue = d.Get("altsvcvalue").(string) + hasChange = true + } if d.HasChange("apdexcltresptimethreshold") { log.Printf("[DEBUG] citrixadc-provider: Apdexcltresptimethreshold has changed for nshttpprofile %s, starting update", nshttpprofileName) nshttpprofile.Apdexcltresptimethreshold = d.Get("apdexcltresptimethreshold").(int) @@ -364,11 +481,31 @@ func updateNshttpprofileFunc(d *schema.ResourceData, meta interface{}) error { nshttpprofile.Dropinvalreqs = d.Get("dropinvalreqs").(string) hasChange = true } + if d.HasChange("grpcholdlimit") { + log.Printf("[DEBUG] citrixadc-provider: Grpcholdlimit has changed for nshttpprofile %s, starting update", nshttpprofileName) + nshttpprofile.Grpcholdlimit = d.Get("grpcholdlimit").(int) + hasChange = true + } + if d.HasChange("grpcholdtimeout") { + log.Printf("[DEBUG] citrixadc-provider: Grpcholdtimeout has changed for nshttpprofile %s, starting update", nshttpprofileName) + nshttpprofile.Grpcholdtimeout = d.Get("grpcholdtimeout").(int) + hasChange = true + } + if d.HasChange("grpclengthdelimitation") { + log.Printf("[DEBUG] citrixadc-provider: Grpclengthdelimitation has changed for nshttpprofile %s, starting update", nshttpprofileName) + nshttpprofile.Grpclengthdelimitation = d.Get("grpclengthdelimitation").(string) + hasChange = true + } if d.HasChange("http2") { log.Printf("[DEBUG] citrixadc-provider: Http2 has changed for nshttpprofile %s, starting update", nshttpprofileName) nshttpprofile.Http2 = d.Get("http2").(string) hasChange = true } + if d.HasChange("http2altsvcframe") { + log.Printf("[DEBUG] citrixadc-provider: Http2altsvcframe has changed for nshttpprofile %s, starting update", nshttpprofileName) + nshttpprofile.Http2altsvcframe = d.Get("http2altsvcframe").(string) + hasChange = true + } if d.HasChange("http2direct") { log.Printf("[DEBUG] citrixadc-provider: Http2direct has changed for nshttpprofile %s, starting update", nshttpprofileName) nshttpprofile.Http2direct = d.Get("http2direct").(string) @@ -379,6 +516,11 @@ func updateNshttpprofileFunc(d *schema.ResourceData, meta interface{}) error { nshttpprofile.Http2headertablesize = d.Get("http2headertablesize").(int) hasChange = true } + if d.HasChange("http2initialconnwindowsize") { + log.Printf("[DEBUG] citrixadc-provider: Http2initialconnwindowsize has changed for nshttpprofile %s, starting update", nshttpprofileName) + nshttpprofile.Http2initialconnwindowsize = d.Get("http2initialconnwindowsize").(int) + hasChange = true + } if d.HasChange("http2initialwindowsize") { log.Printf("[DEBUG] citrixadc-provider: Http2initialwindowsize has changed for nshttpprofile %s, starting update", nshttpprofileName) nshttpprofile.Http2initialwindowsize = d.Get("http2initialwindowsize").(int) @@ -389,6 +531,11 @@ func updateNshttpprofileFunc(d *schema.ResourceData, meta interface{}) error { nshttpprofile.Http2maxconcurrentstreams = d.Get("http2maxconcurrentstreams").(int) hasChange = true } + if d.HasChange("http2maxemptyframespermin") { + log.Printf("[DEBUG] citrixadc-provider: Http2maxemptyframespermin has changed for nshttpprofile %s, starting update", nshttpprofileName) + nshttpprofile.Http2maxemptyframespermin = d.Get("http2maxemptyframespermin").(int) + hasChange = true + } if d.HasChange("http2maxframesize") { log.Printf("[DEBUG] citrixadc-provider: Http2maxframesize has changed for nshttpprofile %s, starting update", nshttpprofileName) nshttpprofile.Http2maxframesize = d.Get("http2maxframesize").(int) @@ -399,6 +546,21 @@ func updateNshttpprofileFunc(d *schema.ResourceData, meta interface{}) error { nshttpprofile.Http2maxheaderlistsize = d.Get("http2maxheaderlistsize").(int) hasChange = true } + if d.HasChange("http2maxpingframespermin") { + log.Printf("[DEBUG] citrixadc-provider: Http2maxpingframespermin has changed for nshttpprofile %s, starting update", nshttpprofileName) + nshttpprofile.Http2maxpingframespermin = d.Get("http2maxpingframespermin").(int) + hasChange = true + } + if d.HasChange("http2maxresetframespermin") { + log.Printf("[DEBUG] citrixadc-provider: Http2maxresetframespermin has changed for nshttpprofile %s, starting update", nshttpprofileName) + nshttpprofile.Http2maxresetframespermin = d.Get("http2maxresetframespermin").(int) + hasChange = true + } + if d.HasChange("http2maxsettingsframespermin") { + log.Printf("[DEBUG] citrixadc-provider: Http2maxsettingsframespermin has changed for nshttpprofile %s, starting update", nshttpprofileName) + nshttpprofile.Http2maxsettingsframespermin = d.Get("http2maxsettingsframespermin").(int) + hasChange = true + } if d.HasChange("http2minseverconn") { log.Printf("[DEBUG] citrixadc-provider: Http2minseverconn has changed for nshttpprofile %s, starting update", nshttpprofileName) nshttpprofile.Http2minseverconn = d.Get("http2minseverconn").(int) @@ -409,6 +571,26 @@ func updateNshttpprofileFunc(d *schema.ResourceData, meta interface{}) error { nshttpprofile.Http2strictcipher = d.Get("http2strictcipher").(string) hasChange = true } + if d.HasChange("http3") { + log.Printf("[DEBUG] citrixadc-provider: Http3 has changed for nshttpprofile %s, starting update", nshttpprofileName) + nshttpprofile.Http3 = d.Get("http3").(string) + hasChange = true + } + if d.HasChange("http3maxheaderblockedstreams") { + log.Printf("[DEBUG] citrixadc-provider: Http3maxheaderblockedstreams has changed for nshttpprofile %s, starting update", nshttpprofileName) + nshttpprofile.Http3maxheaderblockedstreams = d.Get("http3maxheaderblockedstreams").(int) + hasChange = true + } + if d.HasChange("http3maxheaderfieldsectionsize") { + log.Printf("[DEBUG] citrixadc-provider: Http3maxheaderfieldsectionsize has changed for nshttpprofile %s, starting update", nshttpprofileName) + nshttpprofile.Http3maxheaderfieldsectionsize = d.Get("http3maxheaderfieldsectionsize").(int) + hasChange = true + } + if d.HasChange("http3maxheadertablesize") { + log.Printf("[DEBUG] citrixadc-provider: Http3maxheadertablesize has changed for nshttpprofile %s, starting update", nshttpprofileName) + nshttpprofile.Http3maxheadertablesize = d.Get("http3maxheadertablesize").(int) + hasChange = true + } if d.HasChange("incomphdrdelay") { log.Printf("[DEBUG] citrixadc-provider: Incomphdrdelay has changed for nshttpprofile %s, starting update", nshttpprofileName) nshttpprofile.Incomphdrdelay = d.Get("incomphdrdelay").(int) @@ -424,6 +606,16 @@ func updateNshttpprofileFunc(d *schema.ResourceData, meta interface{}) error { nshttpprofile.Markhttp09inval = d.Get("markhttp09inval").(string) hasChange = true } + if d.HasChange("markhttpheaderextrawserror") { + log.Printf("[DEBUG] citrixadc-provider: Markhttpheaderextrawserror has changed for nshttpprofile %s, starting update", nshttpprofileName) + nshttpprofile.Markhttpheaderextrawserror = d.Get("markhttpheaderextrawserror").(string) + hasChange = true + } + if d.HasChange("markrfc7230noncompliantinval") { + log.Printf("[DEBUG] citrixadc-provider: Markrfc7230noncompliantinval has changed for nshttpprofile %s, starting update", nshttpprofileName) + nshttpprofile.Markrfc7230noncompliantinval = d.Get("markrfc7230noncompliantinval").(string) + hasChange = true + } if d.HasChange("marktracereqinval") { log.Printf("[DEBUG] citrixadc-provider: Marktracereqinval has changed for nshttpprofile %s, starting update", nshttpprofileName) nshttpprofile.Marktracereqinval = d.Get("marktracereqinval").(string) From 4968815610ceff4a6d3eea19bbf6fd5e972d70bf Mon Sep 17 00:00:00 2001 From: George Nikolopoulos Date: Wed, 29 Sep 2021 11:33:55 +0300 Subject: [PATCH 2/3] Update nshttpprofile acceptance test --- citrixadc/resource_citrixadc_nshttpprofile_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/citrixadc/resource_citrixadc_nshttpprofile_test.go b/citrixadc/resource_citrixadc_nshttpprofile_test.go index 273e52cf2..b6cf1b5e8 100644 --- a/citrixadc/resource_citrixadc_nshttpprofile_test.go +++ b/citrixadc/resource_citrixadc_nshttpprofile_test.go @@ -28,12 +28,18 @@ const testAccNshttpprofile_add = ` resource "citrixadc_nshttpprofile" "foo" { name = "tf_httpprofile" http2 = "ENABLED" + markrfc7230noncompliantinval = "ENABLED" + markhttpheaderextrawserror = "ENABLED" + dropinvalreqs = "ENABLED" } ` const testAccNshttpprofile_update = ` resource "citrixadc_nshttpprofile" "foo" { name = "tf_httpprofile" http2 = "DISABLED" + markrfc7230noncompliantinval = "DISABLED" + markhttpheaderextrawserror = "DISABLED" + dropinvalreqs = "DISABLED" } ` @@ -52,6 +58,9 @@ func TestAccNshttpprofile_basic(t *testing.T) { testAccCheckNshttpprofileExist("citrixadc_nshttpprofile.foo", nil), resource.TestCheckResourceAttr("citrixadc_nshttpprofile.foo", "name", "tf_httpprofile"), resource.TestCheckResourceAttr("citrixadc_nshttpprofile.foo", "http2", "ENABLED"), + resource.TestCheckResourceAttr("citrixadc_nshttpprofile.foo", "markrfc7230noncompliantinval", "ENABLED"), + resource.TestCheckResourceAttr("citrixadc_nshttpprofile.foo", "markhttpheaderextrawserror", "ENABLED"), + resource.TestCheckResourceAttr("citrixadc_nshttpprofile.foo", "dropinvalreqs", "ENABLED"), ), }, resource.TestStep{ @@ -60,6 +69,9 @@ func TestAccNshttpprofile_basic(t *testing.T) { testAccCheckNshttpprofileExist("citrixadc_nshttpprofile.foo", nil), resource.TestCheckResourceAttr("citrixadc_nshttpprofile.foo", "name", "tf_httpprofile"), resource.TestCheckResourceAttr("citrixadc_nshttpprofile.foo", "http2", "DISABLED"), + resource.TestCheckResourceAttr("citrixadc_nshttpprofile.foo", "markrfc7230noncompliantinval", "DISABLED"), + resource.TestCheckResourceAttr("citrixadc_nshttpprofile.foo", "markhttpheaderextrawserror", "DISABLED"), + resource.TestCheckResourceAttr("citrixadc_nshttpprofile.foo", "dropinvalreqs", "DISABLED"), ), }, }, From 552fb35f92d94e44151853cfc1f6295bb310c79a Mon Sep 17 00:00:00 2001 From: George Nikolopoulos Date: Wed, 29 Sep 2021 11:37:17 +0300 Subject: [PATCH 3/3] Update nshttpprofile documentation --- docs/resources/nshttpprofile.md | 82 ++++++++++++++++++++------------- 1 file changed, 49 insertions(+), 33 deletions(-) diff --git a/docs/resources/nshttpprofile.md b/docs/resources/nshttpprofile.md index fef13fd0f..4644805f9 100644 --- a/docs/resources/nshttpprofile.md +++ b/docs/resources/nshttpprofile.md @@ -13,47 +13,63 @@ The nshttpprofile resource is used to create HTTP profiles. resource "citrixadc_nshttpprofile" "tf_httpprofile" { name = "tf_httpprofile" http2 = "ENABLED" -} +} ``` ## Argument Reference -* `name` - (Required) Name for an HTTP profile.The name of a HTTP profile cannot be changed after it is created. -* `dropinvalreqs` - (Optional) Drop invalid HTTP requests or responses. Possible values: [ ENABLED, DISABLED ] -* `markhttp09inval` - (Optional) Mark HTTP/0.9 requests as invalid. Possible values: [ ENABLED, DISABLED ] -* `markconnreqinval` - (Optional) Mark CONNECT requests as invalid. Possible values: [ ENABLED, DISABLED ] -* `marktracereqinval` - (Optional) Mark TRACE requests as invalid. Possible values: [ ENABLED, DISABLED ] -* `cmponpush` - (Optional) Start data compression on receiving a TCP packet with PUSH flag set. Possible values: [ ENABLED, DISABLED ] -* `conmultiplex` - (Optional) Reuse server connections for requests from more than one client connections. Possible values: [ ENABLED, DISABLED ] -* `maxreusepool` - (Optional) -* `dropextracrlf` - (Optional) Drop any extra 'CR' and 'LF' characters present after the header. Possible values: [ ENABLED, DISABLED ] -* `incomphdrdelay` - (Optional) -* `websocket` - (Optional) HTTP connection to be upgraded to a web socket connection. Once upgraded, Citrix ADC does not process Layer 7 traffic on this connection. Possible values: [ ENABLED, DISABLED ] -* `rtsptunnel` - (Optional) Allow RTSP tunnel in HTTP. Once application/x-rtsp-tunnelled is seen in Accept or Content-Type header, Citrix ADC does not process Layer 7 traffic on this connection. Possible values: [ ENABLED, DISABLED ] +* `adpttimeout` - (Optional) Adapts the configured request timeout based on flow conditions. The timeout is increased or decreased internally and applied on the flow. +* `altsvc` - (Optional) Choose whether to enable support for Alternative Services. +* `altsvcvalue` - (Optional) Configure a custom Alternative Services header value that should be inserted in the response to advertise a HTTP/SSL/HTTP_QUIC vserver. +* `apdexcltresptimethreshold` - (Optional) This option sets the satisfactory threshold (T) for client response time in milliseconds to be used for APDEX calculations. This means a transaction responding in less than this threshold is considered satisfactory. Transaction responding between T and 4\*T is considered tolerable. Any transaction responding in more than 4\*T time is considered frustrating. Citrix ADC maintains stats for such tolerable and frustrating transcations. And client response time related apdex counters are only updated on a vserver which receives clients traffic. +* `clientiphdrexpr` - (Optional) Name of the header that contains the real client IP address. +* `cmponpush` - (Optional) Start data compression on receiving a TCP packet with PUSH flag set. +* `conmultiplex` - (Optional) Reuse server connections for requests from more than one client connections. +* `dropextracrlf` - (Optional) Drop any extra 'CR' and 'LF' characters present after the header. +* `dropextradata` - (Optional) Drop any extra data when server sends more data than the specified content-length. +* `dropinvalreqs` - (Optional) Drop invalid HTTP requests or responses. +* `grpcholdlimit` - (Optional) +* `grpcholdtimeout` - (Optional) +* `grpclengthdelimitation` - (Optional) Set to DISABLED for gRPC without a length delimitation. +* `http2` - (Optional) Choose whether to enable support for HTTP/2. +* `http2altsvcframe` - (Optional) Choose whether to enable support for sending HTTP/2 ALTSVC frames. When enabled, the ADC sends HTTP/2 ALTSVC frames to HTTP/2 clients, instead of the Alt-Svc response header field. Not applicable to servers. +* `http2direct` - (Optional) Choose whether to enable support for Direct HTTP/2. +* `http2headertablesize` - (Optional) +* `http2initialconnwindowsize` - (Optional) Initial window size for connection level flow control, in bytes. +* `http2initialwindowsize` - (Optional) Initial window size for stream level flow control, in bytes. +* `http2maxconcurrentstreams` - (Optional) +* `http2maxemptyframespermin` - (Optional) +* `http2maxframesize` - (Optional) +* `http2maxheaderlistsize` - (Optional) +* `http2maxpingframespermin` - (Optional) +* `http2maxresetframespermin` - (Optional) +* `http2maxsettingsframespermin` - (Optional) +* `http2minseverconn` - (Optional) +* `http2strictcipher` - (Optional) Choose whether to enable strict HTTP/2 cipher selection +* `http3` - (Optional) Choose whether to enable support for HTTP/3. +* `http3maxheaderblockedstreams` - (Optional) +* `http3maxheaderfieldsectionsize` - (Optional) +* `http3maxheadertablesize` - (Optional) +* `incomphdrdelay` - (Optional) +* `markconnreqinval` - (Optional) Mark CONNECT requests as invalid. +* `markhttp09inval` - (Optional) Mark HTTP/0.9 requests as invalid. +* `markhttpheaderextrawserror` - (Optional) Mark Http header with extra white space as invalid +* `markrfc7230noncompliantinval` - (Optional) Mark RFC7230 non-compliant transaction as invalid +* `marktracereqinval` - (Optional) Mark TRACE requests as invalid. +* `maxheaderlen` - (Optional) Number of bytes to be queued to look for complete header before returning error. If complete header is not obtained after queuing these many bytes, request will be marked as invalid and no L7 processing will be done for that TCP connection. +* `maxreq` - (Optional) +* `maxreusepool` - (Optional) +* `minreusepool` - (Optional) +* `name` - (Required) Name for an HTTP profile. Must begin with a letter, number, or the underscore \(\_\) character. Other characters allowed, after the first character, are the hyphen \(-\), period \(.\), hash \(\#\), space \( \), at \(@\), colon \(:\), and equal \(=\) characters. The name of a HTTP profile cannot be changed after it is created. CLI Users: If the name includes one or more spaces, enclose the name in double or single quotation marks \(for example, "my http profile" or 'my http profile'\). +* `persistentetag` - (Optional) Generate the persistent Citrix ADC specific ETag for the HTTP response with ETag header. * `reqtimeout` - (Optional) Time, in seconds, within which the HTTP request must complete. If the request does not complete within this time, the specified request timeout action is executed. Zero disables the timeout. -* `adpttimeout` - (Optional) Adapts the configured request timeout based on flow conditions. The timeout is increased or decreased internally and applied on the flow. Possible values: [ ENABLED, DISABLED ] * `reqtimeoutaction` - (Optional) Action to take when the HTTP request does not complete within the specified request timeout duration. You can configure the following actions: * RESET - Send RST (reset) to client when timeout occurs. * DROP - Drop silently when timeout occurs. * Custom responder action - Name of the responder action to trigger when timeout occurs, used to send custom message. -* `dropextradata` - (Optional) Drop any extra data when server sends more data than the specified content-length. Possible values: [ ENABLED, DISABLED ] -* `weblog` - (Optional) Enable or disable web logging. Possible values: [ ENABLED, DISABLED ] -* `clientiphdrexpr` - (Optional) Name of the header that contains the real client IP address. -* `maxreq` - (Optional) -* `persistentetag` - (Optional) Generate the persistent Citrix ADC specific ETag for the HTTP response with ETag header. Possible values: [ ENABLED, DISABLED ] -* `spdy` - (Optional) Enable SPDYv2 or SPDYv3 or both over SSL vserver. SSL will advertise SPDY support either during NPN Handshake or when client will advertises SPDY support during ALPN handshake. Both SPDY versions are enabled when this parameter is set to ENABLED. Possible values: [ DISABLED, ENABLED, V2, V3 ] -* `http2` - (Optional) Choose whether to enable support for HTTP/2. Possible values: [ ENABLED, DISABLED ] -* `http2direct` - (Optional) Choose whether to enable support for Direct HTTP/2. Possible values: [ ENABLED, DISABLED ] -* `http2strictcipher` - (Optional) Choose whether to enable strict HTTP/2 cipher selection. Possible values: [ ENABLED, DISABLED ] -* `altsvc` - (Optional) Choose whether to enable support for Alternative Service. Possible values: [ ENABLED, DISABLED ] * `reusepooltimeout` - (Optional) Idle timeout (in seconds) for server connections in re-use pool. Connections in the re-use pool are flushed, if they remain idle for the configured timeout. -* `maxheaderlen` - (Optional) Number of bytes to be queued to look for complete header before returning error. If complete header is not obtained after queuing these many bytes, request will be marked as invalid and no L7 processing will be done for that TCP connection. -* `minreusepool` - (Optional) -* `http2maxheaderlistsize` - (Optional) -* `http2maxframesize` - (Optional) -* `http2maxconcurrentstreams` - (Optional) -* `http2initialwindowsize` - (Optional) Initial window size for stream level flow control, in bytes. -* `http2headertablesize` - (Optional) -* `http2minseverconn` - (Optional) -* `apdexcltresptimethreshold` - (Optional) This option sets the satisfactory threshold (T) for client response time in milliseconds to be used for APDEX calculations. This means a transaction responding in less than this threshold is considered satisfactory. Transaction responding between T and 4\*T is considered tolerable. Any transaction responding in more than 4\*T time is considered frustrating. Citrix ADC maintains stats for such tolerable and frustrating transcations. And client response time related apdex counters are only updated on a vserver which receives clients traffic. +* `rtsptunnel` - (Optional) Allow RTSP tunnel in HTTP. Once application/x-rtsp-tunnelled is seen in Accept or Content-Type header, Citrix ADC does not process Layer 7 traffic on this connection. +* `spdy` - (Optional) Enable SPDYv2 or SPDYv3 or both over SSL vserver. SSL will advertise SPDY support either during NPN Handshake or when client will advertises SPDY support during ALPN handshake. Both SPDY versions are enabled when this parameter is set to ENABLED. +* `weblog` - (Optional) Enable or disable web logging. +* `websocket` - (Optional) HTTP connection to be upgraded to a web socket connection. Once upgraded, Citrix ADC does not process Layer 7 traffic on this connection. ## Attribute Reference