hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.82k stars 9.17k forks source link

Life cycle hook creation failure #33642

Open LAVA-KUMAR opened 1 year ago

LAVA-KUMAR commented 1 year ago

Terraform Core Version

">= 0.12

AWS Provider Version

4.67.0

Affected Resource(s)

*aws life cycle hook

Expected Behavior

It should create life cycle hook

Actual Behavior

but it is failing by throwing error .

Relevant Error/Panic Output Snippet

Error: configuration for module.test_eks.module.cluster-worker.aws_autoscaling_lifecycle_hook.eks_node_asg_ec2_termination_hook[2] still contains unknown values during apply (this is a bug in Terraform; please report it!)

Terraform Configuration Files

Life cycle resource configuration :

resource "aws_autoscaling_lifecycle_hook" "eks_node_asg_ec2_termination_hook" {
  count = length(aws_autoscaling_group.eks_nodes_asg.*.name)
  name                   = "aws-nth-ec2-termination-hook"
  autoscaling_group_name = aws_autoscaling_group.eks_nodes_asg[count.index].name
  default_result         = "CONTINUE"
  heartbeat_timeout      = var.heartbeat_timeout
  lifecycle_transition   = "autoscaling:EC2_INSTANCE_TERMINATING"

  notification_target_arn = var.aws_nth_queue_arn
  role_arn                = var.aws_nth_sqs_access_role_arn
}

Steps to Reproduce

tf plan and apply with above config , will throw the error

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 1 year ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue