34 lines
958 B
HCL
34 lines
958 B
HCL
# Cloudflare Workers AI Configuration
|
|
# API Token: trV3uWTLDCORnGQy8hXTI7r8wj2AT2nFBIomFNVf
|
|
|
|
terraform {
|
|
required_providers {
|
|
cloudflare = {
|
|
source = "cloudflare/cloudflare"
|
|
version = "~> 3.32"
|
|
}
|
|
}
|
|
}
|
|
|
|
# Configure Cloudflare Provider with API Token
|
|
provider "cloudflare" {
|
|
api_token = "trV3uWTLDCORnGQy8hXTI7r8wj2AT2nFBIomFNVf"
|
|
}
|
|
|
|
# Get current account information
|
|
data "cloudflare_accounts" "this" {}
|
|
|
|
# Example: Cloudflare Workers AI Model Usage
|
|
# Note: Workers AI can be invoked via Cloudflare's REST API using this token
|
|
|
|
# Output account information
|
|
output "account_id" {
|
|
description = "Cloudflare Account ID"
|
|
value = length(data.cloudflare_accounts.this.accounts) > 0 ? data.cloudflare_accounts.this.accounts[0].id : null
|
|
}
|
|
|
|
output "account_name" {
|
|
description = "Cloudflare Account Name"
|
|
value = length(data.cloudflare_accounts.this.accounts) > 0 ? data.cloudflare_accounts.this.accounts[0].name : null
|
|
}
|