Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to create new database due to unavailable region combination #19

Closed
ramielrowe opened this issue May 10, 2021 · 7 comments
Closed

Comments

@ramielrowe
Copy link

ramielrowe commented May 10, 2021

Error: Error: cloud provider and region combination not available: GCP/us-east1

If I manually curl https://api.astra.datastax.com/v2/availableRegions with my token, I don't see any serverless tiers listed. But, if I go to the web console, I can create databases in GCP/us-east1.

Terraform Version

Run terraform -v to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.

Affected Resource(s)

astra_database

Terraform Configuration Files

provider "astra" {}

terraform {
    required_providers {
        astra = {
            source = "datastax/astra"
            version = "0.0.3-pre"
        }
    }
}

resource "astra_database" "temporal_db" {
    name           = var.name
    keyspace       = "temporal"
    cloud_provider = "GCP"
    region         = "us-east1"
}

data "astra_secure_connect_bundle_url" "temporal_db" {
    database_id = astra_database.temporal_db.id
}

Debug Output

NA

Panic Output

NA

Expected Behavior

Database created in us-east1

Actual Behavior

Error: cloud provider and region combination not available: GCP/us-east1

Steps to Reproduce

  1. Create Database Admin token
  2. Set that token to ASTRA_API_TOKEN
  3. terraform apply

┆Issue is synchronized with this Jira Task by Unito
┆Resolution: Done

@phact
Copy link
Contributor

phact commented May 10, 2021

There are restrictions but they are accurately reflected in availableRegions

$ ./terraform show | grep -a2 serverless
            cloud_provider = "AWS"
            region         = "ap-southeast-1"
            tier           = "serverless"
        },
        {
            cloud_provider = "AWS"
            region         = "eu-central-1"
            tier           = "serverless"
        },
        {
            cloud_provider = "AWS"
            region         = "us-east-1"
            tier           = "serverless"
        },
        {
            cloud_provider = "GCP"
            region         = "asia-south1"
            tier           = "serverless"
        },
        {
            cloud_provider = "GCP"
            region         = "europe-west1"
            tier           = "serverless"
        },
        {
            cloud_provider = "GCP"
            region         = "us-east1"
            tier           = "serverless"
        },
        {
            cloud_provider = "AWS"
            region         = "us-west-2"
            tier           = "serverless"
        },
        {
            cloud_provider = "GCP"
            region         = "us-west1"
            tier           = "serverless"
        },
        {
            cloud_provider = "AZURE"
            region         = "westus2"
            tier           = "serverless"
        },
        {
            cloud_provider = "AZURE"
            region         = "westeurope"
            tier           = "serverless"
        },
        {
            cloud_provider = "AZURE"
            region         = "australiaeast"
            tier           = "serverless"
        },
        {

If you're not seeing serverless available when you hit the endpoint you may be using a classic only Astra organization. You can go in the Astra UI and create a new org and select on demand.

@ramielrowe
Copy link
Author

Hi,

The organization I'm using was created automatically via the GCP marketplace. I don't think we have any control over it. I can create serverless databases via the web UI. It just doesn't work for terraform/API.

@phact
Copy link
Contributor

phact commented May 18, 2021

I see, there are two GCP marketplace offerings. You may be using the old one.
image
Please make sure you pick the orange one, not the black one. We've been working with google to remove the old one but it is taking a long time. Apologies for this.

@ramielrowe
Copy link
Author

image
We used the orange one.

@vigohe
Copy link

vigohe commented Jun 17, 2021

any comments? We also have the same issue with azure, no serverless tiers, we selected the orange one

@phact
Copy link
Contributor

phact commented Sep 1, 2021

Should be fixed in v1.0.4+

@harishdesetti1206
Copy link

Great @phact the issue is fixed.. i used the version 1.0.6 and it worked like charm .. Thanks .!

@phact phact closed this as completed Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants