{"id":17791241,"url":"https://github.com/schell/teleform","last_synced_at":"2025-04-02T01:47:27.318Z","repository":{"id":202553768,"uuid":"707467365","full_name":"schell/teleform","owner":"schell","description":"IaC in a Rust library","archived":false,"fork":false,"pushed_at":"2024-11-08T02:17:47.000Z","size":133,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-07T16:45:05.557Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/schell.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":"2023-10-20T01:03:34.000Z","updated_at":"2024-11-08T02:17:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"67323753-82ab-4dfe-96b1-eb6f89dfcade","html_url":"https://github.com/schell/teleform","commit_stats":null,"previous_names":["schell/teleform"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schell%2Fteleform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schell%2Fteleform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schell%2Fteleform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schell%2Fteleform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schell","download_url":"https://codeload.github.com/schell/teleform/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246741182,"owners_count":20826063,"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":[],"created_at":"2024-10-27T10:50:22.805Z","updated_at":"2025-04-02T01:47:27.296Z","avatar_url":"https://github.com/schell.png","language":"Rust","readme":"\u003cimg src=\"https://raw.githubusercontent.com/schell/teleform/main/globe.png\" alt=\"teleform logo\" width=\"250\" align=\"right\"\u003e\n\n# teleform\n\n[See the example](crates/example/src/main.rs).\n\n## what\n\nInfrastructure-as-code like `terraform`, but in a Rust library. This makes\nit easy to integrate infrastructure setup and teardown into your project's\nxtask.\n\n### building and running the example\n\nFirst build the example lambda using [cargo lambda](https://www.cargo-lambda.info/):\n```\ncargo lambda build --release --arm64 --output-format zip\n```\n\nThen run the example program with your AWS account id:\n```\ncargo run -p example -vvv --account-id xxxxxxxxxxxx\n```\n\nWhen you're ready to apply the changes (building all infrastructure):\n```\ncargo run -p example -vvv --account-id xxxxxxxxxxxx --apply\n```\n\nThat should print out a url where you can play with your stack.\n\nWhen you're ready to tear it all down run:\n```\ncargo run -p example -vvv --account-id xxxxxxxxxxxx --apply --delete\n```\n\n## why\n\nIaC is a good idea. It's good to have options. Rust is great, and using a\nfull-featured language provides a lot of flexibility. Also some people\nhave a chip on their shoulder about `terraform`.\n\n## how\n\n### high level idea\n\nThe trait `TeleSync` allows you to write `create`, `update`, and `delete`\nimplementations for resources. It also specifies how resources are\n`composite`d from the IaC definition (aka your code) and the store file, as well\nas what fields cause recreations (`should_recreate`) and updates\n(`should_update`). The `teleform-derive` crate provides a derive macro and\nattributes that make implementing this trait pretty easy for new resources.\n\n### resources\n\nA resource is a struct with fields of either type `Local\u003cT\u003e` or `Remote\u003cT\u003e`,\nwhich are wrappers for local values and remote values, respectively. A\nlocal value is a value that is known before resource creation - like the\nname of an AWS Lambda function. A remote value is one that can only be\nknown _after_ creation - like the ARN of the same Lambda function.\n\nEach resource must implement `TeleSync`.\n\n### providers\n\nA provider is an associated type on `TeleSync` that helps sync your resources to\nyour IaC definition. For AWS, the provider is `SdkConfig`, which is used to\ncreate a client for each AWS sub-service.\n\n#### included providers\n\nThere are currently only stub providers offering a very limited number of\nresources. Part of the motivation to opensource this project is to vet the idea\nand see if folks are willing to contribute some resources.\n\nSee the `tele::aws` module for included resources.\n\n### store\n\nThe store is a `BTreeMap` of resources that get syncronized and serialized. It is\nthe main structure you interact with in your command line program when defining\nyour infrastructure.\n\n## WARNING: alpha software!\n\nThis software is super-alpha! It pretty much works along my happy path, but I\nwouldn't base _your_ corp on it, unless you're a computer cowboy like me.\nYeehaw!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschell%2Fteleform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschell%2Fteleform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschell%2Fteleform/lists"}