-
Notifications
You must be signed in to change notification settings - Fork 5
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
ProviderArgs are not optional and can't be left as empty string #19
Comments
which seems to imply that the identityProviderUrl is https://identity.eventstore.com (https://identity.eventstore.com/.well-known/openid-configuration is available) But still don't know what to put under
Any sample using the Pulumi's event store cloud provider would be much appreciated PS: Today I was unable to test it as event store cloud provisioning seems to be disable for up to 24-48 hours until they review a request form. |
These can be empty strings, and the TF provider will set them. |
I am getting
when creating
Which is expected as per The event store provider is
If I pass any random url value
Which URL is this supposed to be? An empty |
If it's a bug, it's the generator bug. These values are optional in Terraform as far as I can see. You can find the URL in the Terraform provider code, which I posted earlier. Same for the client id: identityProviderURL := opts.IdentityProviderURL
if strings.TrimSpace(identityProviderURL) == "" {
identityProviderURL = "https://identity.eventstore.com"
}
parsedIdentityProviderURL, err := url.Parse(identityProviderURL)
if err != nil {
return nil, fmt.Errorf("invalid identity provider URL: %q, %w", identityProviderURL, err)
}
clientID := opts.ClientID
if strings.TrimSpace(clientID) == "" {
clientID = "OraYp3cFES9O8aWuQtnqi1A7m534iTwt"
} Token store is basically the path where the token will be stored on disk. |
That's the
|
As I mentioned before, the token store is the location on disk where the refresh token would be stored locally. The
|
Here's the default token store: defaultTokenStore = filepath.Join(os.Getenv("HOME"), ".esctf", "tokens") |
Btw, the TypeScript code for var merged = CustomResourceOptions.Merge(defaultOptions, options); There are no pre-checks there. And here's the TypeScript code: opts = opts || {};
{
if ((!args || args.clientId === undefined) && !opts.urn) {
throw new Error("Missing required property 'clientId'");
}
if ((!args || args.identityProviderUrl === undefined) && !opts.urn) {
throw new Error("Missing required property 'identityProviderUrl'");
}
if ((!args || args.organizationId === undefined) && !opts.urn) {
throw new Error("Missing required property 'organizationId'");
}
if ((!args || args.token === undefined) && !opts.urn) {
throw new Error("Missing required property 'token'");
}
if ((!args || args.tokenStore === undefined) && !opts.urn) {
throw new Error("Missing required property 'tokenStore'");
}
if ((!args || args.url === undefined) && !opts.urn) {
throw new Error("Missing required property 'url'");
}
resourceInputs["clientId"] = args ? args.clientId : undefined;
resourceInputs["identityProviderUrl"] = args ? args.identityProviderUrl : undefined;
resourceInputs["organizationId"] = args ? args.organizationId : undefined;
resourceInputs["token"] = args ? args.token : undefined;
resourceInputs["tokenStore"] = args ? args.tokenStore : undefined;
resourceInputs["url"] = args ? args.url : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); You can see that the first check the options, and then do the merge. It should be in reverse. |
Thank you.
|
I need to use explicit organizationId + token without relying on environment variables.
So I would like to explicitly create a Provider associated to Event Store Cloud which I can later use to explicitly associate to some resources (e.g: the event store cloud project, cluster, etc.)
The problem is that there are no optional
ProviderArgs
despite the documentation suggesting soSee
pulumi-eventstorecloud/sdk/nodejs/provider.ts
Line 79 in c0f3bfb
and https://developers.eventstore.com/cloud/automation/#provider-configuration
Which are the default
clientId
,tokenStore
,identityProviderUrl
andurl
I should provide?The above would cause
but I am not using .NET SDK nor Go, but Typescript/NodeJs and the documentation says
Is this also needed for Typescript?
CLO-434
The text was updated successfully, but these errors were encountered: