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

Improve usage of optionals in FAST stage 2 VPN variables #1797

Merged
merged 1 commit into from Oct 23, 2023

Conversation

ludoo
Copy link
Collaborator

@ludoo ludoo commented Oct 23, 2023

The current code requires to specify dev/prod/landing and their ASNs in order to set custom advertising even for a single environment. This PR adopts a more modern strategy which we use extensively in modules, and extends the use of optionals in the vpn_configs variable type, so the following code is not needed if only the landing advertisements need to be set.

vpn_configs = {
  # this needs to remain like defaults
  dev = {
    asn = 65501
  }
  landing = {
    # this needs to remain like defaults
    asn = 65500
    custom_advertise = {
      # this is what we really want to set
    }
  }
 # this needs to remain like defaults
  prod = {
    asn = 65502
  }
}

@ludoo ludoo merged commit a93f08e into master Oct 23, 2023
13 checks passed
@ludoo ludoo deleted the ludo/fast-net-vpn-optionals branch October 23, 2023 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants