Ddos Protection Plan
Manages an AzureNetwork DDoS Protection Plan.
NOTE Azure only allows
one
DDoS Protection Plan per region. NOTE The DDoS Protection Plan is a high-cost service. Please keep this in mind while testing and learning.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-resources",
location: "West Europe",
});
const exampleDdosProtectionPlan = new azure.network.DdosProtectionPlan("example", {
name: "example-protection-plan",
location: example.location,
resourceGroupName: example.name,
});
Content copied to clipboard
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_ddos_protection_plan = azure.network.DdosProtectionPlan("example",
name="example-protection-plan",
location=example.location,
resource_group_name=example.name)
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-resources",
Location = "West Europe",
});
var exampleDdosProtectionPlan = new Azure.Network.DdosProtectionPlan("example", new()
{
Name = "example-protection-plan",
Location = example.Location,
ResourceGroupName = example.Name,
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
_, err = network.NewDdosProtectionPlan(ctx, "example", &network.DdosProtectionPlanArgs{
Name: pulumi.String("example-protection-plan"),
Location: example.Location,
ResourceGroupName: example.Name,
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.network.DdosProtectionPlan;
import com.pulumi.azure.network.DdosProtectionPlanArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleDdosProtectionPlan = new DdosProtectionPlan("exampleDdosProtectionPlan", DdosProtectionPlanArgs.builder()
.name("example-protection-plan")
.location(example.location())
.resourceGroupName(example.name())
.build());
}
}
Content copied to clipboard
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleDdosProtectionPlan:
type: azure:network:DdosProtectionPlan
name: example
properties:
name: example-protection-plan
location: ${example.location}
resourceGroupName: ${example.name}
Content copied to clipboard
Import
Azure DDoS Protection Plan can be imported using the resource id
, e.g.
$ pulumi import azure:network/ddosProtectionPlan:DdosProtectionPlan example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/ddosProtectionPlans/testddospplan
Content copied to clipboard
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
Link copied to clipboard
A list of Virtual Network IDs associated with the DDoS Protection Plan.