Skip to content
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

PROD SSM LD #5189

Merged
merged 2 commits into from
Dec 22, 2022
Merged
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
2 changes: 2 additions & 0 deletions services/ui-src/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ custom:
cognito_user_pool_id: ${cf:ui-auth-${self:custom.stage}.UserPoolId}
cognito_user_pool_client_id: ${cf:ui-auth-${self:custom.stage}.UserPoolClientId}
cognito_user_pool_client_domain: ${cf:ui-auth-${self:custom.stage}.UserPoolClientDomain}
ldSdkClient: ${env:REACT_APP_LD_SDK_CLIENT, ssm:/${self:custom.stage}/launchdarkly/client, ssm:/default/launchdarkly/client}
s3_attachments_bucket_region: ${cf:uploads-${self:custom.stage}.Region}
s3_attachments_bucket_name: ${cf:uploads-${self:custom.stage}.AttachmentsBucketName}
ui_s3_bucket_name: ${cf:ui-${self:custom.stage}.S3BucketName}
Expand Down Expand Up @@ -62,6 +63,7 @@ custom:
export COGNITO_USER_POOL_CLIENT_DOMAIN=${self:custom.cognito_user_pool_client_domain}
export COGNITO_REDIRECT_SIGNIN=${self:custom.application_endpoint_url}
export COGNITO_REDIRECT_SIGNOUT=${self:custom.application_endpoint_url}
export REACT_APP_LD_SDK_CLIENT=${self:custom.ldSdkClient}
export S3_ATTACHMENTS_BUCKET_REGION=${self:custom.s3_attachments_bucket_region}
export S3_ATTACHMENTS_BUCKET_NAME=${self:custom.s3_attachments_bucket_name}
export STAGE=${self:custom.stage}
Expand Down
1 change: 1 addition & 0 deletions services/ui-src/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const config = {
},
STAGE: window._env_.STAGE,
DEV_API_URL: window._env_.DEV_API_URL,
REACT_APP_LD_SDK_CLIENT: window._env_.REACT_APP_LD_SDK_CLIENT,
};

export default config;
2 changes: 1 addition & 1 deletion services/ui-src/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Amplify.configure({
});

// LaunchDarkly configuration
const ldClientId = process.env.REACT_APP_LD_SDK_CLIENT;
const ldClientId = config.REACT_APP_LD_SDK_CLIENT;
(async () => {
const LDProvider = await asyncWithLDProvider({
clientSideID: ldClientId!,
Expand Down