Skip to content

Cannot import panos_ldap_profile #480

@peterbaumert

Description

@peterbaumert

Describe the bug

resource "panos_ldap_profile" "CORP" {
  location = {
      shared = {}
    }

  ldap_type = "active-directory"
  name      = "DOMAIN.com"

  base           = "DC=...,DC=com"
  bind_dn        = "CN=...DC=com"
  bind_password  = var.ldap_bind_password
  retry_interval = 120
  ssl            = true

  servers = [
    {
      name   = "DOMAIN"
      server = "DOMAIN.com"
      port   = 636
    }
  ]

  lifecycle {
    create_before_destroy = true
  }
}

locals {
  corp = {
    location = {
      shared = {}
    }
    name = "DOMAIN"
  }
}

import {
  id = base64encode(jsonencode(local.corp))
  to = panos_ldap_profile.CORP
}

Expected behavior

Resource gets imported.

Current behavior

10:04:26.902 STDERR terraform: ╷
10:04:26.902 STDERR terraform: │ Error: Failed to read encrypted values state
10:04:26.902 STDERR terraform: │ 
10:04:26.902 STDERR terraform: │ Missing plaintext value for /bind-password
10:04:26.902 STDERR terraform: ╵
10:04:26.902 STDERR terraform: ╷
10:04:26.902 STDERR terraform: │ Error: Value Conversion Error
10:04:26.902 STDERR terraform: │ 
10:04:26.902 STDERR terraform: │ An unexpected error was encountered while verifying an attribute value
10:04:26.902 STDERR terraform: │ matched its expected type to prevent unexpected behavior or panics. This is
10:04:26.902 STDERR terraform: │ always an error in the provider. Please report the following to the
10:04:26.902 STDERR terraform: │ provider developer:
10:04:26.902 STDERR terraform: │ 
10:04:26.902 STDERR terraform: │ Expected framework type from provider logic:
10:04:26.902 STDERR terraform: │ types.ListType[types.ObjectType["address":basetypes.StringType,
10:04:26.902 STDERR terraform: │ "name":basetypes.StringType, "port":basetypes.Int64Type]] / underlying
10:04:26.902 STDERR terraform: │ type: tftypes.List[tftypes.Object["address":tftypes.String,
10:04:26.902 STDERR terraform: │ "name":tftypes.String, "port":tftypes.Number]]
10:04:26.902 STDERR terraform: │ Received framework type from provider logic: types.ListType[!!! MISSING
10:04:26.902 STDERR terraform: │ TYPE !!!] / underlying type: tftypes.List[tftypes.DynamicPseudoType]
10:04:26.903 STDERR terraform: │ Path: servers

Possible solution

No idea

Steps to reproduce

  1. Use code above
  2. terraform plan

Screenshots

Context

Your Environment

  • Version used: 2.0.2
  • Python: 2.0.2
  • Terraform v1.12.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions