Skip to content

Commit

Permalink
fix: minify policy documents (#540)
Browse files Browse the repository at this point in the history
Policy documents are minified to provide to assist with working within the policy character limits.

Co-authored-by: Olaf Conijn <[email protected]>
  • Loading branch information
CameronHall and OlafConijn authored Feb 1, 2024
1 parent 145a572 commit 9459ba9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/aws-provider/aws-organization-writer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ export class AwsOrganizationWriter {
Name: resource.policyName,
Description: resource.description!,
Type: 'SERVICE_CONTROL_POLICY',
Content: JSON.stringify(resource.policyDocument, null, 2),
});
const response = await this.organizationsService.send(createPolicyCommand);
Content: JSON.stringify(resource.policyDocument, null, 0),
};
const response = await this.organizationService.createPolicy(createPolicyRequest).promise();
const scpId = response.Policy!.PolicySummary!.Id!;
ConsoleUtil.LogDebug(`SCP Created ${scpId}`);
return scpId;
Expand Down Expand Up @@ -130,9 +130,9 @@ export class AwsOrganizationWriter {
PolicyId: physicalId,
Name: resource.policyName,
Description: resource.description,
Content: JSON.stringify(resource.policyDocument, null, 2),
});
await this.organizationsService.send(updatePolicyCommand);
Content: JSON.stringify(resource.policyDocument, null, 0),
};
await this.organizationService.updatePolicy(updatePolicyRequest).promise();
});
}

Expand Down

0 comments on commit 9459ba9

Please sign in to comment.