{"id":19190794,"url":"https://github.com/krestomatio/terraform-aws-multiarch-builder","last_synced_at":"2026-05-10T02:26:07.427Z","repository":{"id":39642909,"uuid":"506434116","full_name":"krestomatio/terraform-aws-multiarch-builder","owner":"krestomatio","description":"Terraform module for building multi-architecture container images (amd64 and arm64) using remote (TLS) ephemeral EC2 instances as builders","archived":false,"fork":false,"pushed_at":"2023-10-09T17:45:41.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T04:16:36.506Z","etag":null,"topics":["aws","buildkit","buildx","docker","ec2","ec2-spot","terraform","terraform-module","tls"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krestomatio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-22T23:21:52.000Z","updated_at":"2022-06-22T23:26:40.000Z","dependencies_parsed_at":"2024-11-09T11:35:52.598Z","dependency_job_id":null,"html_url":"https://github.com/krestomatio/terraform-aws-multiarch-builder","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/krestomatio/terraform-aws-multiarch-builder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krestomatio%2Fterraform-aws-multiarch-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krestomatio%2Fterraform-aws-multiarch-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krestomatio%2Fterraform-aws-multiarch-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krestomatio%2Fterraform-aws-multiarch-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krestomatio","download_url":"https://codeload.github.com/krestomatio/terraform-aws-multiarch-builder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krestomatio%2Fterraform-aws-multiarch-builder/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260988838,"owners_count":23093571,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","buildkit","buildx","docker","ec2","ec2-spot","terraform","terraform-module","tls"],"created_at":"2024-11-09T11:35:48.201Z","updated_at":"2026-05-10T02:26:02.401Z","avatar_url":"https://github.com/krestomatio.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"Terraform module for building multi-architecture container images (amd64 and arm64) using remote (TLS) ephemeral EC2 instances as builders. Two AWS Spot instances are launched (one for each architecture). They both run docker (moby) in TLS mode. The module generates the remote builders and client certificates to connect and authenticate between them. The module installs the certificates and applies the respective [buildx](https://github.com/docker/buildx) configuration in the client (see `create_client_certs` and `handle_client_config` input variables).\n\nThe builders are intended for ephemeral use cases, during pipelines, for instance. Therefore, [caching](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#cache-from) usage is also recommended.\n\n## Dependencies\nThe following are the dependencies to make use of the remote ephemeral builders, once they are deployed:\n* [docker](https://docs.docker.com/engine/install/)\n* [buildx](https://github.com/docker/buildx)\n\n\u003c!-- BEGIN_TF_DOCS --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | \u003e= 0.13.1 |\n| \u003ca name=\"requirement_aws\"\u003e\u003c/a\u003e [aws](#requirement\\_aws) | ~\u003e 4.0 |\n| \u003ca name=\"requirement_tls\"\u003e\u003c/a\u003e [tls](#requirement\\_tls) | ~\u003e 3.0 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | 4.20.0 |\n| \u003ca name=\"provider_local\"\u003e\u003c/a\u003e [local](#provider\\_local) | 2.2.3 |\n| \u003ca name=\"provider_null\"\u003e\u003c/a\u003e [null](#provider\\_null) | 3.1.1 |\n| \u003ca name=\"provider_template\"\u003e\u003c/a\u003e [template](#provider\\_template) | 2.2.0 |\n| \u003ca name=\"provider_tls\"\u003e\u003c/a\u003e [tls](#provider\\_tls) | 3.4.0 |\n\n## Modules\n\nNo modules.\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_spot_instance_request.multiarch_builder_amd64](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/spot_instance_request) | resource |\n| [aws_spot_instance_request.multiarch_builder_arm64](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/spot_instance_request) | resource |\n| [local_sensitive_file.ca_cert](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/sensitive_file) | resource |\n| [local_sensitive_file.client_cert](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/sensitive_file) | resource |\n| [local_sensitive_file.client_key](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/sensitive_file) | resource |\n| [null_resource.client_config](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |\n| [null_resource.client_config_amd64](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |\n| [null_resource.client_config_arm64](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |\n| [tls_cert_request.client](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/cert_request) | resource |\n| [tls_cert_request.server](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/cert_request) | resource |\n| [tls_locally_signed_cert.client](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/locally_signed_cert) | resource |\n| [tls_locally_signed_cert.server](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/locally_signed_cert) | resource |\n| [tls_private_key.ca](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key) | resource |\n| [tls_private_key.client](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key) | resource |\n| [tls_private_key.server](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key) | resource |\n| [tls_self_signed_cert.ca](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/self_signed_cert) | resource |\n| [aws_ami.amazon_linux_amd64](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami) | data source |\n| [aws_ami.amazon_linux_arm64](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami) | data source |\n| [template_cloudinit_config.multiarch_builder](https://registry.terraform.io/providers/hashicorp/template/latest/docs/data-sources/cloudinit_config) | data source |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_az\"\u003e\u003c/a\u003e [az](#input\\_az) | The multiarch builder instances availability zone | `any` | `null` | no |\n| \u003ca name=\"input_create_amd64\"\u003e\u003c/a\u003e [create\\_amd64](#input\\_create\\_amd64) | Whether to create amd64 builder instance | `bool` | `true` | no |\n| \u003ca name=\"input_create_arm64\"\u003e\u003c/a\u003e [create\\_arm64](#input\\_create\\_arm64) | Whether to create arm64 builder instance | `bool` | `true` | no |\n| \u003ca name=\"input_create_client_certs\"\u003e\u003c/a\u003e [create\\_client\\_certs](#input\\_create\\_client\\_certs) | Whether client certificate files are stored on the disk | `bool` | `true` | no |\n| \u003ca name=\"input_docker_cert_path\"\u003e\u003c/a\u003e [docker\\_cert\\_path](#input\\_docker\\_cert\\_path) | Location for storing generated client docker certificates | `string` | `\"~/.docker/multiarch-builder/certs\"` | no |\n| \u003ca name=\"input_handle_client_config\"\u003e\u003c/a\u003e [handle\\_client\\_config](#input\\_handle\\_client\\_config) | Whether client buildx config is created or removed (when destroyed) | `bool` | `true` | no |\n| \u003ca name=\"input_iam_instance_profile\"\u003e\u003c/a\u003e [iam\\_instance\\_profile](#input\\_iam\\_instance\\_profile) | The multiarch builder instances iam instance profile | `any` | `null` | no |\n| \u003ca name=\"input_instance_type_amd64\"\u003e\u003c/a\u003e [instance\\_type\\_amd64](#input\\_instance\\_type\\_amd64) | The amd64 builder instance type | `string` | `\"t3.medium\"` | no |\n| \u003ca name=\"input_instance_type_arm64\"\u003e\u003c/a\u003e [instance\\_type\\_arm64](#input\\_instance\\_type\\_arm64) | The arm64 builder instance type | `string` | `\"t4g.medium\"` | no |\n| \u003ca name=\"input_key_name\"\u003e\u003c/a\u003e [key\\_name](#input\\_key\\_name) | The multiarch builder instances ssh key name | `any` | `null` | no |\n| \u003ca name=\"input_prefix_name\"\u003e\u003c/a\u003e [prefix\\_name](#input\\_prefix\\_name) | The multiarch builder instances prefix name | `string` | `\"multiarch-builder\"` | no |\n| \u003ca name=\"input_security_group_ids\"\u003e\u003c/a\u003e [security\\_group\\_ids](#input\\_security\\_group\\_ids) | The multiarch builder instances security group ids list | `list(string)` | `[]` | no |\n| \u003ca name=\"input_subnet_id\"\u003e\u003c/a\u003e [subnet\\_id](#input\\_subnet\\_id) | The multiarch builder instances (public) subnet id | `any` | `null` | no |\n| \u003ca name=\"input_tls_validity_period_hours\"\u003e\u003c/a\u003e [tls\\_validity\\_period\\_hours](#input\\_tls\\_validity\\_period\\_hours) | Number of hours, after initial issuing, that the certificate will remain valid for | `number` | `24` | no |\n| \u003ca name=\"input_volume_root_size\"\u003e\u003c/a\u003e [volume\\_root\\_size](#input\\_volume\\_root\\_size) | The multiarch builder instances root volume size | `number` | `15` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_ca_cert\"\u003e\u003c/a\u003e [ca\\_cert](#output\\_ca\\_cert) | This CA certificate |\n| \u003ca name=\"output_client_cert\"\u003e\u003c/a\u003e [client\\_cert](#output\\_client\\_cert) | The client certificate sign by this CA |\n| \u003ca name=\"output_client_config_amd64_cmd\"\u003e\u003c/a\u003e [client\\_config\\_amd64\\_cmd](#output\\_client\\_config\\_amd64\\_cmd) | Command to configure the client (docker and buildx) with amd64 instance |\n| \u003ca name=\"output_client_config_arm64_cmd\"\u003e\u003c/a\u003e [client\\_config\\_arm64\\_cmd](#output\\_client\\_config\\_arm64\\_cmd) | Command to configure the client (docker and buildx) with arm64 instance |\n| \u003ca name=\"output_client_key\"\u003e\u003c/a\u003e [client\\_key](#output\\_client\\_key) | The client private key |\n| \u003ca name=\"output_docker_host_amd64\"\u003e\u003c/a\u003e [docker\\_host\\_amd64](#output\\_docker\\_host\\_amd64) | Docker host (TLS) for amd64 instance |\n| \u003ca name=\"output_docker_host_arm64\"\u003e\u003c/a\u003e [docker\\_host\\_arm64](#output\\_docker\\_host\\_arm64) | Docker host (TLS) for arm64 instance |\n\u003c!-- END_TF_DOCS --\u003e\n\n## [About Krestomatio](https://krestomatio.com/about)\n[Krestomatio is a managed service for Moodle™ e-learning platforms](https://krestomatio.com/). It allows you to have open-source instances managed by a service optimized for Moodle™, complete with an additional plugin pack and customization options.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrestomatio%2Fterraform-aws-multiarch-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrestomatio%2Fterraform-aws-multiarch-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrestomatio%2Fterraform-aws-multiarch-builder/lists"}