Skip to content

Commit

Permalink
Resource name sanitization (#108)
Browse files Browse the repository at this point in the history
Sanitizes AWS resource names in deploylib and related IAC files
  • Loading branch information
DavidSeptimus authored and Jordan Singer committed Feb 6, 2023
1 parent b28770b commit bc28eee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/infra/pulumi_aws/deploylib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ export class CloudCCLib {
}
// Right now we sanitize this bucket name in the compiler go code so we do not need to here (issue #188 & pro#51)
const resolvedBucketName = pulumi.interpolate`${this.account.accountId}${physicalPayloadsBucketName}`

this.createBuckets([resolvedBucketName], true)
this.addSharedPolicyStatement({
Effect: 'Allow',
Expand Down Expand Up @@ -1389,8 +1390,7 @@ export class CloudCCLib {
this,
execUnits,
charts || [],
existingCluster,
lbPlugin
existingCluster
)
}

Expand Down
1 change: 1 addition & 0 deletions pkg/infra/pulumi_aws/iac/sanitization/sanitizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export function sanitize(s: string, options: Partial<SanitizationOptions>): Sani
if (debug) {
failedRules?.forEach((f) => console.debug(f))
}

if (failedRules?.length === 0) {
return { result, violations: [] }
}
Expand Down

0 comments on commit bc28eee

Please sign in to comment.