OAuth Clients
resource cloudflare_oauth_client
required
Array of OAuth grant types the client is allowed to use. authorization_code is required; refresh_token may be included optionally.
Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes offline_access and openid are added or removed automatically based on grant_types and response_types.
optional
cloudflare_oauth_client
resource "cloudflare_oauth_client" "example_oauth_client" {
account_id = "023e105f4ecef8ad9ca31a8372d0c353"
client_name = "My OAuth App"
grant_types = ["authorization_code", "refresh_token"]
redirect_uris = ["https://example.com/callback"]
response_types = ["code"]
scopes = ["account.read"]
token_endpoint_auth_method = "client_secret_post"
allowed_cors_origins = ["https://example.com"]
client_uri = "https://example.com"
logo_uri = "https://example.com/logo.png"
policy_uri = "https://example.com/privacy"
post_logout_redirect_uris = ["https://example.com/logout"]
tos_uri = "https://example.com/tos"
}
data cloudflare_oauth_client
required
computed
Indicates whether the client has a rotated secret that has not yet been deleted.
Array of OAuth grant types the client is allowed to use. authorization_code is required; refresh_token may be included optionally.
Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes offline_access and openid are added or removed automatically based on grant_types and response_types.
cloudflare_oauth_client
data "cloudflare_oauth_client" "example_oauth_client" {
account_id = "023e105f4ecef8ad9ca31a8372d0c353"
oauth_client_id = "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
}