Skip to content

Commit

Permalink
Merge pull request #9 from Snowflake-Labs/Add-custom-s3-name-option
Browse files Browse the repository at this point in the history
Add option to specify custom S3 bucket name
  • Loading branch information
sfc-gh-pkommini authored Oct 17, 2022
2 parents e158625 + b740826 commit 64854da
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ variable "snowflake_integration_user_roles" {
description = "List of roles to which GEFF infra will GRANT USAGE ON INTEGRATION perms."
}

variable "s3_bucket_name" {
type = string
default = ""
description = "Custom S3 bucket name."
}

variable "data_bucket_arns" {
type = list(string)
default = []
Expand All @@ -44,7 +50,7 @@ locals {
}

locals {
s3_bucket_name = "${replace(var.prefix, "_", "-")}-${var.env}-bucket" # Only hiphens + lower alphanumeric are allowed for bucket name
s3_bucket_name = var.s3_bucket_name == "" ? "${replace(var.prefix, "_", "-")}-${var.env}-bucket" : "${replace(var.s3_bucket_name, "_", "-")}" # Only hiphens + lower alphanumeric are allowed for bucket name
s3_reader_role_name = "${var.prefix}-s3-reader"
s3_sns_policy_name = "${var.prefix}-s3-sns-topic-policy"
s3_bucket_policy_name = "${var.prefix}-rw-to-s3-bucket-policy"
Expand Down

0 comments on commit 64854da

Please sign in to comment.