{"id":13505779,"url":"https://github.com/devops-rob/terraform-provider-terracurl","last_synced_at":"2025-04-05T04:08:50.041Z","repository":{"id":37506926,"uuid":"505491506","full_name":"devops-rob/terraform-provider-terracurl","owner":"devops-rob","description":"A flexible Terraform provider for making API calls","archived":false,"fork":false,"pushed_at":"2025-03-28T04:44:54.000Z","size":271,"stargazers_count":138,"open_issues_count":16,"forks_count":12,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-29T03:03:05.654Z","etag":null,"topics":["api","api-rest","http","terracurl","terraform","terraform-provider"],"latest_commit_sha":null,"homepage":"https://www.hashicorp.com/blog/writing-terraform-for-unsupported-resources","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/devops-rob.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-20T15:12:34.000Z","updated_at":"2025-03-27T10:56:58.000Z","dependencies_parsed_at":"2024-01-03T02:28:09.151Z","dependency_job_id":"4ac443f7-2940-48fe-a480-deb7811c33a4","html_url":"https://github.com/devops-rob/terraform-provider-terracurl","commit_stats":{"total_commits":44,"total_committers":7,"mean_commits":6.285714285714286,"dds":"0.31818181818181823","last_synced_commit":"ec4200090d91d81082e6e8d5681e7fa29c3af07f"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":"hashicorp/terraform-provider-scaffolding","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devops-rob%2Fterraform-provider-terracurl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devops-rob%2Fterraform-provider-terracurl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devops-rob%2Fterraform-provider-terracurl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devops-rob%2Fterraform-provider-terracurl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devops-rob","download_url":"https://codeload.github.com/devops-rob/terraform-provider-terracurl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247284942,"owners_count":20913704,"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":["api","api-rest","http","terracurl","terraform","terraform-provider"],"created_at":"2024-08-01T00:01:13.526Z","updated_at":"2025-04-05T04:08:49.948Z","avatar_url":"https://github.com/devops-rob.png","language":"Go","funding_links":[],"categories":["Providers"],"sub_categories":["Community providers"],"readme":"# Terraform Provider TerraCurl\n\n[![Terraform](https://img.shields.io/badge/terraform-%235835CC.svg?style=for-the-badge\u0026logo=terraform\u0026logoColor=white)](https://registry.terraform.io/providers/devops-rob/terracurl/latest/docs)\n\nThis provider is designed to be a flexible extension of your terraform code to make managed and unamanged API calls to your target endpoint. Platform native providers should be preferred to TerraCurl but for instances where the platform provider does not have a resource or data source that you require, TerraCurl can be used to make substitute API calls.\n\n## Join the community\n\n[![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?style=for-the-badge\u0026logo=discord\u0026logoColor=white)](https://discord.gg/Zc4raDkX4C)\n\n## Managed API calls\nWhen using TerraCurl, if the API call is creating a change on the target platform and you would like this change reversed upon a destroy, use the `terracurl_request` resource. This will allow you to enter the API call that should be run when `terraform destroy` is run.\n\n```hcl\nresource \"terracurl_request\" \"mount\" {\n  name           = \"vault-mount\"\n  url            = \"https://localhost:8200/v1/sys/mounts/aws\"\n  method         = \"POST\"\n  request_body   = \u003c\u003cEOF\n{\n  \"type\": \"aws\",\n  \"config\": {\n    \"force_no_cache\": true\n  }\n}\n\nEOF\n\n  headers = {\n    X-Vault-Token = \"root\"\n  }\n\n  response_codes = [\n    200,\n    204\n  ]\n\n  cert_file       = \"server-vault-0.pem\"\n  key_file        = \"server-vault-0-key.pem\"\n  ca_cert_file    = \"vault-server-ca.pem\"\n  skip_tls_verify = false\n\n\n  destroy_url    = \"https://localhost:8200/v1/sys/mounts/aws\"\n  destroy_method = \"DELETE\"\n\n  destroy_headers = {\n    X-Vault-Token = \"root\"\n  }\n\n  destroy_response_codes = [\n    204\n  ]\n\n  destroy_cert_file       = \"server-vault-0.pem\"\n  destroy_key_file        = \"server-vault-0-key.pem\"\n  destroy_ca_cert_file    = \"vault-server-ca.pem\"\n  destroy_skip_tls_verify = false\n\n}\n```\n## Unmanaged API calls\nFor instances where there is no change required on the target platform when the `terraform destroy` command is run, use the `terracurl_request` data source\n\n```hcl\ndata \"terracurl_request\" \"test\" {\n  name           = \"products\"\n  url            = \"https://api.releases.hashicorp.com/v1/products\"\n  method         = \"GET\"\n\n  response_codes = [\n    200\n  ]\n\n  max_retry      = 1\n  retry_interval = 10\n}\n```\n## Requirements\n\n-\t[Terraform](https://www.terraform.io/downloads.html) \u003e= 0.13.x\n-\t[Go](https://golang.org/doc/install) \u003e= 1.17\n\n## Building The Provider\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\n## Adding Dependencies\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## Developing the Provider\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, update the makefile with your OS architecture, then run `make install`. This will build the provider and put the provider binary in the `~/.terraform.d/plugins/local/` directory.\n\nTo generate or update documentation, run `make docs`.\n\nIn order to run the full suite of Acceptance tests, run `make test`.\n\n*Note:* Acceptance tests create real resources, and often cost money to run.\n\n```sh\n$ make test\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevops-rob%2Fterraform-provider-terracurl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevops-rob%2Fterraform-provider-terracurl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevops-rob%2Fterraform-provider-terracurl/lists"}