Skip to content

IPSec network creates OpenVPN connector instead of IPSec connector causing "Connect/Stop actions are forbidden for non IPSEC connector" error #141

@obliviongx

Description

@obliviongx

Bug Report

Environment

  • Provider Version: OpenVPN/cloudconnexa v1.0.7 (latest available)
  • Terraform Version: 1.5.7 and OpenTofu v1.10.2 (both tested)

Issue Description

When creating an IPSec network using the cloudconnexa_ipsec_network resource, the provider creates an OpenVPN connector instead of a proper IPSec connector. This causes the following error during terraform apply:

Expected Behavior

The cloudconnexa_ipsec_network resource should create a proper IPSec connector that supports IPSec-specific operations like connect/stop actions.

Actual Behavior

The resource creates an OpenVPN connector type instead of an IPSec connector type, which doesn't support IPSec operations and causes API validation errors.

Terraform Configuration

resource "cloudconnexa_ipsec_network" "ipsec_networks" {
  for_each = var.ipsec_networks

  name            = each.value.name
  description     = each.value.description
  egress          = true
  internet_access = "SPLIT_TUNNEL_ON"

  ipsec_config {
    remote_gateway       = each.value.remote_gateway
    remote_networks      = each.value.remote_networks
    pre_shared_key       = var.global_ipsec_pre_shared_key
    ike_version          = "IKEv2"
    encryption_algorithm = "AES256"
    hash_algorithm       = "SHA256"
    dh_group             = "14"
    pfs_group            = "14"
    ike_lifetime         = 28800
    ipsec_lifetime       = 3600
    dpd_timeout          = 30
    nat_traversal        = true
  }

  connector {
    name          = each.value.connector_name
    description   = "IPSec connector managed by Terraform"
    vpn_region_id = each.value.vpn_region_id
  }
}

Steps to Reproduce

  1. Configure a cloudconnexa_ipsec_network resource IPSec conf
  2. Run terraform apply or tofu apply
  3. Observe the error about "Connect/Stop actions are forbidden for non IPSEC connector"

Error Output

Error: status code: 400, response body: {"errorDetails":{"connector":[{"errorCode":"9-11-100","message":"Connect/Stop actions are forbidden for non IPSEC connector"}]},"errorMessage":"Request validation failed","statusError":"Bad Request"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions