返回提示词目录第 1187 页

配置云成本归属与预算告警

为云资源规划费用归属、标签约束与账单报表,形成预算告警配置和分阶段实施方案。

完整提示词

<context>
Most organisations cannot say what a team or product costs, so cost reviews turn into arguments. Allocation works from the top down: the cheapest and most reliable split is structural (one account, project or subscription per team or environment), and tags or labels refine within it. Tags only count for billing after they are activated as cost allocation tags (AWS) or exported with billing data (GCP labels, Azure tags), and a tag only shows up for usage that happened while it was on the resource (AWS can backfill the activation of tags that already existed, but adding a tag today does not relabel last year), so start early. Some spend can never be tagged (support plans, data transfer, shared clusters, NAT gateways, marketplace fees); it needs an explicit shared-cost rule (proportional, fixed split or a platform line item) or it becomes an unexplained remainder. Kubernetes spend needs in-cluster allocation by namespace or label (for example OpenCost or the provider's split-cost feature). Budgets alert on forecasts and thresholds; anomaly detection catches a sudden spike from one service that a monthly budget would miss for weeks.
</context>

<task>
Set up cost allocation on {{cloud}} for:
{{organisation}}
{{#goals}}
Goals: {{goals}}
{{/goals}}

1. Allocation model: what is split structurally (accounts, projects, subscriptions), what by tags, and the rule for shared and untaggable costs. Say whether this is showback or chargeback and who owns the numbers.
2. Tag policy: a small required set (for example `team`, `service`, `env`, `cost-center`), exact key spelling and case, allowed values or their source of truth, and which resource types are exempt. Fewer reliable tags beat many optional ones.
3. Enforcement: default tags in IaC (provider-level default tags or labels), a policy that rejects untagged resources (organisation tag policies, Azure Policy, organisation policy constraints, or policy as code in CI), and a weekly report of untagged spend with owners.
4. Reports: activate the cost allocation tags or billing export, the views or dashboards to build (by team, service, environment, trend), and the Kubernetes allocation approach if clusters are shared.
5. Budgets and alerts: one budget per team or account with forecast and actual thresholds, anomaly detection monitors per service or account, and who receives each alert and what they are expected to do.
6. Rollout: order of steps with the first useful report date, noting that tags are not retroactive.
</task>

<constraints>
- Use only provider features that exist; if unsure of a feature name or availability, say so.
- Do not invent prices, savings or percentages; the goal is visibility, not estimates.
- Keep the tag set small and say why each tag exists.
{{> output/uncertainty}}
</constraints>

<output_format>
## Allocation model
A short paragraph plus the shared-cost rule.
## Tag policy
Table: key | allowed values or source | required on | example.
## Enforcement
Bullets with config snippets in fenced blocks where useful.
## Reports
Bullets: views to build and where.
## Budgets and alerts
Table: scope | threshold or monitor | recipient | expected action.
## Rollout
Numbered steps.
</output_format>

可替换内容

  • {{cloud}}
  • {{organisation}}
  • {{#goals}}
  • {{goals}}
  • {{/goals}}
  • {{> output/uncertainty}}

分类与标签

编程开发、云成本治理、资源标签、预算告警、基础设施配置

前往 AI 图片创作