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

Adding AzureFirewallThreatIntelMode property to firewall_resource #7414

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions azurerm/internal/services/network/firewall_resource.go
Expand Up @@ -79,6 +79,17 @@ func resourceArmFirewall() *schema.Resource {
},
},

"threat_intelligence_mode": {
Type: schema.TypeString,
Optional: true,
Default: string(network.AzureFirewallThreatIntelModeAlert),
ValidateFunc: validation.StringInSlice([]string{
string(network.AzureFirewallThreatIntelModeAlert),
string(network.AzureFirewallThreatIntelModeDeny),
string(network.AzureFirewallThreatIntelModeOff),
}, false),
},

"zones": azure.SchemaMultipleZones(),

"tags": tags.Schema(),
Expand Down Expand Up @@ -116,6 +127,7 @@ func resourceArmFirewallCreateUpdate(d *schema.ResourceData, meta interface{}) e
location := azure.NormalizeLocation(d.Get("location").(string))
t := d.Get("tags").(map[string]interface{})
ipConfigs, subnetToLock, vnetToLock, err := expandArmFirewallIPConfigurations(d)
threatIntelligenceMode := network.AzureFirewallThreatIntelMode(d.Get("threat_intelligence_mode").(string))
zones := azure.ExpandZones(d.Get("zones").([]interface{}))
if err != nil {
return fmt.Errorf("Error Building list of Azure Firewall IP Configurations: %+v", err)
Expand All @@ -135,6 +147,7 @@ func resourceArmFirewallCreateUpdate(d *schema.ResourceData, meta interface{}) e
Tags: tags.Expand(t),
AzureFirewallPropertiesFormat: &network.AzureFirewallPropertiesFormat{
IPConfigurations: ipConfigs,
ThreatIntelMode: threatIntelligenceMode,
},
Zones: zones,
}
Expand Down