Skip to content

Commit d1b57b1

Browse files
authored
Remove ElastioAwsBackupEc2Scan permission boundary, we'll instead configure it via stack params (#114)
1 parent 8386a8e commit d1b57b1

File tree

4 files changed

+5
-208
lines changed

4 files changed

+5
-208
lines changed

codegen/src/main.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const scriptDir = path.dirname(scriptPath);
1616
const iamPoliciesTfModulePath = path.join(
1717
path.join(scriptDir, "../../iam-policies/terraform"),
1818
);
19+
const iamPoliciesOutDir = path.join(iamPoliciesTfModulePath, "policies");
1920

2021
async function writePolicy(policyName: string, policy: Policy) {
2122
const policyDocument = {
@@ -33,11 +34,7 @@ async function writePolicy(policyName: string, policy: Policy) {
3334

3435
const policyDocumentJson = JSON.stringify(policyDefinition, null, 2);
3536

36-
const policyOutputPath = path.join(
37-
iamPoliciesTfModulePath,
38-
"policies",
39-
`${policyName}.json`,
40-
);
37+
const policyOutputPath = path.join(iamPoliciesOutDir, `${policyName}.json`);
4138

4239
await fs.writeFile(policyOutputPath, policyDocumentJson);
4340
}
@@ -47,6 +44,9 @@ async function main() {
4744
const policyFiles = await fs.readdir(policiesDir);
4845
const policyNames = policyFiles.map((file) => path.basename(file, ".ts"));
4946

47+
await fs.rm(iamPoliciesOutDir, { recursive: true, force: true });
48+
await fs.mkdir(iamPoliciesOutDir, { recursive: true });
49+
5050
const policies = await Promise.all(
5151
policyNames.map(async (policyName) => {
5252
const policyPath = path.join(policiesDir, `${policyName}.ts`);

codegen/src/policies/ElastioAwsBackupEc2Scan.ts

Lines changed: 0 additions & 115 deletions
This file was deleted.

iam-policies/terraform/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@ See the basic [usage example](./examples/basic/main.tf).
3030
| Policy | Description |
3131
| ------------------------------------------------------------ | -------------------------------------------------------------- |
3232
| [`ElastioAssetAccountDeployer`][ElastioAssetAccountDeployer] | Permissions required to deploy the Elastio Asset Account stack |
33-
| [`ElastioAwsBackupEc2Scan`][ElastioAwsBackupEc2Scan] | Allows Elastio to scan AWS Backup EC2 and EBS recovery points. |
3433

3534
[ElastioAssetAccountDeployer]: ../../codegen/src/policies/ElastioAssetAccountDeployer.ts
36-
[ElastioAwsBackupEc2Scan]: ../../codegen/src/policies/ElastioAwsBackupEc2Scan.ts
3735

3836
<!-- ELASTIO_END_POLICY_NAMES -->
3937

iam-policies/terraform/policies/ElastioAwsBackupEc2Scan.json

Lines changed: 0 additions & 86 deletions
This file was deleted.

0 commit comments

Comments
 (0)