Theo dõi lịch sử của bạn Track your history ពិនិត្យឡើងវិញប្រវត្តិសាស្រ្តរបស់អ្នក
Hướng dẫn chi tiết đồng bộ từ docs Cloudflare — mỗi section có backlink tới đúng vị trí trên trang gốc. Detailed guide synced from Cloudflare docs — each section links to the matching anchor on the official page. មគ្គុទ្ទេសក៍លម្អិតធ្វើសមកាលពី docs Cloudflare — ផ្នែកនីមួយៗមានតំណទៅទីតាំងត្រូវគ្នានៅទំព័រផ្លូវការ។
← Danh mục ← Catalog ← បញ្ជីGiải thích nhanh Quick context បរិបទរហ័ស
Thuộc nhóm Application Services — tập trung bảo vệ, tăng tốc và vận hành ứng dụng/web phía trước origin. Tutorial «2 – Track your history» giúp bạn làm quen luồng triển khai thật — phù hợp đọc trước khi mở tài liệu gốc tiếng Anh. Docs gốc chia khoảng 2 bước chính; bản tóm tắt dưới đây giúp bạn nắm khung trước khi làm theo từng lệnh.
Learn how to track history with Cloudflare Terraform.
តើធ្វើដូចម្តេចដើម្បីរក្សាទុកប្រវត្តិសាស្រ្តជាមួយ Cloudflare Terraform ។
Lưu ý Note ចំណាំ
Lưu ý trước khi làm Notes before you start ចំណាំមុនពេលចាប់ផ្តើម
- Đây là bản tóm tắt trên Orange Cloud Learning Hub — không thay thế tài liệu chính thức.
- Luôn mở liên kết «Tài liệu gốc» bên dưới khi cần lệnh CLI, snippet code và ảnh minh họa đầy đủ.
- Kiểm tra token/API và state backend trước khi chạy trên môi trường production.
- Docs Cloudflare cập nhật thường xuyên — đối chiếu ngày «Rà soát lần cuối» trên trang gốc khi triển khai production.
- This is a summary on Orange Cloud Learning Hub — it does not replace the official documentation.
- Open the Official docs link below for CLI commands, code snippets, and full screenshots.
- Verify API tokens and the state backend before running against production.
- Cloudflare docs change frequently — verify the Last reviewed date on the official page before production use.
- នេះគឺជាការបញ្ជាក់អំពី Orange Cloud Learning Hub — វាគឺជាការផ្លាស់ប្តូរនៃឯកសារផ្លូវការ។
- ចុចតំណភ្ជាប់ Docs Official នៅខាងក្រោមសម្រាប់ការបញ្ជា CLI, សៀវភៅកូដនិងរូបថតពេញលេញ។
- សូមពិនិត្យមើល API tokens និងការបង្វិលប្រព័ន្ធប្រតិបត្តិការមុនពេលធ្វើការប្រឆាំងនឹងការផលិត។
- Cloudflare បានផ្លាស់ប្តូរជាធម្មតានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅ។
Overview Overview Overview
Phần «Tổng quan» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.
Read the "Overview" section below — open the official docs link for full screenshots and configuration tabs.
អានផ្នែក «Overview» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។
Liên kết liên quan (docs Cloudflare) Related links (Cloudflare docs) តំណពាក់ព័ន្ធ (docs Cloudflare)
1.Điều Sử dụng các biến môi trường để xác thực 1. Use environment variables for authentication 1 ។ ការប្រើប្រាស់ផ្លាស់ប្តូរបរិស្ថានសម្រាប់ការត្រួតពិនិត្យ
Phần «Sử dụng environment variables for authentication» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.
Read the "1. Use environment variables for authentication" section below — open the official docs link for full screenshots and configuration tabs.
អានផ្នែក «1 ។ ការប្រើប្រាស់ផ្លាស់ប្តូរបរិស្ថានសម្រាប់ការត្រួតពិនិត្យ» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។
main.tf của bạn để loại bỏ mã hóa cứng API token:main.tf file to remove the hardcoded API token:main.tf របស់អ្នកដើម្បីជួសជុល token API ដែលមានកូដខ្ពស់:terraform {
required_providers {
cloudflare = {
source = "cloudflare/cloudflare"
version = "~> 5"
}
}
}
provider "cloudflare" {
# API token will be read from CLOUDFLARE_API_TOKEN environment variable
}
variable "zone_id" {
description = "Cloudflare Zone ID"
type = string
sensitive = true
}
variable "account_id" {
description = "Cloudflare Account ID"
type = string
sensitive = true
}
variable "domain" {
description = "Domain name"
type = string
default = "example.com"
}
resource "cloudflare_dns_record" "www" {
zone_id = var.zone_id
name = "www"
content = "203.0.113.10"
type = "A"
ttl = 1
proxied = true
comment = "Domain verification record"
} terraform.tfvars của bạn:terraform.tfvars file:terraform.tfvars របស់អ្នក:zone_id = "your-zone-id-here"
account_id = "your-account-id-here"
domain = "your-domain.com" export CLOUDFLARE_API_TOKEN="your-api-token-here" terraform plan # cloudflare_dns_record.www will be updated in-place
~ resource "cloudflare_dns_record" "www" {
~ name = "www.your-domain.com" -> "www"
~ zone_id = (sensitive value)
# (other attributes may show changes)
}
Plan: 0 to add, 1 to change, 0 to destroy. Liên kết liên quan (docs Cloudflare) Related links (Cloudflare docs) តំណពាក់ព័ន្ធ (docs Cloudflare)
2.Đối với Cấu hình lưu trữ trong GitHub 2. Store configuration in GitHub 2 ។ ប្រព័ន្ធ ប្រតិបត្តិការ iOS GitHub
Tạo .gitignore file with these contents:
Read the "2. Store configuration in GitHub" section below — open the official docs link for full screenshots and configuration tabs.
អានផ្នែក «2 ។ ប្រព័ន្ធ ប្រតិបត្តិការ iOS GitHub» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។
.gitignore với các nội dung sau:.gitignore file with these contents:.gitignore ជាមួយនឹងការរួមបញ្ចូលទាំងនេះ:.terraform/
*.tfstate*
.terraform.lock.hcl
terraform.tfvars git init
git add main.tf .gitignore
git commit -m "Step 2 - Initial Terraform v5 configuration" git branch -M main
git remote add origin https://github.com/YOUR_USERNAME/cf-config.git
git push -u origin main {"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/terraform/","name":"Terraform"}},{"@type":"ListItem","position":3,"item":{"@id":"/terraform/tutorial/","name":"Tutorials"}},{"@type":"ListItem","position":4,"item":{"@id":"/terraform/tutorial/track-history/","name":"2 – Track your history"}}]} Xem bản đầy đủ trên developers.cloudflare.com (ảnh, tab cấu hình). View the full guide on developers.cloudflare.com (images, config tabs). មើលមគ្គុទ្ទេសក៍ពេញលើ developers.cloudflare.com (រូបភាព, tab កំណត់)។
Tài liệu gốc ↗ Official docs ↗ ឯកសារផ្លូវការ ↗