cloudposse / terraform-aws-ec2-client-vpn

https://cloudposse.com/accelerate
Apache License 2.0
45 stars 28 forks source link

Endpoint does not exist #59

Closed joshuabalduff closed 1 year ago

joshuabalduff commented 1 year ago

Describe the Bug

After running the module there is an output which states the endpoint does not exists even though it does. I have tried version 13 and 14 and seem to get the same result. Is this a known issue? It seems like a down steam issue.

Expected Behavior

For the endpoint to be found.

Steps to Reproduce

Steps to reproduce the behavior: Run the module Wait for it to finish (kind of)

│ Error: InvalidClientVpnEndpointId.NotFound: Endpoint cvpn-endpoint-1231123123 does not exist │ status code: 400, request id: 123123-123123-1231-123 │ │ with module.client_vpn.data.awsutils_ec2_client_vpn_export_client_config.default[0], │ on .terraform/modules/client_vpn/main.tf line 263, in data "awsutils_ec2_client_vpn_export_client_config" "default": │ 263: data "awsutils_ec2_client_vpn_export_client_config" "default" { │

guga-kudos commented 1 year ago

Hey @joshuabalduff, did you find a solution to this? I am facing the same problem.

joshuabalduff commented 1 year ago

Hey @guga-kudos I use Terragrunt so it might be different for you, but I had to add the awutil provider with the correct region. For some reason it kept pulling from us-east-1 and not us-east-2 in my case.

provider "awsutils" {
  source  = "cloudposse/awsutils"
  version = ">= 0.8.0"
  region  = "us-east-2"
}
guga-kudos commented 1 year ago

This worked! Thanks 🧡

In Raw Terraform code if anyone needs in the future.

terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 4.61.0"
    }
    awsutils = {
      source  = "cloudposse/awsutils"
      version = ">= 0.8.0"
    }
  }
}

provider "aws" {
  region = local.aws.region
}

provider "awsutils" {
  region  = local.aws.region
}
Pionerd commented 1 month ago

Same behaviour is observed when profile is missing from the awsutils provider.