Back to Terraform

Alibaba Deep Dive: Regional Capacity, Import Normalization and Provider Changes

November 6, 2026 Wasil Zafar 23 min read

Record endpoints, quotas, import and API support through a controlled provider-specific rehearsal

Table of Contents

  1. Build a Region, Product and Resource Support Ledger
  2. Diagnose Unavailable Images or Instance Types
  3. Reconcile Deprecated Fields and Imported Defaults
  4. Rehearse a Change Without Releasing Unowned Addresses or Data
  5. Accept a Stable Plan with a Billable-Resource Inventory

Build a Region, Product and Resource Support Ledger

A ledger row is a promise about one product in one region. It records where the API answers, what the ceiling is, whether the zone holds stock, and how an existing object is identified. Most failed launches answer only the first question and discover the other three during the apply.

Endpoints come in two families, and the family decides the credential path. RAM and STS answer on global endpoints while compute, network, storage and key management answer per region. One provider region therefore reaches one control plane per service, and an endpoint override that disagrees with that region addresses a place where the object does not exist.

Quota is a ceiling with a narrow scope. vCPU is counted per instance family in a region, VPC and EIP counts are counted per region, and security group rules are counted per group. Quota Center prints the number for your tier, and an approval raises that ceiling and nothing else.

Capacity is a separate fact that quota cannot answer. A quota says how many instances you may hold; capacity says whether the zone has that family in stock this hour. A sold-out zone refuses an instance your quota already allows, and no increase changes that.

Import support belongs in the row because it decides ownership. Each resource page either documents an import identity for 2.2.0 or it does not, and the shape it names is the one the API accepts. A product without an import path is adopted by hand or left outside Terraform, and both choices need a name.

Activation is the gate that masquerades as a permission problem. A product that was never activated in the region returns a refusal that reads like a missing RAM action. Record the activation step beside the product instead of widening the policy until something passes.

Pin the build at the top of the ledger. Terraform 1.17.1 and provider 2.2.0 are the versions the rows were read against, and the lock file proves what init downloaded. A floating constraint turns the ledger into a description of whatever resolved that morning.

Figure 1 orders the gates so that a refusal is attributed to the layer that owns it.

