Update your stack configuration!

Hi folks,

You will find an error when updating a stack which contains static EC2 instances (not ASG based).

The error will be shown on the stack which uses:

More or less here is how the error looks like:

Error: Error refreshing state: 6 error(s) occurred:

* data.http.ssh_infra_ansible: 1 error(s) occurred:
* data.http.ssh_infra_ansible: data.http.ssh_infra_ansible: HTTP request error. Response code: 404

* data.http.ssh_deploy_app: 1 error(s) occurred:
* data.http.ssh_deploy_app: data.http.ssh_deploy_app: HTTP request error. Response code: 404

* data.http.ssh_ec2_key: 1 error(s) occurred:
* data.http.ssh_ec2_key: data.http.ssh_ec2_key: HTTP request error. Response code: 404

* data.http.ssh_superadmin: 1 error(s) occurred:
* data.http.ssh_superadmin: data.http.ssh_superadmin: HTTP request error. Response code: 404

* data.http.ssh_pdadmin: 1 error(s) occurred:
* data.http.ssh_pdadmin: data.http.ssh_pdadmin: HTTP request error. Response code: 404

* data.http.ssh_tower: 1 error(s) occurred:
* data.http.ssh_tower: data.http.ssh_tower: HTTP request error. Response code: 404

What you should do

ec2-cluster module

source = "git::git@github.com:traveloka/terraform-tvlk-prod-aws-ec2-cluster.git?ref=0.3.14"

mongod-cluster module

source = "git@github.com:traveloka/terraform-tvlk-prod-aws-mongod-cluster.git?ref=v0.6.1"

no module

Here is the example of how all 4 points mentioned above looks like:
infra-production-playbooks@1445fe7

Root Cause

Since Ansible Tower has been decommissioned, we deleted an S3 bucket which used to store public keys of each product domain (infra-production-playbooks#3572). The keys, which injected to the instance on creation through user data, were used by Ansible Tower to establish SSH connections with the instance.