1. Packages
  2. Azure Classic
  3. API Docs
  4. mssql
  5. ManagedInstanceVulnerabilityAssessment

We recommend using Azure Native.

Azure Classic v5.49.0 published on Tuesday, Aug 29, 2023 by Pulumi

azure.mssql.ManagedInstanceVulnerabilityAssessment

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.49.0 published on Tuesday, Aug 29, 2023 by Pulumi

    Manages the Vulnerability Assessment for an MS Managed Instance.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
        {
            Location = "West Europe",
        });
    
        var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("exampleVirtualNetwork", new()
        {
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
            AddressSpaces = new[]
            {
                "10.0.0.0/16",
            },
        });
    
        var exampleSubnet = new Azure.Network.Subnet("exampleSubnet", new()
        {
            ResourceGroupName = exampleResourceGroup.Name,
            VirtualNetworkName = exampleVirtualNetwork.Name,
            AddressPrefixes = new[]
            {
                "10.0.2.0/24",
            },
        });
    
        var exampleManagedInstance = new Azure.MSSql.ManagedInstance("exampleManagedInstance", new()
        {
            ResourceGroupName = exampleResourceGroup.Name,
            Location = exampleResourceGroup.Location,
            LicenseType = "BasePrice",
            SkuName = "GP_Gen5",
            StorageSizeInGb = 32,
            SubnetId = exampleSubnet.Id,
            Vcores = 4,
            AdministratorLogin = "missadministrator",
            AdministratorLoginPassword = "NCC-1701-D",
        });
    
        var exampleAccount = new Azure.Storage.Account("exampleAccount", new()
        {
            ResourceGroupName = exampleResourceGroup.Name,
            Location = exampleResourceGroup.Location,
            AccountTier = "Standard",
            AccountReplicationType = "GRS",
        });
    
        var exampleContainer = new Azure.Storage.Container("exampleContainer", new()
        {
            StorageAccountName = exampleAccount.Name,
            ContainerAccessType = "private",
        });
    
        var exampleManagedInstanceSecurityAlertPolicy = new Azure.MSSql.ManagedInstanceSecurityAlertPolicy("exampleManagedInstanceSecurityAlertPolicy", new()
        {
            ResourceGroupName = azurerm_resource_group.Test.Name,
            ManagedInstanceName = azurerm_mssql_managed_instance.Test.Name,
            Enabled = true,
            StorageEndpoint = azurerm_storage_account.Test.Primary_blob_endpoint,
            StorageAccountAccessKey = azurerm_storage_account.Test.Primary_access_key,
            RetentionDays = 30,
        });
    
        var exampleManagedInstanceVulnerabilityAssessment = new Azure.MSSql.ManagedInstanceVulnerabilityAssessment("exampleManagedInstanceVulnerabilityAssessment", new()
        {
            ManagedInstanceId = exampleManagedInstance.Id,
            StorageContainerPath = Output.Tuple(exampleAccount.PrimaryBlobEndpoint, exampleContainer.Name).Apply(values =>
            {
                var primaryBlobEndpoint = values.Item1;
                var name = values.Item2;
                return $"{primaryBlobEndpoint}{name}/";
            }),
            StorageAccountAccessKey = exampleAccount.PrimaryAccessKey,
            RecurringScans = new Azure.MSSql.Inputs.ManagedInstanceVulnerabilityAssessmentRecurringScansArgs
            {
                Enabled = true,
                EmailSubscriptionAdmins = true,
                Emails = new[]
                {
                    "email@example1.com",
                    "email@example2.com",
                },
            },
        }, new CustomResourceOptions
        {
            DependsOn = new[]
            {
                exampleManagedInstanceSecurityAlertPolicy,
            },
        });
    
    });
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/mssql"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/storage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "exampleVirtualNetwork", &network.VirtualNetworkArgs{
    			Location:          exampleResourceGroup.Location,
    			ResourceGroupName: exampleResourceGroup.Name,
    			AddressSpaces: pulumi.StringArray{
    				pulumi.String("10.0.0.0/16"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleSubnet, err := network.NewSubnet(ctx, "exampleSubnet", &network.SubnetArgs{
    			ResourceGroupName:  exampleResourceGroup.Name,
    			VirtualNetworkName: exampleVirtualNetwork.Name,
    			AddressPrefixes: pulumi.StringArray{
    				pulumi.String("10.0.2.0/24"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleManagedInstance, err := mssql.NewManagedInstance(ctx, "exampleManagedInstance", &mssql.ManagedInstanceArgs{
    			ResourceGroupName:          exampleResourceGroup.Name,
    			Location:                   exampleResourceGroup.Location,
    			LicenseType:                pulumi.String("BasePrice"),
    			SkuName:                    pulumi.String("GP_Gen5"),
    			StorageSizeInGb:            pulumi.Int(32),
    			SubnetId:                   exampleSubnet.ID(),
    			Vcores:                     pulumi.Int(4),
    			AdministratorLogin:         pulumi.String("missadministrator"),
    			AdministratorLoginPassword: pulumi.String("NCC-1701-D"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleAccount, err := storage.NewAccount(ctx, "exampleAccount", &storage.AccountArgs{
    			ResourceGroupName:      exampleResourceGroup.Name,
    			Location:               exampleResourceGroup.Location,
    			AccountTier:            pulumi.String("Standard"),
    			AccountReplicationType: pulumi.String("GRS"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleContainer, err := storage.NewContainer(ctx, "exampleContainer", &storage.ContainerArgs{
    			StorageAccountName:  exampleAccount.Name,
    			ContainerAccessType: pulumi.String("private"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleManagedInstanceSecurityAlertPolicy, err := mssql.NewManagedInstanceSecurityAlertPolicy(ctx, "exampleManagedInstanceSecurityAlertPolicy", &mssql.ManagedInstanceSecurityAlertPolicyArgs{
    			ResourceGroupName:       pulumi.Any(azurerm_resource_group.Test.Name),
    			ManagedInstanceName:     pulumi.Any(azurerm_mssql_managed_instance.Test.Name),
    			Enabled:                 pulumi.Bool(true),
    			StorageEndpoint:         pulumi.Any(azurerm_storage_account.Test.Primary_blob_endpoint),
    			StorageAccountAccessKey: pulumi.Any(azurerm_storage_account.Test.Primary_access_key),
    			RetentionDays:           pulumi.Int(30),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = mssql.NewManagedInstanceVulnerabilityAssessment(ctx, "exampleManagedInstanceVulnerabilityAssessment", &mssql.ManagedInstanceVulnerabilityAssessmentArgs{
    			ManagedInstanceId: exampleManagedInstance.ID(),
    			StorageContainerPath: pulumi.All(exampleAccount.PrimaryBlobEndpoint, exampleContainer.Name).ApplyT(func(_args []interface{}) (string, error) {
    				primaryBlobEndpoint := _args[0].(string)
    				name := _args[1].(string)
    				return fmt.Sprintf("%v%v/", primaryBlobEndpoint, name), nil
    			}).(pulumi.StringOutput),
    			StorageAccountAccessKey: exampleAccount.PrimaryAccessKey,
    			RecurringScans: &mssql.ManagedInstanceVulnerabilityAssessmentRecurringScansArgs{
    				Enabled:                 pulumi.Bool(true),
    				EmailSubscriptionAdmins: pulumi.Bool(true),
    				Emails: pulumi.StringArray{
    					pulumi.String("email@example1.com"),
    					pulumi.String("email@example2.com"),
    				},
    			},
    		}, pulumi.DependsOn([]pulumi.Resource{
    			exampleManagedInstanceSecurityAlertPolicy,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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.VirtualNetwork;
    import com.pulumi.azure.network.VirtualNetworkArgs;
    import com.pulumi.azure.network.Subnet;
    import com.pulumi.azure.network.SubnetArgs;
    import com.pulumi.azure.mssql.ManagedInstance;
    import com.pulumi.azure.mssql.ManagedInstanceArgs;
    import com.pulumi.azure.storage.Account;
    import com.pulumi.azure.storage.AccountArgs;
    import com.pulumi.azure.storage.Container;
    import com.pulumi.azure.storage.ContainerArgs;
    import com.pulumi.azure.mssql.ManagedInstanceSecurityAlertPolicy;
    import com.pulumi.azure.mssql.ManagedInstanceSecurityAlertPolicyArgs;
    import com.pulumi.azure.mssql.ManagedInstanceVulnerabilityAssessment;
    import com.pulumi.azure.mssql.ManagedInstanceVulnerabilityAssessmentArgs;
    import com.pulumi.azure.mssql.inputs.ManagedInstanceVulnerabilityAssessmentRecurringScansArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
                .location("West Europe")
                .build());
    
            var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()        
                .location(exampleResourceGroup.location())
                .resourceGroupName(exampleResourceGroup.name())
                .addressSpaces("10.0.0.0/16")
                .build());
    
            var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()        
                .resourceGroupName(exampleResourceGroup.name())
                .virtualNetworkName(exampleVirtualNetwork.name())
                .addressPrefixes("10.0.2.0/24")
                .build());
    
            var exampleManagedInstance = new ManagedInstance("exampleManagedInstance", ManagedInstanceArgs.builder()        
                .resourceGroupName(exampleResourceGroup.name())
                .location(exampleResourceGroup.location())
                .licenseType("BasePrice")
                .skuName("GP_Gen5")
                .storageSizeInGb(32)
                .subnetId(exampleSubnet.id())
                .vcores(4)
                .administratorLogin("missadministrator")
                .administratorLoginPassword("NCC-1701-D")
                .build());
    
            var exampleAccount = new Account("exampleAccount", AccountArgs.builder()        
                .resourceGroupName(exampleResourceGroup.name())
                .location(exampleResourceGroup.location())
                .accountTier("Standard")
                .accountReplicationType("GRS")
                .build());
    
            var exampleContainer = new Container("exampleContainer", ContainerArgs.builder()        
                .storageAccountName(exampleAccount.name())
                .containerAccessType("private")
                .build());
    
            var exampleManagedInstanceSecurityAlertPolicy = new ManagedInstanceSecurityAlertPolicy("exampleManagedInstanceSecurityAlertPolicy", ManagedInstanceSecurityAlertPolicyArgs.builder()        
                .resourceGroupName(azurerm_resource_group.test().name())
                .managedInstanceName(azurerm_mssql_managed_instance.test().name())
                .enabled(true)
                .storageEndpoint(azurerm_storage_account.test().primary_blob_endpoint())
                .storageAccountAccessKey(azurerm_storage_account.test().primary_access_key())
                .retentionDays(30)
                .build());
    
            var exampleManagedInstanceVulnerabilityAssessment = new ManagedInstanceVulnerabilityAssessment("exampleManagedInstanceVulnerabilityAssessment", ManagedInstanceVulnerabilityAssessmentArgs.builder()        
                .managedInstanceId(exampleManagedInstance.id())
                .storageContainerPath(Output.tuple(exampleAccount.primaryBlobEndpoint(), exampleContainer.name()).applyValue(values -> {
                    var primaryBlobEndpoint = values.t1;
                    var name = values.t2;
                    return String.format("%s%s/", primaryBlobEndpoint,name);
                }))
                .storageAccountAccessKey(exampleAccount.primaryAccessKey())
                .recurringScans(ManagedInstanceVulnerabilityAssessmentRecurringScansArgs.builder()
                    .enabled(true)
                    .emailSubscriptionAdmins(true)
                    .emails(                
                        "email@example1.com",
                        "email@example2.com")
                    .build())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(exampleManagedInstanceSecurityAlertPolicy)
                    .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
    example_virtual_network = azure.network.VirtualNetwork("exampleVirtualNetwork",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        address_spaces=["10.0.0.0/16"])
    example_subnet = azure.network.Subnet("exampleSubnet",
        resource_group_name=example_resource_group.name,
        virtual_network_name=example_virtual_network.name,
        address_prefixes=["10.0.2.0/24"])
    example_managed_instance = azure.mssql.ManagedInstance("exampleManagedInstance",
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location,
        license_type="BasePrice",
        sku_name="GP_Gen5",
        storage_size_in_gb=32,
        subnet_id=example_subnet.id,
        vcores=4,
        administrator_login="missadministrator",
        administrator_login_password="NCC-1701-D")
    example_account = azure.storage.Account("exampleAccount",
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location,
        account_tier="Standard",
        account_replication_type="GRS")
    example_container = azure.storage.Container("exampleContainer",
        storage_account_name=example_account.name,
        container_access_type="private")
    example_managed_instance_security_alert_policy = azure.mssql.ManagedInstanceSecurityAlertPolicy("exampleManagedInstanceSecurityAlertPolicy",
        resource_group_name=azurerm_resource_group["test"]["name"],
        managed_instance_name=azurerm_mssql_managed_instance["test"]["name"],
        enabled=True,
        storage_endpoint=azurerm_storage_account["test"]["primary_blob_endpoint"],
        storage_account_access_key=azurerm_storage_account["test"]["primary_access_key"],
        retention_days=30)
    example_managed_instance_vulnerability_assessment = azure.mssql.ManagedInstanceVulnerabilityAssessment("exampleManagedInstanceVulnerabilityAssessment",
        managed_instance_id=example_managed_instance.id,
        storage_container_path=pulumi.Output.all(example_account.primary_blob_endpoint, example_container.name).apply(lambda primary_blob_endpoint, name: f"{primary_blob_endpoint}{name}/"),
        storage_account_access_key=example_account.primary_access_key,
        recurring_scans=azure.mssql.ManagedInstanceVulnerabilityAssessmentRecurringScansArgs(
            enabled=True,
            email_subscription_admins=True,
            emails=[
                "email@example1.com",
                "email@example2.com",
            ],
        ),
        opts=pulumi.ResourceOptions(depends_on=[example_managed_instance_security_alert_policy]))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
    const exampleVirtualNetwork = new azure.network.VirtualNetwork("exampleVirtualNetwork", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        addressSpaces: ["10.0.0.0/16"],
    });
    const exampleSubnet = new azure.network.Subnet("exampleSubnet", {
        resourceGroupName: exampleResourceGroup.name,
        virtualNetworkName: exampleVirtualNetwork.name,
        addressPrefixes: ["10.0.2.0/24"],
    });
    const exampleManagedInstance = new azure.mssql.ManagedInstance("exampleManagedInstance", {
        resourceGroupName: exampleResourceGroup.name,
        location: exampleResourceGroup.location,
        licenseType: "BasePrice",
        skuName: "GP_Gen5",
        storageSizeInGb: 32,
        subnetId: exampleSubnet.id,
        vcores: 4,
        administratorLogin: "missadministrator",
        administratorLoginPassword: "NCC-1701-D",
    });
    const exampleAccount = new azure.storage.Account("exampleAccount", {
        resourceGroupName: exampleResourceGroup.name,
        location: exampleResourceGroup.location,
        accountTier: "Standard",
        accountReplicationType: "GRS",
    });
    const exampleContainer = new azure.storage.Container("exampleContainer", {
        storageAccountName: exampleAccount.name,
        containerAccessType: "private",
    });
    const exampleManagedInstanceSecurityAlertPolicy = new azure.mssql.ManagedInstanceSecurityAlertPolicy("exampleManagedInstanceSecurityAlertPolicy", {
        resourceGroupName: azurerm_resource_group.test.name,
        managedInstanceName: azurerm_mssql_managed_instance.test.name,
        enabled: true,
        storageEndpoint: azurerm_storage_account.test.primary_blob_endpoint,
        storageAccountAccessKey: azurerm_storage_account.test.primary_access_key,
        retentionDays: 30,
    });
    const exampleManagedInstanceVulnerabilityAssessment = new azure.mssql.ManagedInstanceVulnerabilityAssessment("exampleManagedInstanceVulnerabilityAssessment", {
        managedInstanceId: exampleManagedInstance.id,
        storageContainerPath: pulumi.interpolate`${exampleAccount.primaryBlobEndpoint}${exampleContainer.name}/`,
        storageAccountAccessKey: exampleAccount.primaryAccessKey,
        recurringScans: {
            enabled: true,
            emailSubscriptionAdmins: true,
            emails: [
                "email@example1.com",
                "email@example2.com",
            ],
        },
    }, {
        dependsOn: [exampleManagedInstanceSecurityAlertPolicy],
    });
    
    resources:
      exampleResourceGroup:
        type: azure:core:ResourceGroup
        properties:
          location: West Europe
      exampleSubnet:
        type: azure:network:Subnet
        properties:
          resourceGroupName: ${exampleResourceGroup.name}
          virtualNetworkName: ${exampleVirtualNetwork.name}
          addressPrefixes:
            - 10.0.2.0/24
      exampleVirtualNetwork:
        type: azure:network:VirtualNetwork
        properties:
          location: ${exampleResourceGroup.location}
          resourceGroupName: ${exampleResourceGroup.name}
          addressSpaces:
            - 10.0.0.0/16
      exampleManagedInstance:
        type: azure:mssql:ManagedInstance
        properties:
          resourceGroupName: ${exampleResourceGroup.name}
          location: ${exampleResourceGroup.location}
          licenseType: BasePrice
          skuName: GP_Gen5
          storageSizeInGb: 32
          subnetId: ${exampleSubnet.id}
          vcores: 4
          administratorLogin: missadministrator
          administratorLoginPassword: NCC-1701-D
      exampleAccount:
        type: azure:storage:Account
        properties:
          resourceGroupName: ${exampleResourceGroup.name}
          location: ${exampleResourceGroup.location}
          accountTier: Standard
          accountReplicationType: GRS
      exampleContainer:
        type: azure:storage:Container
        properties:
          storageAccountName: ${exampleAccount.name}
          containerAccessType: private
      exampleManagedInstanceSecurityAlertPolicy:
        type: azure:mssql:ManagedInstanceSecurityAlertPolicy
        properties:
          resourceGroupName: ${azurerm_resource_group.test.name}
          managedInstanceName: ${azurerm_mssql_managed_instance.test.name}
          enabled: true
          storageEndpoint: ${azurerm_storage_account.test.primary_blob_endpoint}
          storageAccountAccessKey: ${azurerm_storage_account.test.primary_access_key}
          retentionDays: 30
      exampleManagedInstanceVulnerabilityAssessment:
        type: azure:mssql:ManagedInstanceVulnerabilityAssessment
        properties:
          managedInstanceId: ${exampleManagedInstance.id}
          storageContainerPath: ${exampleAccount.primaryBlobEndpoint}${exampleContainer.name}/
          storageAccountAccessKey: ${exampleAccount.primaryAccessKey}
          recurringScans:
            enabled: true
            emailSubscriptionAdmins: true
            emails:
              - email@example1.com
              - email@example2.com
        options:
          dependson:
            - ${exampleManagedInstanceSecurityAlertPolicy}
    

    Create ManagedInstanceVulnerabilityAssessment Resource

    new ManagedInstanceVulnerabilityAssessment(name: string, args: ManagedInstanceVulnerabilityAssessmentArgs, opts?: CustomResourceOptions);
    @overload
    def ManagedInstanceVulnerabilityAssessment(resource_name: str,
                                               opts: Optional[ResourceOptions] = None,
                                               managed_instance_id: Optional[str] = None,
                                               recurring_scans: Optional[ManagedInstanceVulnerabilityAssessmentRecurringScansArgs] = None,
                                               storage_account_access_key: Optional[str] = None,
                                               storage_container_path: Optional[str] = None,
                                               storage_container_sas_key: Optional[str] = None)
    @overload
    def ManagedInstanceVulnerabilityAssessment(resource_name: str,
                                               args: ManagedInstanceVulnerabilityAssessmentArgs,
                                               opts: Optional[ResourceOptions] = None)
    func NewManagedInstanceVulnerabilityAssessment(ctx *Context, name string, args ManagedInstanceVulnerabilityAssessmentArgs, opts ...ResourceOption) (*ManagedInstanceVulnerabilityAssessment, error)
    public ManagedInstanceVulnerabilityAssessment(string name, ManagedInstanceVulnerabilityAssessmentArgs args, CustomResourceOptions? opts = null)
    public ManagedInstanceVulnerabilityAssessment(String name, ManagedInstanceVulnerabilityAssessmentArgs args)
    public ManagedInstanceVulnerabilityAssessment(String name, ManagedInstanceVulnerabilityAssessmentArgs args, CustomResourceOptions options)
    
    type: azure:mssql:ManagedInstanceVulnerabilityAssessment
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ManagedInstanceVulnerabilityAssessmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ManagedInstanceVulnerabilityAssessmentArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ManagedInstanceVulnerabilityAssessmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ManagedInstanceVulnerabilityAssessmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ManagedInstanceVulnerabilityAssessmentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ManagedInstanceVulnerabilityAssessment Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ManagedInstanceVulnerabilityAssessment resource accepts the following input properties:

    ManagedInstanceId string

    The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.

    StorageContainerPath string

    A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).

    RecurringScans ManagedInstanceVulnerabilityAssessmentRecurringScans

    The recurring scans settings. The recurring_scans block supports fields documented below.

    StorageAccountAccessKey string

    Specifies the identifier key of the storage account for vulnerability assessment scan results. If storage_container_sas_key isn't specified, storage_account_access_key is required.

    NOTE The storage_account_access_key only applies if the storage account is not behind a virtual network or a firewall.

    StorageContainerSasKey string

    A shared access signature (SAS Key) that has write access to the blob container specified in storage_container_path parameter. If storage_account_access_key isn't specified, storage_container_sas_key is required.

    NOTE The storage_container_sas_key only applies if the storage account is not behind a virtual network or a firewall.

    ManagedInstanceId string

    The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.

    StorageContainerPath string

    A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).

    RecurringScans ManagedInstanceVulnerabilityAssessmentRecurringScansArgs

    The recurring scans settings. The recurring_scans block supports fields documented below.

    StorageAccountAccessKey string

    Specifies the identifier key of the storage account for vulnerability assessment scan results. If storage_container_sas_key isn't specified, storage_account_access_key is required.

    NOTE The storage_account_access_key only applies if the storage account is not behind a virtual network or a firewall.

    StorageContainerSasKey string

    A shared access signature (SAS Key) that has write access to the blob container specified in storage_container_path parameter. If storage_account_access_key isn't specified, storage_container_sas_key is required.

    NOTE The storage_container_sas_key only applies if the storage account is not behind a virtual network or a firewall.

    managedInstanceId String

    The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.

    storageContainerPath String

    A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).

    recurringScans ManagedInstanceVulnerabilityAssessmentRecurringScans

    The recurring scans settings. The recurring_scans block supports fields documented below.

    storageAccountAccessKey String

    Specifies the identifier key of the storage account for vulnerability assessment scan results. If storage_container_sas_key isn't specified, storage_account_access_key is required.

    NOTE The storage_account_access_key only applies if the storage account is not behind a virtual network or a firewall.

    storageContainerSasKey String

    A shared access signature (SAS Key) that has write access to the blob container specified in storage_container_path parameter. If storage_account_access_key isn't specified, storage_container_sas_key is required.

    NOTE The storage_container_sas_key only applies if the storage account is not behind a virtual network or a firewall.

    managedInstanceId string

    The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.

    storageContainerPath string

    A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).

    recurringScans ManagedInstanceVulnerabilityAssessmentRecurringScans

    The recurring scans settings. The recurring_scans block supports fields documented below.

    storageAccountAccessKey string

    Specifies the identifier key of the storage account for vulnerability assessment scan results. If storage_container_sas_key isn't specified, storage_account_access_key is required.

    NOTE The storage_account_access_key only applies if the storage account is not behind a virtual network or a firewall.

    storageContainerSasKey string

    A shared access signature (SAS Key) that has write access to the blob container specified in storage_container_path parameter. If storage_account_access_key isn't specified, storage_container_sas_key is required.

    NOTE The storage_container_sas_key only applies if the storage account is not behind a virtual network or a firewall.

    managed_instance_id str

    The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.

    storage_container_path str

    A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).

    recurring_scans ManagedInstanceVulnerabilityAssessmentRecurringScansArgs

    The recurring scans settings. The recurring_scans block supports fields documented below.

    storage_account_access_key str

    Specifies the identifier key of the storage account for vulnerability assessment scan results. If storage_container_sas_key isn't specified, storage_account_access_key is required.

    NOTE The storage_account_access_key only applies if the storage account is not behind a virtual network or a firewall.

    storage_container_sas_key str

    A shared access signature (SAS Key) that has write access to the blob container specified in storage_container_path parameter. If storage_account_access_key isn't specified, storage_container_sas_key is required.

    NOTE The storage_container_sas_key only applies if the storage account is not behind a virtual network or a firewall.

    managedInstanceId String

    The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.

    storageContainerPath String

    A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).

    recurringScans Property Map

    The recurring scans settings. The recurring_scans block supports fields documented below.

    storageAccountAccessKey String

    Specifies the identifier key of the storage account for vulnerability assessment scan results. If storage_container_sas_key isn't specified, storage_account_access_key is required.

    NOTE The storage_account_access_key only applies if the storage account is not behind a virtual network or a firewall.

    storageContainerSasKey String

    A shared access signature (SAS Key) that has write access to the blob container specified in storage_container_path parameter. If storage_account_access_key isn't specified, storage_container_sas_key is required.

    NOTE The storage_container_sas_key only applies if the storage account is not behind a virtual network or a firewall.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ManagedInstanceVulnerabilityAssessment resource produces the following output properties:

    Id string

    The provider-assigned unique ID for this managed resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    id string

    The provider-assigned unique ID for this managed resource.

    id str

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    Look up Existing ManagedInstanceVulnerabilityAssessment Resource

    Get an existing ManagedInstanceVulnerabilityAssessment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ManagedInstanceVulnerabilityAssessmentState, opts?: CustomResourceOptions): ManagedInstanceVulnerabilityAssessment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            managed_instance_id: Optional[str] = None,
            recurring_scans: Optional[ManagedInstanceVulnerabilityAssessmentRecurringScansArgs] = None,
            storage_account_access_key: Optional[str] = None,
            storage_container_path: Optional[str] = None,
            storage_container_sas_key: Optional[str] = None) -> ManagedInstanceVulnerabilityAssessment
    func GetManagedInstanceVulnerabilityAssessment(ctx *Context, name string, id IDInput, state *ManagedInstanceVulnerabilityAssessmentState, opts ...ResourceOption) (*ManagedInstanceVulnerabilityAssessment, error)
    public static ManagedInstanceVulnerabilityAssessment Get(string name, Input<string> id, ManagedInstanceVulnerabilityAssessmentState? state, CustomResourceOptions? opts = null)
    public static ManagedInstanceVulnerabilityAssessment get(String name, Output<String> id, ManagedInstanceVulnerabilityAssessmentState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ManagedInstanceId string

    The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.

    RecurringScans ManagedInstanceVulnerabilityAssessmentRecurringScans

    The recurring scans settings. The recurring_scans block supports fields documented below.

    StorageAccountAccessKey string

    Specifies the identifier key of the storage account for vulnerability assessment scan results. If storage_container_sas_key isn't specified, storage_account_access_key is required.

    NOTE The storage_account_access_key only applies if the storage account is not behind a virtual network or a firewall.

    StorageContainerPath string

    A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).

    StorageContainerSasKey string

    A shared access signature (SAS Key) that has write access to the blob container specified in storage_container_path parameter. If storage_account_access_key isn't specified, storage_container_sas_key is required.

    NOTE The storage_container_sas_key only applies if the storage account is not behind a virtual network or a firewall.

    ManagedInstanceId string

    The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.

    RecurringScans ManagedInstanceVulnerabilityAssessmentRecurringScansArgs

    The recurring scans settings. The recurring_scans block supports fields documented below.

    StorageAccountAccessKey string

    Specifies the identifier key of the storage account for vulnerability assessment scan results. If storage_container_sas_key isn't specified, storage_account_access_key is required.

    NOTE The storage_account_access_key only applies if the storage account is not behind a virtual network or a firewall.

    StorageContainerPath string

    A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).

    StorageContainerSasKey string

    A shared access signature (SAS Key) that has write access to the blob container specified in storage_container_path parameter. If storage_account_access_key isn't specified, storage_container_sas_key is required.

    NOTE The storage_container_sas_key only applies if the storage account is not behind a virtual network or a firewall.

    managedInstanceId String

    The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.

    recurringScans ManagedInstanceVulnerabilityAssessmentRecurringScans

    The recurring scans settings. The recurring_scans block supports fields documented below.

    storageAccountAccessKey String

    Specifies the identifier key of the storage account for vulnerability assessment scan results. If storage_container_sas_key isn't specified, storage_account_access_key is required.

    NOTE The storage_account_access_key only applies if the storage account is not behind a virtual network or a firewall.

    storageContainerPath String

    A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).

    storageContainerSasKey String

    A shared access signature (SAS Key) that has write access to the blob container specified in storage_container_path parameter. If storage_account_access_key isn't specified, storage_container_sas_key is required.

    NOTE The storage_container_sas_key only applies if the storage account is not behind a virtual network or a firewall.

    managedInstanceId string

    The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.

    recurringScans ManagedInstanceVulnerabilityAssessmentRecurringScans

    The recurring scans settings. The recurring_scans block supports fields documented below.

    storageAccountAccessKey string

    Specifies the identifier key of the storage account for vulnerability assessment scan results. If storage_container_sas_key isn't specified, storage_account_access_key is required.

    NOTE The storage_account_access_key only applies if the storage account is not behind a virtual network or a firewall.

    storageContainerPath string

    A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).

    storageContainerSasKey string

    A shared access signature (SAS Key) that has write access to the blob container specified in storage_container_path parameter. If storage_account_access_key isn't specified, storage_container_sas_key is required.

    NOTE The storage_container_sas_key only applies if the storage account is not behind a virtual network or a firewall.

    managed_instance_id str

    The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.

    recurring_scans ManagedInstanceVulnerabilityAssessmentRecurringScansArgs

    The recurring scans settings. The recurring_scans block supports fields documented below.

    storage_account_access_key str

    Specifies the identifier key of the storage account for vulnerability assessment scan results. If storage_container_sas_key isn't specified, storage_account_access_key is required.

    NOTE The storage_account_access_key only applies if the storage account is not behind a virtual network or a firewall.

    storage_container_path str

    A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).

    storage_container_sas_key str

    A shared access signature (SAS Key) that has write access to the blob container specified in storage_container_path parameter. If storage_account_access_key isn't specified, storage_container_sas_key is required.

    NOTE The storage_container_sas_key only applies if the storage account is not behind a virtual network or a firewall.

    managedInstanceId String

    The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.

    recurringScans Property Map

    The recurring scans settings. The recurring_scans block supports fields documented below.

    storageAccountAccessKey String

    Specifies the identifier key of the storage account for vulnerability assessment scan results. If storage_container_sas_key isn't specified, storage_account_access_key is required.

    NOTE The storage_account_access_key only applies if the storage account is not behind a virtual network or a firewall.

    storageContainerPath String

    A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).

    storageContainerSasKey String

    A shared access signature (SAS Key) that has write access to the blob container specified in storage_container_path parameter. If storage_account_access_key isn't specified, storage_container_sas_key is required.

    NOTE The storage_container_sas_key only applies if the storage account is not behind a virtual network or a firewall.

    Supporting Types

    ManagedInstanceVulnerabilityAssessmentRecurringScans, ManagedInstanceVulnerabilityAssessmentRecurringScansArgs

    EmailSubscriptionAdmins bool

    Boolean flag which specifies if the schedule scan notification will be sent to the subscription administrators. Defaults to true.

    Emails List<string>

    Specifies an array of e-mail addresses to which the scan notification is sent.

    Enabled bool

    Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to false.

    EmailSubscriptionAdmins bool

    Boolean flag which specifies if the schedule scan notification will be sent to the subscription administrators. Defaults to true.

    Emails []string

    Specifies an array of e-mail addresses to which the scan notification is sent.

    Enabled bool

    Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to false.

    emailSubscriptionAdmins Boolean

    Boolean flag which specifies if the schedule scan notification will be sent to the subscription administrators. Defaults to true.

    emails List<String>

    Specifies an array of e-mail addresses to which the scan notification is sent.

    enabled Boolean

    Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to false.

    emailSubscriptionAdmins boolean

    Boolean flag which specifies if the schedule scan notification will be sent to the subscription administrators. Defaults to true.

    emails string[]

    Specifies an array of e-mail addresses to which the scan notification is sent.

    enabled boolean

    Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to false.

    email_subscription_admins bool

    Boolean flag which specifies if the schedule scan notification will be sent to the subscription administrators. Defaults to true.

    emails Sequence[str]

    Specifies an array of e-mail addresses to which the scan notification is sent.

    enabled bool

    Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to false.

    emailSubscriptionAdmins Boolean

    Boolean flag which specifies if the schedule scan notification will be sent to the subscription administrators. Defaults to true.

    emails List<String>

    Specifies an array of e-mail addresses to which the scan notification is sent.

    enabled Boolean

    Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to false.

    Import

    The Vulnerability Assessment can be imported using the resource id, e.g.

     $ pulumi import azure:mssql/managedInstanceVulnerabilityAssessment:ManagedInstanceVulnerabilityAssessment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acceptanceTestResourceGroup1/providers/Microsoft.Sql/managedInstances/instance1/vulnerabilityAssessments/Default
    

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the azurerm Terraform Provider.

    azure logo

    We recommend using Azure Native.

    Azure Classic v5.49.0 published on Tuesday, Aug 29, 2023 by Pulumi