### Install copystructure Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/vendor/github.com/mitchellh/copystructure/README.md Use standard `go get` to install the library. ```bash $ go get github.com/mitchellh/copystructure ``` -------------------------------- ### Install go-getter Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/vendor/github.com/hashicorp/go-getter/v2/README.md Install the go-getter library using the standard go get command. ```bash $ go get github.com/hashicorp/go-getter/v2 ``` -------------------------------- ### Install Golang Color Library Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/vendor/github.com/fatih/color/README.md Use 'go get' to install the color library. ```bash go get github.com/fatih/color ``` -------------------------------- ### Install go-version Library Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/vendor/github.com/hashicorp/go-version/README.md Install the go-version library using the standard go get command. ```bash $ go get github.com/hashicorp/go-version ``` -------------------------------- ### Install msgpack Package Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/vendor/github.com/vmihailenco/msgpack/README.md Use 'go get' to install or update the msgpack package. ```shell go get -u github.com/vmihailenco/msgpack ``` -------------------------------- ### Install go-isatty Package Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/vendor/github.com/mattn/go-isatty/README.md Install the go-isatty package using the go get command. This command fetches and installs the package and its dependencies. ```bash go get github.com/mattn/go-isatty ``` -------------------------------- ### Install go-zglob Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/vendor/github.com/mattn/go-zglob/README.md Install the go-zglob package using the go get command. This is a prerequisite for using the library. ```bash $ go get github.com/mattn/go-zglob ``` -------------------------------- ### Install msgpack/v5 Go Package Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/vendor/github.com/vmihailenco/msgpack/v5/README.md Install the msgpack/v5 library using go get. Ensure you are using Go modules and have initialized your project with 'go mod init'. ```shell go mod init github.com/my/repo ``` ```shell go get github.com/vmihailenco/msgpack/v5 ``` -------------------------------- ### Install Golang Tag Parser Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/vendor/github.com/vmihailenco/tagparser/v2/README.md Use `go get` to install the v2 of the tagparser library. ```shell go get github.com/vmihailenco/tagparser/v2 ``` -------------------------------- ### Install go-colorable Package Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/vendor/github.com/mattn/go-colorable/README.md Use the go get command to install the go-colorable package into your Go workspace. ```bash go get github.com/mattn/go-colorable ``` -------------------------------- ### Install Levenshtein Package Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/vendor/github.com/agext/levenshtein/README.md Use 'go get' to install the Levenshtein package for your Go project. ```go go get github.com/agext/levenshtein ``` -------------------------------- ### Install mapstructure Go Library Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/vendor/github.com/mitchellh/mapstructure/README.md Standard installation command for the mapstructure Go library using `go get`. ```bash $ go get github.com/mitchellh/mapstructure ``` -------------------------------- ### Example Usage of Authentication vServer, LDAP Action, LDAP Policy, and Binding Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/resources/authenticationvserver_authenticationldappolicy_binding.md This example demonstrates the complete setup for binding an LDAP authentication policy to an authentication virtual server. It includes the creation of the authentication vServer, the LDAP action, the LDAP policy, and finally, the binding resource. ```hcl resource "citrixadc_authenticationvserver" "tf_authenticationvserver" { name = "tf_authenticationvserver" servicetype = "SSL" comment = "new" authentication = "ON" state = "DISABLED" } resource "citrixadc_authenticationldapaction" "tf_ldapaction" { name = "tf_ldapaction" serverip = "1.2.3.4" serverport = 8080 authtimeout = 1 ldaploginname = "username" } resource "citrixadc_authenticationldappolicy" "tf_authenticationldappolicy" { name = "tf_authenticationldappolicy" rule = "NS_TRUE" reqaction = citrixadc_authenticationldapaction.tf_ldapaction.name } resource "citrixadc_authenticationvserver_authenticationldappolicy_binding" "tf_bind" { name = citrixadc_authenticationvserver.tf_authenticationvserver.name policy = citrixadc_authenticationldappolicy.tf_authenticationldappolicy.name priority = 90 bindpoint = "REQUEST" } ``` -------------------------------- ### AppFlow CLI Commands for Setup Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/resources/appflowpolicylabel_appflowpolicy_binding.md These are example CLI commands to set up AppFlow components, including collectors, actions, policies, and policy labels, which can be referenced by the binding resource. ```shell #add appflow collector tf_collector -IPAddress 192.168.2.2 #add appflowaction test_action -collectors tf_collector #add appflowpolicy test_policy client.TCP.DSTPORT.EQ(22) test_action #add appflowpolicylabel tf_policylabel -policylabeltype OTHERTCP ``` -------------------------------- ### Configure Authentication vServer, Local Policy, and Binding Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/resources/authenticationvserver_authenticationlocalpolicy_binding.md This example demonstrates how to create an authentication vserver, define an authentication local policy, and then bind the policy to the vserver. Ensure the authentication vserver and policy are created before attempting to bind them. ```hcl resource "citrixadc_authenticationvserver" "tf_authenticationvserver" { name = "tf_authenticationvserver" servicetype = "SSL" comment = "new" authentication = "ON" state = "DISABLED" } resource "citrixadc_authenticationlocalpolicy" "tf_authenticationlocalpolicy" { name = "tf_authenticationlocalpolicy" rule = "ns_true" } resource "citrixadc_authenticationvserver_authenticationlocalpolicy_binding" "tf_bind" { name = citrixadc_authenticationvserver.tf_authenticationvserver.name policy = citrixadc_authenticationlocalpolicy.tf_authenticationlocalpolicy.name priority = 90 bindpoint = "AAA_RESPONSE" } ``` -------------------------------- ### Create an Authentication vServer, Login Schema, Login Schema Policy, and Bind them Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/resources/authenticationvserver_authenticationloginschemapolicy_binding.md This example demonstrates the complete setup for binding an authentication login schema policy to an authentication virtual server. It includes creating the necessary resources: the authentication vServer, the login schema, the login schema policy, and finally, the binding resource itself. ```hcl resource "citrixadc_authenticationvserver" "tf_authenticationvserver" { name = "tf_authenticationvserver" servicetype = "SSL" comment = "new" authentication = "ON" state = "DISABLED" } resource "citrixadc_authenticationloginschema" "tf_loginschema" { name = "tf_loginschema" authenticationschema = "LoginSchema/SingleAuth.xml" ssocredentials = "YES" authenticationstrength = "30" passwordcredentialindex = "10" } resource "citrixadc_authenticationloginschemapolicy" "tf_loginschemapolicy" { name = "tf_loginschemapolicy" rule = "true" action = citrixadc_authenticationloginschema.tf_loginschema.name comment = "samplenew_testing" } resource "citrixadc_authenticationvserver_authenticationloginschemapolicy_binding" "tf_binding" { name = citrixadc_authenticationvserver.tf_authenticationvserver.name policy = citrixadc_authenticationloginschemapolicy.tf_loginschemapolicy.name priority = 77 bindpoint = "REQUEST" } ``` -------------------------------- ### Install Terraform with hc-install Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/vendor/github.com/hashicorp/hc-install/README.md Example of using hc-install to install a specific version of Terraform. This command installs Terraform version 1.3.7. ```sh hc-install install -version 1.3.7 terraform ``` -------------------------------- ### Quickstart: Marshal and Unmarshal with msgpack/v5 Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/vendor/github.com/vmihailenco/msgpack/v5/README.md Demonstrates basic usage of msgpack/v5 for encoding (Marshal) and decoding (Unmarshal) a Go struct. This example shows how to serialize a struct to MessagePack format and then deserialize it back. ```go import "github.com/vmihailenco/msgpack/v5" import "fmt" func ExampleMarshal() { type Item struct { Foo string } b, err := msgpack.Marshal(&Item{Foo: "bar"}) if err != nil { panic(err) } var item Item err = msgpack.Unmarshal(b, &item) if err != nil { panic(err) } fmt.Println(item.Foo) // Output: bar } ``` -------------------------------- ### SMB Testing Setup Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/vendor/github.com/hashicorp/go-getter/v2/README.md To test SMB functionality, a Samba server can be started using 'make start-smb'. The shared folder can then be accessed via specific URLs. The 'make smbtests-prepare' command sets up mock files and directories for testing. ```bash make start-smb ``` ```bash smb:///public/ ``` ```bash smb://user:password@/private/ ``` ```bash make smbtests-prepare ``` ```bash make smbtests ``` -------------------------------- ### Example Usage Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/resources/authenticationvserver_authenticationwebauthpolicy_binding.md This configuration creates an authentication virtual server, a web authentication action, a web authentication policy, and then binds the policy to the virtual server. ```hcl resource "citrixadc_authenticationvserver" "tf_authenticationvserver" { name = "tf_authenticationvserver" servicetype = "SSL" comment = "new" authentication = "ON" state = "DISABLED" } resource "citrixadc_authenticationwebauthaction" "tf_webauthaction" { name = "tf_webauthaction" serverip = "1.2.3.4" serverport = 8080 fullreqexpr = "TRUE" scheme = "http" successrule = "http.RES.STATUS.EQ(200)" defaultauthenticationgroup = "new_group" } resource "citrixadc_authenticationwebauthpolicy" "tf_webauthpolicy" { name = "tf_webauthpolicy" rule = "NS_TRUE" action = citrixadc_authenticationwebauthaction.tf_webauthaction.name } resource "citrixadc_authenticationvserver_authenticationwebauthpolicy_binding" "tf_bind" { name = citrixadc_authenticationvserver.tf_authenticationvserver.name policy = citrixadc_authenticationwebauthpolicy.tf_webauthpolicy.name priority = 80 bindpoint = "AAA_RESPONSE" } ``` -------------------------------- ### Quickstart: Marshal and Unmarshal Struct Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/vendor/github.com/vmihailenco/msgpack/README.md Demonstrates basic usage of msgpack.Marshal and msgpack.Unmarshal to encode and decode a Go struct. Ensure error handling for production code. ```go func ExampleMarshal() { type Item struct { Foo string } b, err := msgpack.Marshal(&Item{Foo: "bar"}) if err != nil { panic(err) } var item Item err = msgpack.Unmarshal(b, &item) if err != nil { panic(err) } fmt.Println(item.Foo) // Output: bar } ``` -------------------------------- ### SMB URL Examples Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/vendor/github.com/hashicorp/go-getter/v2/README.md go-getter supports downloading files from SMB shares using URLs prefixed with 'smb://'. Examples are provided for general OS compatibility and Linux-specific authentication. ```bash smb://host/shared/dir ``` ```bash smb://host/shared/dir/file ``` ```bash smb://username:password@host/shared/dir ``` ```bash smb://username@host/shared/dir ``` ```bash smb://username:password@host/shared/dir/file ``` ```bash smb://username@host/shared/dir/file ``` -------------------------------- ### Create and Bind Authentication Certificate Policy Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/resources/authenticationvserver_authenticationcertpolicy_binding.md This example demonstrates how to create an authentication virtual server, an authentication certificate action, an authentication certificate policy, and then bind the policy to the virtual server. ```hcl resource "citrixadc_authenticationvserver" "tf_authenticationvserver" { name = "tf_authenticationvserver" servicetype = "SSL" comment = "new" authentication = "ON" state = "DISABLED" } resource "citrixadc_authenticationcertaction" "tf_certaction" { name = "tf_certaction" twofactor = "ON" defaultauthenticationgroup = "new_group" usernamefield = "Subject:CN" groupnamefield = "subject:grp" } resource "citrixadc_authenticationcertpolicy" "tf_certpolicy" { name = "tf_certpolicy" rule = "ns_true" reqaction = citrixadc_authenticationcertaction.tf_certaction.name } resource "citrixadc_authenticationvserver_authenticationcertpolicy_binding" "tf_bind" { name = citrixadc_authenticationvserver.tf_authenticationvserver.name policy = citrixadc_authenticationcertpolicy.tf_certpolicy.name priority = 90 bindpoint = "AAA_REQUEST" } ``` -------------------------------- ### Example usage Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/data-sources/authenticationvserver.md This example demonstrates how to use the authenticationvserver data source to retrieve details about an authentication virtual server and output its servicetype and comment. ```APIDOC ## Data Source: authenticationvserver The authenticationvserver data source allows you to retrieve information about an existing authentication virtual server. ### Example usage ```terraform data "citrixadc_authenticationvserver" "tf_authenticationvserver" { name = "my_authenticationvserver" } output "servicetype" { value = data.citrixadc_authenticationvserver.tf_authenticationvserver.servicetype } output "comment" { value = data.citrixadc_authenticationvserver.tf_authenticationvserver.comment } ``` ## Argument Reference * `name` - (Required) Name for the new authentication virtual server. Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at (@), equals (=), colon (:), and underscore characters. Can be changed after the authentication virtual server is added by using the rename authentication vserver command. ## Attribute Reference In addition to the arguments, the following attributes are available: * `id` - The id of the authenticationvserver. It has the same value as the `name` attribute. * `appflowlog` - Log AppFlow flow information. * `authentication` - Require users to be authenticated before sending traffic through this virtual server. * `authenticationdomain` - The domain of the authentication cookie set by Authentication vserver. * `certkeynames` - Name of the certificate key that was bound to the corresponding SSL virtual server as the Certificate Authority for the device certificate. * `comment` - Any comments associated with this virtual server. * `failedlogintimeout` - Number of minutes an account will be locked if user exceeds maximum permissible attempts. * `ipv46` - IP address of the authentication virtual server, if a single IP address is assigned to the virtual server. * `maxloginattempts` - Maximum Number of login Attempts. * `newname` - New name of the authentication virtual server. Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at (@), equals (=), colon (:), and underscore characters. * `port` - TCP port on which the virtual server accepts connections. * `range` - If you are creating a series of virtual servers with a range of IP addresses assigned to them, the length of the range. The new range of authentication virtual servers will have IP addresses consecutively numbered, starting with the primary address specified with the IP Address parameter. * `samesite` - SameSite attribute value for Cookies generated in AAATM context. This attribute value will be appended only for the cookies which are specified in the builtin patset ns_cookies_samesite. * `servicetype` - Protocol type of the authentication virtual server. Always SSL. * `state` - Initial state of the new virtual server. * `td` - Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. ## Import A authenticationvserver can be imported using its name, e.g. ```shell terraform import citrixadc_authenticationvserver.tf_authenticationvserver my_authenticationvserver ``` ``` -------------------------------- ### Retrieve Appfwprofile Start URL Binding Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/data-sources/appfwprofile_starturl_binding.md Use this data source to get the configuration of an existing start URL binding for a given AppFW profile. It requires the profile name and the specific start URL pattern to identify the binding. ```terraform data "citrixadc_appfwprofile_starturl_binding" "tf_binding" { name = "tfAcc_appfwprofile" starturl = "^[?]+[.](html?|shtml|js|gif|jpg|jpeg|png|swf|pif|pdf|css|csv)$" } output "state" { value = data.citrixadc_appfwprofile_starturl_binding.tf_binding.state } output "alertonly" { value = data.citrixadc_appfwprofile_starturl_binding.tf_binding.alertonly } ``` -------------------------------- ### Example Usage Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/data-sources/authenticationnegotiatepolicy.md Use this data source to get the details of an existing authentication negotiate policy by its name. ```terraform data "citrixadc_authenticationnegotiatepolicy" "tf_negotiatepolicy" { name = "my_negotiatepolicy" } output "rule" { value = data.citrixadc_authenticationnegotiatepolicy.tf_negotiatepolicy.rule } output "reqaction" { value = data.citrixadc_authenticationnegotiatepolicy.tf_negotiatepolicy.reqaction } ``` -------------------------------- ### Installer Methods Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/vendor/github.com/hashicorp/hc-install/README.md The Installer offers high-level methods for managing HashiCorp binary installations. These methods handle finding, installing, or building specific product versions. ```APIDOC ## Installer Methods The `Installer` offers the following high-level methods: ### `Ensure(context.Context, []src.Source)` **Description**: Finds, installs, or builds a product version based on the provided sources. ### `Install(context.Context, []src.Installable)` **Description**: Installs a specified product version. ``` -------------------------------- ### Example Usage Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/data-sources/vpnvserver_sharefileserver_binding.md Use this data source to get the name and sharefile attributes of a ShareFile server binding to a VPN virtual server. ```terraform data "citrixadc_vpnvserver_sharefileserver_binding" "tf_bind" { name = "tf_vpnvserver" sharefile = "3.3.4.3:90" } output "name" { value = data.citrixadc_vpnvserver_sharefileserver_binding.tf_bind.name } output "sharefile" { value = data.citrixadc_vpnvserver_sharefileserver_binding.tf_bind.sharefile } ``` -------------------------------- ### Retrieve Policymap Configuration Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/data-sources/policymap.md This example demonstrates how to use the `citrixadc_policymap` data source to get information about a specific policy map by its name. ```APIDOC ## Data Source: citrixadc_policymap The `citrixadc_policymap` data source is used to retrieve information about an existing policy map configuration. ### Argument Reference * `mappolicyname` - (Required) Name for the map policy. Must begin with a letter, number, or the underscore (_) character and must consist only of letters, numbers, and the hash (#), period (.), colon (:), space ( ), at (@), equals (=), hyphen (-), and underscore (_) characters. ### Attribute Reference * `id` - The id of the policymap resource. It has the same value as the `mappolicyname` attribute. * `sd` - Publicly known source domain name. This is the domain name with which a client request arrives at a reverse proxy virtual server for cache redirection. If you specify a source domain, you must specify a target domain. * `su` - Source URL. Specify all or part of the source URL, in the following format: /[[prefix] [*]] [.suffix]. * `td` - Target domain name sent to the server. The source domain name is replaced with this domain name. * `tu` - Target URL. Specify the target URL in the following format: /[[prefix] [*]][.suffix]. ``` -------------------------------- ### Configure Bot Profile and Bind Whitelist Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/resources/botprofile_whitelist_binding.md This example demonstrates how to create a bot profile and then bind a whitelist entry to it. Ensure the bot profile is configured with whitelist enabled. ```hcl resource "citrixadc_botprofile" "tf_botprofile" { name = "tf_botprofile" errorurl = "http://www.citrix.com" trapurl = "/http://www.citrix.com" comment = "tf_botprofile comment" bot_enable_white_list = "ON" bot_enable_black_list = "ON" bot_enable_rate_limit = "ON" devicefingerprint = "ON" devicefingerprintaction = ["LOG", "RESET"] bot_enable_ip_reputation = "ON" trap = "ON" trapaction = ["LOG", "RESET"] bot_enable_tps = "ON" } resource "citrixadc_botprofile_whitelist_binding" "tf_binding" { name = citrixadc_botprofile.tf_botprofile.name bot_whitelist = "true" bot_whitelist_type = "IPv4" bot_whitelist_value = "1.2.1.2" bot_bind_comment = "TestingWhiteList" bot_whitelist_enabled = "ON" log = "ON" logmessage = "BotWhiteListAdded" } ``` -------------------------------- ### Get Cluster Nodegroup Authentication vServer Binding Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/data-sources/clusternodegroup_authenticationvserver_binding.md The following example retrieves the details of a cluster nodegroup authentication vserver binding. ```APIDOC ## Get Cluster Nodegroup Authentication vServer Binding ### Description Retrieves the details of a cluster nodegroup authentication vserver binding. ### Method GET ### Endpoint /citrixadc/v1/config/clusternodegroup_authenticationvserver_binding ### Parameters #### Query Parameters - **name** (string) - Required - Name of the nodegroup. - **vserver** (string) - Required - Name of the authentication vserver that is bound to this nodegroup. ### Response #### Success Response (200) - **id** (string) - The id of the clusternodegroup_authenticationvserver_binding. - **name** (string) - Name of the nodegroup. - **vserver** (string) - Name of the authentication vserver. ``` -------------------------------- ### Example Usage of vpnvserver_vpnurl_binding Data Source Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/data-sources/vpnvserver_vpnurl_binding.md Use this data source to get the name and urlname of a vpnvserver_vpnurl_binding. Required arguments are name and urlname. ```terraform data "citrixadc_vpnvserver_vpnurl_binding" "tf_bind" { name = "tf_examplevserver" urlname = "Firsturl" } output "name" { value = data.citrixadc_vpnvserver_vpnurl_binding.tf_bind.name } output "urlname" { value = data.citrixadc_vpnvserver_vpnurl_binding.tf_bind.urlname } ``` -------------------------------- ### Example Usage Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/data-sources/lbvserver_contentinspectionpolicy_binding.md This example demonstrates how to configure a data source to retrieve information about a content inspection policy binding to an lbvserver. ```APIDOC ## Data Source: lbvserver_contentinspectionpolicy_binding The lbvserver_contentinspectionpolicy_binding data source allows you to retrieve information about a content inspection policy binding to an lbvserver. ### Example Usage ```terraform data "citrixadc_lbvserver_contentinspectionpolicy_binding" "tf_lbvserver_contentinspectionpolicy_binding" { name = "tf_lbvserver" bindpoint = "REQUEST" policyname = "tf_contentinspectionpolicy" } output "bindpoint" { value = data.citrixadc_lbvserver_contentinspectionpolicy_binding.tf_lbvserver_contentinspectionpolicy_binding.bindpoint } output "gotopriorityexpression" { value = data.citrixadc_lbvserver_contentinspectionpolicy_binding.tf_lbvserver_contentinspectionpolicy_binding.gotopriorityexpression } ``` ## Argument Reference * `name` - (Required) Name for the virtual server. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at sign (@), equal sign (=), and hyphen (-) characters. Can be changed after the virtual server is created. CLI Users: If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, "my vserver" or 'my vserver'). * `bindpoint` - (Required) The bindpoint to which the policy is bound. * `policyname` - (Required) Name of the policy bound to the LB vserver. ## Attribute Reference In addition to the arguments, the following attributes are available: * `gotopriorityexpression` - Expression specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE. * `invoke` - Invoke policies bound to a virtual server or policy label. * `labelname` - Name of the label invoked. * `priority` - Priority. * `labeltype` - The invocation type. * `order` - Integer specifying the order of the service. A larger number specifies a lower order. Defines the order of the service relative to the other services in the load balancing vserver's bindings. Determines the priority given to the service among all the services bound. * `id` - The id of the lbvserver_contentinspectionpolicy_binding. It is a system-generated identifier. ``` -------------------------------- ### Retrieve SSL Policy Information Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/data-sources/sslpolicy.md This example demonstrates how to use the `citrixadc_sslpolicy` data source to get information about an SSL policy named 'tf_sslpolicy'. ```APIDOC ## Data Source: sslpolicy This datasource is used to retrieve information about an existing SSL policy on the Citrix ADC. ### Example Usage ```hcl data "citrixadc_sslpolicy" "foo" { name = "tf_sslpolicy" } ``` ### Argument Reference * `name` - (Required) Name of the SSL policy to retrieve. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. ### Attribute Reference In addition to the argument above, the following attributes are exported: * `id` - The ID of the SSL policy. * `action` - Name of the built-in or user-defined action to perform on the request. Available built-in actions are NOOP, RESET, DROP, CLIENTAUTH, NOCLIENTAUTH, INTERCEPT AND BYPASS. * `comment` - Any comments associated with this policy. * `reqaction` - The name of the action to be performed on the request. Refer to 'add ssl action' command to add a new action. Builtin actions like NOOP, RESET, DROP, CLIENTAUTH and NOCLIENTAUTH are also allowed. * `rule` - Expression, against which traffic is evaluated. * `undefaction` - Name of the action to be performed when the result of rule evaluation is undefined. Possible values for control policies: CLIENTAUTH, NOCLIENTAUTH, NOOP, RESET, DROP. Possible values for data policies: NOOP, RESET, DROP and BYPASS. ``` -------------------------------- ### Example usage of authenticationwebauthpolicy data source Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/data-sources/authenticationwebauthpolicy.md Use this data source to get the rule and action attributes of a WebAuth authentication policy by its name. ```terraform data "citrixadc_authenticationwebauthpolicy" "tf_webauthpolicy" { name = "my_webauthpolicy" } output "rule" { value = data.citrixadc_authenticationwebauthpolicy.tf_webauthpolicy.rule } output "action" { value = data.citrixadc_authenticationwebauthpolicy.tf_webauthpolicy.action } ``` -------------------------------- ### Configure Authentication Virtual Server and Bind Cache Policy Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/resources/authenticationvserver_cachepolicy_binding.md This example demonstrates how to create an authentication virtual server and then bind a cache policy to it using the authenticationvserver_cachepolicy_binding resource. Ensure the authentication virtual server is configured before binding the policy. ```hcl resource "citrixadc_authenticationvserver" "tf_authenticationvserver" { name = "tf_authenticationvserver" servicetype = "SSL" comment = "new" authentication = "ON" state = "DISABLED" } resource "citrixadc_authenticationvserver_cachepolicy_binding" "tf_binding" { name = citrixadc_authenticationvserver.tf_authenticationvserver.name policy = "tf_cachepolicy" bindpoint = "REQUEST" priority = 9 } ``` -------------------------------- ### Create and Bind Responder Policy to Authentication vServer Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/resources/authenticationvserver_responderpolicy_binding.md This example demonstrates how to create an authentication virtual server, a responder policy, and then bind the policy to the virtual server with a specified priority and bind point. ```hcl resource "citrixadc_authenticationvserver" "tf_authenticationvserver" { name = "tf_authenticationvserver" servicetype = "SSL" comment = "new" authentication = "ON" state = "DISABLED" } resource "citrixadc_responderpolicy" "tf_responder_policy" { name = "tf_responder_policy" action = "NOOP" rule = "HTTP.REQ.URL.PATH_AND_QUERY.CONTAINS(\"nosuchthing\")" } resource "citrixadc_authenticationvserver_responderpolicy_binding" "tf_bind" { name = citrixadc_authenticationvserver.tf_authenticationvserver.name policy = citrixadc_responderpolicy.tf_responder_policy.name priority = 200 bindpoint = "REQUEST" } ``` -------------------------------- ### Example usage of authenticationsamlpolicy data source Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/data-sources/authenticationsamlpolicy.md Use this data source to get the rule and authentication action associated with a SAML policy by its name. ```terraform data "citrixadc_authenticationsamlpolicy" "tf_samlpolicy" { name = "my_samlpolicy" } output "rule" { value = data.citrixadc_authenticationsamlpolicy.tf_samlpolicy.rule } output "reqaction" { value = data.citrixadc_authenticationsamlpolicy.tf_samlpolicy.reqaction } ``` -------------------------------- ### vlan_nsip_binding Data Source Example Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/data-sources/vlan_nsip_binding.md Use this data source to get the details of a VLAN IP binding. It requires the VLAN ID and the IP address. ```terraform data "citrixadc_vlan_nsip_binding" "tf_vlan_nsip_binding" { vlanid = 40 ipaddress = "10.222.74.145" } output "netmask" { value = data.citrixadc_vlan_nsip_binding.tf_vlan_nsip_binding.netmask } output "td" { value = data.citrixadc_vlan_nsip_binding.tf_vlan_nsip_binding.td } ``` -------------------------------- ### Retrieve RADIUS Node Information Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/data-sources/radiusnode.md This example demonstrates how to use the `citrixadc_radiusnode` data source to get information about a RADIUS node identified by its IP prefix. ```APIDOC ## Data Source: radiusnode The `citrixadc_radiusnode` data source is used to retrieve information about a specific RADIUS node configured on the Citrix ADC. ### Example Usage ```hcl data "citrixadc_radiusnode" "example" { nodeprefix = "192.168.1.0/24" } ``` ### Argument Reference * `nodeprefix` - (Required) IP address/IP prefix of RADIUS node in CIDR format. ### Attribute Reference In addition to the argument, the following attributes are exported: * `id` - The ID of the RADIUS node. * `radkey` - The key shared between the RADIUS server and clients. Required for NetScaler to communicate with the RADIUS nodes. ``` -------------------------------- ### Use go-getter CLI Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/vendor/github.com/hashicorp/go-getter/v2/README.md Install and use the go-getter command-line tool to test URL strings. ```bash $ go install github.com/hashicorp/go-getter/cmd/go-getter ... $ go-getter github.com/foo/bar ./foo ... ``` -------------------------------- ### Example Usage of vpnvserver_authenticationnegotiatepolicy_binding Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/resources/vpnvserver_authenticationnegotiatepolicy_binding.md This example demonstrates how to configure a VPN virtual server, an authentication negotiate action, an authentication negotiate policy, and then bind the policy to the VPN virtual server. ```hcl resource "citrixadc_vpnvserver" "tf_vpnvserver" { name = "tf_vpnvserver" servicetype = "SSL" ipv46 = "3.3.3.3" port = 443 } resource "citrixadc_authenticationnegotiateaction" "tf_negotiateaction" { name = "tf_negotiateaction" domain = "DomainName" domainuser = "usersame" domainuserpasswd = "password" ntlmpath = "http://www.example.com/" defaultauthenticationgroup = "new_grpname" } resource "citrixadc_authenticationnegotiatepolicy" "tf_negotiatepolicy" { name = "tf_negotiatepolicy" rule = "ns_true" reqaction = citrixadc_authenticationnegotiateaction.tf_negotiateaction.name } resource "citrixadc_vpnvserver_authenticationnegotiatepolicy_binding" "tf_binding" { name = citrixadc_vpnvserver.tf_vpnvserver.name policy = citrixadc_authenticationnegotiatepolicy.tf_negotiatepolicy.name priority = 33 bindpoint = "AAA_RESPONSE" } ``` -------------------------------- ### Example Usage of icaglobal_icapolicy_binding Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/data-sources/icaglobal_icapolicy_binding.md Use this data source to get information about ICA global policy bindings. It requires the policy name, priority, and type. ```terraform data "citrixadc_icaglobal_icapolicy_binding" "tf_icaglobal_icapolicy_binding" { policyname = "tf_icapolicy" priority = 100 type = "ICA_REQ_DEFAULT" } output "globalbindtype" { value = data.citrixadc_icaglobal_icapolicy_binding.tf_icaglobal_icapolicy_binding.globalbindtype } output "gotopriorityexpression" { value = data.citrixadc_icaglobal_icapolicy_binding.tf_icaglobal_icapolicy_binding.gotopriorityexpression } ``` -------------------------------- ### Create Cluster Instance Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/resources/clusterinstance.md This example demonstrates how to create a new cluster instance with basic configuration. ```APIDOC ## Create Cluster Instance ### Description Creates a new cluster instance with specified parameters. ### Method POST ### Endpoint /citrixadc/v1/clusterinstance ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **clid** (Required, Integer) - Unique number that identifies the cluster. Minimum value = 1 Maximum value = 16 - **deadinterval** (Optional, Integer) - Amount of time, in seconds, after which nodes that do not respond to the heartbeats are assumed to be down. Minimum value = 1 Maximum value = 60 - **hellointerval** (Optional, Integer) - Interval, in milliseconds, at which heartbeats are sent to each cluster node to check the health status. Minimum value = 200 Maximum value = 1000 - **preemption** (Optional, String) - Preempt a cluster node that is configured as a SPARE if an ACTIVE node becomes available. Possible values: [ ENABLED, DISABLED ] - **quorumtype** (Optional, String) - Quorum Configuration Choices - "Majority" (recommended) requires majority of nodes to be online for the cluster to be UP. "None" relaxes this requirement. Possible values: [ MAJORITY, NONE ] - **inc** (Optional, String) - This option is required if the cluster nodes reside on different networks. Possible values: [ ENABLED, DISABLED ] - **processlocal** (Optional, String) - By turning on this option packets destined to a service in a cluster will not under go any steering. Possible values: [ ENABLED, DISABLED ] - **retainconnectionsoncluster** (Optional, String) - This option enables you to retain existing connections on a node joining a Cluster system or when a node is being configured for passive timeout. Possible values: [ YES, NO ] - **backplanebasedview** (Optional, String) - View based on heartbeat only on bkplane interface. Possible values: [ ENABLED, DISABLED ] - **syncstatusstrictmode** (Optional, String) - Strict mode for sync status of cluster. Possible values: [ ENABLED, DISABLED ] - **nodegroup** (Optional, String) - The node group in a Cluster system used for transition from L2 to L3. - **clusterproxyarp** (Optional, String) - This field controls the proxy arp feature in cluster. - **dfdretainl2params** (Optional, String) - Flag to add ext l2 header during steering. - **secureheartbeats** (Optional, String) - By turning on this option cluster heartbeats will have security enabled. ### Request Example ```json { "clid": 1, "deadinterval": 8, "hellointerval": 600, "preemption": "ENABLED", "quorumtype": "MAJORITY", "inc": "ENABLED", "processlocal": "ENABLED", "retainconnectionsoncluster": "YES", "backplanebasedview": "ENABLED", "syncstatusstrictmode": "ENABLED", "nodegroup": "default", "clusterproxyarp": "ENABLED", "dfdretainl2params": "ENABLED", "secureheartbeats": "ENABLED" } ``` ### Response #### Success Response (200) - **id** (String) - The id of the cluster instance. It has the same value as the `clid` attribute. #### Response Example ```json { "id": "1" } ``` ``` -------------------------------- ### Example Usage Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/data-sources/vpnglobal_authenticationsamlpolicy_binding.md This example demonstrates how to use the vpnglobal_authenticationsamlpolicy_binding data source to retrieve and output the policy name, priority, and secondary binding status. ```APIDOC ## Data Source: vpnglobal_authenticationsamlpolicy_binding The vpnglobal_authenticationsamlpolicy_binding data source allows you to retrieve information about a vpnglobal authenticationsamlpolicy binding. ### Example Usage ```terraform data "citrixadc_vpnglobal_authenticationsamlpolicy_binding" "tf_bind" { policyname = "tf_samlpolicy" } output "policyname" { value = data.citrixadc_vpnglobal_authenticationsamlpolicy_binding.tf_bind.policyname } output "priority" { value = data.citrixadc_vpnglobal_authenticationsamlpolicy_binding.tf_bind.priority } output "secondary" { value = data.citrixadc_vpnglobal_authenticationsamlpolicy_binding.tf_bind.secondary } ``` ## Argument Reference * `policyname` - (Required) The name of the policy. ## Attribute Reference In addition to the arguments, the following attributes are available: * `id` - The id of the vpnglobal_authenticationsamlpolicy_binding. It is a system-generated identifier. * `gotopriorityexpression` - Applicable only to advance vpn session policy. An expression or other value specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE. * `groupextraction` - Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded. * `priority` - Integer specifying the policy's priority. The lower the priority number, the higher the policy's priority. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000. * `secondary` - Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords. ``` -------------------------------- ### Example Usage of rewritepolicy Data Source Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/data-sources/rewritepolicy.md Use this data source to get information about an existing rewrite policy by its name. The policy's action is then exported. ```hcl data "citrixadc_rewritepolicy" "example" { name = "my_rewrite_policy" } output "policy_action" { value = data.citrixadc_rewritepolicy.example.action } ``` -------------------------------- ### Example Usage of feoglobal_feopolicy_binding Source: https://github.com/citrix/terraform-provider-citrixadc/blob/master/docs/data-sources/feoglobal_feopolicy_binding.md Use this data source to get information about a globally bound front-end optimization policy. It requires the policy name and type as arguments. ```terraform data "citrixadc_feoglobal_feopolicy_binding" "tf_feoglobal_feopolicy_binding" { policyname = "tf_feopolicy" type = "REQ_DEFAULT" } output "policyname" { value = data.citrixadc_feoglobal_feopolicy_binding.tf_feoglobal_feopolicy_binding.policyname } output "priority" { value = data.citrixadc_feoglobal_feopolicy_binding.tf_feoglobal_feopolicy_binding.priority } output "type" { value = data.citrixadc_feoglobal_feopolicy_binding.tf_feoglobal_feopolicy_binding.type } ```