We recommend using Azure Native.
azure.mssql.ManagedInstanceVulnerabilityAssessment
Explore with Pulumi AI
Manages the Vulnerability Assessment for an MS Managed Instance.
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 exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
name: "example",
location: example.location,
resourceGroupName: example.name,
addressSpaces: ["10.0.0.0/16"],
});
const exampleSubnet = new azure.network.Subnet("example", {
name: "example",
resourceGroupName: example.name,
virtualNetworkName: exampleVirtualNetwork.name,
addressPrefixes: ["10.0.2.0/24"],
});
const exampleManagedInstance = new azure.mssql.ManagedInstance("example", {
name: "exampleinstance",
resourceGroupName: example.name,
location: example.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("example", {
name: "accteststorageaccount",
resourceGroupName: example.name,
location: example.location,
accountTier: "Standard",
accountReplicationType: "GRS",
});
const exampleContainer = new azure.storage.Container("example", {
name: "accteststoragecontainer",
storageAccountName: exampleAccount.name,
containerAccessType: "private",
});
const exampleManagedInstanceSecurityAlertPolicy = new azure.mssql.ManagedInstanceSecurityAlertPolicy("example", {
resourceGroupName: testAzurermResourceGroup.name,
managedInstanceName: test.name,
enabled: true,
storageEndpoint: testAzurermStorageAccount.primaryBlobEndpoint,
storageAccountAccessKey: testAzurermStorageAccount.primaryAccessKey,
retentionDays: 30,
});
const exampleManagedInstanceVulnerabilityAssessment = new azure.mssql.ManagedInstanceVulnerabilityAssessment("example", {
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],
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_virtual_network = azure.network.VirtualNetwork("example",
name="example",
location=example.location,
resource_group_name=example.name,
address_spaces=["10.0.0.0/16"])
example_subnet = azure.network.Subnet("example",
name="example",
resource_group_name=example.name,
virtual_network_name=example_virtual_network.name,
address_prefixes=["10.0.2.0/24"])
example_managed_instance = azure.mssql.ManagedInstance("example",
name="exampleinstance",
resource_group_name=example.name,
location=example.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("example",
name="accteststorageaccount",
resource_group_name=example.name,
location=example.location,
account_tier="Standard",
account_replication_type="GRS")
example_container = azure.storage.Container("example",
name="accteststoragecontainer",
storage_account_name=example_account.name,
container_access_type="private")
example_managed_instance_security_alert_policy = azure.mssql.ManagedInstanceSecurityAlertPolicy("example",
resource_group_name=test_azurerm_resource_group["name"],
managed_instance_name=test["name"],
enabled=True,
storage_endpoint=test_azurerm_storage_account["primaryBlobEndpoint"],
storage_account_access_key=test_azurerm_storage_account["primaryAccessKey"],
retention_days=30)
example_managed_instance_vulnerability_assessment = azure.mssql.ManagedInstanceVulnerabilityAssessment("example",
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]))
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 {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
Name: pulumi.String("example"),
Location: example.Location,
ResourceGroupName: example.Name,
AddressSpaces: pulumi.StringArray{
pulumi.String("10.0.0.0/16"),
},
})
if err != nil {
return err
}
exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
Name: pulumi.String("example"),
ResourceGroupName: example.Name,
VirtualNetworkName: exampleVirtualNetwork.Name,
AddressPrefixes: pulumi.StringArray{
pulumi.String("10.0.2.0/24"),
},
})
if err != nil {
return err
}
exampleManagedInstance, err := mssql.NewManagedInstance(ctx, "example", &mssql.ManagedInstanceArgs{
Name: pulumi.String("exampleinstance"),
ResourceGroupName: example.Name,
Location: example.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, "example", &storage.AccountArgs{
Name: pulumi.String("accteststorageaccount"),
ResourceGroupName: example.Name,
Location: example.Location,
AccountTier: pulumi.String("Standard"),
AccountReplicationType: pulumi.String("GRS"),
})
if err != nil {
return err
}
exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{
Name: pulumi.String("accteststoragecontainer"),
StorageAccountName: exampleAccount.Name,
ContainerAccessType: pulumi.String("private"),
})
if err != nil {
return err
}
exampleManagedInstanceSecurityAlertPolicy, err := mssql.NewManagedInstanceSecurityAlertPolicy(ctx, "example", &mssql.ManagedInstanceSecurityAlertPolicyArgs{
ResourceGroupName: pulumi.Any(testAzurermResourceGroup.Name),
ManagedInstanceName: pulumi.Any(test.Name),
Enabled: pulumi.Bool(true),
StorageEndpoint: pulumi.Any(testAzurermStorageAccount.PrimaryBlobEndpoint),
StorageAccountAccessKey: pulumi.Any(testAzurermStorageAccount.PrimaryAccessKey),
RetentionDays: pulumi.Int(30),
})
if err != nil {
return err
}
_, err = mssql.NewManagedInstanceVulnerabilityAssessment(ctx, "example", &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
})
}
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 exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
{
Name = "example",
Location = example.Location,
ResourceGroupName = example.Name,
AddressSpaces = new[]
{
"10.0.0.0/16",
},
});
var exampleSubnet = new Azure.Network.Subnet("example", new()
{
Name = "example",
ResourceGroupName = example.Name,
VirtualNetworkName = exampleVirtualNetwork.Name,
AddressPrefixes = new[]
{
"10.0.2.0/24",
},
});
var exampleManagedInstance = new Azure.MSSql.ManagedInstance("example", new()
{
Name = "exampleinstance",
ResourceGroupName = example.Name,
Location = example.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("example", new()
{
Name = "accteststorageaccount",
ResourceGroupName = example.Name,
Location = example.Location,
AccountTier = "Standard",
AccountReplicationType = "GRS",
});
var exampleContainer = new Azure.Storage.Container("example", new()
{
Name = "accteststoragecontainer",
StorageAccountName = exampleAccount.Name,
ContainerAccessType = "private",
});
var exampleManagedInstanceSecurityAlertPolicy = new Azure.MSSql.ManagedInstanceSecurityAlertPolicy("example", new()
{
ResourceGroupName = testAzurermResourceGroup.Name,
ManagedInstanceName = test.Name,
Enabled = true,
StorageEndpoint = testAzurermStorageAccount.PrimaryBlobEndpoint,
StorageAccountAccessKey = testAzurermStorageAccount.PrimaryAccessKey,
RetentionDays = 30,
});
var exampleManagedInstanceVulnerabilityAssessment = new Azure.MSSql.ManagedInstanceVulnerabilityAssessment("example", 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 =
{
exampleManagedInstanceSecurityAlertPolicy,
},
});
});
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.name("example")
.location(example.location())
.resourceGroupName(example.name())
.addressSpaces("10.0.0.0/16")
.build());
var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
.name("example")
.resourceGroupName(example.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("10.0.2.0/24")
.build());
var exampleManagedInstance = new ManagedInstance("exampleManagedInstance", ManagedInstanceArgs.builder()
.name("exampleinstance")
.resourceGroupName(example.name())
.location(example.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()
.name("accteststorageaccount")
.resourceGroupName(example.name())
.location(example.location())
.accountTier("Standard")
.accountReplicationType("GRS")
.build());
var exampleContainer = new Container("exampleContainer", ContainerArgs.builder()
.name("accteststoragecontainer")
.storageAccountName(exampleAccount.name())
.containerAccessType("private")
.build());
var exampleManagedInstanceSecurityAlertPolicy = new ManagedInstanceSecurityAlertPolicy("exampleManagedInstanceSecurityAlertPolicy", ManagedInstanceSecurityAlertPolicyArgs.builder()
.resourceGroupName(testAzurermResourceGroup.name())
.managedInstanceName(test.name())
.enabled(true)
.storageEndpoint(testAzurermStorageAccount.primaryBlobEndpoint())
.storageAccountAccessKey(testAzurermStorageAccount.primaryAccessKey())
.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());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleSubnet:
type: azure:network:Subnet
name: example
properties:
name: example
resourceGroupName: ${example.name}
virtualNetworkName: ${exampleVirtualNetwork.name}
addressPrefixes:
- 10.0.2.0/24
exampleVirtualNetwork:
type: azure:network:VirtualNetwork
name: example
properties:
name: example
location: ${example.location}
resourceGroupName: ${example.name}
addressSpaces:
- 10.0.0.0/16
exampleManagedInstance:
type: azure:mssql:ManagedInstance
name: example
properties:
name: exampleinstance
resourceGroupName: ${example.name}
location: ${example.location}
licenseType: BasePrice
skuName: GP_Gen5
storageSizeInGb: 32
subnetId: ${exampleSubnet.id}
vcores: 4
administratorLogin: missadministrator
administratorLoginPassword: NCC-1701-D
exampleAccount:
type: azure:storage:Account
name: example
properties:
name: accteststorageaccount
resourceGroupName: ${example.name}
location: ${example.location}
accountTier: Standard
accountReplicationType: GRS
exampleContainer:
type: azure:storage:Container
name: example
properties:
name: accteststoragecontainer
storageAccountName: ${exampleAccount.name}
containerAccessType: private
exampleManagedInstanceSecurityAlertPolicy:
type: azure:mssql:ManagedInstanceSecurityAlertPolicy
name: example
properties:
resourceGroupName: ${testAzurermResourceGroup.name}
managedInstanceName: ${test.name}
enabled: true
storageEndpoint: ${testAzurermStorageAccount.primaryBlobEndpoint}
storageAccountAccessKey: ${testAzurermStorageAccount.primaryAccessKey}
retentionDays: 30
exampleManagedInstanceVulnerabilityAssessment:
type: azure:mssql:ManagedInstanceVulnerabilityAssessment
name: example
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
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ManagedInstanceVulnerabilityAssessment(name: string, args: ManagedInstanceVulnerabilityAssessmentArgs, opts?: CustomResourceOptions);
@overload
def ManagedInstanceVulnerabilityAssessment(resource_name: str,
args: ManagedInstanceVulnerabilityAssessmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ManagedInstanceVulnerabilityAssessment(resource_name: str,
opts: Optional[ResourceOptions] = None,
managed_instance_id: Optional[str] = None,
storage_container_path: Optional[str] = None,
recurring_scans: Optional[ManagedInstanceVulnerabilityAssessmentRecurringScansArgs] = None,
storage_account_access_key: Optional[str] = None,
storage_container_sas_key: Optional[str] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var managedInstanceVulnerabilityAssessmentResource = new Azure.MSSql.ManagedInstanceVulnerabilityAssessment("managedInstanceVulnerabilityAssessmentResource", new()
{
ManagedInstanceId = "string",
StorageContainerPath = "string",
RecurringScans = new Azure.MSSql.Inputs.ManagedInstanceVulnerabilityAssessmentRecurringScansArgs
{
EmailSubscriptionAdmins = false,
Emails = new[]
{
"string",
},
Enabled = false,
},
StorageAccountAccessKey = "string",
StorageContainerSasKey = "string",
});
example, err := mssql.NewManagedInstanceVulnerabilityAssessment(ctx, "managedInstanceVulnerabilityAssessmentResource", &mssql.ManagedInstanceVulnerabilityAssessmentArgs{
ManagedInstanceId: pulumi.String("string"),
StorageContainerPath: pulumi.String("string"),
RecurringScans: &mssql.ManagedInstanceVulnerabilityAssessmentRecurringScansArgs{
EmailSubscriptionAdmins: pulumi.Bool(false),
Emails: pulumi.StringArray{
pulumi.String("string"),
},
Enabled: pulumi.Bool(false),
},
StorageAccountAccessKey: pulumi.String("string"),
StorageContainerSasKey: pulumi.String("string"),
})
var managedInstanceVulnerabilityAssessmentResource = new ManagedInstanceVulnerabilityAssessment("managedInstanceVulnerabilityAssessmentResource", ManagedInstanceVulnerabilityAssessmentArgs.builder()
.managedInstanceId("string")
.storageContainerPath("string")
.recurringScans(ManagedInstanceVulnerabilityAssessmentRecurringScansArgs.builder()
.emailSubscriptionAdmins(false)
.emails("string")
.enabled(false)
.build())
.storageAccountAccessKey("string")
.storageContainerSasKey("string")
.build());
managed_instance_vulnerability_assessment_resource = azure.mssql.ManagedInstanceVulnerabilityAssessment("managedInstanceVulnerabilityAssessmentResource",
managed_instance_id="string",
storage_container_path="string",
recurring_scans=azure.mssql.ManagedInstanceVulnerabilityAssessmentRecurringScansArgs(
email_subscription_admins=False,
emails=["string"],
enabled=False,
),
storage_account_access_key="string",
storage_container_sas_key="string")
const managedInstanceVulnerabilityAssessmentResource = new azure.mssql.ManagedInstanceVulnerabilityAssessment("managedInstanceVulnerabilityAssessmentResource", {
managedInstanceId: "string",
storageContainerPath: "string",
recurringScans: {
emailSubscriptionAdmins: false,
emails: ["string"],
enabled: false,
},
storageAccountAccessKey: "string",
storageContainerSasKey: "string",
});
type: azure:mssql:ManagedInstanceVulnerabilityAssessment
properties:
managedInstanceId: string
recurringScans:
emailSubscriptionAdmins: false
emails:
- string
enabled: false
storageAccountAccessKey: string
storageContainerPath: string
storageContainerSasKey: string
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:
- Managed
Instance stringId - The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.
- Storage
Container stringPath - A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).
- Recurring
Scans ManagedInstance Vulnerability Assessment Recurring Scans - The recurring scans settings. The
recurring_scans
block supports fields documented below. - Storage
Account stringAccess Key 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 stringSas Key A shared access signature (SAS Key) that has write access to the blob container specified in
storage_container_path
parameter. Ifstorage_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 stringId - The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.
- Storage
Container stringPath - A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).
- Recurring
Scans ManagedInstance Vulnerability Assessment Recurring Scans Args - The recurring scans settings. The
recurring_scans
block supports fields documented below. - Storage
Account stringAccess Key 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 stringSas Key A shared access signature (SAS Key) that has write access to the blob container specified in
storage_container_path
parameter. Ifstorage_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 StringId - The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.
- storage
Container StringPath - A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).
- recurring
Scans ManagedInstance Vulnerability Assessment Recurring Scans - The recurring scans settings. The
recurring_scans
block supports fields documented below. - storage
Account StringAccess Key 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 StringSas Key A shared access signature (SAS Key) that has write access to the blob container specified in
storage_container_path
parameter. Ifstorage_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 stringId - The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.
- storage
Container stringPath - A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).
- recurring
Scans ManagedInstance Vulnerability Assessment Recurring Scans - The recurring scans settings. The
recurring_scans
block supports fields documented below. - storage
Account stringAccess Key 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 stringSas Key A shared access signature (SAS Key) that has write access to the blob container specified in
storage_container_path
parameter. Ifstorage_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_ strid - The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.
- storage_
container_ strpath - A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).
- recurring_
scans ManagedInstance Vulnerability Assessment Recurring Scans Args - The recurring scans settings. The
recurring_scans
block supports fields documented below. - storage_
account_ straccess_ key 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_ strsas_ key A shared access signature (SAS Key) that has write access to the blob container specified in
storage_container_path
parameter. Ifstorage_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 StringId - The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.
- storage
Container StringPath - A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).
- recurring
Scans Property Map - The recurring scans settings. The
recurring_scans
block supports fields documented below. - storage
Account StringAccess Key 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 StringSas Key A shared access signature (SAS Key) that has write access to the blob container specified in
storage_container_path
parameter. Ifstorage_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.
- Managed
Instance stringId - The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.
- Recurring
Scans ManagedInstance Vulnerability Assessment Recurring Scans - The recurring scans settings. The
recurring_scans
block supports fields documented below. - Storage
Account stringAccess Key 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 stringPath - A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).
- Storage
Container stringSas Key A shared access signature (SAS Key) that has write access to the blob container specified in
storage_container_path
parameter. Ifstorage_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 stringId - The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.
- Recurring
Scans ManagedInstance Vulnerability Assessment Recurring Scans Args - The recurring scans settings. The
recurring_scans
block supports fields documented below. - Storage
Account stringAccess Key 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 stringPath - A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).
- Storage
Container stringSas Key A shared access signature (SAS Key) that has write access to the blob container specified in
storage_container_path
parameter. Ifstorage_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 StringId - The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.
- recurring
Scans ManagedInstance Vulnerability Assessment Recurring Scans - The recurring scans settings. The
recurring_scans
block supports fields documented below. - storage
Account StringAccess Key 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 StringPath - A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).
- storage
Container StringSas Key A shared access signature (SAS Key) that has write access to the blob container specified in
storage_container_path
parameter. Ifstorage_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 stringId - The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.
- recurring
Scans ManagedInstance Vulnerability Assessment Recurring Scans - The recurring scans settings. The
recurring_scans
block supports fields documented below. - storage
Account stringAccess Key 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 stringPath - A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).
- storage
Container stringSas Key A shared access signature (SAS Key) that has write access to the blob container specified in
storage_container_path
parameter. Ifstorage_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_ strid - The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.
- recurring_
scans ManagedInstance Vulnerability Assessment Recurring Scans Args - The recurring scans settings. The
recurring_scans
block supports fields documented below. - storage_
account_ straccess_ key 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_ strpath - A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).
- storage_
container_ strsas_ key A shared access signature (SAS Key) that has write access to the blob container specified in
storage_container_path
parameter. Ifstorage_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 StringId - The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.
- recurring
Scans Property Map - The recurring scans settings. The
recurring_scans
block supports fields documented below. - storage
Account StringAccess Key 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 StringPath - A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).
- storage
Container StringSas Key A shared access signature (SAS Key) that has write access to the blob container specified in
storage_container_path
parameter. Ifstorage_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
- Email
Subscription boolAdmins - 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
.
- Email
Subscription boolAdmins - 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
.
- email
Subscription BooleanAdmins - 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
.
- email
Subscription booleanAdmins - 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_ booladmins - 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
.
- email
Subscription BooleanAdmins - 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
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.