-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73 from arangodb-managed/OAS-5111
OAS-5111 | add resources for oasis multi region backup
- Loading branch information
Showing
22 changed files
with
557 additions
and
64 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
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,98 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "oasis_multi_region_backup Resource - terraform-provider-oasis" | ||
subcategory: "" | ||
description: |- | ||
Oasis Multi Region Backup Resource | ||
--- | ||
|
||
# oasis_multi_region_backup (Resource) | ||
|
||
Oasis Multi Region Backup Resource | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
terraform { | ||
required_version = ">= 0.13.0" | ||
required_providers { | ||
oasis = { | ||
source = "arangodb-managed/oasis" | ||
version = ">=2.1.5" | ||
} | ||
} | ||
} | ||
provider "oasis" { | ||
api_key_id = "" // API Key ID generated in Oasis platform | ||
api_key_secret = "" // API Key Secret generated in Oasis platform | ||
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" | ||
} | ||
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 = oasis_backup.backup.id // Existing backup ID | ||
region_id = "gcp-us-central1" // Oasis region identifier, which is other than the deployment region | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Optional | ||
|
||
- `region_id` (String) Oasis Multi Region Backup Resource Region Identifier | ||
- `source_backup_id` (String) Oasis Multi Region Backup Resource Region Identifier | ||
|
||
### Read-Only | ||
|
||
- `auto_deleted_at` (Number) Oasis Multi Region Backup Resource Backup Auto Delete At field, generated based on source backup | ||
- `backup_policy_id` (String) Oasis Multi Region Backup Resource Backup Policy ID field, generated based on source backup | ||
- `deployment_id` (String) Oasis Multi Region Backup Resource Backup Deployment ID field, generated based on source backup | ||
- `description` (String) Oasis Multi Region Backup Resource Backup Description field, generated based on source backup | ||
- `id` (String) The ID of this resource. | ||
- `name` (String) Oasis Multi Region Backup Resource Backup Name field, generated based on source backup | ||
- `upload` (Boolean) Oasis Multi Region Backup Resource Backup Upload field, generated based on source backup | ||
- `url` (String) Oasis Multi Region Backup Resource Backup URL field, generated based on source backup | ||
|
||
|
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,26 @@ | ||
# Example: Multi Region Backup | ||
|
||
This example shows how to use the Terraform Oasis provider to create an Oasis Multi Region backup inside a Deployment. | ||
|
||
## Prerequisites | ||
|
||
_This example uses syntax elements specific to Terraform version 0.13+ (tested on Terraform version 1.1.4). | ||
It will not work out-of-the-box with Terraform 0.12.x and lower._ | ||
|
||
## Environment variables | ||
|
||
Please refer to [Main README](../../README.md) file for all the environment variables you might need. | ||
|
||
## Instructions on how to run: | ||
|
||
``` | ||
terraform init | ||
terraform plan | ||
terraform apply | ||
``` | ||
|
||
To remove the resources created run: | ||
|
||
``` | ||
terraform destroy | ||
``` |
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,61 @@ | ||
terraform { | ||
required_version = ">= 0.13.0" | ||
required_providers { | ||
oasis = { | ||
source = "arangodb-managed/oasis" | ||
version = ">=2.1.6" | ||
} | ||
} | ||
} | ||
|
||
provider "oasis" { | ||
api_key_id = "" // API Key ID generated in Oasis platform | ||
api_key_secret = "" // API Key Secret generated in Oasis platform | ||
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" | ||
} | ||
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 = oasis_backup.backup.id // Existing backup ID | ||
region_id = "gcp-us-central1" // Oasis region identifier, which is other than the deployment region | ||
} |
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
Oops, something went wrong.