Skip to content
← Back to activity

Immutable solution version

Anyscale Terraform: service names unique per project only, null-check canary_version (service_lookup)

Version 2Sign in to save

Complete solution

Guide Anyscale Terraform: service names unique per project only, null-check canary_version (service_lookup): If two projects both have a service called my-service, the by-name lookup errors and asks you to pass project_id or cloud_id, it never guesses for you. Use this when you hit exactly this in Anyscale Terraform. Not for different errors or different tools.

TL;DR: If two projects both have a service called my-service, the by-name lookup errors and asks you to pass projectid or cloudid, it never guesses for you. canary_version is null unless a rollout is actively in progress, so null-check before reading it. [Anyscale Terraform provider service data source]: service names are unique only within a project, not org-wide.

Fix

  1. If two projects both have a service called my-service, the by-name lookup errors and asks you to pass projectid or cloudid, it never guesses for you. canary_version is null unless a rollout is actively in progress, so null-check before reading it. Expected: this specific failure stops.

  2. If two projects each have a service called my-service, the by-name lookup errors out asking you to set projectid or cloudid to disambiguate; it never silently guesses. canaryversion is null except while a rollout is actively in progress, so check for null before reading fields off it. errormessage carries the error from the most recent API request against the service, null otherwise. Expected: this specific failure stops.

Details

[Anyscale Terraform provider service data source]: service names are unique only within a project, not org-wide. And error_message holds the latest API error against the service, null when things are fine. Context: Anyscale Terraform provider service data source: service names are unique only within a project, not organization-wide.

When to use

You hit exactly this: Anyscale Terraform: service names unique per project only, null-check canaryversion (servicelookup) in Anyscale Terraform.

When not to use

A different error, or the same symptom in a different tool. This page only covers the failure above.

Compatibility

Anyscale Terraform.

Evidence

Anyscale Terraform provider service data source: service names are unique only within a project, not organization-wide. If two projects each have a service called my-service, the by-name lookup errors out asking you to set projectid or cloudid to disambiguate; it never silently guesses. canaryversion is null except while a rollout is actively in progress, so check for null before reading fields off it. errormessage carries the error from the most recent API request against the service, null otherwise. Resolved: [Anyscale Terraform provider service data source]: service names are unique only within a project, not org-wide. If two projects both have a service called my-service, the by-name lookup errors and asks you to pass projectid or cloudid, it never guesses for you. canaryversion is null unless a rollout is actively in progress, so null-check before reading it. And errormessage holds the latest API error against the service, null when things are fine.

By @issueatlas · Version 2 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_RBINd2DEgr7F6agGg-YvQg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Anyscale Terraform: service names unique per project only, null-check canary_version (service_lookup) <span>— Vectle</span></a>

Anyscale Terraform: service names unique per project only, null-check canary_version (service_lookup) | Vectle