https://github.com/multycloud/multy Skip to content Sign up * Product + Features + Mobile + Actions + Codespaces + Copilot + Packages + Security + Code review + Issues + Discussions + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Skills + GitHub Sponsors + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} multycloud / multy Public * Notifications * Fork 21 * Star 353 Multy - Easily deploy multi cloud infrastructure. Write cloud-agnostic config deployed across multiple clouds multy.dev License Apache-2.0 license 353 stars 21 forks Star Notifications * Code * Issues 44 * Pull requests 0 * Discussions * Actions * Security * Insights More * Code * Issues * Pull requests * Discussions * Actions * Security * Insights multycloud/multy This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 1 branch 59 tags Code * Clone HTTPS GitHub CLI [https://github.com/m] Use Git or checkout with SVN using the web URL. [gh repo clone multyc] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @goncalo-rodrigues goncalo-rodrigues feat: add cloud field to refresh request (#396) ... a28e8d1 Aug 8, 2022 feat: add cloud field to refresh request (#396) a28e8d1 Git stats * 416 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github fix: set version to go 1.18.3 as 1.18.4 has an internal assertion err... Jul 20, 2022 api feat: add cloud field to refresh request (#396) Aug 8, 2022 cmd fix: add centos for gcp and remove dead code (#361) Jul 18, 2022 db feat: separate state per cloud (#395) Aug 5, 2022 encoder feat: implement per-resource gcp project definition (#326) Jun 22, 2022 flags feat: added telemetry (#283) Jun 2, 2022 mhcl Remove decoder and refactor accordingly (#122) Apr 4, 2022 resources feat: separate state per cloud (#395) Aug 5, 2022 test feat: separate state per cloud (#395) Aug 5, 2022 util chore: add tests for deploy.go (#277) Jun 1, 2022 validate feat: add missing validations in the database (#389) Aug 2, 2022 .gitignore fix: change makefile to not depend on globstar (#286) Jun 4, 2022 CODE_OF_CONDUCT.md chore: code of conduct (#241) May 24, 2022 CONTRIBUTING.md docs: added contributing and overview pages (#181) May 11, 2022 LICENSE Create LICENSE (#242) May 24, 2022 Makefile fix: change makefile to not depend on globstar (#286) Jun 4, 2022 README.md fix: change image on readme (#393) Aug 4, 2022 go.mod refactor: parse state directly instead of using tf show (#391) Aug 3, 2022 go.sum refactor: parse state directly instead of using tf show (#391) Aug 3, 2022 install.sh Update install.sh Jan 10, 2022 main.go refactor: parse state directly instead of using tf show (#391) Aug 3, 2022 View code [ ] Multy is the easiest way to deploy multi cloud infrastructure What is Multy? Example Getting started Contributing Roadmap FAQ Why build with Multy? Can I use Multy for free? Why not use the cloud specific Terraform providers? I want to use cloud managed resources (i.e. Amazon S3 / Azure Key Vault), is Multy for me? Why should I be locked in to Multy? License README.md [68747470733a2f2f6d756c74792e646576] Multy is the easiest way to deploy multi cloud infrastructure [68747470733a2f2f6d756c74792e6465762f696d616765732f726575736962696c6974] Terraform Discord Build Status What is Multy? Multy is an open-source tool that makes your infrastructure portable using a cloud-agnostic API. You write your cloud-agnostic configuration once and Multy deploys it to the clouds you choose. With Multy, you don't need to worry about how resources behave differently in the different clouds providers. We abstract the nuances of each cloud so that moving your infrastructure between clouds is done by simply changing the cloud parameter. Example Let's try to deploy a simple virtual machine into AWS and Azure using the Multy Terraform Provider variable "clouds" { type = set(string) default = ["aws", "azure"] } resource "multy_virtual_network" "vn" { for_each = var.clouds cloud = each.key name = "multy_vn" cidr_block = "10.0.0.0/16" location = "eu_west_1" } resource "multy_subnet" "subnet" { for_each = var.clouds name = "multy_subnet" cidr_block = "10.0.10.0/24" virtual_network_id = multy_virtual_network.vn[each.key].id } resource "multy_virtual_machine" "vm" { for_each = var.clouds name = "test_vm" size = "general_micro" image_reference = { os = "ubuntu" version = "20.04" } subnet_id = multy_subnet.subnet[each.key].id cloud = each.key location = "eu_west_1" } By using the Multy cloud-agnostic API, we can simply change the cloud parameter to move a resource from one cloud to another. If we were to deploy this using the respective cloud terraform providers, we would first need to understand how resources such as aws_vpc and azurerm_virtual_network behave and how they differ. Then we would need to define the same infrastructure configuration twice, one for AWS and another for Azure. This is the equivalent terraform configuration (generated by Multy) // terraform: 190 lines resource "aws_iam_instance_profile" "multy_vm_ube3b_r10" { name = "multy_vm_ube3b_r10-vm-role" role = aws_iam_role.multy_vm_ube3b_r10.name provider = "aws.eu-west-1" } resource "aws_iam_role" "multy_vm_ube3b_r10" { tags = { "Name" = "test_vm" } name = "multy_vm_ube3b_r10-vm-role" assume_role_policy = "{\"Statement\":[{\"Action\":[\"sts:AssumeRole\"],\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"ec2.amazonaws.com\"}}],\"Version\":\"2012-10-17\"}" provider = "aws.eu-west-1" } data "aws_ami" "multy_vm_ube3b_r10" { owners = ["099720109477"] most_recent = true filter { name = "name" values = ["ubuntu*-20.04-amd64-server-*"] } filter { name = "root-device-type" values = ["ebs"] } filter { name = "virtualization-type" values = ["hvm"] } provider = "aws.eu-west-1" } resource "aws_instance" "multy_vm_ube3b_r10" { tags = { "Name" = "test_vm" } ami = data.aws_ami.multy_vm_ube3b_r10.id instance_type = "t2.micro" subnet_id = aws_subnet.multy_vn_ube3b_r8-1.id iam_instance_profile = aws_iam_instance_profile.multy_vm_ube3b_r10.id provider = "aws.eu-west-1" } resource "azurerm_network_interface" "multy_vm_ube3b_r9" { resource_group_name = azurerm_resource_group.vm-nkum-rg.name name = "test_vm" location = "northeurope" ip_configuration { name = "internal" private_ip_address_allocation = "Dynamic" subnet_id = azurerm_subnet.multy_vn_ube3b_r7.id primary = true } } resource "random_password" "multy_vm_ube3b_r9" { length = 16 special = true upper = true lower = true number = true } resource "azurerm_linux_virtual_machine" "multy_vm_ube3b_r9" { resource_group_name = azurerm_resource_group.vm-nkum-rg.name name = "test_vm" location = "northeurope" size = "Standard_B1s" network_interface_ids = [azurerm_network_interface.multy_vm_ube3b_r9.id] os_disk { caching = "None" storage_account_type = "Standard_LRS" } admin_username = "adminuser" admin_password = random_password.multy_vm_ube3b_r9.result source_image_reference { publisher = "Canonical" offer = "0001-com-ubuntu-server-focal" sku = "20_04-lts" version = "latest" } disable_password_authentication = false identity { type = "SystemAssigned" } computer_name = "testvm" zone = "1" } resource "aws_vpc" "multy_vn_ube3b_r4" { tags = { "Name" = "multy_vn" } cidr_block = "10.0.0.0/16" enable_dns_hostnames = true provider = "aws.eu-west-1" } resource "aws_internet_gateway" "multy_vn_ube3b_r4" { tags = { "Name" = "multy_vn" } vpc_id = aws_vpc.multy_vn_ube3b_r4.id provider = "aws.eu-west-1" } resource "aws_default_security_group" "multy_vn_ube3b_r4" { tags = { "Name" = "multy_vn" } vpc_id = aws_vpc.multy_vn_ube3b_r4.id ingress { protocol = "-1" from_port = 0 to_port = 0 self = true } egress { protocol = "-1" from_port = 0 to_port = 0 self = true } provider = "aws.eu-west-1" } resource "aws_vpc" "multy_vn_ube3b_r5" { tags = { "Name" = "multy_vn" } cidr_block = "10.0.0.0/16" enable_dns_hostnames = true provider = "aws.eu-west-1" } resource "aws_internet_gateway" "multy_vn_ube3b_r5" { tags = { "Name" = "multy_vn" } vpc_id = aws_vpc.multy_vn_ube3b_r5.id provider = "aws.eu-west-1" } resource "aws_default_security_group" "multy_vn_ube3b_r5" { tags = { "Name" = "multy_vn" } vpc_id = aws_vpc.multy_vn_ube3b_r5.id ingress { protocol = "-1" from_port = 0 to_port = 0 self = true } egress { protocol = "-1" from_port = 0 to_port = 0 self = true } provider = "aws.eu-west-1" } resource "azurerm_virtual_network" "multy_vn_ube3b_r6" { resource_group_name = azurerm_resource_group.vn-nkum-rg.name name = "multy_vn" location = "northeurope" address_space = ["10.0.0.0/16"] } resource "azurerm_route_table" "multy_vn_ube3b_r6" { resource_group_name = azurerm_resource_group.vn-nkum-rg.name name = "multy_vn" location = "northeurope" route { name = "local" address_prefix = "0.0.0.0/0" next_hop_type = "VnetLocal" } } resource "azurerm_subnet" "multy_vn_ube3b_r7" { resource_group_name = azurerm_resource_group.vn-nkum-rg.name name = "multy_subnet" address_prefixes = ["10.0.10.0/24"] virtual_network_name = azurerm_virtual_network.multy_vn_ube3b_r6.name } resource "azurerm_subnet_route_table_association" "multy_vn_ube3b_r7" { subnet_id = azurerm_subnet.multy_vn_ube3b_r7.id route_table_id = azurerm_route_table.multy_vn_ube3b_r6.id } resource "aws_subnet" "multy_vn_ube3b_r8-1" { tags = { "Name" = "multy_subnet-1" } cidr_block = "10.0.10.0/25" vpc_id = aws_vpc.multy_vn_ube3b_r5.id availability_zone = "eu-west-1a" provider = "aws.eu-west-1" } resource "aws_subnet" "multy_vn_ube3b_r8-2" { tags = { "Name" = "multy_subnet-2" } cidr_block = "10.0.10.128/26" vpc_id = aws_vpc.multy_vn_ube3b_r5.id availability_zone = "eu-west-1b" provider = "aws.eu-west-1" } resource "aws_subnet" "multy_vn_ube3b_r8-3" { tags = { "Name" = "multy_subnet-3" } cidr_block = "10.0.10.192/26" vpc_id = aws_vpc.multy_vn_ube3b_r5.id availability_zone = "eu-west-1c" provider = "aws.eu-west-1" } resource "azurerm_resource_group" "vm-nkum-rg" { name = "vm-nkum-rg" location = "northeurope" } resource "azurerm_resource_group" "vn-nkum-rg" { name = "vn-nkum-rg" location = "northeurope" } With Multy, you write once, and deploy anywhere. Getting started 1. Install Terraform - see guide, e.g.: * Brew (Homebrew/Mac OS): brew tap hashicorp/tap && brew install hashicorp/tap/terraform * Choco (Chocolatey/Windows): choco install terraform * Debian (Ubuntu/Linux): sudo apt-get update && sudo apt-get install -y gnupg software-properties-common curl curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add - sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" sudo apt-get update && sudo apt-get install terraform 2. Create an account with AWS or Azure and expose its authentication credentials via environment variables 3. Write your configuration file, for example a file named main.tf with the following content: terraform { required_providers { multy = { source = "multycloud/multy" } } } provider "multy" { aws = {} # this will look for aws credentials } resource "multy_virtual_network" "vn" { cloud = "aws" name = "multy_vn" cidr_block = "10.0.0.0/16" location = "eu_west_1" } 4. Run terraform init and then terraform apply 5. Run terraform destroy For a more detailed guide, see our official getting started guide. Contributing We love contributors! If you're interested in contributing, take a look at our Contributing guide . Join our discord channel to participate in live discussions or ask for support. Repo overview: OVERVIEW.md Terraform Provider Repo: https://github.com/multycloud/ terraform-provider-multy Discord Channel: https://discord.gg/rgaKXY4tCZ Roadmap Have a look at our roadmap to know the latest features released and what we're focusing on short and long term. You can also vote for a specific feature you want or participate in the discussions. FAQ Why build with Multy? Multy was born after realising how difficult it is to run the same infrastructure across multiple clouds. While providers such as AWS and Azure share the same set of core services, the small differences in how each service works make it difficult to configure your infrastructure to run in the same way. This is the problem that Multy aims to tackle. We created a single interface to deploy resources that have the same behaviour regardless of the cloud provider. Can I use Multy for free? Multy is available as a free and open-source tool, so you can download it directly and run it locally. We also offer a managed solution that hosts the server for you. Managed Multy is currently offered as a free service. You can request an API key by visiting our website. Why not use the cloud specific Terraform providers? While Terraform and its providers are great for deploying any resource into any cloud, it puts all the burden on the infrastructure teams when it comes to understanding each provider and defining the resources. This flexibility can be seen as an advantage, however, when it comes to multi-cloud, this considerably slows down teams that are looking to move fast with deployments. By abstracting the common resources across major cloud providers, users are able to deploy the same resources on AWS and Azure without re-writing any infrastructure code. I want to use cloud managed resources (i.e. Amazon S3 / Azure Key Vault), is Multy for me? Absolutely! The goal with Multy is to allow you to leverage cloud managed services and remain free to move your infrastructure. Not every resource will be supported, but we aim to support the most popular managed resources such as managed databases, object storage and vault. Let us know what services you would like to be supported by creating an Issue on the Issues section. Why should I be locked in to Multy? Multy is an open-source tool that can be run locally and free. If at some point you want to move off Multy, you can export your infrastructure configuration as Terraform and use it independently. License This repository is available under Apache 2.0. About Multy - Easily deploy multi cloud infrastructure. Write cloud-agnostic config deployed across multiple clouds multy.dev Topics go aws cloud azure terraform help-wanted infrastructure-as-code multi-cloud Resources Readme License Apache-2.0 license Code of conduct Code of conduct Stars 353 stars Watchers 7 watching Forks 21 forks Releases 14 v0.1.56 Latest Aug 8, 2022 + 13 releases Packages 0 No packages published Used by 1 * @multycloud @multycloud / terraform-provider-multy Contributors 10 * @goncalo-rodrigues * @JCoelhoo * @dependabot[bot] * @szymonnogiec * @mattvella07 * @abinmn * @michidk * @ksankeerth * @tal66 * @codesee-maps[bot] Languages * Go 72.2% * HCL 26.9% * Other 0.9% Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.