Skip to content

Commit

Permalink
add s3 bucket module
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljguarino committed Sep 22, 2024
1 parent a3a5cf9 commit ed95108
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 1 deletion.
13 changes: 13 additions & 0 deletions terraform/modules/blob/s3/bucket.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module "s3_bucket" {
source = "terraform-aws-modules/s3-bucket/aws"

bucket = var.bucket_name
acl = "private"

control_object_ownership = true
object_ownership = "ObjectWriter"

versioning = {
enabled = true
}
}
8 changes: 8 additions & 0 deletions terraform/modules/blob/s3/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
variable "bucket_name" {
type = string
}

variable "region" {
type = string
default = "us-east-2"
}
13 changes: 13 additions & 0 deletions terraform/modules/blob/s3/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
terraform {
required_version = ">= 1.0"

required_providers {
aws = {
source = "hashicorp/aws"
}
}
}

provider "aws" {
region = var.region
}
7 changes: 6 additions & 1 deletion terraform/modules/clusters/aws/addons.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,16 @@ module "externaldns_irsa_role" {

role_name = "${module.eks.cluster_name}-externaldns"
attach_external_dns_policy = true
attach_cert_manager_policy = true

oidc_providers = {
main = {
provider_arn = module.eks.oidc_provider_arn
namespace_service_accounts = ["plural-runtime:external-dns"]
namespace_service_accounts = [
"plural-runtime:external-dns",
"external-dns:external-dns",
"cert-manager:cert-manager"
]
}
}
}

0 comments on commit ed95108

Please sign in to comment.