Whether to enable Elastic IP switching code in user-data on wg server startup. If true, eip_id must also be set to the ID of the Elastic IP.
In the README there is a mention of eip_id with this description:
When 'use_eip' is enabled, specify the ID of the Elastic IP to which the VPN server will attach.
But the eip_id is never declared in variables.tf and thus never actually used inside main.tf.
By default use_eip = false but when you look at main.tf it will always create the elastic IP internally inside the module. There is no count = var.use_eip ? 1 : 0 as would be expected if the intent is to make it optional.
There is a discrepancy between the README/docs and that main.tf is actually doing.
Q: Is the used expected to create an elastic IP outside the module and pass it in or is the module responsible for managing the elastic IP when use_eip is set to true?
The description for
use_eip
invariables.tf
:Whether to enable Elastic IP switching code in user-data on wg server startup. If true, eip_id must also be set to the ID of the Elastic IP.
In the README there is a mention of
eip_id
with this description:When 'use_eip' is enabled, specify the ID of the Elastic IP to which the VPN server will attach.
But the
eip_id
is never declared invariables.tf
and thus never actually used insidemain.tf
.By default
use_eip = false
but when you look atmain.tf
it will always create the elastic IP internally inside the module. There is nocount = var.use_eip ? 1 : 0
as would be expected if the intent is to make it optional.There is a discrepancy between the README/docs and that
main.tf
is actually doing.Q: Is the used expected to create an elastic IP outside the module and pass it in or is the module responsible for managing the elastic IP when
use_eip
is set totrue
?