Skip to content

Commit

Permalink
chore(infra): remove unused resources
Browse files Browse the repository at this point in the history
  • Loading branch information
debkanchan committed Aug 4, 2024
1 parent c2f6858 commit d312dd1
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions infra/index.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,9 @@
import * as gcp from "@pulumi/gcp";
import * as pulumi from "@pulumi/pulumi";

const serviceName =
new pulumi.Config("service").get("name") || pulumi.getProject();
const serviceName = new pulumi.Config("service").get("name") || pulumi.getProject();
const location = gcp.config.region || "asia-east1";

const bucket = new gcp.storage.Bucket("bazel-remote-cache", {
location, // Replace with desired location if needed.
uniformBucketLevelAccess: true,
});

// IAM policy to allow the specific service account read and write access to the bucket
const bucketIAMMemberUser = new gcp.storage.BucketIAMMember(
"bucketIAMMemberUser",
{
bucket: bucket.name,
role: "roles/storage.objectUser",
member: `serviceAccount:${gcp.config.project}@cloudbuild.gserviceaccount.com`,
},
);

const github_connection = gcp.cloudbuildv2.Connection.get(
"github-connection",
pulumi.interpolate`projects/${gcp.config.project}/locations/${location}/connections/GitHub`,
Expand All @@ -40,7 +24,6 @@ new gcp.cloudbuild.Trigger("build-trigger", {
},
},
substitutions: {
_BAZEL_REMOTE_CACHE_BUCKET: bucket.name,
_LOG_DEBUG: new pulumi.Config().get("logDebug") ?? "false",
},
filename: "cloudbuild.yaml",
Expand Down

0 comments on commit d312dd1

Please sign in to comment.