Skip to content

Commit

Permalink
chore: add random suffix to bucket name
Browse files Browse the repository at this point in the history
  • Loading branch information
vmttn committed Oct 17, 2023
1 parent 8151037 commit 07339ab
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
20 changes: 20 additions & 0 deletions deployment/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion deployment/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ resource "scaleway_instance_server" "main" {
security_group_id = scaleway_instance_security_group.main.id
}

resource "random_pet" "main" {}

resource "scaleway_object_bucket" "main" {
name = "data-inclusion-datalake-${var.environment}"
name = "data-inclusion-datalake-${var.environment}-${random_integer.main.id}"
}

data "scaleway_account_project" "main" {
Expand Down
4 changes: 4 additions & 0 deletions deployment/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ terraform {
source = "hashicorp/null"
version = "3.2.1"
}
random = {
source = "hashicorp/random"
version = "3.5.1"
}
}
}

Expand Down

0 comments on commit 07339ab

Please sign in to comment.