Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use private ip when the public is empty string #268

Merged
merged 12 commits into from
Sep 18, 2023
Merged

use private ip when the public is empty string #268

merged 12 commits into from
Sep 18, 2023

Conversation

elsegev
Copy link
Collaborator

@elsegev elsegev commented Sep 14, 2023

No description provided.

@@ -55,7 +55,7 @@ module "agent_gw" {
instance_profile_name = var.agent_gw_instance_profile_name

management_server_host_for_registration = module.mx[0].private_ip
management_server_host_for_api_access = module.mx[0].public_ip
management_server_host_for_api_access = module.mx[0].public_ip == null || module.mx[0].public_ip == "" ? module.mx[0].private_ip : module.mx[0].public_ip
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'module.mx[0].public_ip == ""' - this can't happen since you have disabled this option. Right?

If so, this reduces the readability of this fie. Please remove.

I think it is best to use coalesce function. Please consider -
https://developer.hashicorp.com/terraform/language/functions/coalesce

@elsegev elsegev temporarily deployed to test September 18, 2023 09:27 — with GitHub Actions Inactive
@elsegev elsegev temporarily deployed to test September 18, 2023 10:05 — with GitHub Actions Inactive
@elsegev elsegev temporarily deployed to test September 18, 2023 11:27 — with GitHub Actions Inactive
@elsegev elsegev temporarily deployed to test September 18, 2023 11:30 — with GitHub Actions Inactive
@elsegev elsegev temporarily deployed to test September 18, 2023 11:31 — with GitHub Actions Inactive
@elsegev elsegev temporarily deployed to test September 18, 2023 11:42 — with GitHub Actions Inactive
@elsegev elsegev temporarily deployed to test September 18, 2023 11:42 — with GitHub Actions Inactive
@elsegev elsegev temporarily deployed to test September 18, 2023 11:42 — with GitHub Actions Inactive
@elsegev elsegev merged commit 0ea0515 into dev Sep 18, 2023
4 checks passed
@elsegev elsegev temporarily deployed to test September 19, 2023 06:52 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants