Hi, I have a simple ec2_group configuration like this:
- name: Create cc
hosts: localhost
tasks:
- name: Create security group
ec2_group:
name: cc
description: Security group for cc
region: ap-northeast-1
state: absent
rules:
- proto: tcp
from_port: 80
to_port: 80
- proto: tcp
from_port: 22
to_port: 22
To change this security group's configuration, it seems that I need delete it first and create a new one.
If I have an ec2 instance that is using that security group, I need to delete the instance.
What's the best practice here to change the configuration of ec2 security group and other ec2 module?