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

Uninstall and redeploy functions does not work #458

Open
umutkacar opened this issue Jul 7, 2020 · 0 comments
Open

Uninstall and redeploy functions does not work #458

umutkacar opened this issue Jul 7, 2020 · 0 comments
Assignees

Comments

@umutkacar
Copy link

umutkacar commented Jul 7, 2020

  • OS Type: Linux
  • Java version:
  • 1.8

Summary

sudo python3 manager.py redeployand sudo python3 manager.py destroy commands does not succeed.

Reproduce steps

Run sudo python3 manager.py redeploy or sudo python3 manager.py destroy and tail related log files.

Expected Results

Expected 'redeploy' command to redeploy all pacbot related AWS resources, and 'destroy' command to remove them.

Actual Results

sudo python3 manager.py destroy command fails at step 4:

Step 4: Terraform destroy started
        Terraform destroy encountered an error
        Error occured, please check error log for more details

And you can observe the terraform_destroy.log to have these warning messages:

*** Terraform Destroy  Started ***
DateTime: 2020-07-07 07:04:52
****************************************************************************************************
Warning: "condition.0.values": [DEPRECATED] use 'host_header' or 'path_pattern' attribute instead

  on pacbot_app_alb_https_listener_AdminALBHttpsListenerRule.tf.json line 23, in resource.aws_lb_listener_rule.pacbot_app_alb_https_listener_AdminALBHttpsListenerRule:
  23:             }

(and 13 more similar warnings elsewhere)


Warning: "condition.0.field": [DEPRECATED] use 'host_header' or 'path_pattern' attribute instead

  on pacbot_app_alb_https_listener_AdminALBHttpsListenerRule.tf.json line 23, in resource.aws_lb_listener_rule.pacbot_app_alb_https_listener_AdminALBHttpsListenerRule:
  23:             }

(and 13 more similar warnings elsewhere)

sudo python3 manager.py redeploy command fails at step 6:

Step 6: Terraform init started
        Execution encountered error
        Completed in 0m 0s
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib64/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/usr/lib64/python3.7/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/home/ec2-user/pacbot/installer/custom/commands/redeploy.py", line 176, in run_reinstallation
    self.dry_run
  File "/home/ec2-user/pacbot/installer/core/providers/aws/reinstall.py", line 41, in execute
    raise self.exception
  File "/home/ec2-user/pacbot/installer/core/providers/aws/reinstall.py", line 78, in re_create_resources
    PyTerraform().terraform_destroy(resources_to_destroy)
  File "/home/ec2-user/pacbot/installer/core/terraform/__init__.py", line 136, in terraform_destroy
    raise Exception(response[2])
Exception:
Error: Reference to undeclared resource

  on pacbot_app_alb_https_listener_VulnerabilityALBHttpsListenerRule.tf.json line 7, in resource.aws_lb_listener_rule.pacbot_app_alb_https_listener_VulnerabilityALBHttpsListenerRule.action:
   7:                     "target_group_arn": "${aws_alb_target_group.pacbot_app_alb_target_groups_VulnerabilityALBTargetGroup.arn}",

A managed resource "aws_alb_target_group"
"pacbot_app_alb_target_groups_VulnerabilityALBTargetGroup" has not been
declared in the root module.

And you can observe the terraform_destroy.log to have these warning messages:

****************************************************************************************************
*** Terraform Destroy  Started ***
DateTime: 2020-07-07 07:12:57
****************************************************************************************************
Warning: "condition.0.values": [DEPRECATED] use 'host_header' or 'path_pattern' attribute instead

  on pacbot_app_alb_https_listener_AdminALBHttpsListenerRule.tf.json line 23, in resource.aws_lb_listener_rule.pacbot_app_alb_https_listener_AdminALBHttpsListenerRule:
  23:             }

(and 13 more similar warnings elsewhere)


Warning: "condition.0.field": [DEPRECATED] use 'host_header' or 'path_pattern' attribute instead

  on pacbot_app_alb_https_listener_AdminALBHttpsListenerRule.tf.json line 23, in resource.aws_lb_listener_rule.pacbot_app_alb_https_listener_AdminALBHttpsListenerRule:
  23:             }

(and 13 more similar warnings elsewhere)

I guess this issue might be related to some changes in AWS provider. See here: brikis98/terraform-up-and-running-code#43 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants