Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions codegen/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const scriptDir = path.dirname(scriptPath);
const iamPoliciesTfModulePath = path.join(
path.join(scriptDir, "../../iam-policies/terraform"),
);
const iamPoliciesOutDir = path.join(iamPoliciesTfModulePath, "policies");

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

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

const policyOutputPath = path.join(
iamPoliciesTfModulePath,
"policies",
`${policyName}.json`,
);
const policyOutputPath = path.join(iamPoliciesOutDir, `${policyName}.json`);

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

await fs.rm(iamPoliciesOutDir, { recursive: true, force: true });
await fs.mkdir(iamPoliciesOutDir, { recursive: true });

const policies = await Promise.all(
policyNames.map(async (policyName) => {
const policyPath = path.join(policiesDir, `${policyName}.ts`);
Expand Down
115 changes: 0 additions & 115 deletions codegen/src/policies/ElastioAwsBackupEc2Scan.ts

This file was deleted.

2 changes: 0 additions & 2 deletions iam-policies/terraform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ See the basic [usage example](./examples/basic/main.tf).
| Policy | Description |
| ------------------------------------------------------------ | -------------------------------------------------------------- |
| [`ElastioAssetAccountDeployer`][ElastioAssetAccountDeployer] | Permissions required to deploy the Elastio Asset Account stack |
| [`ElastioAwsBackupEc2Scan`][ElastioAwsBackupEc2Scan] | Allows Elastio to scan AWS Backup EC2 and EBS recovery points. |

[ElastioAssetAccountDeployer]: ../../codegen/src/policies/ElastioAssetAccountDeployer.ts
[ElastioAwsBackupEc2Scan]: ../../codegen/src/policies/ElastioAwsBackupEc2Scan.ts

<!-- ELASTIO_END_POLICY_NAMES -->

Expand Down
86 changes: 0 additions & 86 deletions iam-policies/terraform/policies/ElastioAwsBackupEc2Scan.json

This file was deleted.