Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
david-pepper committed Jun 25, 2024
1 parent d30bbad commit 172eba5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 1 addition & 3 deletions cdk/lib/zuora-salesforce-link-remover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ export class ZuoraSalesforceLinkRemover extends GuStack {
architecture: Architecture.ARM_64,
initialPolicy: [
new PolicyStatement({
actions: [
'secretsmanager:GetSecretValue',
],
actions: ['secretsmanager:GetSecretValue'],
resources: [
`arn:aws:secretsmanager:${this.region}:${this.account}:secret:DEV/Salesforce/ConnectedApp/AwsConnectorSandbox-oO8Phf`,
],
Expand Down
12 changes: 7 additions & 5 deletions handlers/zuora-salesforce-link-remover/src/getBillingAccounts.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import { GetSecretValueCommand, SecretsManagerClient } from "@aws-sdk/client-secrets-manager";
import {
GetSecretValueCommand,
SecretsManagerClient,
} from '@aws-sdk/client-secrets-manager';

export function handler() {
console.log('getting secret...');
const secretName = "DEV/Salesforce/ConnectedApp/AwsConnectorSandbox"
const secretName = 'DEV/Salesforce/ConnectedApp/AwsConnectorSandbox';

const secret = getSecretValue({secretName});
const secret = getSecretValue({ secretName });
console.log('secret = ', secret);
return 'abcdef';
}


export const getSecretValue = async <T>({
secretName,
}: {
Expand Down Expand Up @@ -38,7 +40,7 @@ export const getSecretValue = async <T>({

return secretValue;
} catch (error) {
console.error('error:',error);
console.error('error:', error);
throw error;
}
};

0 comments on commit 172eba5

Please sign in to comment.