Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .tools/run_node_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ npm_install_check $PROJECT_ROOT/typescript/end-to-end-applications/food-ordering
npm_install_check $PROJECT_ROOT/typescript/end-to-end-applications/chat-bot

npm_install_check $PROJECT_ROOT/typescript/integrations/opentelemetry
RESTATE_ENV_ID=env_test RESTATE_API_KEY=key_test npm_install_check $PROJECT_ROOT/typescript/integrations/deployment-lambda-cdk
RESTATE_ENV_ID=env_test RESTATE_AUTH_TOKEN=key_test npm_install_check $PROJECT_ROOT/typescript/integrations/deployment-lambda-cdk

RESTATE_ENV_ID=env_test RESTATE_API_KEY=key_test npm_install_check $PROJECT_ROOT/python/integrations/deployment-lambda-cdk
RESTATE_ENV_ID=env_test RESTATE_AUTH_TOKEN=key_test npm_install_check $PROJECT_ROOT/python/integrations/deployment-lambda-cdk
4 changes: 2 additions & 2 deletions go/integrations/go-lambda-cdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ npm install
To deploy the stack, export the Restate Cloud environment id and admin API key, and run `cdk deploy`:

```shell
export RESTATE_ENV_ID=env_... RESTATE_API_KEY=key_...
export RESTATE_ENV_ID=env_... RESTATE_AUTH_TOKEN=key_...
npx cdk deploy
```

Expand All @@ -58,7 +58,7 @@ You can send a test request to the Restate ingress endpoint to call the newly de

```shell
curl -k ${restateIngressUrl}/Greeter/Greet \
-H "Authorization: Bearer $RESTATE_API_KEY" \
-H "Authorization: Bearer $RESTATE_AUTH_TOKEN" \
-H 'content-type: application/json' -d '"Restate"'
```

Expand Down
6 changes: 3 additions & 3 deletions go/integrations/go-lambda-cdk/cdk/go-lambda-cdk-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ export class GoLambdaCdkStack extends cdk.Stack {

// If you would prefer to manually register the Lambda service with your Restate environment,
// you can remove or comment the rest of the code below this line.
if (!process.env.RESTATE_ENV_ID || !process.env.RESTATE_API_KEY) {
if (!process.env.RESTATE_ENV_ID || !process.env.RESTATE_AUTH_TOKEN) {
throw new Error(
"Required environment variables RESTATE_ENV_ID and RESTATE_API_KEY are not set, please see README."
"Required environment variables RESTATE_ENV_ID and RESTATE_AUTH_TOKEN are not set, please see README."
);
}

Expand All @@ -54,7 +54,7 @@ export class GoLambdaCdkStack extends cdk.Stack {
// See: https://docs.aws.amazon.com/secretsmanager/latest/userguide/cdk.html
apiKey: new secrets.Secret(this, "RestateCloudApiKey", {
secretStringValue: cdk.SecretValue.unsafePlainText(
process.env.RESTATE_API_KEY!,
process.env.RESTATE_AUTH_TOKEN!,
),
}),
},
Expand Down
4 changes: 2 additions & 2 deletions java/integrations/java-gradle-lambda-cdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ npm install
To deploy the stack, export the Restate Cloud environment id and API key, and run `cdk deploy`:

```shell
export RESTATE_ENV_ID=env_... RESTATE_API_KEY=key_...
export RESTATE_ENV_ID=env_... RESTATE_AUTH_TOKEN=key_...
npx cdk deploy
```

Expand All @@ -59,7 +59,7 @@ You can send a test request to the Restate ingress endpoint to call the newly de

```shell
curl -k ${restateIngressUrl}/Greeter/greet \
-H "Authorization: Bearer $RESTATE_API_KEY" \
-H "Authorization: Bearer $RESTATE_AUTH_TOKEN" \
-H 'content-type: application/json' -d '"Restate"'
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ export class LambdaJvmCdkStack extends cdk.Stack {

// If you would prefer to manually register the Lambda service with your Restate environment,
// you can remove or comment the rest of the code below this line.
if (!process.env.RESTATE_ENV_ID || !process.env.RESTATE_API_KEY) {
if (!process.env.RESTATE_ENV_ID || !process.env.RESTATE_AUTH_TOKEN) {
throw new Error(
"Required environment variables RESTATE_ENV_ID and RESTATE_API_KEY are not set, please see README."
"Required environment variables RESTATE_ENV_ID and RESTATE_AUTH_TOKEN are not set, please see README."
);
}

Expand All @@ -46,7 +46,7 @@ export class LambdaJvmCdkStack extends cdk.Stack {
// For improved security, pre-populate the secret and pass it to the construct as a reference.
// See: https://docs.aws.amazon.com/secretsmanager/latest/userguide/cdk.html
apiKey: new secrets.Secret(this, "RestateCloudApiKey", {
secretStringValue: cdk.SecretValue.unsafePlainText(process.env.RESTATE_API_KEY!),
secretStringValue: cdk.SecretValue.unsafePlainText(process.env.RESTATE_AUTH_TOKEN!),
}),
});
const deployer = new restate.ServiceDeployer(this, "ServiceDeployer");
Expand Down
4 changes: 2 additions & 2 deletions kotlin/integrations/kotlin-gradle-lambda-cdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ npm install
To deploy the stack, export the Restate Cloud environment id and API key, and run `cdk deploy`:

```shell
export RESTATE_ENV_ID=env_... RESTATE_API_KEY=key_...
export RESTATE_ENV_ID=env_... RESTATE_AUTH_TOKEN=key_...
npx cdk deploy
```

Expand All @@ -60,7 +60,7 @@ You can send a test request to the Restate ingress endpoint to call the newly de

```shell
curl -k ${restateIngressUrl}/Greeter/greet \
-H "Authorization: Bearer $RESTATE_API_KEY" \
-H "Authorization: Bearer $RESTATE_AUTH_TOKEN" \
-H 'content-type: application/json' -d '"Restate"'
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ export class LambdaJvmCdkStack extends cdk.Stack {

// If you would prefer to manually register the Lambda service with your Restate environment,
// you can remove or comment the rest of the code below this line.
if (!process.env.RESTATE_ENV_ID || !process.env.RESTATE_API_KEY) {
if (!process.env.RESTATE_ENV_ID || !process.env.RESTATE_AUTH_TOKEN) {
throw new Error(
"Required environment variables RESTATE_ENV_ID and RESTATE_API_KEY are not set, please see README."
"Required environment variables RESTATE_ENV_ID and RESTATE_AUTH_TOKEN are not set, please see README."
);
}

Expand All @@ -46,7 +46,7 @@ export class LambdaJvmCdkStack extends cdk.Stack {
// For improved security, pre-populate the secret and pass it to the construct as a reference.
// See: https://docs.aws.amazon.com/secretsmanager/latest/userguide/cdk.html
apiKey: new secrets.Secret(this, "RestateCloudApiKey", {
secretStringValue: cdk.SecretValue.unsafePlainText(process.env.RESTATE_API_KEY!),
secretStringValue: cdk.SecretValue.unsafePlainText(process.env.RESTATE_AUTH_TOKEN!),
}),
});
const deployer = new restate.ServiceDeployer(this, "ServiceDeployer");
Expand Down
4 changes: 2 additions & 2 deletions python/integrations/deployment-lambda-cdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ npm install
To deploy the stack, export the Restate Cloud environment id and API key, and run `cdk deploy`:

```shell
export RESTATE_ENV_ID=env_... RESTATE_API_KEY=key_...
export RESTATE_ENV_ID=env_... RESTATE_AUTH_TOKEN=key_...
npx cdk deploy
```

Expand All @@ -57,7 +57,7 @@ You can send a test request to the Restate cluster ingress endpoint to call the

```shell
curl -k ${restateIngressUrl}/Greeter/greet \
-H "Authorization: Bearer $RESTATE_API_KEY" \
-H "Authorization: Bearer $RESTATE_AUTH_TOKEN" \
-H 'content-type: application/json' -d '"Restate"'
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ export class LambdaPythonStack extends cdk.Stack {

// If you would prefer to manually register the Lambda service with your Restate environment,
// you can remove or comment the rest of the code below this line.
if (!process.env.RESTATE_ENV_ID || !process.env.RESTATE_API_KEY) {
if (!process.env.RESTATE_ENV_ID || !process.env.RESTATE_AUTH_TOKEN) {
throw new Error(
"Required environment variables RESTATE_ENV_ID and RESTATE_API_KEY are not set, please see README."
"Required environment variables RESTATE_ENV_ID and RESTATE_AUTH_TOKEN are not set, please see README."
);
}

Expand All @@ -54,7 +54,7 @@ export class LambdaPythonStack extends cdk.Stack {
// For improved security, pre-populate the secret and pass it to the construct as a reference.
// See: https://docs.aws.amazon.com/secretsmanager/latest/userguide/cdk.html
apiKey: new secrets.Secret(this, "RestateCloudApiKey", {
secretStringValue: cdk.SecretValue.unsafePlainText(process.env.RESTATE_API_KEY!),
secretStringValue: cdk.SecretValue.unsafePlainText(process.env.RESTATE_AUTH_TOKEN!),
}),
});
const deployer = new restate.ServiceDeployer(this, "ServiceDeployer");
Expand Down
4 changes: 2 additions & 2 deletions typescript/integrations/deployment-lambda-cdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ npm install
To deploy the stack, export the Restate Cloud environment id and API key, and run `cdk deploy`:

```shell
export RESTATE_ENV_ID=env_... RESTATE_API_KEY=key_...
export RESTATE_ENV_ID=env_... RESTATE_AUTH_TOKEN=key_...
npx cdk deploy
```

Expand All @@ -58,7 +58,7 @@ You can send a test request to the Restate cluster ingress endpoint to call the

```shell
curl -k ${restateIngressUrl}/Greeter/greet \
-H "Authorization: Bearer $RESTATE_API_KEY" \
-H "Authorization: Bearer $RESTATE_AUTH_TOKEN" \
-H 'content-type: application/json' -d '"Restate"'
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ export class LambdaTsCdkStack extends cdk.Stack {

// If you would prefer to manually register the Lambda service with your Restate environment,
// you can remove or comment the rest of the code below this line.
if (!process.env.RESTATE_ENV_ID || !process.env.RESTATE_API_KEY) {
if (!process.env.RESTATE_ENV_ID || !process.env.RESTATE_AUTH_TOKEN) {
throw new Error(
"Required environment variables RESTATE_ENV_ID and RESTATE_API_KEY are not set, please see README.",
"Required environment variables RESTATE_ENV_ID and RESTATE_AUTH_TOKEN are not set, please see README.",
);
}

Expand All @@ -46,7 +46,7 @@ export class LambdaTsCdkStack extends cdk.Stack {
// For improved security, pre-populate the secret and pass it to the construct as a reference.
// See: https://docs.aws.amazon.com/secretsmanager/latest/userguide/cdk.html
apiKey: new secrets.Secret(this, "RestateCloudApiKey", {
secretStringValue: cdk.SecretValue.unsafePlainText(process.env.RESTATE_API_KEY!),
secretStringValue: cdk.SecretValue.unsafePlainText(process.env.RESTATE_AUTH_TOKEN!),
}),
});
const deployer = new restate.ServiceDeployer(this, "ServiceDeployer");
Expand Down
4 changes: 2 additions & 2 deletions typescript/templates/nextjs/app/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ function getRestateUrl(): string {

function getRestateAuthHeaders(): Record<string, string> {
if (process.env.VERCEL) {
const apiKey = process.env.RESTATE_API_KEY;
const apiKey = process.env.RESTATE_AUTH_TOKEN;
if (!apiKey) {
throw new Error('RESTATE_API_KEY environment variable is not set');
throw new Error('RESTATE_AUTH_TOKEN environment variable is not set');
}
return {
Authorization: "Bearer " + apiKey,
Expand Down
Loading