Skip to content

Google Cloud Function Rule breaks if you have a region with a - in it due to a bug in the control api. #115

Description

@graham-russell

Problem

ably_rule_google_function fails when the function's region contains a hyphen. Every Google Cloud region contains one (us-central1, europe-west2), so the resource is unusable as it stands, which is why the priority is raised off Unprioritized.

Context

The provider does nothing clever with the value. region is a plain string attribute (internal/provider/resource_ably_rule_http_google_cloud_function.go:22-24) and is passed straight through to the target (internal/provider/rules.go:221-235), so the rejection happens on the Control API side, as the original report says.

What is missing from the report is the failure itself: no error message, no status code, and no note of whether creation fails or the value is silently mangled. Without that, nobody can tell whether the Control API is validating the region against a pattern that excludes hyphens, or splitting on the hyphen while parsing.

This is a Unito mirror of a GitHub issue on ably/terraform-provider-ably.

Acceptance criteria

  • Reproduced with a real region such as us-central1, with the request and the exact error captured on the ticket
  • The failing component is identified: Control API validation, Control API parsing, or the provider after all
  • A rule can be created and updated for a hyphenated region, which is every region
  • An acceptance test covers a hyphenated region, alongside the existing coverage in resource_ably_rule_http_google_cloud_function_test.go
  • If the fix is in the Control API, it is tracked there and this is closed as a mirror

Scope

  • In scope: getting a Google Cloud Function rule working for a normal region, wherever the fix belongs
  • Out of scope: other rule types, the Azure and AWS Lambda equivalents unless they share the defect, and adding new attributes to the resource

Pointers

  • internal/provider/resource_ably_rule_http_google_cloud_function.go:22 - the region attribute
  • internal/provider/rules.go:221 - the target the provider sends
  • internal/provider/resource_ably_rule_http_google_cloud_function_test.go - existing tests
  • INF-6921 - a nonprod Control API would make this reproducible without touching production
  • GitHub issue on ably/terraform-provider-ably

┆Issue is synchronized with this Jira Bug by Unito

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working. It's clear that this does need to be fixed.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions