Skip to content

Commit

Permalink
Merge pull request #26 from MagaluCloud/lp-update-docs-manual
Browse files Browse the repository at this point in the history
Update Header Categories, Add Guides, Update Block Storage Snapshot Document
  • Loading branch information
lfpicoloto1 authored Jul 16, 2024
2 parents 34e550c + aa75e05 commit 8cc1509
Show file tree
Hide file tree
Showing 20 changed files with 169 additions and 49 deletions.
74 changes: 74 additions & 0 deletions docs/guides/env-variables.md
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"
}
```
108 changes: 77 additions & 31 deletions docs/resources/block_storage_snapshots.md
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"
},
```
2 changes: 1 addition & 1 deletion docs/resources/block_storage_volume_attachment.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "mgc_block_storage_volume_attachment Resource - terraform-provider-mgc"
subcategory: ""
subcategory: "Block Storage"
description: |-
Block Storage Volume Attachment
---
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/block_storage_volumes.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "mgc_block_storage_volumes Resource - terraform-provider-mgc"
subcategory: ""
subcategory: "Block Storage"
description: |-
Operations with volumes, including create, delete, extend, retype, list and other actions.
---
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/container_registry_registries.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "mgc_container_registry_registries Resource - terraform-provider-mgc"
subcategory: ""
subcategory: "Kubernetes"
description: |-
Routes related to creation, listing and deletion of registries.
---
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/dbaas_instances.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "mgc_dbaas_instances Resource - terraform-provider-mgc"
subcategory: ""
subcategory: "Database"
description: |-
Database instances management.
---
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/dbaas_instances_backups.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "mgc_dbaas_instances_backups Resource - terraform-provider-mgc"
subcategory: ""
subcategory: "Database"
description: |-
Database instances management. | backups
---
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/dbaas_replicas.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "mgc_dbaas_replicas Resource - terraform-provider-mgc"
subcategory: ""
subcategory: "Database"
description: |-
Database replicas management.
---
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/kubernetes_cluster.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "mgc_kubernetes_cluster Resource - terraform-provider-mgc"
subcategory: ""
subcategory: "Kubernetes"
description: |-
Endpoints related to the creation, listing, deletion, and retrieval of the kubeconfig for a Kubernetes cluster.
---
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/kubernetes_nodepool.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "mgc_kubernetes_nodepool Resource - terraform-provider-mgc"
subcategory: ""
subcategory: "Kubernetes"
description: |-
Endpoints related to the creation, listing of nodepools and nodes, updating, and deletion of nodepools for a Kubernetes cluster.
---
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/network_ports.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "mgc_network_ports Resource - terraform-provider-mgc"
subcategory: ""
subcategory: "Network"
description: |-
VPC Port
---
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/network_ports_security_group_attachment.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "mgc_network_ports_security_group_attachment Resource - terraform-provider-mgc"
subcategory: ""
subcategory: "Network"
description: |-
Manage the attachment between a Security Group and a Port
---
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/network_public_ips.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "mgc_network_public_ips Resource - terraform-provider-mgc"
subcategory: ""
subcategory: "Network"
description: |-
VPC Public IPs
---
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/network_public_ips_port_attachment.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "mgc_network_public_ips_port_attachment Resource - terraform-provider-mgc"
subcategory: ""
subcategory: "Network"
description: |-
Manage the attachment between a Public IP and a Port
---
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/network_rules.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "mgc_network_rules Resource - terraform-provider-mgc"
subcategory: ""
subcategory: "Network"
description: |-
VPC Rules
---
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/network_security_groups.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "mgc_network_security_groups Resource - terraform-provider-mgc"
subcategory: ""
subcategory: "Network"
description: |-
VPC Security Groups
---
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/network_vpcs.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "mgc_network_vpcs Resource - terraform-provider-mgc"
subcategory: ""
subcategory: "Network"
description: |-
Virtual Private Cloud (VPC)
---
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/object_storage_buckets.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "mgc_object_storage_buckets Resource - terraform-provider-mgc"
subcategory: ""
subcategory: "Object Storage"
description: |-
Bucket operations for Object Storage API
---
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/virtual_machine_instances.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "mgc_virtual_machine_instances Resource - terraform-provider-mgc"
subcategory: ""
subcategory: "Virtual Machine"
description: |-
Operations with instances, including create, delete, start, stop, reboot and other actions.
---
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/virtual_machine_snapshots.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "mgc_virtual_machine_snapshots Resource - terraform-provider-mgc"
subcategory: ""
subcategory: "Virtual Machine"
description: |-
Operations with snapshots for instances.
---
Expand Down

0 comments on commit 8cc1509

Please sign in to comment.