{"record":{"id":"af5d3f8f2bbda73c","repo":"spinnaker/spinnaker","slug":"autoscaling-is-not-supported-for-this-account-regi-af5d3f","errorCode":null,"errorMessage":"Autoscaling is not supported for this account/region","messagePattern":"Autoscaling is not supported for this account/region","errorType":"exception","errorClass":"UserException","httpStatus":null,"severity":"error","filePath":"clouddriver/clouddriver-titus/src/main/java/com/netflix/spinnaker/clouddriver/titus/deploy/actions/MonitorTitusScalingPolicy.java","lineNumber":80,"sourceCode":"  @Override\n  public Result apply(\n      @NotNull MonitorTitusScalingPolicy.MonitorTitusScalingPolicyCommand command,\n      @NotNull Saga saga) {\n    TitusScalingPolicyModified event = saga.getEvent(TitusScalingPolicyModified.class);\n\n    saga.log(\n        \"Monitored Titus Scaling Policy %s:%s:%s (scalingPolicyId: %s\",\n        event.getAccount(), event.getRegion(), event.getJobId(), event.getScalingPolicyId());\n\n    AccountCredentials accountCredentials =\n        accountCredentialsProvider.getCredentials(event.getAccount());\n\n    TitusAutoscalingClient titusClient =\n        titusClientProvider.getTitusAutoscalingClient(\n            (NetflixTitusCredentials) accountCredentials, event.getRegion());\n\n    if (titusClient == null) {\n      throw new UserException(\"Autoscaling is not supported for this account/region\");\n    }\n\n    // make sure the new policy was applied\n    retrySupport.retry(\n        () -> {\n          ScalingPolicyResult updatedPolicy =\n              titusClient.getScalingPolicy(event.getScalingPolicyId());\n          if (updatedPolicy == null\n              || (updatedPolicy.getPolicyState().getState()\n                  != ScalingPolicyStatus.ScalingPolicyState.Applied)) {\n            throw new IntegrationException(\"Scaling policy updates have not been applied\")\n                .setRetryable(true);\n          }\n          return true;\n        },\n        10,\n        5000,\n        false);","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/spinnaker/spinnaker/blob/1d4a5d0f6d10d0232b1af077decd559b68a94a5e/clouddriver/clouddriver-titus/src/main/java/com/netflix/spinnaker/clouddriver/titus/deploy/actions/MonitorTitusScalingPolicy.java#L62-L98","documentation":"MonitorTitusScalingPolicy verifies that a newly created/updated scaling policy was applied. It first needs a TitusAutoscalingClient for the event's account/region; when the provider returns null, it throws a UserException because scaling policies cannot be monitored (or used) where autoscaling is unsupported.","triggerScenarios":"Titus createServerGroup with a targetTrackingPolicy/stepScalingPolicy into an account/region where getTitusAutoscalingClient returns null; the monitoring task then fails with this message.","commonSituations":"Deploy with scaling policy targeting an unsupported region; autoscaling endpoint not configured for the account in clouddriver config.","solutions":["Configure autoscaling support for the Titus account/region in clouddriver config","Deploy the scaling policy in a region where autoscaling is supported","Remove the scaling policy from the server group description for this account/region"],"exampleFix":"# before\nserverGroup: { region: \"us-central1-a\", targetTrackingPolicy: {...} }\n# after: drop policy or pick supported region\nserverGroup: { region: \"us-east-1\", targetTrackingPolicy: {...} }","handlingStrategy":"validation","validationCode":"if (titusClientProvider.getTitusAutoscalingClient(creds, region) == null) {\n  throw new IllegalStateException(\"Cannot attach scaling policy: autoscaling unsupported in \" + region);\n}","typeGuard":"boolean supportsScalingPolicies = (creds, region) -> titusClientProvider.getTitusAutoscalingClient((NetflixTitusCredentials) creds, region) != null;","tryCatchPattern":"try { monitorStage(event); } catch (UserException e) { if (e.getMessage().contains(\"Autoscaling is not supported\")) { failFastWithConfigGuidance(); } else { throw e; } }","preventionTips":["Only attach targetTracking/step policies in regions with autoscaling configured","Verify per-region autoscaling endpoints during account onboarding","Strip scaling policies from descriptions targeting unsupported regions"],"tags":["titus","autoscaling","unsupported-operation"],"backgroundTag":"unsupported-operation","analyzedSha":"1d4a5d0f6d10d0232b1af077decd559b68a94a5e","analyzedAt":"2026-09-10T14:13:07.222Z","contentChangedAt":"2026-09-10T14:13:07.222Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}