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

pecdm::destroy fails #85

Open
cdenneen opened this issue Oct 19, 2022 · 3 comments
Open

pecdm::destroy fails #85

cdenneen opened this issue Oct 19, 2022 · 3 comments
Labels
bug Something isn't working jira

Comments

@cdenneen
Copy link

❯ /opt/puppetlabs/bin/bolt plan run pecdm::destroy provider=aws
Starting: plan pecdm::destroy
Starting: task terraform::initialize on localhost
Finished: task terraform::initialize with 0 failures in 0.16 sec
Starting: plan terraform::destroy
Starting: task terraform::destroy on localhost
Finished: task terraform::destroy with 1 failure in 4.75 sec
Finished: plan terraform::destroy in 4.76 sec
Finished: plan pecdm::destroy in 4.96 sec
Failed on localhost:

  Error: error retrieving ALB: ValidationError: 'arn:aws:elasticloadbalancing:us-east-1:REDACTED:loadbalancer/net/pe-compiler-lb-43c75e/89bcd05a3b3226f8' is not a valid load balancer ARN
  	status code: 400, request id: REDACTED

    with module.loadbalancer.aws_lb.pe_compiler_service[0],
    on modules/loadbalancer/main.tf line 9, in resource "aws_lb" "pe_compiler_service":
     9: resource "aws_lb" "pe_compiler_service" {


  Error: error retrieving Target Group: ValidationError: 'arn:aws:elasticloadbalancing:us-east-1:REDACTED:targetgroup/pe-tg-43c75e-8142/db3af2c8afa6bbf1' is not a valid target group ARN
  	status code: 400, request id: REDACTED

    with module.loadbalancer.aws_lb_target_group.pe_compiler["8142"],
    on modules/loadbalancer/main.tf line 31, in resource "aws_lb_target_group" "pe_compiler":
    31: resource "aws_lb_target_group" "pe_compiler" {


  Error: error retrieving Target Group: ValidationError: 'arn:aws:elasticloadbalancing:us-east-1:REDACTED:targetgroup/pe-tg-43c75e-8140/6ce18ba5cfdb042d' is not a valid target group ARN
  	status code: 400, request id: REDACTED

    with module.loadbalancer.aws_lb_target_group.pe_compiler["8140"],
    on modules/loadbalancer/main.tf line 31, in resource "aws_lb_target_group" "pe_compiler":
    31: resource "aws_lb_target_group" "pe_compiler" {

Failed on 1 target: localhost
Ran on 1 target

I've confirmed the ARNs for all 3 resources are accurate.

@cdenneen cdenneen added the bug Something isn't working label Oct 19, 2022
@cdenneen
Copy link
Author

I manually removed the target groups and load balancer from AWS. Then manually removed the LB pieces from the terraform.tfstate and it says Puppet Enterprise deployment successfully destroyed:

❯ /opt/puppetlabs/bin/bolt plan run pecdm::destroy provider=aws
Starting: plan pecdm::destroy
Starting: plan pecdm::subplans::destroy
Destroying Puppet Enterprise deployment on aws
Starting: task terraform::initialize on localhost
Finished: task terraform::initialize with 0 failures in 0.16 sec
Starting: plan terraform::destroy
Starting: task terraform::destroy on localhost
Finished: task terraform::destroy with 0 failures in 6.85 sec
Finished: plan terraform::destroy in 6.86 sec
Puppet Enterprise deployment successfully destroyed
Finished: plan pecdm::subplans::destroy in 7.04 sec
Finished: plan pecdm::destroy in 7.04 sec
Plan completed successfully with no result

but in the AWS console the instances are all still there. The key pair, security groups. Doesn't look like it actually destroyed anything from what I can tell.

@mcka1n mcka1n added the jira label Oct 20, 2022
@mcka1n
Copy link
Contributor

mcka1n commented Oct 27, 2022

Hey @cdenneen

We have created an internal issue, we will evaluate it, and come back when we reproduced the issue.

Thanks!

@timidri
Copy link
Contributor

timidri commented Dec 30, 2022

Hi @cdenneen, if you use pecdm in a non-default region, you need to specify that as a parameter to destroy as follows:

bolt plan run pecdm::destroy provider=aws cloud_region=myregion

Can you try this out and tell us if that solved your problem?

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

No branches or pull requests

3 participants