Giter Club home page Giter Club logo

Comments (4)

DRuggeri avatar DRuggeri commented on July 20, 2024

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.

jmeldrum76 avatar jmeldrum76 commented on July 20, 2024

from terraform-provider-restapi.

jmeldrum76 avatar jmeldrum76 commented on July 20, 2024

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.

DRuggeri avatar DRuggeri commented on July 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.