From 37e4b33e42073e7cc227f870d593edcff0fb6072 Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Tue, 28 Nov 2023 00:52:27 +1100 Subject: [PATCH] fix: minify policy documents Policy documents are minified to provide to assist with working within the policy character limits. --- src/aws-provider/aws-organization-writer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/aws-provider/aws-organization-writer.ts b/src/aws-provider/aws-organization-writer.ts index b5adb8a9..53fd3a79 100644 --- a/src/aws-provider/aws-organization-writer.ts +++ b/src/aws-provider/aws-organization-writer.ts @@ -57,7 +57,7 @@ export class AwsOrganizationWriter { Name: resource.policyName, Description: resource.description!, Type: 'SERVICE_CONTROL_POLICY', - Content: JSON.stringify(resource.policyDocument, null, 2), + Content: JSON.stringify(resource.policyDocument, null, 0), }; const response = await this.organizationService.createPolicy(createPolicyRequest).promise(); const scpId = response.Policy!.PolicySummary!.Id!; @@ -127,7 +127,7 @@ export class AwsOrganizationWriter { PolicyId: physicalId, Name: resource.policyName, Description: resource.description, - Content: JSON.stringify(resource.policyDocument, null, 2), + Content: JSON.stringify(resource.policyDocument, null, 0), }; await this.organizationService.updatePolicy(updatePolicyRequest).promise(); });