-
Notifications
You must be signed in to change notification settings - Fork 826
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
azfw quickstarts #245
azfw quickstarts #245
Conversation
adding azfw quickstarts
The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
Looks great. I have a few minor comments and questions.
provider "azurerm" { | ||
features { | ||
resource_group { | ||
prevent_deletion_if_contains_resources = false // Set to True for Production |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to set this to false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this is quickstart its mainly used for testing so if they want to destroy and tear it down this will delete everything. I have run into issues in the past where some resources is hanging around and doesnt delete the resource group so this at least forces it all to be removed and customers dont have resources hanging around.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can remove if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're using a pattern where you're specifying a flag at the RG level to delete everything in the RG should the encompassed entity not automatically delete. However, many times, a lower-level entity has its own flag for this purpose. For example, let's say you have a VM with a disk. instead of using prevent_deletion_if_contains_resources
at the RG level, you can use delete_data_disks_on_termination
at the VM level, which deletes the disk when the VM is deleted. The Terraform PG prefers this latter pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it thanks Tom, i updated it with the virtual machine feature.
variable "admin_username" { | ||
default = "azureuser" | ||
} | ||
variable "admin_password" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be marked as sensitive. Just add
sensitive = true
after default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added senstive to the admin_password in the output.tf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added my comments.
@@ -0,0 +1,228 @@ | |||
# Deploy Azure Firewall and a Firewall Policy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
README.md file name needs to be renamed to lowercase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did that and it broke it. There seems to be no consistency with other quickstarts since some are lower case and some are upper case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, there is inconsistency as many samples were created before we started defining a standard for the samples. All new samples have a much higher bar than previous samples. However, we don't have the resources to go back and retroactively update every sample. Instead, we enforce the standards on new samples and when we need to fix older samples, we apply the standards then. The lack of consistency across the repo is why I referred to specific examples for you to follow in my comments.
| `tags` | tags to organize your resources | | ||
| `fw_sku` | Sku size for your Firewall and Firewall Policy | | ||
|
||
## Example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the plan output from this section. This section should just point to the article. See https://github.com/Azure/terraform/tree/master/quickstart/101-front-door-standard-premium. If you don't know the title and URL of the article, I'll update those values when I generate the article from this sample code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed code. Doc is not ready yet. Can update once doc is published.
variable "admin_username" { | ||
default = "azureuser" | ||
} | ||
variable "admin_password" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To maintain consistency with the sample showing how to create a Windows VM, please generate the password as in the Windows VM creation article. Remember to output the randomly generated password.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the generate password to the main.tf and output.tf password for each vm following the docs. Please let me know if I need to fix it.
Happy to change it but it seems there is no consistency when looking at the different quickstarts. |
This needs to be updated in other quickstarts because the plan output is in other readme's |
I was following the FIrewall terraform quickstart that had the plan output in the README. I removed the output from the README. |
@grayzu @TomArcherMsft Just checking in to see if there are any more changes are needed. Thanks! |
Hi, @cshea15. I wasn't aware that you were ready for another review. I'll do that either today or tomorrow. Thanks! |
no problem, I reviewed all the comments, made the changes, and added comments. Let me know if there is anything I missed. Thanks again! |
@cshea15 Reviewing now. Please do not push any new commits until I'm done. Thanks! |
@grayzu @lonegunmanb I've completed my review. Could you please review & merge when you get a chance? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @cshea15, LGTM!
Created two quickstarts for Azure Firewall.
Deploy Azure Firewall with Azure Policy
Deploy Azure Firewall with Azure Policy in a Secure Hub
The plan is to add these two quickstarts to the Firewall Manager docs. https://learn.microsoft.com/en-us/azure/firewall-manager/quick-secure-virtual-hub-bicep?tabs=CLI