hashicorp / packer-plugin-oneandone

Packer plugin for 1&1 on IONOS-Cloud
https://www.packer.io/docs/builders/oneandone
Mozilla Public License 2.0
1 stars 4 forks source link

unknown configuration key: '"data_center_id"' #74

Closed yellowhat closed 3 months ago

yellowhat commented 3 months ago

Overview of the Issue

Hi, I would like to use this plugin to create images on IONOS cloud using packer.

But I get the following error:

# PACKER_LOG=1 packer build .
2024/06/20 13:57:12 [INFO] Packer version: 1.11.0 [go1.21.10 linux amd64]
2024/06/20 13:57:12 [INFO] PACKER_CONFIG env var not set; checking the default config file path
2024/06/20 13:57:12 [INFO] PACKER_CONFIG env var set; attempting to open config file: /root/.packerconfig
2024/06/20 13:57:12 [WARN] Config file doesn't exist: /root/.packerconfig
2024/06/20 13:57:12 [INFO] Setting cache directory: /root/.cache/packer
2024/06/20 13:57:12 [TRACE] listing potential installations for "github.com/hashicorp/oneandone" that match "1.0.1". plugingetter.ListInstallationsOptions{PluginDirectory:"/root/.config/packer/plugins", BinaryInstallationOptions:plugingetter.BinaryInstallationOptions{APIVersionMajor:"5", APIVersionMinor:"0", OS:"linux", ARCH:"amd64", Ext:"", Checksummers:[]plugingetter.Checksummer{plugingetter.Checksummer{Type:"sha256", Hash:(*sha256.digest)(0xc000134480)}}, ReleasesOnly:false}}
2024/06/20 13:57:12 [TRACE] Found the following "github.com/hashicorp/oneandone" installations: [{/root/.config/packer/plugins/github.com/hashicorp/oneandone/packer-plugin-oneandone_v1.0.1_x5.0_linux_amd64 v1.0.1 x5.0}]
2024/06/20 13:57:12 [INFO] found external [-packer-default-plugin-name-] builders from oneandone plugin
2024/06/20 13:57:12 [TRACE] listing potential installations for <nil> that match "". plugingetter.ListInstallationsOptions{PluginDirectory:"/root/.config/packer/plugins", BinaryInstallationOptions:plugingetter.BinaryInstallationOptions{APIVersionMajor:"5", APIVersionMinor:"0", OS:"linux", ARCH:"amd64", Ext:"", Checksummers:[]plugingetter.Checksummer{plugingetter.Checksummer{Type:"sha256", Hash:(*sha256.digest)(0xc000134880)}}, ReleasesOnly:false}}
2024/06/20 13:57:12 [INFO] found external [-packer-default-plugin-name-] builders from oneandone plugin
2024/06/20 13:57:12 [INFO] Starting external plugin /root/.config/packer/plugins/github.com/hashicorp/oneandone/packer-plugin-oneandone_v1.0.1_x5.0_linux_amd64 start builder -packer-default-plugin-name-
2024/06/20 13:57:12 Starting plugin: /root/.config/packer/plugins/github.com/hashicorp/oneandone/packer-plugin-oneandone_v1.0.1_x5.0_linux_amd64 []string{"/root/.config/packer/plugins/github.com/hashicorp/oneandone/packer-plugin-oneandone_v1.0.1_x5.0_linux_amd64", "start", "builder", "-packer-default-plugin-name-"}
2024/06/20 13:57:12 Waiting for RPC address for: /root/.config/packer/plugins/github.com/hashicorp/oneandone/packer-plugin-oneandone_v1.0.1_x5.0_linux_amd64
2024/06/20 13:57:12 Received unix RPC address for /root/.config/packer/plugins/github.com/hashicorp/oneandone/packer-plugin-oneandone_v1.0.1_x5.0_linux_amd64: addr is /tmp/packer-plugin4175223822
2024/06/20 13:57:12 packer-plugin-oneandone_v1.0.1_x5.0_linux_amd64 plugin: 2024/06/20 13:57:12 Plugin address: unix /tmp/packer-plugin4175223822
2024/06/20 13:57:12 packer-plugin-oneandone_v1.0.1_x5.0_linux_amd64 plugin: 2024/06/20 13:57:12 Waiting for connection...
2024/06/20 13:57:12 packer-plugin-oneandone_v1.0.1_x5.0_linux_amd64 plugin: 2024/06/20 13:57:12 Serving a plugin connection...
2024/06/20 13:57:12 packer-plugin-oneandone_v1.0.1_x5.0_linux_amd64 plugin: 2024/06/20 13:57:12 [TRACE] starting builder -packer-default-plugin-name-
    * unknown configuration key: '"data_center_id"'

  on packer.pkr.hcl line 10:
  (source code not available)

2024/06/20 13:57:12 [INFO] (telemetry) Finalizing.
Error: 1 error occurred:
    * unknown configuration key: '"data_center_id"'

  on packer.pkr.hcl line 10:
  (source code not available)

2024/06/20 13:57:12 waiting for all plugin processes to complete...
2024/06/20 13:57:12 /root/.config/packer/plugins/github.com/hashicorp/oneandone/packer-plugin-oneandone_v1.0.1_x5.0_linux_amd64: plugin process exited

Plugin and Packer version

$ packer version
Packer v1.11.0

Simplified Packer Buildfile

packer {
  required_plugins {
    oneandone = {
      version = "1.0.1"
      source = "github.com/hashicorp/oneandone"
    }
  }
}

source "oneandone" "this" {
  source_image_name = "debian:latest"
  image_name        = "blah"
}

build {
  sources = [
    "source.oneandone.this",
  ]
}

Same error with:

source "oneandone" "this" {
  data_center_id = "asd"
  source_image_name = "debian:latest"
  image_name        = "blah"
}

Operating system and Environment details

OS, Architecture, and any other information you can provide about the environment.

Log Fragments and crash.log files

Include appropriate log fragments. If the log is longer than a few dozen lines, please include the URL to the gist of the log or use the Github detailed format instead of posting it directly in the issue.

Set the env var PACKER_LOG=1 for maximum log detail.

yellowhat commented 3 months ago

Use "github.com/ionos-cloud/ionoscloud"