The official Terraform provider for Magalu Cloud, allowing you to manage your cloud infrastructure as code. As an official HashiCorp Partner, this provider follows Terraform best practices for reliability and user experience.
The MGC provider gives you comprehensive control over your Magalu Cloud resources, including:
- Virtual Private Clouds (VPCs) - Create isolated network environments
- Subnets - Segment your VPC networks
- Security Rules - Control traffic with fine-grained permissions
- Public IPs - Expose services to the internet
- Virtual Machines - Deploy and manage instances with various sizes and configurations
- VM Snapshots - Create point-in-time backups of your instances
- SSH Keys - Securely access your virtual machines
- Managed Kubernetes Clusters - Deploy production-ready Kubernetes
- Node Pools - Scale your Kubernetes worker nodes
- Database Instances - Deploy managed database services
- Replication - Configure high availability and read replicas
- Block Storage - Persistent volumes for your instances
- Volume Snapshots - Point-in-time backups
- VM Volume Attachment - Connect storage to your virtual machines
- Object Storage - S3-compatible storage for unstructured data
terraform {
required_providers {
mgc = {
source = "magalucloud/mgc"
}
}
}
provider "mgc" {
region = "br-ne1"
api_key = var.api_key
}
variable "api_key" {
type = string
sensitive = true
}
# Create a virtual machine instance
resource "mgc_virtual_machine_instances" "example_vm" {
name = "example-vm"
machine_type = "BV1-1-40"
image = "cloud-ubuntu-24.04 LTS"
ssh_key_name = "my-ssh-key"
}
The provider follows semantic versioning practices. You can find all releases, including pre-releases, release notes, and binaries at our GitHub Releases page.
When specifying the provider version in your Terraform configurations, we recommend using version constraints to ensure compatibility:
terraform {
required_providers {
mgc = {
source = "magalucloud/mgc"
version = "~> 0.32.0"
}
}
}
For complete usage documentation and examples, visit:
- Clone the repository
- Install dependencies
- Install Go (version 1.24 or higher)
- Install GoReleaser
- Install Terraform
- Install Make
- Install Git
- Run
make build
to build the provider locally
# Clone the repo
git clone https://github.com/MagaluCloud/terraform-provider-mgc.git
cd terraform-provider-mgc
# Build the provider
make build
Before submitting contributions, please run:
# Run pre-commit checks
make before-commit
# Run all tests
make go-test
We welcome contributions to the Magalu Cloud Terraform Provider!
-
Report Issues: Found a bug or have a feature request? Open an issue
-
Submit PRs: Contributions via pull requests are welcome. Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Run
make before-commit
to verify - Submit a PR
-
Join Discussions: Participate in our Discussions Forum
This provider is released under the Mozilla Public License 2.0.