Saturday, 20 November 2021

Do this on your AGIC

 Hi all, 

i would like to share some finding you are deploying application gateway ingress controller or AGIC in short form. 


There behavior of it keep deploying defaultaddresspool and the address pool that u specify in your terraform code. 

 backend_address_pool {

   name = "${var.agname}-beap"

   fqdns = [

        "dummy"

      ]

So let say your var.agname is AGIC.. so defaultaddresspool  and AGIC-beap backend pool will replacing each other everytime you  run terraform apply. 

After searching then i found there some workaround which some lifecycle management has been added to ignore the changes of the block listed in it. 

  lifecycle {

  ignore_changes = [

    backend_address_pool,

    backend_http_settings,

    frontend_port,

    http_listener,

    probe,

    redirect_configuration,

    request_routing_rule,

    ssl_certificate,

    tags,

    url_path_map,

  ]

}

source : stackoverflow 

some other workaround i tested before getting to this is edit the gateway time and set the agic reconcile  

after all been added according and i try to deploy 3 sample with agic, it is all running smoothly,,



 so why not i reshare the finding on stackoverflow and what i done here for your reading, sample to try this available on my terraform github .




Do this on your AGIC