Skip to content

Commit

Permalink
OAS-5111 | update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lakhansamani committed Sep 14, 2022
1 parent 17da831 commit 6d86255
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 13 deletions.
47 changes: 45 additions & 2 deletions docs/resources/multi_region_backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,53 @@ provider "oasis" {
organization = "" // Your Oasis organization where you want to create the resources
}
// Create Project
resource "oasis_project" "oasis_test_project" {
name = "Terraform Oasis Project"
description = "A test Oasis project within an organization from the Terraform Provider"
}
// Create Deployment
resource "oasis_deployment" "my_oneshard_deployment" {
terms_and_conditions_accepted = "true"
project = oasis_project.oasis_test_project.id // Project id where deployment will be created
name = "oasis_multi_region_deployment"
location {
region = "gcp-europe-west4"
}
version {
db_version = "3.8.7"
}
security {
disable_foxx_authentication = false
}
disk_performance = "dp30"
configuration {
model = "oneshard"
node_size_id = "c4-a8"
node_disk_size = 20
maximum_node_disk_size = 40
}
notification_settings {
email_addresses = [
"[email protected]"
]
}
}
// Create Backup
resource "oasis_backup" "backup" {
name = "oasis_backup"
description = "test backup description update from terraform"
deployment_id = oasis_deployment.my_oneshard_deployment.id
upload = true
auto_deleted_at = 3 // auto delete after 3 days
}
// Create Multi Region Backup
resource "oasis_multi_region_backup" "backup" {
source_backup_id = "" // make sure backup is uploaded
region_id = "" // set to the oasis region identifier other than the deployment region
source_backup_id = oasis_backup.backup.id // Existing backup ID that is already uploaded
region_id = "gcp-us-central1" // Oasis region identifier, which is other than the deployment region
}
```

Expand Down
22 changes: 11 additions & 11 deletions examples/resources/oasis_multi_region_backup/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ resource "oasis_project" "oasis_test_project" {
// Create Deployment
resource "oasis_deployment" "my_oneshard_deployment" {
terms_and_conditions_accepted = "true"
project = oasis_project.oasis_test_project.id // Project id where deployment will be created
name = "oasis_multi_region_deployment"
project = oasis_project.oasis_test_project.id // Project id where deployment will be created
name = "oasis_multi_region_deployment"
location {
region = "gcp-europe-west4"
}
Expand All @@ -36,29 +36,29 @@ resource "oasis_deployment" "my_oneshard_deployment" {
}
disk_performance = "dp30"
configuration {
model = "oneshard"
node_size_id = "c4-a8"
node_disk_size = 20
model = "oneshard"
node_size_id = "c4-a8"
node_disk_size = 20
maximum_node_disk_size = 40
}
notification_settings {
email_addresses = [
"[email protected]"
"[email protected]"
]
}
}

// Create Backup
resource "oasis_backup" "backup" {
name = "oasis_backup"
description = "test backup description update from terraform"
deployment_id = oasis_deployment.my_oneshard_deployment.id
upload = true
name = "oasis_backup"
description = "test backup description update from terraform"
deployment_id = oasis_deployment.my_oneshard_deployment.id
upload = true
auto_deleted_at = 3 // auto delete after 3 days
}

// Create Multi Region Backup
resource "oasis_multi_region_backup" "backup" {
source_backup_id = oasis_backup.backup.id // Existing backup ID that is already uploaded
region_id = "gcp-us-central1" // Oasis region identifier, which is other than the deployment region
region_id = "gcp-us-central1" // Oasis region identifier, which is other than the deployment region
}

0 comments on commit 6d86255

Please sign in to comment.