{"id":13582447,"url":"https://github.com/scottwinkler/terraform-provider-shell","last_synced_at":"2025-04-05T22:05:22.693Z","repository":{"id":35563518,"uuid":"136586484","full_name":"scottwinkler/terraform-provider-shell","owner":"scottwinkler","description":"Terraform provider for executing shell commands and saving output to state file","archived":false,"fork":false,"pushed_at":"2023-03-07T00:34:49.000Z","size":17471,"stargazers_count":284,"open_issues_count":39,"forks_count":63,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-29T21:04:06.003Z","etag":null,"topics":["json","lifecycle-commands","python","shell","stderr","stdout","terraform","terraform-provider","terraform-provider-shell"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scottwinkler.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2018-06-08T07:56:50.000Z","updated_at":"2025-03-24T16:57:13.000Z","dependencies_parsed_at":"2024-01-19T08:17:31.193Z","dependency_job_id":"bf2386ff-365f-426e-aba5-d43ae541362a","html_url":"https://github.com/scottwinkler/terraform-provider-shell","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottwinkler%2Fterraform-provider-shell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottwinkler%2Fterraform-provider-shell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottwinkler%2Fterraform-provider-shell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottwinkler%2Fterraform-provider-shell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scottwinkler","download_url":"https://codeload.github.com/scottwinkler/terraform-provider-shell/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247406085,"owners_count":20933803,"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":["json","lifecycle-commands","python","shell","stderr","stdout","terraform","terraform-provider","terraform-provider-shell"],"created_at":"2024-08-01T15:02:43.421Z","updated_at":"2025-04-05T22:05:22.676Z","avatar_url":"https://github.com/scottwinkler.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"Terraform Provider Shell\n==================\nhttps://registry.terraform.io/providers/scottwinkler/shell\n\nThis plugin is for wrapping shell scripts to make them fully fledged terraform resources. Note that this is a backdoor into the Terraform runtime. You can do some pretty dangerous things with this and it is up to you to make sure you don't get in trouble.\n\nSince this provider is rather different than most other provider, it is recommended that you at least have some familiarity with the internals of Terraform before attempting to use this provider.\n\n**Note:** many people use this provider for wrapping APIs of resources that are not supported by existing providers. For an example of using this provider to manage a Github repo resource, see `examples/github-repo`\n\nRequirements\n------------\n\n-\t[Terraform](https://www.terraform.io/downloads.html) \u003e= 0.12.x\n-\t[Go](https://golang.org/doc/install) \u003e= 1.12\n\nBuilding The Provider\n---------------------\n\n1. Clone the repository\n1. Enter the repository directory\n1. Build the provider using the Go `install` command: \n```sh\n$ go install\n```\n\nAdding Dependencies\n---------------------\n\nThis provider uses [Go modules](https://github.com/golang/go/wiki/Modules).\nPlease see the Go documentation for the most up to date information about using Go modules.\n\nTo add a new dependency `github.com/author/dependency` to your Terraform provider:\n\n```\ngo get github.com/author/dependency\ngo mod tidy\n```\n\nThen commit the changes to `go.mod` and `go.sum`.\n\n\nUsing the provider\n----------------------\n\nYou can use this provider to make custom external resources and data sources:\n\n```\nterraform {\n  required_providers {\n    shell = {\n      source = \"scottwinkler/shell\"\n      version = \"1.7.7\"\n    }\n  }\n}\n\nvariable \"oauth_token\" {\n  type = string\n}\n\nprovider \"shell\" {\n  sensitive_environment = {\n    OAUTH_TOKEN = var.oauth_token\n  }\n}\n\nresource \"shell_script\" \"github_repository\" {\n  lifecycle_commands {\n    create = file(\"${path.module}/scripts/create.sh\")\n    read   = file(\"${path.module}/scripts/read.sh\")\n    update = file(\"${path.module}/scripts/update.sh\")\n    delete = file(\"${path.module}/scripts/delete.sh\")\n  }\n\n  environment = {\n    NAME        = \"HELLO-WORLD\"\n    DESCRIPTION = \"description\"\n  }\n}\n```\n\nDeveloping the Provider\n---------------------------\n\nIf you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (see [Requirements](#requirements) above).\n\nTo compile the provider, run `go install`. This will build the provider and put the provider binary in the `$GOPATH/bin` directory.\n\nIn order to run the full suite of Acceptance tests, run `make testacc`.\n\n*Note:* Acceptance tests create real resources, and often cost money to run.\n\n```sh\n$ make testacc\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscottwinkler%2Fterraform-provider-shell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscottwinkler%2Fterraform-provider-shell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscottwinkler%2Fterraform-provider-shell/lists"}