Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

Commit

Permalink
add resume object to storage bucket definition
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgraham4401 committed Sep 14, 2023
1 parent b544eda commit ed8135e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ module "storage" {
project_id = var.project_id
environment = var.environment
bucket_name = "dpgraham-dev"
resume_path = "./README.md"
}

module "database" {
Expand Down
6 changes: 6 additions & 0 deletions modules/storage/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,10 @@ resource "google_storage_default_object_access_control" "public_access" {
bucket = google_storage_bucket.default.name
role = "READER"
entity = "allUsers"
}

resource "google_storage_bucket_object" "resume_folder" {
bucket = google_storage_bucket.default.name
name = "resume/resume.md"
source = var.resume_path
}
5 changes: 5 additions & 0 deletions modules/storage/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,9 @@ variable "environment" {
condition = contains(["dev", "prod"], var.environment)
error_message = "Environment must be one of [devel, prod]"
}
}

variable "resume_path" {
description = "The path to the resume to upload"
type = string
}

0 comments on commit ed8135e

Please sign in to comment.