Eventstore Terraform Module

Hey Folks. I’m curious if anyone can help me with a terraform issue I’m having with the eventstorecloud provider. Essentially, I’ve gone through the steps highlighted here: https://github.com/EventStore/esc to create a token with the command line tool, esc. With that token, I input it in my terraform provider code, using the token id of my auhentication token:

  token           = <my_token_id>
  organization_id = "<my_org_id> 
}

I attempt to create a project:

resource "eventstorecloud_project" "example" {
  name = var.project_name
}

However, it seems to fail. I am getting error messages concerning refresh tokens. Has anyone run into an issue like this or have an idea of how to resolve this? I am under the impression I’ve done the right auth flow, but maybe I didn’t. Pic below:

Hey,

Do you want to try again with v1.3. We’ve done some fixes around the tokens

Hey Matt,

I gave it a whirl on v1.3 and I’m now getting a 403 error. Is there a standard protocol for how to generate these auth tokens? I use the one specified in the esc github, but that seems to be failling me

Hey @jonny,

So I’ve just been through this using

  • terraform v0.12
  • terraform-provider-eventstorecloud v1.3.0 (found here)

First I ran the following command to get a token

[~]esc access tokens create --email <email> --unsafe-password <password>
Token created for audience https://api.eventstore.cloud
<your token>

Then create this basic terraform file using the above token and the org id from the https://console.eventstore.cloud

provider "eventstorecloud" {
    token = "<your token>"
    organization_id = "bt77lfqrh41scaatc180"

}

resource "eventstorecloud_project" "example" {
  name = "example_project"
}

And it successfully create a new project.

I know you’ve been through this once already but would you mind trying again with a new token etc?

Hey Matt,

So I went ahead and followed the protocols described here. Still failed with a 403.

The main difference here is that my Terraform version is v0.13.4 as opposed to v0.12.*

My provider is v1.3.0. We would prefer not to downgrade our terraform provider to 0.12, since the rest of our state is in 13. I’m sure it’s possible, but managing multiple versions across projects would be really a pain for us.

In my estimation, the main difference between v0.13 and v0.12 is the declaration of the source of external providers. In this case, I need to specify where exactly the darwin file lies. Like so:

terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "2.70"
    }
    eventstorecloud = {
      source  = "bondtech.jfrog.io/bond-tech/eventstorecloud"
      version = "1.3.0"
    }
  }
  required_version = ">= 0.13"
}

My question is: is there a fixed planned for v0.13? Would you be able to test out v0.13 to be sure that there is an incompatibility as opposed to my installation/setup being somehow broken?

Hey,

we noticed when looking at this thing that they’d moved a lot of things around with 0.13 (you think they’ll ever make it to 1.0?)

we will be fixing it. I’m gonna take another look in the morning and see what’s involved

Awesome, thanks a bunch Mat. Let me know when you have an idea of when the fix will be pushed