You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
resource"incapsula_site""main" {
domain=var.fqdndomain_validation="dns"send_site_setup_emails="false"site_ip=var.fqdnforce_ssl="true"data_storage_region="US"wildcard_san="false"
}
resource"incapsula_data_centers_configuration""main" {
site_id=incapsula_site.main.idsite_topology="SINGLE_DC"data_center {
name="New DC"ip_mode="MULTIPLE_IP"origin_server {
address=var.destination_ip_or_fqdn# the DNS/IP of the ELBis_active=true
}
}
}
resource"incapsula_application_delivery""main" {
site_id=incapsula_site.main.idfile_compression=trueminify_css=trueminify_js=trueminify_static_html=truecompress_jpeg=trueprogressive_image_rendering=falseaggressive_compression=falsecompress_png=truetcp_pre_pooling=trueorigin_connection_reuse=truesupport_non_sni_clients=trueenable_http2=truehttp2_to_origin=trueredirect_http_to_https=trueredirect_naked_to_full=falselifecycle {
ignore_changes=[port_to, ssl_port_to]
}
}
Debug output
N/A
Panic output
N/A
Expected output
The application delivery resource to apply successfully
Actual output
│ Error: Error status code 401 from Incapsula service when Updating Application Delivery for Site ID [redacted]: {"res":9415,"res_message":"Operation not allowed","debug_info":{"error":"HTTP/2 support requires that SSL will be configured for your website","id-info":"999999"}}
│
│ with module.base.module.imperva_site[0].incapsula_application_delivery.main
Steps to reproduce
Apply a terraform configuration containing an incapsula_site, incapsula_data_centers_configuration and incapsula_application_delivery resource like the example configuration above. Using an imperva-generated certificate is required to reproduce this issue.
The incapsula_site and incapsula_data_centers_configuration resource will deploy successfully but the incapsula_application_delivery resource will fail (with the error above) because the SSL cert hasn't been approved yet.
Additional factoids
The certificate request approval time seems to vary anywhere from seconds up to an hour. I've seen it take as long as 45-50 minutes in the past couple of days. Querying the site status API (https://my.imperva.com/api/prov/v1/sites/status?site_id=[redacted]) returns a status of "pending-certificate" until the cert has been approved. I wrote a hacky solution to query this API every 10 seconds until the status returns "fully-configured", which is the only time I can successfully apply the incapsula_application_delivery resource to finish configuring my site. This is very frustrating and prevents our terraform module from deploying a site in a single run. Could we get a resource or data source that waits for the cert request approval before continuing so I can apply the incapsula_application_delivery resource in a single run? You all may feel it would be better to add that logic to the site resource or something else, but any method to work around this would be /very/ helpful.
I'll be opening a support case to help escalate this request internally as well.
Thank you!
References
N/A
The text was updated successfully, but these errors were encountered:
Confirmation
Terraform and Imperva provider version
Terraform v1.2.2
on darwin_arm64
Affected resource(s)
incapsula_application_delivery
Terraform configuration files
Debug output
N/A
Panic output
N/A
Expected output
The application delivery resource to apply successfully
Actual output
│ Error: Error status code 401 from Incapsula service when Updating Application Delivery for Site ID [redacted]: {"res":9415,"res_message":"Operation not allowed","debug_info":{"error":"HTTP/2 support requires that SSL will be configured for your website","id-info":"999999"}}
│
│ with module.base.module.imperva_site[0].incapsula_application_delivery.main
Steps to reproduce
Additional factoids
The certificate request approval time seems to vary anywhere from seconds up to an hour. I've seen it take as long as 45-50 minutes in the past couple of days. Querying the site status API (https://my.imperva.com/api/prov/v1/sites/status?site_id=[redacted]) returns a status of "pending-certificate" until the cert has been approved. I wrote a hacky solution to query this API every 10 seconds until the status returns "fully-configured", which is the only time I can successfully apply the incapsula_application_delivery resource to finish configuring my site. This is very frustrating and prevents our terraform module from deploying a site in a single run. Could we get a resource or data source that waits for the cert request approval before continuing so I can apply the incapsula_application_delivery resource in a single run? You all may feel it would be better to add that logic to the site resource or something else, but any method to work around this would be /very/ helpful.
I'll be opening a support case to help escalate this request internally as well.
Thank you!
References
N/A
The text was updated successfully, but these errors were encountered: