cycloidio / terracognita

Reads from existing public and private cloud providers (reverse Terraform) and generates your infrastructure as code on Terraform configuration
MIT License
2.2k stars 164 forks source link

Terraform plan - Cycle error #417

Open kaviyarasu16p opened 3 months ago

kaviyarasu16p commented 3 months ago

General information:

Describe the bug: While trying to execute terraform plan after using this terracognita command, terracognita aws --hcl qa --tfstate terraform.tfstate --aws-default-region us-east-2

its fails with cyclic error to destroy all resoruces

Log message

Plan: 0 to add, 0 to change, 341 to destroy. ╷ │ Error: Cycle: aws_subnet.onengine_prod_vpc_private_us_east_2a (destroy), aws_security_group.sg_08335c6bcbeb8221a (destroy), aws_vpc.onengine_prod_vpc (destroy), aws_security_group.sg_0cbb2c9c3d8932ed8 (destroy), aws_db_parameter_group.default_aurora_postgresql14 (destroy), aws_db_parameter_group.default_postgres14 (destroy), aws_security_group.eks_cluster_sg_onengine_eks_1978341983 (destroy), aws_db_subnet_group.retool_retool (destroy), aws_security_group.sg_0a506807d28c8c12f (destroy), aws_ecs_task_definition.arn_aws_ecs_us_east_2_637423319568_task_definition_env0_agent_2 (destroy), aws_iam_role.ecstaskexecutionrole (destroy), aws_iam_role.retool_temporal_execution_role (destroy), aws_iam_policy.arn_aws_iam__637423319568_policy_o2_kinesis_stream (destroy), aws_iam_role.terraform_2024052003310460330000000e (destroy), aws_key_pair.onengine_prod_key (destroy), aws_db_instance.retool_rds_instance (destroy)

Additional context

Expected Result after terraform plan is

No changes. Infrastructure is up-to-date.

This means that Terraform did not detect any differences between your configuration and real physical resources that exist. As a result, no actions need to be performed.