Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: junos_security_ike_gateway Value Conversion Error #533

Closed
giulianna14 opened this issue Aug 28, 2023 · 2 comments
Closed

Bug: junos_security_ike_gateway Value Conversion Error #533

giulianna14 opened this issue Aug 28, 2023 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@giulianna14
Copy link

Terraform and Provider Versions

Terraform 1.5.3
Provider 2.1.1

Terraform Configuration Files

resource "junos_security_ike_gateway" "gateway" {
  for_each           = var.tunnels
  name               = "ike_gw_${each.key}"
  address            = [var.tunnels[each.key].public_ip
  policy             = junos_security_ike_policy.gateway[each.key].name
  external_interface = junos_interface_logical.dmz.name
  no_nat_traversal   = true
  version            = "v2-only"
  dead_peer_detection {
    interval  = 10
    threshold = 3
    send_mode = "always-send"
  }
  local_identity {
    type  = "inet"
    value = var.public_ip
  }
  remote_identity {
    type  = "inet"
    value = var.tunnels[each.key].public_ip
  }
}

Expected Behavior

A successful plan.

Actual Behavior

 Error: Value Conversion Error
│ 
│   with module.shared-awsvpn-settings[0].junos_security_ike_gateway.gateway["gateway"],
│   on modules/shared-awsvpn-settings/vpn.tf line 57, in resource "junos_security_ike_gateway" "gateway":
│   57: resource "junos_security_ike_gateway" "gateway" {
│ 
│ An unexpected error was encountered trying to convert tftypes.Value into
│ providerfwk.securityIkeGatewayBlockRemoteIdentity. This is always an error
│ in the provider. Please report the following to the provider developer:
│ 
│ mismatch between struct and object: Struct defines fields not found in
│ object: distinguished_name_container and distinguished_name_wildcard.
╵

Steps to Reproduce

  1. terraform plan

We thank you for any help you can provide! If we can provide any further details please let us know.

@giulianna14 giulianna14 added the bug Something isn't working label Aug 28, 2023
@jeremmfr
Copy link
Owner

jeremmfr commented Aug 28, 2023

Hi @giulianna14 👋
Thank you for reporting this issue.
This bug only appears when upgrading the provider before v2.0.0 to v2.0.0...v2.1.1 and there are junos_security_ike_gateway resources with remote_identity block set in Terraform state.
I'll take care of fixing this quickly.

@jeremmfr jeremmfr self-assigned this Aug 28, 2023
@jeremmfr jeremmfr added this to the v2.1.2 milestone Aug 28, 2023
@giulianna14
Copy link
Author

@jeremmfr, Thank you very much for the quick code fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants