Added storage bucket tests.
This commit is contained in:
1 parent
4b4dc4c507
commit
df5cdc1aa2
4 files changed
+71
-5
No files matched your search
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env node
|
||||
import { readFileSync, writeFileSync } from "node:fs";
|
||||
import YAML from "yaml";
|
||||
|
||||
const policy = YAML.parse(readFileSync("iam_policy.yaml", "utf8"));
|
||||
|
||||
// Replace the Cloud Storage entry, if any, and keep the other audit configs.
|
||||
policy.auditConfigs = (policy.auditConfigs ?? []).filter(
|
||||
(c) => c.service !== "storage.googleapis.com",
|
||||
);
|
||||
policy.auditConfigs.push({
|
||||
service: "storage.googleapis.com",
|
||||
auditLogConfigs: [{ logType: "DATA_READ" }, { logType: "DATA_WRITE" }],
|
||||
});
|
||||
|
||||
writeFileSync("iam_policy.yaml", YAML.stringify(policy, { indentSeq: false }));
|
||||
Reference in new issue
Block a user