From 00fb5a6d1506f365bff4da5388951c7e0f5a02ae Mon Sep 17 00:00:00 2001 From: ponkio-o <29038315+ponkio-o@users.noreply.github.com> Date: Sun, 4 Sep 2022 15:50:35 +0900 Subject: [PATCH 1/4] fix: added newline --- docs/resources/corp_integration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/resources/corp_integration.md b/docs/resources/corp_integration.md index 8c39741..12abd14 100644 --- a/docs/resources/corp_integration.md +++ b/docs/resources/corp_integration.md @@ -26,4 +26,4 @@ You can import corp integrations with the generic corp import formula Example: ```shell script terraform import sigsci_corp_integration.test_corp_integration id -``` \ No newline at end of file +``` From a1348d0b86f10595d725b91d0666e39a8d1e0e58 Mon Sep 17 00:00:00 2001 From: ponkio-o <29038315+ponkio-o@users.noreply.github.com> Date: Sun, 4 Sep 2022 15:50:53 +0900 Subject: [PATCH 2/4] add: added corp_cloudwaf_instance --- docs/resources/corp_cloudwaf_instance.md | 64 ++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 docs/resources/corp_cloudwaf_instance.md diff --git a/docs/resources/corp_cloudwaf_instance.md b/docs/resources/corp_cloudwaf_instance.md new file mode 100644 index 0000000..25956f9 --- /dev/null +++ b/docs/resources/corp_cloudwaf_instance.md @@ -0,0 +1,64 @@ +### Example Usage + +```hcl-terraform +resource "sigsci_corp_cloudwaf_instance" "test_corp_cloudwaf" { + name = "Test CloudWAF" + description = "for test" + region = "ap-northeast-1" + tls_min_version = "1.2" + use_uploaded_certificates = true + + workspace_configs { + site_name = sigsci_site.this.short_name + instance_location = "direct" + listener_protocols = [ + "https", + ] + + routes { + certificate_ids = [ + "a01bc234-5678-9de0-a12b-3456c789d12d", + ] + connection_pooling = true + domains = [ + "example.com", + ] + origin = "https://origin.example.com" + pass_host_header = true + trust_proxy_headers = false + } + } +} +``` + +### Argument Reference +- `name` - (Required) Friendly name to identify a CloudWAF instance. +- `description` - (Required) Friendly description to identify a CloudWAF instance. +- `region` - (Required) Region the CloudWAF Instance is being deployed to. See the [documentation](https://docs.fastly.com/signalsciences/api/#_corps__corpName__cloudwafInstances_post) for a list of available regions. +- `tls_min_version` - (Required) TLS minimum version. Versions Available: "1.0", "1.2". +- `use_uploaded_certificates` - (Required) If "true", use the uploaded certificate. +- `workspace_configs` - (Required) Workspace Configs. Detailed below. + +#### `workspace_configs` +- `site_name` - (Required) Site name. +- `instance_location` - (Required) Set instance location to "direct" or "advanced". +- `client_ip_header` - (Optional) Specify the request header containing the client IP address, available when InstanceLocation is set to "advanced". Default: "X-Forwarded-For". +- `listener_protocols` - (Required) Specify the protocol or protocols required. ex. ["http", "https"], ["https"]. +- `routes` - (Required) Routes. Detailed below. + +##### `routes` +- `certificate_ids` - (Optional) List of certificate IDs in string associated with request URI or domains. IDs will be available in certificate GET request. +- `connection_pooling` - (Optional) If enabled, this will allow open TCP connections to be reused (default: true). +- `domains` - (Required) List of domain or request URIs, up to 100 entries. +- `origin` - (Required) Origin server URI. +- `pass_host_header` - (Optional) Pass the client supplied host header through to the upstream (including the upstream TLS handshake for use with SNI and certificate validation). If using Heroku or Server Name Indications (SNI), this must be disabled (default: false). +- `trust_proxy_headers` - (Optional) If true, will trust proxy headers coming into the agent. If false, will ignore and drop those headers (default: false). + +### Attributes Reference +In addition to all arguments, the following fields are also available +- `id` - the identifier of the resource + +### Import +``` +$ terraform import sigsci_corp_cloudwaf_instance.test_corp_cloudwaf id +``` From 3de50623c0afd078254c8e36186b19b489d67e9b Mon Sep 17 00:00:00 2001 From: ponkio-o <29038315+ponkio-o@users.noreply.github.com> Date: Mon, 12 Sep 2022 09:56:27 +0900 Subject: [PATCH 3/4] add: added link --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a15db18..7b61245 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,8 @@ provider "sigsci" { [Integrations](https://github.com/signalsciences/terraform-provider-sigsci/blob/main/docs/resources/corp_integration.md) +[Cloud WAF Instance](https://github.com/signalsciences/terraform-provider-sigsci/blob/main/docs/resources/corp_cloudwaf_instance.md) + ## Site resources [Lists](https://github.com/signalsciences/terraform-provider-sigsci/blob/main/docs/resources/site_list.md) From b0c5c335a7344ed72b0724b515898c14304306b2 Mon Sep 17 00:00:00 2001 From: grokify Date: Mon, 12 Sep 2022 22:23:28 +0000 Subject: [PATCH 4/4] update cloud waf instance doc formatting --- docs/resources/corp_cloudwaf_instance.md | 26 ++++++++++-------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/docs/resources/corp_cloudwaf_instance.md b/docs/resources/corp_cloudwaf_instance.md index 25956f9..8b25583 100644 --- a/docs/resources/corp_cloudwaf_instance.md +++ b/docs/resources/corp_cloudwaf_instance.md @@ -38,21 +38,17 @@ resource "sigsci_corp_cloudwaf_instance" "test_corp_cloudwaf" { - `tls_min_version` - (Required) TLS minimum version. Versions Available: "1.0", "1.2". - `use_uploaded_certificates` - (Required) If "true", use the uploaded certificate. - `workspace_configs` - (Required) Workspace Configs. Detailed below. - -#### `workspace_configs` -- `site_name` - (Required) Site name. -- `instance_location` - (Required) Set instance location to "direct" or "advanced". -- `client_ip_header` - (Optional) Specify the request header containing the client IP address, available when InstanceLocation is set to "advanced". Default: "X-Forwarded-For". -- `listener_protocols` - (Required) Specify the protocol or protocols required. ex. ["http", "https"], ["https"]. -- `routes` - (Required) Routes. Detailed below. - -##### `routes` -- `certificate_ids` - (Optional) List of certificate IDs in string associated with request URI or domains. IDs will be available in certificate GET request. -- `connection_pooling` - (Optional) If enabled, this will allow open TCP connections to be reused (default: true). -- `domains` - (Required) List of domain or request URIs, up to 100 entries. -- `origin` - (Required) Origin server URI. -- `pass_host_header` - (Optional) Pass the client supplied host header through to the upstream (including the upstream TLS handshake for use with SNI and certificate validation). If using Heroku or Server Name Indications (SNI), this must be disabled (default: false). -- `trust_proxy_headers` - (Optional) If true, will trust proxy headers coming into the agent. If false, will ignore and drop those headers (default: false). + - `site_name` - (Required) Site name. + - `instance_location` - (Required) Set instance location to "direct" or "advanced". + - `client_ip_header` - (Optional) Specify the request header containing the client IP address, available when InstanceLocation is set to "advanced". Default: "X-Forwarded-For". + - `listener_protocols` - (Required) Specify the protocol or protocols required. ex. ["http", "https"], ["https"]. + - `routes` - (Required) Routes. Detailed below. + - `certificate_ids` - (Optional) List of certificate IDs in string associated with request URI or domains. IDs will be available in certificate GET request. + - `connection_pooling` - (Optional) If enabled, this will allow open TCP connections to be reused (default: true). + - `domains` - (Required) List of domain or request URIs, up to 100 entries. + - `origin` - (Required) Origin server URI. + - `pass_host_header` - (Optional) Pass the client supplied host header through to the upstream (including the upstream TLS handshake for use with SNI and certificate validation). If using Heroku or Server Name Indications (SNI), this must be disabled (default: false). + - `trust_proxy_headers` - (Optional) If true, will trust proxy headers coming into the agent. If false, will ignore and drop those headers (default: false). ### Attributes Reference In addition to all arguments, the following fields are also available