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

fix: maintain frontdoor tags #62

Merged
merged 2 commits into from
Jan 10, 2023

Conversation

pyrxm
Copy link
Contributor

@pyrxm pyrxm commented Jan 9, 2023

Closes: #61

Disclaimer: I don't get to write a lot of golang at the moment, please provide feedback if there's issues with my proposed fix.

Changes

  1. Add variable to read existing Front Door policy using PoliciesClient.Get().
  2. Set Tags to the value returned by PoliciesClient.Get()

Testing

  1. Build the infra in ./terraform
  2. Check the tags on the Azure Front Door WAF policy exist in Azure Portal
  3. Configure the config file ./config/config.yaml as per the Terraform and service principal (I also did rm ./config/resources/*.yaml for testing).
  4. Run go build
  5. Run ./ip-whitelister
  6. Re-check the tags on the Azure Front Door WAF policy exist in Azure Portal - the tags should remain.

@alec-pinson alec-pinson merged commit 6fb4e68 into alec-pinson:main Jan 10, 2023
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.

issue: ip-whitelister removes tags from Azure Front Door WAF policy on start
2 participants