Closed pditommaso closed 10 months ago
This TOWER_HOSTNAME
is a value that Terraform is not handling.
I can send to the file the other stuff that is part of the Terraform code.
On the other hand, instead of making Terraform handle this, you can just type terraform output > output.txt
and you will get the same result.
Also, look at the format of terraform output:
database_url = "seqera-db.cedbg7vc0xjg.eu-west-2.rds.amazonaws.com"
redis_url = "seqera-terraform-aws-redis.gmzywf.ng.0001.euw2.cache.amazonaws.com"
Even if I create the file, you will still have to do grep and sed in your bash script.
This TOWER_HOSTNAME is a value that Terraform is not handling.
Why not, it's this
This TOWER_HOSTNAME is a value that Terraform is not handling.
Why not, it's this
Well, technically speaking this is the DNS name of the EC2 instance, which only exists if the instance is deployed in public subnet with public IP. According to Tower manifests naming convention TOWER_HOSTNAME
is something like "tower.example.com"
But we are still in the same situation. It comes out with terraform output
command and con be redirected to a file with >
so we keep terraform code clean.
It's my recommendation based on my experience, at the end of the day if this is what you want to do, I will do it.
But it's a bad practice to decrease the quality of what we are doing with the module because of bash scripts limitations.
I'd be curious to get this in front of customers before making this particular change, just to see if it's something that people ask for. We might be over-anticipating. Can we keep this suggestion in our back pockets for a future iteration if customers need it?
Well, technically speaking this is the DNS name of the EC2 instance
Not a useful comment
Solved
For the sake of the automation of the Ec2 deployment it would be usual to add in the terraform script the ability to dump the output params into a local file.
Ideally having this format: