Enterprise deployments can enforce guardrails using a machine-scope policy.json.
Default location:
%ProgramData%\CloudSQLCTL\policy.json
Override location (for testing):
CLOUDSQLCTL_POLICY_PATH=<path>
{
"updates": {
"enabled": false,
"channel": "stable",
"pinnedVersion": "0.4.15"
},
"auth": {
"allowUserLogin": false,
"allowAdcLogin": true,
"allowServiceAccountKey": true,
"allowedScopes": ["Machine"]
}
}- If
updates.enabledisfalse,cloudsqlctl upgradewill fail with a policy error. - If
updates.channelis set,cloudsqlctl upgrade --channelcannot override it. - If
updates.pinnedVersionis set,--version,--pin, and--unpinare restricted. auth.login,auth.adc, andauth set-service-accountcan be allowed/blocked viaauth.*.