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

New Resource: Web Application Firewall Policy #4119

Merged
merged 14 commits into from
Aug 30, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 57 additions & 52 deletions azurerm/internal/services/network/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,33 @@ import (
)

type Client struct {
ApplicationGatewaysClient *network.ApplicationGatewaysClient
ApplicationSecurityGroupsClient *network.ApplicationSecurityGroupsClient
AzureFirewallsClient *network.AzureFirewallsClient
ConnectionMonitorsClient *network.ConnectionMonitorsClient
DDOSProtectionPlansClient *network.DdosProtectionPlansClient
ExpressRouteAuthsClient *network.ExpressRouteCircuitAuthorizationsClient
ExpressRouteCircuitsClient *network.ExpressRouteCircuitsClient
ExpressRoutePeeringsClient *network.ExpressRouteCircuitPeeringsClient
InterfacesClient *network.InterfacesClient
LoadBalancersClient *network.LoadBalancersClient
LocalNetworkGatewaysClient *network.LocalNetworkGatewaysClient
ProfileClient *network.ProfilesClient
PacketCapturesClient *network.PacketCapturesClient
PublicIPsClient *network.PublicIPAddressesClient
PublicIPPrefixesClient *network.PublicIPPrefixesClient
RoutesClient *network.RoutesClient
RouteTablesClient *network.RouteTablesClient
SecurityGroupClient *network.SecurityGroupsClient
SecurityRuleClient *network.SecurityRulesClient
SubnetsClient *network.SubnetsClient
VnetGatewayConnectionsClient *network.VirtualNetworkGatewayConnectionsClient
VnetGatewayClient *network.VirtualNetworkGatewaysClient
VnetClient *network.VirtualNetworksClient
VnetPeeringsClient *network.VirtualNetworkPeeringsClient
VirtualWanClient *network.VirtualWansClient
WatcherClient *network.WatchersClient
ApplicationGatewaysClient *network.ApplicationGatewaysClient
ApplicationSecurityGroupsClient *network.ApplicationSecurityGroupsClient
AzureFirewallsClient *network.AzureFirewallsClient
ConnectionMonitorsClient *network.ConnectionMonitorsClient
DDOSProtectionPlansClient *network.DdosProtectionPlansClient
ExpressRouteAuthsClient *network.ExpressRouteCircuitAuthorizationsClient
ExpressRouteCircuitsClient *network.ExpressRouteCircuitsClient
ExpressRoutePeeringsClient *network.ExpressRouteCircuitPeeringsClient
InterfacesClient *network.InterfacesClient
LoadBalancersClient *network.LoadBalancersClient
LocalNetworkGatewaysClient *network.LocalNetworkGatewaysClient
ProfileClient *network.ProfilesClient
PacketCapturesClient *network.PacketCapturesClient
PublicIPsClient *network.PublicIPAddressesClient
PublicIPPrefixesClient *network.PublicIPPrefixesClient
RoutesClient *network.RoutesClient
RouteTablesClient *network.RouteTablesClient
SecurityGroupClient *network.SecurityGroupsClient
SecurityRuleClient *network.SecurityRulesClient
SubnetsClient *network.SubnetsClient
VnetGatewayConnectionsClient *network.VirtualNetworkGatewayConnectionsClient
VnetGatewayClient *network.VirtualNetworkGatewaysClient
VnetClient *network.VirtualNetworksClient
VnetPeeringsClient *network.VirtualNetworkPeeringsClient
VirtualWanClient *network.VirtualWansClient
WatcherClient *network.WatchersClient
WebApplicationFirewallPoliciesClient *network.WebApplicationFirewallPoliciesClient
}

func BuildClient(o *common.ClientOptions) *Client {
Expand Down Expand Up @@ -114,32 +115,36 @@ func BuildClient(o *common.ClientOptions) *Client {
WatcherClient := network.NewWatchersClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId)
o.ConfigureClient(&WatcherClient.Client, o.ResourceManagerAuthorizer)

WebApplicationFirewallPoliciesClient := network.NewWebApplicationFirewallPoliciesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId)
o.ConfigureClient(&WebApplicationFirewallPoliciesClient.Client, o.ResourceManagerAuthorizer)

