aws-samples / amazon-ec2-global-dashboard

Monitor how many EC2 instances are running across all regions with a simple dashboard.
Other
31 stars 10 forks source link

The following resource types are not supported for resource import: AWS::EC2::EIPAssociation,AWS::EC2::EIPAssociation,AWS::EC2::EIPAssociation #4

Open shaminms opened 1 year ago

shaminms commented 1 year ago

I have been using my cloud formation template for long time. After a few weeks gap today when I tried to deploy a VM using my cloud formation template I am getting the following error.

The following resource types are not supported for resource import: AWS::EC2::EIPAssociation,AWS::EC2::EIPAssociation,AWS::EC2::EIPAssociation is it because the listed resource can no longer support import function ? what is the work around ?

xonor commented 1 year ago

Hello shaminms,

Thank you for reaching out. Sorry to hear about the issue you described.

Is your issue specifically related to the aws-samples/amazon-ec2-global-dashboard repository?

The CloudFormation template provided in the repository does not contain the AWS::EC2::EIPAssociation resource. So, I'm a bit confused.

Can you please elaborate.

Looking forward to your update.

shaminms commented 1 year ago

Sorry for the confusion. The issue is not with aws-samples/amazon-ec2-global-dashboard template. The issue is with my own private template which I have been using for long time.

xonor commented 1 year ago

Thank you for the update.

Can you please check my previous comment linked below and let me know if it helps:

If not, we can dive deeper into the issue and try resolve.

amolksagar commented 1 month ago

Hi @xonor ,

I have a genuine case of Stack import where my CFN stack is drifted. The stack seems to be lagging behind the AWS resources in terms of some resource properties i.e. The actual AWS Resources have correct properties and CFN stack has incorrect properties

Steps I have taken so far for 2 drifted resources of type AWS::ECS::TaskDefinition and AWS::ECS::Service:

  1. Updated the DeletionPolicy and UpdateReplacePolicy to 'Retain' and deployed the stack
  2. Commented the code for AWS::ECS::TaskDefinition and AWS::ECS::Service in the template and deployed the stack again
  3. Problematic step: Selected 'Import resources into stack' and selected the updated template which has resources of type AWS::ECS::TaskDefinition and AWS::ECS::Service redefined. I am getting an error 'The following resource types are not supported for resource import: AWS::EC2::SecurityGroupIngress,AWS::ElasticLoadBalancingV2::ListenerRule' .
  4. If you notice I am not even trying to import SecurityGroupIngress and ListenerRule but it still complains about it.

What can be done in this case? Can I try to UPDATE the stack straight away with the new values instead of using the 'Import into stack'?