PaloAltoNetworks / terraform-provider-scm

The Terraform provider for Strata Cloud Manager
Apache License 2.0
7 stars 2 forks source link

Creating scm_snippet fails with error "An unexpected error was encountered trying to build a value" #5

Open kaisero opened 8 months ago

kaisero commented 8 months ago

Describe the bug

When creating an scm_snippet terraform apply fails with the following error

│ Error: Value Conversion Error
│ 
│   with scm_snippet.example,
│   on scm.tf line 1, in resource "scm_snippet" "example":
│    1: resource "scm_snippet" "example" {
│ 
│ An unexpected error was encountered trying to build a value. This is always an error in the provider. Please report the following to the provider developer:
│ 
│ Received unknown value, however the target type cannot handle unknown values. Use the corresponding `types` package type or a custom type that handles unknown values.
│ 
│ Path: folders
│ Target Type: []provider.snippetRsModel_ujXZojh_FolderObject
│ Suggested Type: basetypes.ListValue

Expected behavior

Snippet should be created

Current behavior

Operation fails

Steps to reproduce

Define a provider (tried api.strata.paloaltonetworks.com and api.sase.paloaltonetworks.com) and resource and apply configuration

terraform {
  required_providers {
    scm = {
      source  = "paloaltonetworks/scm"
      version = "0.1.1"
    }
  }
}

provider "scm" {
  host          = "api.strata.paloaltonetworks.com"
  client_id     = "YOUR-CLIENT-ID"
  client_secret = "YOUR-CLIENT-SECRET"
  scope         = "tsg_id:YOUR-TSG-ID"
}
resource "scm_snippet" "example" {
  name = "example"
}

Your Environment

Terraform v1.6.6 MacOS 13.6.3 (darwin_arm64) Provider registry.terraform.io/paloaltonetworks/scm v0.1.1

shinmog commented 7 months ago

I've reached out to my contact at HashiCorp to see if I can figure out why this is happening...

ancoleman commented 6 months ago

@shinmog any updates on moving forward with this?

shinmog commented 6 months ago

Not yet. I was redirected, and haven't re-followed up on this yet.

aSauerwein commented 3 weeks ago

Hi!

I've just tried to use Terraform with SCM and came across this Issue on version 0.9.2. Do you have an update on this ?

Thanks