krystal / terraform-provider-katapult

Terraform Provider for Katapult.
https://registry.terraform.io/providers/krystal/katapult/latest/docs
MIT License
5 stars 2 forks source link

List of data centre permalinks? #81

Closed LondonAppDev closed 1 year ago

LondonAppDev commented 1 year ago

I'm trying to use the Katapult Terraform provider, but I cannot figure out what value to put for KATAPULT_DATA_CENTER... I tried LON-1 but it says it's incorrect. I looked everywhere in the docs but can't find a list.

jimeh commented 1 year ago

Apologies for the confusion. The provider and its docs are still very much a work in progress.

The current list of data centers can be fetched via Katapult's Public API (no auth) and the Core API (requires auth).

The public API endpoint is: https://api.katapult.io/public/v1/data_centers, which as of writing returns:

{
    "data_centers": [
        {
            "id": "dc_Wm37yAq0BHhKXsPa",
            "name": "Amsterdam",
            "permalink": "nl-ams-01",
            "country": "NL"
        },
        {
            "id": "loc_UUhPmoCbpic6UX0Y",
            "name": "London",
            "permalink": "uk-lon-01",
            "country": "GB"
        },
        {
            "id": "dc_TfDSMyVYoS3fJnSt",
            "name": "New York",
            "permalink": "us-nyc-01",
            "country": "US"
        },
        {
            "id": "dc_U3UVcwL8GKXJdsgw",
            "name": "Phoenix",
            "permalink": "us-azp-01",
            "country": "US"
        }
    ]
}

I've also raised #82, which will enable you fetch a list of data centers via the Terraform provider once implemented.

LondonAppDev commented 1 year ago

Thank you!