-
Notifications
You must be signed in to change notification settings - Fork 1
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 #26 from MagaluCloud/lp-update-docs-manual
Update Header Categories, Add Guides, Update Block Storage Snapshot Document
- Loading branch information
Showing
20 changed files
with
169 additions
and
49 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
--- | ||
page_title: "Environment Variables MGC" | ||
subcategory: "Guides" | ||
description: |- | ||
How to use Environment Variables in MGC Cloud. | ||
--- | ||
|
||
# Environment Variables MGC | ||
|
||
## Introduction | ||
|
||
This documentation describes how to configure and use the following environment variables for Terraform and the CLI: | ||
|
||
- `MGC_API_KEY` | ||
- `MGC_OBJ_KEY_ID` | ||
- `MGC_OBJ_KEY_SECRET` | ||
- `MGC_REGION` | ||
- `MGC_ENV` | ||
|
||
These environment variables are used for authentication and environment configuration when interacting with the provided infrastructure and services. | ||
|
||
1. `MGC_API_KEY` - | ||
API key for authentication. [More information](/docs/terraform/how-to/auth#autenticação-com-api-key). | ||
|
||
2. `MGC_OBJ_KEY_ID` - | ||
Key ID to access the Object Storage product. [More information](/docs/terraform/how-to/auth#autenticação-com-api-key). | ||
|
||
3. `MGC_OBJ_KEY_SECRET` - | ||
*Secret* of the key to access the Object Storage product. [More information](/docs/terraform/how-to/auth#autenticação-com-api-key). | ||
|
||
4. `MGC_REGION` - | ||
Specifies the region where resources will be created and managed. | ||
|
||
5. `MGC_ENV` - | ||
Defines the operating environment to differentiate between different phases of development.. | ||
|
||
|
||
## Configuration in Terraform | ||
|
||
Example: | ||
|
||
```hcl | ||
provider "mgc" { | ||
alias = "nordeste" | ||
region = var.mgc_region | ||
api_key = var.mgc_api_key | ||
object_storage = { | ||
key_pair = { | ||
key_id = var.mgc_obj_key_id | ||
key_secret = var.mgc_obj_key_secret | ||
} | ||
} | ||
} | ||
variable "mgc_api_key" { | ||
description = "API key for authentication." | ||
} | ||
variable "mgc_obj_key_id" { | ||
description = "Key ID to access the Object Storage product." | ||
} | ||
variable "mgc_obj_key_secret" { | ||
description = "Secret of the key to access the Object Storage product." | ||
} | ||
variable "mgc_region" { | ||
description = "Specifies the region where resources will be created and managed." | ||
} | ||
variable "mgc_env" { | ||
description = "Defines the operating environment" | ||
} | ||
``` |
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,78 +1,124 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "mgc_block_storage_snapshots Resource - terraform-provider-mgc" | ||
subcategory: "" | ||
subcategory: "Block Storage" | ||
description: |- | ||
Operations with snapshots for volumes. | ||
--- | ||
|
||
# mgc_block_storage_snapshots (Resource) | ||
|
||
Operations with snapshots for volumes. | ||
## Introduction | ||
|
||
The mgc_block_storage_snapshots resource allows you to manage snapshots of block storage volumes in Magalu Cloud. Snapshots are useful for backup and restore operations, enabling you to capture the state of a volume at a specific point in time. For more information see the [official documentation](https://docs.magalu.cloud/docs/block-storage/overview). | ||
|
||
## Example Usage | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
```hcl | ||
resource "mgc_block_storage_snapshots" "snapshot_example" { | ||
description = "example of description" | ||
name = "exemplo snapshot name" | ||
volume = { | ||
id = mgc_block_storage_volumes.example_volume.id | ||
} | ||
} | ||
``` | ||
|
||
### Required | ||
-> For more examples, you can visit the [Magalu Cloud Terraform example repository.](https://github.com/MagaluCloud/terraform-examples) | ||
|
||
- `description` (String) | ||
- `name` (String) | ||
- `volume` (Attributes) (see [below for nested schema](#nestedatt--volume)) | ||
<!-- schema generated by tfplugindocs --> | ||
## Arguments Reference | ||
|
||
### Read-Only | ||
### Required | ||
|
||
- `created_at` (Attributes) (see [below for nested schema](#nestedatt--created_at)) | ||
- `current_volume` (Attributes) (see [below for nested schema](#nestedatt--current_volume)) | ||
- `id` (String) The ID of this resource. | ||
- `size` (Number) | ||
- `state` (String) | ||
- `status` (String) | ||
- `updated_at` (Attributes) (see [below for nested schema](#nestedatt--updated_at)) | ||
- `description` (String): Description of the snapshot. | ||
- `name` (String): Name of the snapshot. | ||
- `volume` (Block): Details of the volume to snapshot. ([See nested schema for `volume`](#nestedatt--volume)) | ||
|
||
<a id="nestedatt--volume"></a> | ||
### Nested Schema for `volume` | ||
|
||
Optional: | ||
Required: | ||
|
||
- `id` (String): ID of the volume. | ||
- `name` (String): Name of the volume. | ||
|
||
- `id` (String) | ||
- `name` (String) | ||
-> You can provide `id` or `name`. It is not necessary to inform both. | ||
|
||
## Attributes Reference | ||
|
||
- `created_at`: Timestamp of when the snapshot was created ([see Nested Schema for `created_at`](#nestedatt--created_at)) | ||
- `current_volume`: Details of the current volume ([see Nested Schema for `current_volume`](#nestedatt--current_volume)) | ||
- `id` (String) The ID of this resource. | ||
- `size` (Number) Size of the snapshot. | ||
- `state` (String) Current state of the snapshot. | ||
- `status` (String) Status of the snapshot. | ||
- `updated_at`: Timestamp of when the snapshot was last updated ([see Nested Schema for `updated_at`](#nestedatt--updated_at)) | ||
|
||
|
||
<a id="nestedatt--created_at"></a> | ||
### Nested Schema for `created_at` | ||
|
||
Read-Only: | ||
|
||
- `string1` (String) | ||
- `string2` (String) | ||
- `string1` (String): Timestamp of when the snapshot was created | ||
- `string2` (String): Timestamp of when the snapshot was created | ||
|
||
Example: | ||
```hcl | ||
"created_at": { | ||
"string1": "2024-07-12T13:45:06Z", | ||
"string2": "2024-07-12T13:45:06Z" | ||
}, | ||
``` | ||
|
||
<a id="nestedatt--current_volume"></a> | ||
### Nested Schema for `current_volume` | ||
|
||
Read-Only: | ||
|
||
- `id` (String) | ||
- `name` (String) | ||
- `size` (Number) | ||
- `type` (Attributes) (see [below for nested schema](#nestedatt--current_volume--type)) | ||
- `id` (String): ID of current volume | ||
- `name` (String): Name of current volume | ||
- `size` (Number): Size of current volume | ||
- `type` (Attributes) ([see nested schema for `type`](#nestedatt--current_volume--type)) | ||
|
||
Example: | ||
```hcl | ||
"current_volume": { | ||
"id": "5c7ae181-fd5d-4a2f-8f10-fasdfadaf", | ||
"name": null, | ||
"size": null, | ||
"type": null | ||
}, | ||
``` | ||
|
||
<a id="nestedatt--current_volume--type"></a> | ||
### Nested Schema for `current_volume.type` | ||
|
||
Read-Only: | ||
|
||
- `id` (String) | ||
- `name` (String) | ||
|
||
- `id` (String): ID of current volume type | ||
- `name` (String): Name of current volume type | ||
|
||
Example: | ||
```hcl | ||
"type": { | ||
"id": 5c7ae181-fd5d-4a2f-8f10-fasdfadaf, | ||
"name": "cloud_nvme" | ||
}, | ||
``` | ||
|
||
<a id="nestedatt--updated_at"></a> | ||
### Nested Schema for `updated_at` | ||
|
||
Read-Only: | ||
|
||
- `string1` (String) | ||
- `string2` (String) | ||
- `string1` (String): Timestamp of when the snapshot was last updated | ||
- `string2` (String): Timestamp of when the snapshot was last updated | ||
|
||
Example: | ||
```hcl | ||
"updated_at": { | ||
"string1": "2024-07-12T13:45:06Z", | ||
"string2": "2024-07-12T13:45:06Z" | ||
}, | ||
``` |
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
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
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
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