Skip to content

AccessKeyConfiguration

Source: src/Cloudflare/Access/KeyConfiguration.ts

The Cloudflare Zero Trust Access service-key rotation configuration for an account (/accounts/{account_id}/access/keys).

The key configuration is an account singleton — it always exists, so this resource never creates or deletes anything physical. Reconcile PUTs the rotation interval when the observed value differs from the desired one; destroy restores the interval the account had before Alchemy first managed it (captured as initialKeyRotationIntervalDays).

Rotate Access service keys every 30 days

const keys = yield* Cloudflare.AccessKeyConfiguration("Keys", {
keyRotationIntervalDays: 30,
});

Inspect rotation status

const keys = yield* Cloudflare.AccessKeyConfiguration("Keys", {
keyRotationIntervalDays: 90,
});
// keys.daysUntilNextRotation, keys.lastKeyRotationAt