Build a Region, Product and Resource Support Ledger
%%{init: {'theme':'base','themeCSS':'.edgeLabel .label text, .edgeLabel text, .edgeLabel span { fill:#132440 !important; color:#132440 !important; }','themeVariables': {'primaryColor':'#16476A','primaryTextColor':'#ffffff','primaryBorderColor':'#132440','secondaryColor':'#3B9797','secondaryTextColor':'#ffffff','secondaryBorderColor':'#132440','tertiaryColor':'#c4873b','tertiaryTextColor':'#132440','tertiaryBorderColor':'#132440','lineColor':'#5a6e82','textColor':'#132440','titleColor':'#132440','mainBkg':'#16476A','nodeBorder':'#132440','clusterBkg':'#eef3f7','clusterBorder':'#132440','edgeLabelBackground':'#ffffff','actorBkg':'#16476A','actorTextColor':'#ffffff','actorBorder':'#132440','activationBkgColor':'#3B9797','activationBorderColor':'#132440','signalColor':'#5a6e82','signalTextColor':'#132440','noteBkgColor':'#c4873b','noteTextColor':'#132440','noteBorderColor':'#132440','labelBoxBkgColor':'#a8dede','labelBoxBorderColor':'#132440','labelTextColor':'#132440','loopTextColor':'#132440','altBackground':'#f8f9fa','fontFamily':'DM Sans, sans-serif'}}}%%
flowchart TD
    W["Workload shape
zones, family, storage"] --> R{"Region approved
for this account?"} R -->|"no"| R1["Stop
data residency or endpoint scope"] R -->|"yes"| P{"Product activated
in this region?"} P -->|"no"| P1["Activate, then re-read the quota"] P -->|"yes"| Q{"Quota ceiling
above the ask?"} Q -->|"no"| Q1["File the increase
before the window"] Q -->|"yes"| C{"Zone stock for
this exact family?"} C -->|"no"| C1["Change zone or family
as a design decision"] C -->|"yes"| I{"Import path documented
in 2.2.0?"} I -->|"no"| I1["Own outside Terraform
or adopt by hand"] I -->|"yes"| L["Ledger row accepted
with a build and a date"] Q1 --> C P1 --> Q classDef primary fill:#132440,color:#ffffff,stroke:#0b172b; classDef secondary fill:#16476A,color:#ffffff,stroke:#0f314a; classDef ok fill:#3B9797,color:#ffffff,stroke:#2a6f6f; classDef danger fill:#BF092F,color:#ffffff,stroke:#7a0420; classDef warn fill:#c4873b,color:#132440,stroke:#8a5a1f; class W,L primary; class R,P,Q,C,I secondary; class Q1,C1 warn; class R1,P1,I1 danger;

The order matters more than the count. A regional rejection is a policy conversation, a quota rejection is a ticket, and a stock rejection is a design change.

Account, region and zone layers feeding one ledger row Three stacked bands show the account layer with global endpoints and account quotas, the region layer with regional endpoints and product activation, and the zone layer with instance family stock. Arrows feed one ledger row that records endpoint scope, quota unit, capacity source, import identity, read path, activation state and the build pin. A crimson footer states that a clean plan proves the schema agreed, not that the zone has stock, and a note below separates quota ceilings from zone capacity. Three layers answer three different questions A ledger row flattens all of them onto one product. Account layer global endpoints for RAM and STS account quotas, roles and shared controls owned by the platform, read here Region layer regional endpoints for compute and storage regional quotas and product activation one control plane per service per region Zone layer stock for an exact instance family disk category and image availability changes without any schema change Ledger row one product, one region, one build endpoint scope: global or regional quota unit and quota scope capacity source: zone and family import identity as documented in 2.2.0 read path the provider uses on refresh activation state in the target region build pin: Terraform 1.17.1, provider 2.2.0 Complete when a second engineer can predict the first failure from the row. Quota cannot answer stock. A clean plan proves the schema agreed, not that the zone has stock. The plan is a claim about configuration; capacity is a claim about the zone. An approved quota raises a ceiling. It never adds inventory.

The layers are nested, and the ledger is what flattens them. Account controls reach every region, a regional endpoint reaches one control plane, and zone capacity reaches one family on one rack.

Table 1 gives the row shape; add resource-specific identity notes underneath it.

Ledger fieldWhat to recordEnforced byCost of assuming it
Endpoint scopeGlobal for RAM and STS, regional for compute, network and storageProvider region and endpoint blockThe call lands in a region with no such object
Quota unit and scopevCPU per family and region, EIP per region, rules per groupQuota Center and the service consoleAn approved increase still leaves the plan denied
Capacity sourceZone stock for the exact family, plus disk categoryZone and instance type dataClean plan, failed create
Import identitySimple ID, name, or composite with named separatorsResource page Import section for 2.2.0Import adopts a different object
Read pathDescribe call the provider uses on refreshProvider schema and APIDrift is invisible and the plan stays empty
ActivationProduct state and any service-linked roleConsole and the platform ownerA denial is read as a policy gap
Build pinTerraform 1.17.1 with alicloud 2.2.0The lock fileReview against a schema you do not run

Diagnose Unavailable Images or Instance Types

The first split is where the failure happened, not what it said. A validation error names a file, a line and an argument and arrives before any API call, while a service refusal carries a request ID from the other side. Reading that difference saves an afternoon of policy debugging on a misspelled argument.

A schema error means the pinned provider does not accept what you wrote. In 2.2.0 an argument may have been renamed, moved into a block, or removed at the major boundary, and validation catches all three for free. Nothing about the account, the region or the zone is implicated, so no amount of quota or capacity work will change the message.

An image is a regional object with an architecture. Image IDs do not travel between regions, a copied image arrives under a new identifier, and an Arm image cannot boot an x86 instance family. An image that exists in the console is therefore not evidence that it exists for the type you picked.

An instance type is offered per zone, not per region. A family that is listed for the region can still be absent in zone b, and the zone filter is what turns a regional catalogue into a launchable answer. This is the cheapest place to discover that the design needs a second vSwitch.

Resolve the image and the type together. Filtering images by instance type produces a pair that launches, while two independent lookups can each be correct and still be incompatible. That single change removes the most common class of first-apply failure.

Diagnose Unavailable Images or Instance Types
%%{init: {'theme':'base','themeCSS':'.edgeLabel .label text, .edgeLabel text, .edgeLabel span { fill:#132440 !important; color:#132440 !important; }','themeVariables': {'primaryColor':'#16476A','primaryTextColor':'#ffffff','primaryBorderColor':'#132440','secondaryColor':'#3B9797','secondaryTextColor':'#ffffff','secondaryBorderColor':'#132440','tertiaryColor':'#c4873b','tertiaryTextColor':'#132440','tertiaryBorderColor':'#132440','lineColor':'#5a6e82','textColor':'#132440','titleColor':'#132440','mainBkg':'#16476A','nodeBorder':'#132440','clusterBkg':'#eef3f7','clusterBorder':'#132440','edgeLabelBackground':'#ffffff','actorBkg':'#16476A','actorTextColor':'#ffffff','actorBorder':'#132440','activationBkgColor':'#3B9797','activationBorderColor':'#132440','signalColor':'#5a6e82','signalTextColor':'#132440','noteBkgColor':'#c4873b','noteTextColor':'#132440','noteBorderColor':'#132440','labelBoxBkgColor':'#a8dede','labelBoxBorderColor':'#132440','labelTextColor':'#132440','loopTextColor':'#132440','altBackground':'#f8f9fa','fontFamily':'DM Sans, sans-serif'}}}%%
flowchart TD
    A["Plan or apply fails"] --> B{"Error names a file,
a line and an argument?"} B -->|"yes"| B1["Schema: 2.2.0 rejects
the argument you wrote"] B -->|"no"| C{"Response carries
a request ID?"} C -->|"no"| C1["Local: credential,
endpoint or provider config"] C -->|"yes"| D{"What does the
message name?"} D -->|"image"| D1["Regional ID or
architecture mismatch"] D -->|"instance type"| D2["Family not offered
in this zone"] D -->|"quota"| D3["Ceiling reached
in this region"] D -->|"stock"| D4["Zone sold out
for this family"] B1 --> E["Fix the configuration,
then plan again"] C1 --> E D1 --> F["Resolve image and type
in one lookup"] D2 --> F D3 --> G["File the increase
and keep the plan"] D4 --> H["Move zone or family
deliberately"] classDef primary fill:#132440,color:#ffffff,stroke:#0b172b; classDef secondary fill:#16476A,color:#ffffff,stroke:#0f314a; classDef ok fill:#3B9797,color:#ffffff,stroke:#2a6f6f; classDef danger fill:#BF092F,color:#ffffff,stroke:#7a0420; classDef warn fill:#c4873b,color:#132440,stroke:#8a5a1f; class A,E,G primary; class B,C,D secondary; class F,H ok; class B1,C1,D1,D2 danger; class D3,D4 warn;

A quota refusal is a number and a capacity refusal is a place. The quota message names the ceiling and the region, while the stock message names the zone and the family. One needs a request with lead time, and the other needs a different placement decision.

Fallbacks chosen at apply time destroy determinism. A list of acceptable zones resolved by a random pick produces a different plan on every run and a state you cannot reproduce. Choose the order in configuration, record which entry was used, and treat a fallback as a reviewed change.

Storage classes are zonal as well. An ESSD performance level or a local-disk family can be unavailable in a zone that still offers the instance, so check the pair rather than the instance alone.

An empty data source result is a finding, not a bug. When the zone filter returns nothing, the plan stops before spending anything. That is the least expensive failure in the whole rehearsal, and it belongs in the change record beside the zone you rejected.

Reconcile Deprecated Fields and Imported Defaults

Import records what the API answered, and the first plan compares that answer with your configuration. Every line in the resulting diff is one of four things: a spelling the provider normalizes, a default the service filled in, a field the version changed, or a value someone else wrote. Only the last one is drift.

Identifiers normalize before they compare. Letter case, a retained product prefix and the field order inside a composite ID all affect equality even when both sides name the same object. A composite identifier with its segments reordered reads as a different object and produces a replacement rather than an update.

The API fills arguments you never wrote. A default resource group, an empty description, an implicit tag map and a false protection flag are all values the service chose. The provider stores what it read and then proposes your absence again on the next plan, which is why an imported object can diff forever without changing.

Computed values are recorded, never authored. Creation time, status, private address and the implicit route table identifier belong to the read path. Writing one into configuration creates a conflict the provider cannot resolve, and the plan keeps offering to correct it.

Deprecated aliases diff without any API change. In 2.2.0 the old and new names for a VPC still coexist, and the provider reads one of them. Configuration that uses the other produces a permanent difference that no apply can settle, which is why the rename is a separate commit from the import.

Configuration, state and API answer compared field by field Three columns show what the configuration wrote, what state recorded after import, and what the API returns. A dashed boundary below states that comparison happens field by field, because one object can be identical and still differ on four fields. Three classification boxes then separate normalized defaults that are stable across two plans, schema changes at the version boundary, and drift written by another system. One object, three records, four possible explanations A diff is evidence of disagreement, not evidence of drift. Your configuration arguments a human wrote names instead of identifiers optional values left absent deprecated alias still in use State after import identifier the API returned defaults the service filled in computed fields from the read composite segments in API order API answer case and separators as stored default resource group status and timestamps values written out of band Comparison is field by field, never object by object One object can be identical and still differ on four fields, in four different ways. Normalized the same diff in two plans no API change between them encode the value Schema changed at the version boundary documented replacement exists read the changelog first Drift changed with no commit another writer holds it name the owner in the register An ignore rule hides a diff. It does not decide who owns the value. Order of work: settle the import diff, then the alias, then the schema change.

Normalization is stable, drift moves. Plan twice with refresh; a difference that survives an apply that changed nothing is normalization, while a difference that appears between two plans with no commit is drift. The refresh-only plan separates the two without touching the object.

Encode normalization and assign drift. A default the service always writes belongs in configuration as an explicit value, and a value another team changes belongs to that team in the register. An ignore rule hides the difference without deciding who owns it, and an annotation written by another controller is the only kind that earns one.

Prove the baseline before removing the old field. The import diff, the deprecated alias and the schema change each get a plan of their own, and the baseline is empty only when all three are settled. Deleting the deprecated argument first mixes three causes into one plan and loses the ability to attribute the result.

Rehearse a Change Without Releasing Unowned Addresses or Data

A replacement plan is a data question before it is a capacity question. Every destroy-and-create line needs two answers: what happens to the data the old object held, and who holds the name or address after the swap. If either answer is missing, the change has been planned but not rehearsed.

Force-new fields are wider than most teams expect. The zone, the vSwitch, the disk category, a bucket name and a VPC CIDR can each turn an edit into a destroy and a create. Read the action column before the attribute diff, because the action decides the blast radius.

Destroying an instance releases more than the instance. The system disk, an auto-assigned public address and the EIP association all go with it, and only the EIP object survives if it is declared separately and left alone. An address that returns to the pool cannot be requested back, which is why the association belongs in the rehearsal.

One replacement plan split into what is released and what survives The left panel lists what a replacement plan contains: an action column showing destroy and create, a changed zone, vSwitch or family, a changed image or disk category, and an address that is either kept or returned. The crimson middle panel lists what is released at destroy, including the system disk, the auto-assigned public IP, the EIP association, the instance identity and in-flight connections. The teal right panel lists what survives when declared separately: the EIP object, a snapshot or custom image, OSS objects and versions, database backups and the register entry. An amber band notes that create_before_destroy needs capacity for two objects at once. A replacement is two inventories and one address decision The plan tells you what changes. It does not tell you what leaves. Plan says replace plan action is replace, not update zone, vSwitch or family changed image or disk category changed name is reused or replaced address is kept or returned two objects exist at the peak Released on destroy system disk and its data auto-assigned public address EIP association instance identity and tags in-flight connections the old private address Survives the swap EIP object, if declared separately snapshot or custom image OSS objects and versions database backup window the tag and the register entry the data you tested a restore from create_before_destroy needs capacity for two objects at once. A quota sitting at the ceiling turns the safer option into a failed apply. The address is the piece you cannot rehearse twice. Rehearse the restore on a twin before the real object is in the plan.

Retention boundaries expire on a clock. A key deletion is scheduled rather than immediate, a database keeps automated backups for a configured window, and a versioned bucket keeps every version until they are removed. Rehearsing a destroy without reading those windows rehearses a recovery you do not have.

Some objects must never be released by a plan. A shared vSwitch, a CEN attachment and the account audit trail belong to other owners, so they enter the root as reads and never as resources. A plan that can destroy one of them is a boundary defect regardless of what the diff says.

The rehearsal root is bounded by state, not by intent. A separate prefix, a separate VPC and no shared attachments mean the exercise cannot reach a neighbour even when a reference is wrong. Shared objects enter through data sources so the dependency stays visible without becoming writable.

Rehearse in the order the destroy will happen. Plan the replacement, destroy a scratch twin, restore from the snapshot or image, and only then change the real object. That order proves the recovery path exists before the plan that needs it is approved.

A removed block is not a destroy. Declaring the block with destroy disabled drops the record and leaves the object running for its new owner. Deleting the resource block instead proposes a destroy, and confusing the two is how a handover becomes an outage.

Name the recovery boundary in the change record. The snapshot, the image, the backup window and the person who can restore them are the answer to "what if the plan is wrong". A rehearsal that stops at a green apply has tested the happy path and nothing else.

Accept a Stable Plan with a Billable-Resource Inventory

Acceptance is a set of artifacts, not a feeling about the diff. The build is pinned, the imported addresses plan clean, the remaining diff is classified, the replacement was rehearsed inside a bounded root, and the billable inventory matches state. A missing item leaves the change unproven rather than nearly done.

Lab

Accept a Stable Plan with a Billable-Resource Inventory

Status: design-only. No Alibaba Cloud account, credential or billable resource was used for this article, and none of the steps below was executed. Every identifier is a placeholder; substitute your own sandbox account, region, VPC and bucket.

Prerequisites. Terraform CLI 1.17.1 with aliyun/alicloud 2.2.0, one sandbox account in one region, an OSS state bucket with versioning and a Tablestore lock table, a console-created VPC with one vSwitch in each of two zones, and one EIP that Terraform does not yet manage. The root is limited to compute, that one VPC and four imported addresses, with no shared network attachment.

Scope check. Confirm the root cannot reach a shared vSwitch, a CEN instance or the account trail before the first plan. If one appears as a resource rather than a data source, fix the boundary and restart.

  1. Record the build with the version command and the provider listing, then write 1.17.1 and 2.2.0 into the ledger header with the date you read them.
  2. Query the region for zones, instance types filtered by zone, and images filtered by type. Write the accepted triple of zone, family and image as one row, not three.
  3. Read Quota Center for the family's vCPU ceiling and the EIP count, and record both numbers with the request channel and the approval lead time.
  4. Add import blocks for the VPC, both vSwitches and the EIP at their final addresses, then plan and read every line before applying.
  5. Apply the import plan, remove the import blocks, and plan again. Classify each remaining line as a default, a normalization, a schema change or drift.
  6. Encode each normalized value in configuration, name the writer for each drift line, and confirm two consecutive plans produce the same diff.
  7. Create the instance in the first vSwitch, snapshot its system disk, then move it to the vSwitch in the second zone and read the action column before applying.
  8. Apply the replacement in the rehearsal root, restore the data from the snapshot into the new instance, and confirm the instance returns with its tag.
  9. Destroy the root, then search Resource Center by the ownership tag and compare the result with state for EIPs, disks and snapshots that outlived it.
CheckEvidenceVerdict
Build pinnedThe lock file records 1.17.1 and 2.2.0Pass or stop
Triple resolvedZone, family and image came from one query setPass
Import cleanImported addresses show no change on the next planPass or fix HCL
NormalizedThe same diff appears in two consecutive plansEncode the value
ReplacementAction column and data answer are both written downPass or stop
RuntimeThe instance answers after the restorePass
InventoryThe tag search matches the recorded addressesPass or assign an owner

Expected observation. The four imported addresses settle to no change after the normalized values are encoded, and the second plan repeats the first exactly. The move in step 7 is the only destroy-and-create in the plan, and the restore in step 8 returns the instance with the same data and tag. The tag search at the end returns the same set of addresses that state records, with no unattached EIP left behind.

Failure checks. If the imported VPC diff changes between two plans with no commit, the value is drift rather than a normalization. If the replacement in step 7 arrives without a data answer, the change is unproven even when the plan is green. If the tag search finds an EIP that state does not, the root released an address it never owned. If the plan is empty but the instance was never reachable, the runtime boundary was never tested.

Cost and cleanup. One small instance, one EIP and one snapshot cost cents for a session; the VPC, vSwitches and security group are free, and the state bucket and lock table are the only persistent objects. Destroy the root, release the EIP, delete the snapshot, confirm the shared trail still holds the other principals, and remove the test prefix and temporary roles.

Release criterion. Publish the ledger row with the build, the accepted triple, the quota numbers, the import identities and the plan hashes. If any acceptance check is missing, the row stays unverified, and the next engineer inherits an honest gap instead of a false guarantee.