terraform "Missing required attribute" error

trying the terraform integration using a pretty "standard" config for 1password on terraform and I'm getting this error:

**│ Error: Missing required attribute

│ on line 1:
│ (source code not available)

│ The attribute "url" is required, but no definition was found.
**
my docker compose file is:

version: "3.4"

services:
  op-connect-api:
    image: 1password/connect-api:latest
    ports:
      - "8080:8080"
    volumes:
      - "./1password-credentials.json:/home/opuser/.op/1password-credentials.json"
      - "data:/home/opuser/.op/data"
  op-connect-sync:
    image: 1password/connect-sync:latest
    ports:
      - "8081:8080"
    volumes:
      - "./1password-credentials.json:/home/opuser/.op/1password-credentials.json"
      - "data:/home/opuser/.op/data"

volumes:
  data:

and my terraform file is

terraform {
  required_providers {
    docker = {
      source  = "kreuzwerker/docker"
      version = "2.15.0"
    }
    onepassword = {
      source = "1Password/onepassword"
      version = "~> 1.1.2"

    }
  }
}

provider "onepassword" {
  url = "http://localhost:8080"
}

resource "onepassword_item" "demo_password" {
  vault = "ACTUAL_VAULT_UUID"

  title    = "Demo Password Recipe"
  category = "password"

  password_recipe {
    length  = 40
    symbols = false
  }
}

output of versions

❯ terraform version
Terraform v1.0.8
on darwin_amd64
+ provider registry.terraform.io/1password/onepassword v1.1.2
+ provider registry.terraform.io/kreuzwerker/docker v2.15.0
❯ docker version
Client:
 Cloud integration: 1.0.17
 Version:           20.10.7
 API version:       1.41
 Go version:        go1.16.4
 Git commit:        f0df350
 Built:             Wed Jun  2 11:56:22 2021
 OS/Arch:           darwin/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.7
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       b0f5bc3
  Built:            Wed Jun  2 11:54:58 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.6
  GitCommit:        d71fcd7d8303cbf684402823e425e9dd2e99285d
 runc:
  Version:          1.0.0-rc95
  GitCommit:        b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

1Password Version: 1Password 7 Version 7.8.6 (70806000) Mac App Store
Extension Version: Not Provided
OS Version: osx 10.15.7

Comments

  • Hi!,

    Thank you for reaching out!

    I saw you reported this on the Terraform Provider GitHub repository; you got a reply over there.

This discussion has been closed.