-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PLT-1443: Added backup storage location for other available storage t…
…ypes. (#546) * initial commit * PLT-1443:Added Backup storage for other providers(Minio, gcp and azure). * added validation on back up storage location * disable unit test * incorporated review comments
- Loading branch information
1 parent
4264c78
commit adbe025
Showing
8 changed files
with
1,196 additions
and
199 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
95 changes: 73 additions & 22 deletions
95
examples/resources/spectrocloud_backup_storage_location/resource.tf
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 |
---|---|---|
@@ -1,29 +1,80 @@ | ||
resource "spectrocloud_backup_storage_location" "bsl1" { | ||
name = "aaa-project-dev-1" | ||
context = "project" | ||
is_default = false | ||
region = "us-east-1" | ||
bucket_name = "project-backup-2" | ||
// S3 Backup location with secret credential type example | ||
resource "spectrocloud_backup_storage_location" "bsl_s3" { | ||
name = "project-dev-bsl-s3" | ||
context = "project" | ||
location_provider = "aws" | ||
is_default = false | ||
region = "us-east-1" | ||
bucket_name = "project-backup-bucket-s3" | ||
s3 { | ||
credential_type = "secret" | ||
access_key = "access_key" | ||
secret_key = "secret_key" | ||
access_key = "test-access-key-s3" | ||
secret_key = "test-secret-key-s3" | ||
s3_force_path_style = false | ||
s3_url = "https://s3.us-east-1.amazonaws.com" | ||
} | ||
} | ||
|
||
// Minio Backup location with secret credential type example | ||
resource "spectrocloud_backup_storage_location" "bsl_minio" { | ||
name = "project-dev-minio-bsl" | ||
context = "project" | ||
location_provider = "minio" | ||
is_default = false | ||
region = "us-east-2" | ||
bucket_name = "project-backup-bucket-minio" | ||
s3 { | ||
credential_type = "secret" | ||
access_key = "test-access-key-minio" | ||
secret_key = "test-secret-key-minio" | ||
s3_force_path_style = true | ||
s3_url = "http://10.90.78.23" | ||
} | ||
} | ||
|
||
#resource "spectrocloud_backup_storage_location" "bsl2" { | ||
# name = "tenant-dev-1" | ||
# context = "tenant" | ||
# is_default = false | ||
# region = "us-east-2" | ||
# bucket_name = "tenant-backup-2" | ||
# s3 { | ||
# credential_type = "sts" | ||
# arn = "arn_role" | ||
# external_id = "external_id" | ||
# s3_force_path_style = false | ||
# #s3_url = "http://10.90.78.23" | ||
# } | ||
#} | ||
// GCP Backup location example | ||
resource "spectrocloud_backup_storage_location" "bsl_gcp" { | ||
name = "project-dev-gcp" | ||
context = "project" | ||
location_provider = "gcp" | ||
is_default = false | ||
bucket_name = "project-backup-bucket-gcp" | ||
gcp_storage_config { | ||
project_id = "test-gcp-project-id" | ||
gcp_json_credentials = "" | ||
} | ||
} | ||
|
||
// Azure Backup location example | ||
resource "spectrocloud_backup_storage_location" "bsl_azure" { | ||
name = "project-dev-azure-bsl" | ||
context = "project" | ||
location_provider = "azure" | ||
is_default = false | ||
azure_storage_config { | ||
container_name = "test-container" | ||
storage_name = "test-storage" | ||
stock_keeping_unit = "Standard_LRS" | ||
resource_group = "test-resource-group" | ||
azure_tenant_id = "test-azure-tenant-id" | ||
azure_client_id = "test-azure-client-id" | ||
subscription_id = "test-azure-subscription-id" | ||
azure_client_secret = "" | ||
} | ||
} | ||
|
||
// S3 Backup location with STS credential type | ||
resource "spectrocloud_backup_storage_location" "bsl_sts" { | ||
name = "tenant-dev-1" | ||
context = "tenant" | ||
is_default = false | ||
region = "us-east-2" | ||
bucket_name = "tenant-backup-bucket-sts" | ||
s3 { | ||
credential_type = "sts" | ||
arn = "arn:aws:role/TestRole" | ||
external_id = "test-external-id" | ||
s3_force_path_style = false | ||
s3_url = "https://s3.us-east-2.amazonaws.com" | ||
} | ||
} |
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
Oops, something went wrong.