return &Client{
ApplicationGatewaysClient: &ApplicationGatewaysClient,
ApplicationSecurityGroupsClient: &ApplicationSecurityGroupsClient,
AzureFirewallsClient: &AzureFirewallsClient,
ConnectionMonitorsClient: &ConnectionMonitorsClient,
DDOSProtectionPlansClient: &DDOSProtectionPlansClient,
ExpressRouteAuthsClient: &ExpressRouteAuthsClient,
ExpressRouteCircuitsClient: &ExpressRouteCircuitsClient,
ExpressRoutePeeringsClient: &ExpressRoutePeeringsClient,
InterfacesClient: &InterfacesClient,
LoadBalancersClient: &LoadBalancersClient,
LocalNetworkGatewaysClient: &LocalNetworkGatewaysClient,
ProfileClient: &ProfileClient,
PacketCapturesClient: &PacketCapturesClient,
PublicIPsClient: &PublicIPsClient,
PublicIPPrefixesClient: &PublicIPPrefixesClient,
RoutesClient: &RoutesClient,
RouteTablesClient: &RouteTablesClient,
SecurityGroupClient: &SecurityGroupClient,
SecurityRuleClient: &SecurityRuleClient,
SubnetsClient: &SubnetsClient,
VnetGatewayConnectionsClient: &VnetGatewayConnectionsClient,
VnetGatewayClient: &VnetGatewayClient,
VnetClient: &VnetClient,
VnetPeeringsClient: &VnetPeeringsClient,
VirtualWanClient: &VirtualWanClient,
WatcherClient: &WatcherClient,
ApplicationGatewaysClient: &ApplicationGatewaysClient,
ApplicationSecurityGroupsClient: &ApplicationSecurityGroupsClient,
AzureFirewallsClient: &AzureFirewallsClient,
ConnectionMonitorsClient: &ConnectionMonitorsClient,
DDOSProtectionPlansClient: &DDOSProtectionPlansClient,
ExpressRouteAuthsClient: &ExpressRouteAuthsClient,
ExpressRouteCircuitsClient: &ExpressRouteCircuitsClient,
ExpressRoutePeeringsClient: &ExpressRoutePeeringsClient,
InterfacesClient: &InterfacesClient,
LoadBalancersClient: &LoadBalancersClient,
LocalNetworkGatewaysClient: &LocalNetworkGatewaysClient,
ProfileClient: &ProfileClient,
PacketCapturesClient: &PacketCapturesClient,
PublicIPsClient: &PublicIPsClient,
PublicIPPrefixesClient: &PublicIPPrefixesClient,
RoutesClient: &RoutesClient,
RouteTablesClient: &RouteTablesClient,
SecurityGroupClient: &SecurityGroupClient,
SecurityRuleClient: &SecurityRuleClient,
SubnetsClient: &SubnetsClient,
VnetGatewayConnectionsClient: &VnetGatewayConnectionsClient,
VnetGatewayClient: &VnetGatewayClient,
VnetClient: &VnetClient,
VnetPeeringsClient: &VnetPeeringsClient,
VirtualWanClient: &VirtualWanClient,
WatcherClient: &WatcherClient,
WebApplicationFirewallPoliciesClient: &WebApplicationFirewallPoliciesClient,
}
}
1 change: 1 addition & 0 deletions azurerm/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ func Provider() terraform.ResourceProvider {
"azurerm_virtual_network_peering": resourceArmVirtualNetworkPeering(),
"azurerm_virtual_network": resourceArmVirtualNetwork(),
"azurerm_virtual_wan": resourceArmVirtualWan(),
"azurerm_web_application_firewall_policy": resourceArmWebApplicationFirewallPolicy(),
}

for _, service := range supportedServices {
Expand Down
Loading