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

Changing AWS ELB cert resulting in error and second launch conf. #4673

Closed
aldarund opened this issue Jan 14, 2016 · 3 comments
Closed

Changing AWS ELB cert resulting in error and second launch conf. #4673

aldarund opened this issue Jan 14, 2016 · 3 comments

Comments

@aldarund
Copy link

If i want to change elb cert it resulting in error at apply stage and second launch configuration are created by terraform that are not deleted, so two launch conf will be in place after apply.

Plan was:

Path: /terraform/terraform.tfplan

~ aws_autoscaling_group.ecs
    launch_configuration: "ecs-rentapp-launch-sfl55i5olfhvtdldbo4bigwlzy" => "${aws_launch_configuration.ecs.name}"

~ aws_elb.rentapp_service
    listener.2113473723.instance_port:       "9999" => "0"
    listener.2113473723.instance_protocol:   "http" => ""
    listener.2113473723.lb_port:             "443" => "0"
    listener.2113473723.lb_protocol:         "https" => ""
    listener.2113473723.ssl_certificate_id:  "arn:aws:iam::133662108267:server-certificate/some_test_cert" => ""
    listener.2673987931.instance_port:       "9999" => "9999"
    listener.2673987931.instance_protocol:   "http" => "HTTP"
    listener.2673987931.lb_port:             "80" => "80"
    listener.2673987931.lb_protocol:         "http" => "HTTP"
    listener.2673987931.ssl_certificate_id:  "" => ""
    listener.~3306491374.instance_port:      "" => "9999"
    listener.~3306491374.instance_protocol:  "" => "HTTP"
    listener.~3306491374.lb_port:            "" => "443"
    listener.~3306491374.lb_protocol:        "" => "https"
    listener.~3306491374.ssl_certificate_id: "" => "${aws_iam_server_certificate.rent_cert.arn}"

-/+ aws_iam_server_certificate.rent_cert
    arn:              "arn:aws:iam::133662108267:server-certificate/some_test_cert" => "<computed>"
    certificate_body: "c35c92ef60c0e74ebdab7a9fab020f41c3d4bef7" => "86b59f743a4d2f7c42660f19ba49a59b683d8f54" (forces new resource)
    name:             "some_test_cert" => "some_test_cert"
    path:             "/" => "/"
    private_key:      "47d42cf5a4df2c7cc198f5d28d713c8f85e161c1" => "c0622718e3021e5d27aeff044b3abf108916c141" (forces new resource)

+ aws_launch_configuration.ecs
    associate_public_ip_address: "" => "0"
    ebs_block_device.#:          "" => "<computed>"
    ebs_optimized:               "" => "<computed>"
    enable_monitoring:           "" => "1"
    iam_instance_profile:        "" => "ecs-instance-profile"
    image_id:                    "" => "ami-2b3b6041"
    instance_type:               "" => "m3.medium"
    key_name:                    "" => "deployer-key"
    name:                        "" => "<computed>"
    name_prefix:                 "" => "ecs-rentapp-launch-"
    root_block_device.#:         "" => "<computed>"
    security_groups.#:           "" => "1"
    security_groups.65002500:    "" => "sg-7326bc0a"
    user_data:                   "" => "52ae45671014952dd7ca831856e3f7e566a9a96e"


Plan: 2 to add, 2 to change, 1 to destroy.

Result

Refreshing Terraform state prior to plan...
aws_iam_server_certificate.rent_cert: Destroying...
aws_launch_configuration.ecs: Creating...
  associate_public_ip_address: "" => "0"
  ebs_block_device.#:          "" => "<computed>"
  ebs_optimized:               "" => "<computed>"
  enable_monitoring:           "" => "1"
  iam_instance_profile:        "" => "ecs-instance-profile"
  image_id:                    "" => "ami-2b3b6041"
  instance_type:               "" => "m3.medium"
  key_name:                    "" => "deployer-key"
  name:                        "" => "<computed>"
  name_prefix:                 "" => "ecs-rentapp-launch-"
  root_block_device.#:         "" => "<computed>"
  security_groups.#:           "" => "1"
  security_groups.65002500:    "" => "sg-7326bc0a"
  user_data:                   "" => "52ae45671014952dd7ca831856e3f7e566a9a96e"
aws_launch_configuration.ecs: Creation complete
Error applying plan:

1 error(s) occurred:

* aws_iam_server_certificate.rent_cert: [WARN] Conflict deleting server certificate: Certificate: ASCAIN22VALXE7QYJO6OY is currently in use by arn:aws:elasticloadbalancing:us-east-1:133662108267:loadbalancer/rentapp-service-elb. Please remove it first before deleting it from IAM., retrying
@catsby
Copy link
Contributor

catsby commented Feb 17, 2016

Hello – this should be mostly addressed in #5178, though you would need to omit the name value from the iam_server_certificate

@stack72
Copy link
Contributor

stack72 commented Feb 22, 2016

Hi @aldarund, this has been fixed now that #5178 has been merged. It will be available in Terraform 0.6.12 in 1 or 2 days

@stack72 stack72 closed this as completed Feb 22, 2016
@ghost
Copy link

ghost commented Apr 28, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants