Event Store Cloud

v0.2.6 published on Tuesday, Aug 9, 2022 by EventStore

Installation

The Event Store Cloud (ESC) provider is available as a package in all Pulumi languages:

Setup

Download the provider

For projects that use .NET and Go Pulumi SDK you have to install the provider before trying to update the stack.

Use the following command to add the plugin to your environment:

pulumi plugin install resource eventstorecloud [version] \
  --server https://github.com/EventStore/pulumi-eventstorecloud/releases/download/[version]

Example:

pulumi plugin install resource eventstorecloud v0.2.3 \
  --server https://github.com/EventStore/pulumi-eventstorecloud/releases/download/v0.2.3

Configure the provider

The Pulumi provider needs credentials to authenticate requests from your computer to Event Store Cloud. Your credentials are never sent to pulumi.com. The provider needs to be configured with Event Store Cloud credentials before it can be used to create resources.

First, you need an access token for your user.

Then, go to the list of organizations you have access to in Event Store Cloud console, choose the organization that you will be provisioning resources for, and look the organization id in the settings.

  • <YOUR_ACCESS_TOKEN>: your access token
  • <YOUR_ORGANIZATION_ID>: the Event Store Cloud organization id

Once the credentials are obtained, there are two ways to communicate your authorization tokens to Pulumi:

  1. Set the environment variables ESC_TOKEN and ESC_ORG_ID:

    $ export ESC_TOKEN=<YOUR_ACCESS_TOKEN>
    $ export ESC_ORG_ID=<YOUR_ORGANIZATION_ID>
    
  2. Set them using configuration, if you prefer that they be stored alongside your Pulumi stack for easy multi-user access:

    pulumi config set eventstorecloud:token <YOUR_ACCESS_TOKEN> --secret
    pulumi config set eventstorecloud:organizationId <YOUR_ORGANIZATION_ID> --secret
    
OptionRequired/OptionalDescription
tokenRequiredAccess token. You can retrieve this from the ‘Access Tokens’ section of the Event Store Cloud console.
organizationIdRequiredThe organization id. You can find it in the organization settings page if the ESC console.
urlOptionalThe URL of the Event Store Cloud API. This defaults to the public cloud instance of Event Store Cloud.
tokenStoreOptionalThe location on the local filesystem of the token cache. This is shared with the Event Store Cloud CLI.