Closed hikerspath closed 7 months ago
Link this GH Issue to fix in PR #298
@hikerspath thank you for opening this issue.
As described in the responses to #298, the http data source, and more broadly, the scope of the http provider is intended to be limited to operations that do not perform any mutation. Consequently, introduction of a resource, which would allow mutation of the target would be outside of this scope. Unfortunately, this means that we are unable to consider your proposal at this time. Perhaps the restapi provider might prove to be a suitable alternative, as the restapi_object
resource allows POST
, GET
, PUT
and DELETE
operations.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Terraform CLI and Provider Versions
0.12+
Use Cases or Problem Statement
So datasources are read during the 'Refreshing state' phase of both plan and apply so that the data that they are given is available through the remainder of the runtime. This prevents pushing configuration into API's only during an apply phase, to build / configure something for an API that has no provider.
Proposal
Creation of a
resource
type object that would afford the ability to interact with virtually ANY api through paths and variables to build a resource. Given that the resource would store the json outputs in the state file then configuration could be built for any API (not just those which have a first-class provider).How much impact is this issue causing?
Medium
Additional Information
For instance, I run a grafana instance using the kubernetes provider. It would be super cool to have a resource based trigger that would trigger the reload URL:
Unfortunately, while the above does "work" it triggers before any of the changes are applied and does not help interact with the changes to the config (even though I think we found a creative way of causing the resource to "change". This type of action can only be accomplished in a resource.
Code of Conduct