cloudflare_access_application (Resource)

Provides a Cloudflare Access Application resource. Access Applications are used to restrict access to a whole application using an authorisation gateway managed by Cloudflare.

Example Usage

resource "cloudflare_access_application" "staging_app" {
  zone_id                   = "0da42c8d2132a9ddaf714f9e7c920711"
  name                      = "staging application"
  domain                    = "staging.example.com"
  type                      = "self_hosted"
  session_duration          = "24h"
  auto_redirect_to_identity = false
}

# With CORS configuration
resource "cloudflare_access_application" "staging_app" {
  zone_id          = "0da42c8d2132a9ddaf714f9e7c920711"
  name             = "staging application"
  domain           = "staging.example.com"
  type             = "self_hosted"
  session_duration = "24h"
  cors_headers {
    allowed_methods   = ["GET", "POST", "OPTIONS"]
    allowed_origins   = ["https://example.com"]
    allow_credentials = true
    max_age           = 10
  }
}

Schema

Optional

Read-Only

Nested Schema for cors_headers

Optional:

Optional:

Nested Schema for landing_page_design

Optional:

Nested Schema for saas_app

Optional:

Read-Only:

Nested Schema for saas_app.custom_attribute

Required:

Optional:

Nested Schema for saas_app.custom_attribute.source

Required:

Nested Schema for scim_config

Required:

Optional:

Nested Schema for scim_config.authentication using HTTP Basic authentication

Required:

Nested Schema for scim_config.authentication using OAuth Bearer Token authentication

Required:

Nested Schema for scim_config.authentication using OAuth 2 authentication

Required:

Optional:

Nested Schema for scim_config.mappings

Required:

Optional:

Nested Schema for scim_config.mappings.operations

Optional:

Import

Import is supported using the following syntax:

$ terraform import cloudflare_access_application.example <account_id>/<application_id>