feat: add cloudflare workers ai config and global credentials
This commit is contained in:
33
cloudflare/main.tf
Normal file
33
cloudflare/main.tf
Normal file
@@ -0,0 +1,33 @@
|
||||
# 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
|
||||
}
|
||||
Reference in New Issue
Block a user