{"id":21030959,"url":"https://github.com/philippechepy/terraform-initial-provisioning","last_synced_at":"2026-04-02T01:37:09.371Z","repository":{"id":118531370,"uuid":"438027143","full_name":"PhilippeChepy/terraform-initial-provisioning","owner":"PhilippeChepy","description":null,"archived":false,"fork":false,"pushed_at":"2021-12-27T18:59:03.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-02T10:56:33.963Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PhilippeChepy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-12-13T21:15:44.000Z","updated_at":"2021-12-27T18:59:05.000Z","dependencies_parsed_at":"2023-07-03T22:46:09.134Z","dependency_job_id":null,"html_url":"https://github.com/PhilippeChepy/terraform-initial-provisioning","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PhilippeChepy/terraform-initial-provisioning","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhilippeChepy%2Fterraform-initial-provisioning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhilippeChepy%2Fterraform-initial-provisioning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhilippeChepy%2Fterraform-initial-provisioning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhilippeChepy%2Fterraform-initial-provisioning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PhilippeChepy","download_url":"https://codeload.github.com/PhilippeChepy/terraform-initial-provisioning/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhilippeChepy%2Fterraform-initial-provisioning/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31293982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T01:05:07.454Z","status":"ssl_error","status_checked_at":"2026-04-02T00:56:46.496Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-19T12:22:39.584Z","updated_at":"2026-04-02T01:37:09.355Z","avatar_url":"https://github.com/PhilippeChepy.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Easily deploy files and run commands on remote host\n\nThis module allows one to easily deploy files and execute commands on a remote host (either before\nor after provisioning files).\n\nExample usage:\n\n```terraform\nmodule \"etcd\" {\n  source   = \"git@github.com:PhilippeChepy/terraform-initial-provisioning.git\"\n  for_each = var.hostnames\n\n  connection = merge(\n    { host = exoscale_compute.etcd[each.value].ip_address },\n    var.connection\n  )\n\n  # It's possible to run commands before copying files to the remote\n  # pre_exec = [\n  # ]\n\n  files = {\n    \"/etc/etcd/tls/server-ca.pem\" = {\n      content = var.certificates.ca_certificate\n      owner   = \"etcd\"\n      group   = \"etcd\"\n      mode    = \"0644\"\n    }\n    \"/etc/etcd/tls/server-cert.pem\" = {\n      content = var.certificates.server_certificates[each.value]\n      owner   = \"etcd\"\n      group   = \"etcd\"\n      mode    = \"0644\"\n    }\n    \"/etc/etcd/tls/server-cert.key\" = {\n      content = var.certificates.server_private_keys[each.value]\n      owner   = \"etcd\"\n      group   = \"etcd\"\n      mode    = \"0600\"\n    }\n    \"/etc/etcd/tls/peer-ca.pem\" = {\n      content = var.certificates.ca_certificate\n      owner   = \"etcd\"\n      group   = \"etcd\"\n      mode    = \"0644\"\n    }\n    \"/etc/etcd/tls/peer-cert.pem\" = {\n      content = var.certificates.peer_certificates[each.value]\n      owner   = \"etcd\"\n      group   = \"etcd\"\n      mode    = \"0644\"\n    }\n    \"/etc/etcd/tls/peer-cert.key\" = {\n      content = var.certificates.peer_private_keys[each.value]\n      owner   = \"etcd\"\n      group   = \"etcd\"\n      mode    = \"0600\"\n    }\n    \"/etc/default/etcd\" = {\n      content = templatefile(\"${path.module}/templates/etcd\", {\n        hostname          = each.value,\n        etcd_ip_address = exoscale_compute.etcd[each.value].ip_address,\n        etcd_ip_cluster = join(\",\", [for peer in var.hostnames : \"${peer}=https://${exoscale_compute.etcd[peer].ip_address}:2380\"])\n      })\n      owner = \"etcd\"\n      group = \"etcd\"\n      mode  = \"0644\"\n    }\n  }\n\n  post_exec = [\n    \"sudo systemctl enable etcd\",\n    \"sudo systemctl start etcd\"\n  ]\n}\n```\n\n\n\u003c!-- BEGIN_TF_DOCS --\u003e\n## Requirements\n\nNo requirements.\n\n## Providers\n\nThe following providers are used by this module:\n\n- \u003ca name=\"provider_null\"\u003e\u003c/a\u003e [null](#provider\\_null)\n\n## Modules\n\nNo modules.\n\n## Resources\n\nThe following resources are used by this module:\n\n- [null_resource.files](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) (resource)\n\n## Required Inputs\n\nThe following input variables are required:\n\n### \u003ca name=\"input_connection\"\u003e\u003c/a\u003e [connection](#input\\_connection)\n\nDescription: An object describing how to connect to target server.\n\nType:\n\n```hcl\nobject({\n  host        = string\n  user        = string\n  private_key = string\n})\n```\n\n### \u003ca name=\"input_files\"\u003e\u003c/a\u003e [files](#input\\_files)\n\nDescription: A map of files to provision (key = full path of a file, value = file content and ownership/mode).\n\nType:\n\n```hcl\nmap(object({\n  content = string\n  owner   = string\n  group   = string\n  mode    = string\n}))\n```\n\n## Optional Inputs\n\nThe following input variables are optional (have default values):\n\n### \u003ca name=\"input_post_exec\"\u003e\u003c/a\u003e [post\\_exec](#input\\_post\\_exec)\n\nDescription: A list of commands to execute after provisioning files.\n\nType: `list(string)`\n\nDefault: `[]`\n\n### \u003ca name=\"input_pre_exec\"\u003e\u003c/a\u003e [pre\\_exec](#input\\_pre\\_exec)\n\nDescription: A list of commands to execute before provisioning files.\n\nType: `list(string)`\n\nDefault: `[]`\n\n## Outputs\n\nNo outputs.\n\u003c!-- END_TF_DOCS --\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilippechepy%2Fterraform-initial-provisioning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphilippechepy%2Fterraform-initial-provisioning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilippechepy%2Fterraform-initial-provisioning/lists"}