-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enable tiered storage in AWS via IAM policy
- Loading branch information
Showing
11 changed files
with
262 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
ansible/playbooks/roles/redpanda_broker/templates/configs/tiered_storage.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
cluster: | ||
cloud_storage_access_key: THISVALUENOTUSED | ||
cloud_storage_bucket: {{ tiered_storage_bucket_name if tiered_storage_bucket_name is defined }} | ||
cloud_storage_enable_remote_read: true | ||
cloud_storage_enable_remote_write: true | ||
cloud_storage_region: {{ aws_region if aws_region is defined }} | ||
cloud_storage_secret_key: THISVALUENOTUSED | ||
cloud_storage_credentials_source: aws_instance_metadata | ||
# cloud_storage_enabled must be after other cloud_storage parameters | ||
cloud_storage_enabled: {{ true if tiered_storage_bucket_name is defined and tiered_storage_bucket_name|d('')|length > 0 else false }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
resource "aws_s3_bucket" "tiered_storage" { | ||
count = var.tiered_storage_enabled ? 1 : 0 | ||
bucket = local.tiered_storage_bucket_name | ||
tags = local.instance_tags | ||
} | ||
|
||
resource "aws_s3_bucket_acl" "tiered_storage" { | ||
count = var.tiered_storage_enabled ? 1 : 0 | ||
bucket = aws_s3_bucket.tiered_storage[count.index].id | ||
acl = "private" | ||
} | ||
|
||
resource "aws_s3_bucket_versioning" "tiered_storage" { | ||
count = var.tiered_storage_enabled ? 1 : 0 | ||
bucket = aws_s3_bucket.tiered_storage[count.index].id | ||
versioning_configuration { | ||
status = "Disabled" | ||
} | ||
} |
Oops, something went wrong.