Comments (4)
Hi, @jmeldrum76. I would encourage just using the binaries published in the releases.
If you'd like to build, on Linux you can run the build.sh script after installing go and govendor. Hope that helps - feel free to reopen the issue if you need more info!
from terraform-provider-restapi.
from terraform-provider-restapi.
Hi,
I was able to get the plugin installed. Now when I run " terraform apply" This is what I get:
Terraform File:
`provider "restapi" {
uri = "https://venafiserver.se.venafi.com:443/"
insecure = true
debug = true
write_returns_object = true
}
resource "restapi_object" "Authorize" {
path = "/vedsdk/authorize"
#data = "{ "id": "1234", "first": "Foo", "last": "Bar" }"
data = "{ "Username": "administrator", "Password": "MyPassw0rd"}"
}`
Output from Console
`
venafilab@ubuntu:~/terraform/REST_API_Test$ terraform apply
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
- create
Terraform will perform the following actions:
restapi_object.Authorize will be created
- resource "restapi_object" "Authorize" {
- api_data = (known after apply)
- api_response = (known after apply)
- create_response = (known after apply)
- data = jsonencode(
{
+ Password = "MyPassword"
+ Username = "administrator"
}
) - id = (known after apply)
- path = "/vedsdk/authorize"
}
Plan: 1 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
restapi_object.Authorize: Creating...
Error: Internal validation failed. Object ID is not set, but may have been created. This should never happen!
on cert_request_and_API.tf line 9, in resource "restapi_object" "Authorize":
9: resource "restapi_object" "Authorize" {
`
from terraform-provider-restapi.
Hi, @jmeldrum76
Since terraform is used to manage resources, and the portion you've put up here is not a resource (it's a login "action"), the lifecycle activities that terraform needs (thus, this provider) are not applicable. It's hard to describe, but this provider is intended to manage objects. Your login action will need to be done elsewhere, but fed into this provider (by setting the HTTP headers).
from terraform-provider-restapi.
Related Issues (20)
- Double slash "/" added to path when path empty or set to "{id}" HOT 1
- search bool value
- Documentation not showing examples and description HOT 1
- Updating a resource with id in the payload HOT 4
- The request body must contain the following parameter: 'grant_type' HOT 2
- "POST" not working as destroy method HOT 2
- How to build / test local changes to the provider. HOT 3
- import is not documented
- Add support to ignore changes in read-only attributes HOT 2
- Incorrect License Display in GitHub REST API
- How to update predefined resources (already created by default)? HOT 1
- Diff is not shown in case of manual changes outside of terraform
- Error while installing mastercard/restapi v1.18.0: error checking (signature: openpgp: key expired)
- Pulling in data from endpoint with no query parameters?
- Support for different Content-Type / Headers for each method
- Delete API not triggered on destroy (redux)
- [Feature Request] Moving all the parameters from the provider to restapi_object
- Multiple base URIs
- [curl] allow request body, content-type to be provided as strings
- Error: internal validation failed; object ID is not set, but may have been created; this should never happen HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-restapi.