Skip to content

Region

Source: src/AWS/Account/Region.ts

The opt-in status of an AWS Region for an account. Opt-in Regions (e.g. ap-east-1, me-south-1) are disabled by default and must be enabled before use; this resource drives account:EnableRegion / account:DisableRegion to converge the Region to the desired status.

Enabling or disabling a Region is asynchronous and can take several minutes; reconcile waits (bounded) for the transition to settle and records the observed status either way. Disabling a Region removes all IAM access to resources in it, so destroying this resource intentionally does NOT disable the Region — it only stops managing it (set enabled: false explicitly to opt out).

Enable an Opt-In Region

const region = yield* Account.Region("HongKong", {
regionName: "ap-east-1",
enabled: true,
});

Track a Default Region

const region = yield* Account.Region("UsEast1", {
regionName: "us-east-1",
enabled: true, // ENABLED_BY_DEFAULT — reconcile makes no API mutation
});

Opt Out of a Region

const region = yield* Account.Region("HongKong", {
regionName: "ap-east-1",
enabled: false,
});