wallix / awless

A Mighty CLI for AWS
http://awless.io/
Apache License 2.0
4.97k stars 263 forks source link

dry-running breaks creating tag for elasticip #246

Open mauricioscastro opened 5 years ago

mauricioscastro commented 5 years ago

when running a template, the dry run breaks while trying to create a 'dryrunid-xxxxx' while issuing create tag for a elasticip. later I can do a oneliner and tag it, right after all right. follows the output. this is not stopping me from using this lovely piece of software (thank you guys for this! so much), just a report. unfortunately I am not in a position to help although I would love to learn some go.

[verbose] awless v0.1.11 - loading AWS session with profile 'mdep' and region 'sa-east-1'
[verbose] Loaded template text:

vpc = create vpc cidr=192.168.0.0/16 name=mdep-cirrus-vpc
igw = create internetgateway
create tag resource=$igw key=Name value=mdep-cirrus-igw
attach internetgateway id=$igw vpc=$vpc
off_cluster_subnet = create subnet cidr=192.168.0.0/26 vpc=$vpc public=true name=mdep-cirrus-off-cluster-subnet availabilityzone=sa-east-1a
mng_cluster_subnet = create subnet cidr=192.168.0.64/26 vpc=$vpc name=mdep-cirrus-mng-cluster-subnet availabilityzone=sa-east-1a
create tag resource=$mng_cluster_subnet key=kubernetes.io/role/internal-elb value=1
rt1_cluster_subnet = create subnet cidr=192.168.1.0/24 vpc=$vpc name=mdep-cirrus-rt1-cluster-subnet availabilityzone=sa-east-1a
create tag resource=$rt1_cluster_subnet key=kubernetes.io/role/internal-elb value=1
rt = create routetable vpc=$vpc
create route table=$rt cidr=0.0.0.0/0 gateway=$igw
attach routetable id=$rt subnet=$off_cluster_subnet
ip_gw = create elasticip domain=vpc
create tag resource=$ip_gw key=Name value=mdep-cirrus-eip-natgw
ip_bast = create elasticip domain=vpc
ip_mng = create elasticip domain=vpc
ip_rt = create elasticip domain=vpc
natgw = create natgateway elasticip-id=$ip_gw subnet=$off_cluster_subnet
create tag resource=$natgw key=Name value=mdep-cirrus-natgw
check natgateway id=$natgw state=available timeout=300
natgw_rtable = create routetable vpc=$vpc
attach routetable id=$natgw_rtable subnet=$mng_cluster_subnet
attach routetable id=$natgw_rtable subnet=$rt1_cluster_subnet
create route cidr=0.0.0.0/0 gateway=$natgw table=$natgw_rtable
sg_control_plane = create securitygroup vpc=$vpc description="control plane sg for eks" name=mdep-cirrus-sg-control-plane

[info]    Dry running template ...
[verbose] dry run: create vpc ok
[verbose] dry run: create internetgateway ok
[verbose] dry run: create tag ok
[verbose] dry run: attach internetgateway ok
[verbose] dry run: create subnet ok
[verbose] dry run: create subnet ok
[verbose] dry run: create tag ok
[verbose] dry run: create subnet ok
[verbose] dry run: create tag ok
[verbose] dry run: create routetable ok
[verbose] dry run: create route ok
[verbose] dry run: attach routetable ok
[verbose] dry run: create elasticip ok
[error]   dry run: create tag: dry run: InvalidID: The ID 'dryrunid-746698' is not valid
    status code: 400, request id: d2a600f7-dd48-4106-9b1e-a910ef4711dd
[error]   Dry run failed