Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

EIP is not associated to new instance after instance recreation #239

@endrec

Description

@endrec

What happened?

I have created an EC2 instnace, and an Elastic IP, which references the instance.
After the instance is deleted and recreated, EIP is not re-attached to the new instance.
(Workaround: manually remove spec.forProvider.instance from EIP.)

How can we reproduce it?

  1. Create an EC2 instance:
apiVersion: ec2.aws.jet.crossplane.io/v1alpha2
kind: Instance
metadata:
  name: test-server
spec:
  providerConfigRef:
    name: aws-provider
  forProvider:
    region: eu-west-2 # or any other, as long as it is same as eip
    # Not important for reproduction, whatever you need to have a running instance
    [...]
  1. Create an EIP:
apiVersion: ec2.aws.jet.crossplane.io/v1alpha2
kind: EIP
metadata:
  name: test-eip
spec:
  providerConfigRef:
    name: aws-provider
  forProvider:
    region: eu-west-2 # or any other, as long as it is same as instance
    vpc: true
    instanceRef:
      name: test-server
  1. Apply both instance and EIP manifests, and observe they are synchronised and ready.
  2. kubectl delete instance.ec2.aws.jet.crossplane.io/test-server, and reapply instance manifest.
  3. After instance is synchronised and ready, observe EIP is not reattached.

What environment did it happen in?

Crossplane version: v0.5.0-preview
EKS: 1.21

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions