diff --git a/README.md b/README.md index 214f1aaa..b50803ea 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ To further configure your plugin, use the following custom parameters in your `s | Parameter | Description | | ----------------------------- |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `site` | Set which Datadog site to send data to, such as `datadoghq.com` (default), `datadoghq.eu`, `us3.datadoghq.com`, `us5.datadoghq.com`, `ap1.datadoghq.com`, `ap2.datadoghq.com`, or `ddog-gov.com`. This parameter is required when collecting telemetry using the Datadog Lambda Extension. | +| `site` | Set which Datadog site to send data to, such as `datadoghq.com` (default), `datadoghq.eu`, `us3.datadoghq.com`, `us5.datadoghq.com`, `ap1.datadoghq.com`, `ap2.datadoghq.com`, `ddog-gov.com`, or `us2.ddog-gov.com`. This parameter is required when collecting telemetry using the Datadog Lambda Extension. | | `apiKey` | [Datadog API key][7]. This parameter is required when collecting telemetry using the Datadog Lambda Extension. Alternatively, you can also set the `DATADOG_API_KEY` environment variable in your deployment environment. | | `appKey` | Datadog app key. Only needed when the `monitors` field is defined. Alternatively, you can also set the `DATADOG_APP_KEY` environment variable in your deployment environment. | | `apiKeySecretArn` | An alternative to using the `apiKey` field. The ARN of the secret that is storing the Datadog API key in AWS Secrets Manager. Remember to add the `secretsmanager:GetSecretValue` permission to the Lambda execution role. | diff --git a/src/index.spec.ts b/src/index.spec.ts index ffdfeb7e..fecea80a 100644 --- a/src/index.spec.ts +++ b/src/index.spec.ts @@ -803,7 +803,7 @@ describe("ServerlessPlugin", () => { } expect(threwError).toBe(true); expect(thrownErrorMessage).toEqual( - "Warning: Invalid site URL. Must be one of datadoghq.com, datadoghq.eu, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, ddog-gov.com.", + "Warning: Invalid site URL. Must be one of datadoghq.com, datadoghq.eu, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, ddog-gov.com, us2.ddog-gov.com.", ); }); diff --git a/src/index.ts b/src/index.ts index cf780960..3f1ec6ff 100644 --- a/src/index.ts +++ b/src/index.ts @@ -640,6 +640,7 @@ function validateConfiguration(config: Configuration): void { "ap1.datadoghq.com", "ap2.datadoghq.com", "ddog-gov.com", + "us2.ddog-gov.com", ]; if (!config.testingMode && config.site !== undefined && !siteList.includes(config.site.toLowerCase())) { throw new Error(`Warning: Invalid site URL. Must be one of ${siteList.join(", ")}.`);