{"id":13790985,"url":"https://github.com/poseidon/terraform-provider-matchbox","last_synced_at":"2025-05-12T09:33:42.140Z","repository":{"id":19854894,"uuid":"87239118","full_name":"poseidon/terraform-provider-matchbox","owner":"poseidon","description":"Terraform provider for Matchbox on-premise / bare-metal provisioning","archived":false,"fork":false,"pushed_at":"2024-05-17T19:02:03.000Z","size":9503,"stargazers_count":123,"open_issues_count":1,"forks_count":35,"subscribers_count":14,"default_branch":"main","last_synced_at":"2024-05-17T20:22:56.954Z","etag":null,"topics":["butane","fedora-coreos","flatcar-linux","matchbox","terraform","terraform-provider"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/providers/poseidon/matchbox/latest/docs","language":"Go","has_issues":false,"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/poseidon.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","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},"funding":{"github":["poseidon","dghubble"]}},"created_at":"2017-04-04T21:58:42.000Z","updated_at":"2024-06-18T22:38:04.372Z","dependencies_parsed_at":"2023-07-13T23:44:00.067Z","dependency_job_id":"b531d3f7-a24c-42bd-a6d2-c053024ed3b6","html_url":"https://github.com/poseidon/terraform-provider-matchbox","commit_stats":null,"previous_names":["coreos/terraform-provider-matchbox"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poseidon%2Fterraform-provider-matchbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poseidon%2Fterraform-provider-matchbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poseidon%2Fterraform-provider-matchbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poseidon%2Fterraform-provider-matchbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/poseidon","download_url":"https://codeload.github.com/poseidon/terraform-provider-matchbox/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225133618,"owners_count":17426035,"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":["butane","fedora-coreos","flatcar-linux","matchbox","terraform","terraform-provider"],"created_at":"2024-08-03T22:00:53.956Z","updated_at":"2024-11-18T05:31:44.652Z","avatar_url":"https://github.com/poseidon.png","language":"Go","funding_links":["https://github.com/sponsors/poseidon","https://github.com/sponsors/dghubble"],"categories":["Plugins"],"sub_categories":[],"readme":"# terraform-provider-matchbox\n[![GoDoc](https://pkg.go.dev/badge/github.com/poseidon/terraform-provider-matchbox.svg)](https://pkg.go.dev/github.com/poseidon/terraform-provider-matchbox)\n[![Workflow](https://github.com/poseidon/terraform-provider-matchbox/actions/workflows/test.yaml/badge.svg)](https://github.com/poseidon/terraform-provider-matchbox/actions/workflows/test.yaml?query=branch%3Amain)\n![Downloads](https://img.shields.io/github/downloads/poseidon/terraform-provider-matchbox/total)\n[![Sponsors](https://img.shields.io/github/sponsors/poseidon?logo=github)](https://github.com/sponsors/poseidon)\n[![Mastodon](https://img.shields.io/badge/follow-news-6364ff?logo=mastodon)](https://fosstodon.org/@poseidon)\n\n`terraform-provider-matchbox` allows defining [Matchbox](https://github.com/poseidon/matchbox) Profiles and Groups in Terraform. Matchbox matches machines, by label (e.g. MAC address), to Profiles with iPXE configs, Ignition configs, or generic free-form configs to provision clusters. Resources are created via the client certificate authenticated Matchbox API.\n\n## Usage\n\n[Setup](https://matchbox.psdn.io/network-setup/) a PXE network boot environment and [deploy](https://matchbox.psdn.io/deployment/) a Matchbox instance. Be sure to enable the gRPC API and follow the instructions to generate TLS credentials.\n\nConfigure the Matchbox provider with the Matchbox API endpoint and client certificate (e.g. `providers.tf`).\n\n```tf\nprovider \"matchbox\" {\n  endpoint    = \"matchbox.example.com:8081\"\n  client_cert = \"${file(\"~/.matchbox/client.crt\")}\"\n  client_key  = \"${file(\"~/.matchbox/client.key\")}\"\n  ca          = \"${file(\"~/.matchbox/ca.crt\")}\"\n}\n\nterraform {\n  required_providers {\n    matchbox = {\n      source = \"poseidon/matchbox\"\n      version = \"0.5.4\"\n    }\n  }\n}\n```\n\nDefine a Matchbox Profile or Group resource in Terraform.\n\n```tf\n// Fedora CoreOS profile\nresource \"matchbox_profile\" \"fedora-coreos-install\" {\n  name  = \"worker\"\n  kernel = \"https://builds.coreos.fedoraproject.org/prod/streams/${var.os_stream}/builds/${var.os_version}/x86_64/fedora-coreos-${var.os_version}-live-kernel-x86_64\"\n\n  initrd = [\n    \"--name main https://builds.coreos.fedoraproject.org/prod/streams/${var.os_stream}/builds/${var.os_version}/x86_64/fedora-coreos-${var.os_version}-live-initramfs.x86_64.img\"\n  ]\n\n  args = [\n    \"initrd=main\",\n    \"coreos.live.rootfs_url=https://builds.coreos.fedoraproject.org/prod/streams/${var.os_stream}/builds/${var.os_version}/x86_64/fedora-coreos-${var.os_version}-live-rootfs.x86_64.img\",\n    \"coreos.inst.install_dev=/dev/sda\",\n    \"coreos.inst.ignition_url=${var.matchbox_http_endpoint}/ignition?uuid=$${uuid}\u0026mac=$${mac:hexhyp}\"\n  ]\n\n  raw_ignition = data.ct_config.worker.rendered\n}\n\ndata \"ct_config\" \"worker\" {\n  content = templatefile(\"fcc/fedora-coreos.yaml\", {\n    ssh_authorized_key = var.ssh_authorized_key\n  })\n  strict = true\n}\n\n// Default matcher group for machines\nresource \"matchbox_group\" \"default\" {\n  name    = \"default\"\n  profile = matchbox_profile.fedora-coreos-install.name\n  selector = {}\n  metadata = {}\n}\n```\n\nRun `terraform init` to ensure plugin version requirements are met.\n\n```\n$ terraform init\n```\n\nSee [examples](https://github.com/poseidon/matchbox/tree/master/examples/terraform) for Terraform configs which PXE boot, install CoreOS, and provision entire clusters.\n\n## Requirements\n\n* Terraform v0.13+ [installed](https://www.terraform.io/downloads.html)\n* Matchbox v0.8+ [installed](https://matchbox.psdn.io/deployment/)\n* Matchbox credentials `client.crt`, `client.key`, `ca.crt`\n\n## Development\n\n### Binary\n\nTo develop the provider plugin locally, build an executable with Go 1.18+.\n\n```\nmake\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposeidon%2Fterraform-provider-matchbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fposeidon%2Fterraform-provider-matchbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposeidon%2Fterraform-provider-matchbox/lists"}