DatabaseVulnerabilityAssessmentRuleBaseline

Manages a Database Vulnerability Assessment Rule Baseline.

NOTE Database Vulnerability Assessment is currently only available for MS SQL databases.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
    {
        Location = "West Europe",
    });

    var exampleSqlServer = new Azure.Sql.SqlServer("exampleSqlServer", new()
    {
        ResourceGroupName = exampleResourceGroup.Name,
        Location = exampleResourceGroup.Location,
        Version = "12.0",
        AdministratorLogin = "4dm1n157r470r",
        AdministratorLoginPassword = "4-v3ry-53cr37-p455w0rd",
    });

    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 exampleServerSecurityAlertPolicy = new Azure.MSSql.ServerSecurityAlertPolicy("exampleServerSecurityAlertPolicy", new()
    {
        ResourceGroupName = exampleResourceGroup.Name,
        ServerName = exampleSqlServer.Name,
        State = "Enabled",
    });

    var exampleDatabase = new Azure.Sql.Database("exampleDatabase", new()
    {
        ResourceGroupName = exampleResourceGroup.Name,
        ServerName = exampleSqlServer.Name,
        Location = exampleResourceGroup.Location,
        Edition = "Standard",
    });

    var exampleServerVulnerabilityAssessment = new Azure.MSSql.ServerVulnerabilityAssessment("exampleServerVulnerabilityAssessment", new()
    {
        ServerSecurityAlertPolicyId = exampleServerSecurityAlertPolicy.Id,
        StorageContainerPath = Output.Tuple(exampleAccount.PrimaryBlobEndpoint, exampleContainer.Name).Apply(values =>
        {
            var primaryBlobEndpoint = values.Item1;
            var name = values.Item2;
            return $"{primaryBlobEndpoint}{name}/";
        }),
        StorageAccountAccessKey = exampleAccount.PrimaryAccessKey,
    });

    var exampleDatabaseVulnerabilityAssessmentRuleBaseline = new Azure.MSSql.DatabaseVulnerabilityAssessmentRuleBaseline("exampleDatabaseVulnerabilityAssessmentRuleBaseline", new()
    {
        ServerVulnerabilityAssessmentId = exampleServerVulnerabilityAssessment.Id,
        DatabaseName = exampleDatabase.Name,
        RuleId = "VA2065",
        BaselineName = "master",
        BaselineResults = new[]
        {
            new Azure.MSSql.Inputs.DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArgs
            {
                Results = new[]
                {
                    "allowedip1",
                    "123.123.123.123",
                    "123.123.123.123",
                },
            },
            new Azure.MSSql.Inputs.DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArgs
            {
                Results = new[]
                {
                    "allowedip2",
                    "255.255.255.255",
                    "255.255.255.255",
                },
            },
        },
    });

});
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/sql"
	"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
		}
		exampleSqlServer, err := sql.NewSqlServer(ctx, "exampleSqlServer", &sql.SqlServerArgs{
			ResourceGroupName:          exampleResourceGroup.Name,
			Location:                   exampleResourceGroup.Location,
			Version:                    pulumi.String("12.0"),
			AdministratorLogin:         pulumi.String("4dm1n157r470r"),
			AdministratorLoginPassword: pulumi.String("4-v3ry-53cr37-p455w0rd"),
		})
		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
		}
		exampleServerSecurityAlertPolicy, err := mssql.NewServerSecurityAlertPolicy(ctx, "exampleServerSecurityAlertPolicy", &mssql.ServerSecurityAlertPolicyArgs{
			ResourceGroupName: exampleResourceGroup.Name,
			ServerName:        exampleSqlServer.Name,
			State:             pulumi.String("Enabled"),
		})
		if err != nil {
			return err
		}
		exampleDatabase, err := sql.NewDatabase(ctx, "exampleDatabase", &sql.DatabaseArgs{
			ResourceGroupName: exampleResourceGroup.Name,
			ServerName:        exampleSqlServer.Name,
			Location:          exampleResourceGroup.Location,
			Edition:           pulumi.String("Standard"),
		})
		if err != nil {
			return err
		}
		exampleServerVulnerabilityAssessment, err := mssql.NewServerVulnerabilityAssessment(ctx, "exampleServerVulnerabilityAssessment", &mssql.ServerVulnerabilityAssessmentArgs{
			ServerSecurityAlertPolicyId: exampleServerSecurityAlertPolicy.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,
		})
		if err != nil {
			return err
		}
		_, err = mssql.NewDatabaseVulnerabilityAssessmentRuleBaseline(ctx, "exampleDatabaseVulnerabilityAssessmentRuleBaseline", &mssql.DatabaseVulnerabilityAssessmentRuleBaselineArgs{
			ServerVulnerabilityAssessmentId: exampleServerVulnerabilityAssessment.ID(),
			DatabaseName:                    exampleDatabase.Name,
			RuleId:                          pulumi.String("VA2065"),
			BaselineName:                    pulumi.String("master"),
			BaselineResults: mssql.DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArray{
				&mssql.DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArgs{
					Results: pulumi.StringArray{
						pulumi.String("allowedip1"),
						pulumi.String("123.123.123.123"),
						pulumi.String("123.123.123.123"),
					},
				},
				&mssql.DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArgs{
					Results: pulumi.StringArray{
						pulumi.String("allowedip2"),
						pulumi.String("255.255.255.255"),
						pulumi.String("255.255.255.255"),
					},
				},
			},
		})
		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.sql.SqlServer;
import com.pulumi.azure.sql.SqlServerArgs;
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.ServerSecurityAlertPolicy;
import com.pulumi.azure.mssql.ServerSecurityAlertPolicyArgs;
import com.pulumi.azure.sql.Database;
import com.pulumi.azure.sql.DatabaseArgs;
import com.pulumi.azure.mssql.ServerVulnerabilityAssessment;
import com.pulumi.azure.mssql.ServerVulnerabilityAssessmentArgs;
import com.pulumi.azure.mssql.DatabaseVulnerabilityAssessmentRuleBaseline;
import com.pulumi.azure.mssql.DatabaseVulnerabilityAssessmentRuleBaselineArgs;
import com.pulumi.azure.mssql.inputs.DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArgs;
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 exampleSqlServer = new SqlServer("exampleSqlServer", SqlServerArgs.builder()        
            .resourceGroupName(exampleResourceGroup.name())
            .location(exampleResourceGroup.location())
            .version("12.0")
            .administratorLogin("4dm1n157r470r")
            .administratorLoginPassword("4-v3ry-53cr37-p455w0rd")
            .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 exampleServerSecurityAlertPolicy = new ServerSecurityAlertPolicy("exampleServerSecurityAlertPolicy", ServerSecurityAlertPolicyArgs.builder()        
            .resourceGroupName(exampleResourceGroup.name())
            .serverName(exampleSqlServer.name())
            .state("Enabled")
            .build());

        var exampleDatabase = new Database("exampleDatabase", DatabaseArgs.builder()        
            .resourceGroupName(exampleResourceGroup.name())
            .serverName(exampleSqlServer.name())
            .location(exampleResourceGroup.location())
            .edition("Standard")
            .build());

        var exampleServerVulnerabilityAssessment = new ServerVulnerabilityAssessment("exampleServerVulnerabilityAssessment", ServerVulnerabilityAssessmentArgs.builder()        
            .serverSecurityAlertPolicyId(exampleServerSecurityAlertPolicy.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())
            .build());

        var exampleDatabaseVulnerabilityAssessmentRuleBaseline = new DatabaseVulnerabilityAssessmentRuleBaseline("exampleDatabaseVulnerabilityAssessmentRuleBaseline", DatabaseVulnerabilityAssessmentRuleBaselineArgs.builder()        
            .serverVulnerabilityAssessmentId(exampleServerVulnerabilityAssessment.id())
            .databaseName(exampleDatabase.name())
            .ruleId("VA2065")
            .baselineName("master")
            .baselineResults(            
                DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArgs.builder()
                    .results(                    
                        "allowedip1",
                        "123.123.123.123",
                        "123.123.123.123")
                    .build(),
                DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArgs.builder()
                    .results(                    
                        "allowedip2",
                        "255.255.255.255",
                        "255.255.255.255")
                    .build())
            .build());

    }
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_sql_server = azure.sql.SqlServer("exampleSqlServer",
    resource_group_name=example_resource_group.name,
    location=example_resource_group.location,
    version="12.0",
    administrator_login="4dm1n157r470r",
    administrator_login_password="4-v3ry-53cr37-p455w0rd")
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_server_security_alert_policy = azure.mssql.ServerSecurityAlertPolicy("exampleServerSecurityAlertPolicy",
    resource_group_name=example_resource_group.name,
    server_name=example_sql_server.name,
    state="Enabled")
example_database = azure.sql.Database("exampleDatabase",
    resource_group_name=example_resource_group.name,
    server_name=example_sql_server.name,
    location=example_resource_group.location,
    edition="Standard")
example_server_vulnerability_assessment = azure.mssql.ServerVulnerabilityAssessment("exampleServerVulnerabilityAssessment",
    server_security_alert_policy_id=example_server_security_alert_policy.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)
example_database_vulnerability_assessment_rule_baseline = azure.mssql.DatabaseVulnerabilityAssessmentRuleBaseline("exampleDatabaseVulnerabilityAssessmentRuleBaseline",
    server_vulnerability_assessment_id=example_server_vulnerability_assessment.id,
    database_name=example_database.name,
    rule_id="VA2065",
    baseline_name="master",
    baseline_results=[
        azure.mssql.DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArgs(
            results=[
                "allowedip1",
                "123.123.123.123",
                "123.123.123.123",
            ],
        ),
        azure.mssql.DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArgs(
            results=[
                "allowedip2",
                "255.255.255.255",
                "255.255.255.255",
            ],
        ),
    ])
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleSqlServer = new azure.sql.SqlServer("exampleSqlServer", {
    resourceGroupName: exampleResourceGroup.name,
    location: exampleResourceGroup.location,
    version: "12.0",
    administratorLogin: "4dm1n157r470r",
    administratorLoginPassword: "4-v3ry-53cr37-p455w0rd",
});
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 exampleServerSecurityAlertPolicy = new azure.mssql.ServerSecurityAlertPolicy("exampleServerSecurityAlertPolicy", {
    resourceGroupName: exampleResourceGroup.name,
    serverName: exampleSqlServer.name,
    state: "Enabled",
});
const exampleDatabase = new azure.sql.Database("exampleDatabase", {
    resourceGroupName: exampleResourceGroup.name,
    serverName: exampleSqlServer.name,
    location: exampleResourceGroup.location,
    edition: "Standard",
});
const exampleServerVulnerabilityAssessment = new azure.mssql.ServerVulnerabilityAssessment("exampleServerVulnerabilityAssessment", {
    serverSecurityAlertPolicyId: exampleServerSecurityAlertPolicy.id,
    storageContainerPath: pulumi.interpolate`${exampleAccount.primaryBlobEndpoint}${exampleContainer.name}/`,
    storageAccountAccessKey: exampleAccount.primaryAccessKey,
});
const exampleDatabaseVulnerabilityAssessmentRuleBaseline = new azure.mssql.DatabaseVulnerabilityAssessmentRuleBaseline("exampleDatabaseVulnerabilityAssessmentRuleBaseline", {
    serverVulnerabilityAssessmentId: exampleServerVulnerabilityAssessment.id,
    databaseName: exampleDatabase.name,
    ruleId: "VA2065",
    baselineName: "master",
    baselineResults: [
        {
            results: [
                "allowedip1",
                "123.123.123.123",
                "123.123.123.123",
            ],
        },
        {
            results: [
                "allowedip2",
                "255.255.255.255",
                "255.255.255.255",
            ],
        },
    ],
});
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    properties:
      location: West Europe
  exampleSqlServer:
    type: azure:sql:SqlServer
    properties:
      resourceGroupName: ${exampleResourceGroup.name}
      location: ${exampleResourceGroup.location}
      version: 12.0
      administratorLogin: 4dm1n157r470r
      administratorLoginPassword: 4-v3ry-53cr37-p455w0rd
  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
  exampleServerSecurityAlertPolicy:
    type: azure:mssql:ServerSecurityAlertPolicy
    properties:
      resourceGroupName: ${exampleResourceGroup.name}
      serverName: ${exampleSqlServer.name}
      state: Enabled
  exampleDatabase:
    type: azure:sql:Database
    properties:
      resourceGroupName: ${exampleResourceGroup.name}
      serverName: ${exampleSqlServer.name}
      location: ${exampleResourceGroup.location}
      edition: Standard
  exampleServerVulnerabilityAssessment:
    type: azure:mssql:ServerVulnerabilityAssessment
    properties:
      serverSecurityAlertPolicyId: ${exampleServerSecurityAlertPolicy.id}
      storageContainerPath: ${exampleAccount.primaryBlobEndpoint}${exampleContainer.name}/
      storageAccountAccessKey: ${exampleAccount.primaryAccessKey}
  exampleDatabaseVulnerabilityAssessmentRuleBaseline:
    type: azure:mssql:DatabaseVulnerabilityAssessmentRuleBaseline
    properties:
      serverVulnerabilityAssessmentId: ${exampleServerVulnerabilityAssessment.id}
      databaseName: ${exampleDatabase.name}
      ruleId: VA2065
      baselineName: master
      baselineResults:
        - results:
            - allowedip1
            - 123.123.123.123
            - 123.123.123.123
        - results:
            - allowedip2
            - 255.255.255.255
            - 255.255.255.255

Create DatabaseVulnerabilityAssessmentRuleBaseline Resource

new DatabaseVulnerabilityAssessmentRuleBaseline(name: string, args: DatabaseVulnerabilityAssessmentRuleBaselineArgs, opts?: CustomResourceOptions);
@overload
def DatabaseVulnerabilityAssessmentRuleBaseline(resource_name: str,
                                                opts: Optional[ResourceOptions] = None,
                                                baseline_name: Optional[str] = None,
                                                baseline_results: Optional[Sequence[DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArgs]] = None,
                                                database_name: Optional[str] = None,
                                                rule_id: Optional[str] = None,
                                                server_vulnerability_assessment_id: Optional[str] = None)
@overload
def DatabaseVulnerabilityAssessmentRuleBaseline(resource_name: str,
                                                args: DatabaseVulnerabilityAssessmentRuleBaselineArgs,
                                                opts: Optional[ResourceOptions] = None)
func NewDatabaseVulnerabilityAssessmentRuleBaseline(ctx *Context, name string, args DatabaseVulnerabilityAssessmentRuleBaselineArgs, opts ...ResourceOption) (*DatabaseVulnerabilityAssessmentRuleBaseline, error)
public DatabaseVulnerabilityAssessmentRuleBaseline(string name, DatabaseVulnerabilityAssessmentRuleBaselineArgs args, CustomResourceOptions? opts = null)
public DatabaseVulnerabilityAssessmentRuleBaseline(String name, DatabaseVulnerabilityAssessmentRuleBaselineArgs args)
public DatabaseVulnerabilityAssessmentRuleBaseline(String name, DatabaseVulnerabilityAssessmentRuleBaselineArgs args, CustomResourceOptions options)
type: azure:mssql:DatabaseVulnerabilityAssessmentRuleBaseline
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DatabaseVulnerabilityAssessmentRuleBaselineArgs
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 DatabaseVulnerabilityAssessmentRuleBaselineArgs
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 DatabaseVulnerabilityAssessmentRuleBaselineArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DatabaseVulnerabilityAssessmentRuleBaselineArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DatabaseVulnerabilityAssessmentRuleBaselineArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

DatabaseVulnerabilityAssessmentRuleBaseline 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 DatabaseVulnerabilityAssessmentRuleBaseline resource accepts the following input properties:

BaselineResults List<DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArgs>

A baseline_result block as documented below. Multiple blocks can be defined.

DatabaseName string

Specifies the name of the MS SQL Database. Changing this forces a new resource to be created.

RuleId string

The vulnerability assessment rule ID. Changing this forces a new resource to be created.

ServerVulnerabilityAssessmentId string

The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created.

BaselineName string

The name of the vulnerability assessment rule baseline. Valid options are default and master. default implies a baseline on a database level rule and master for server level rule. Defaults to default. Changing this forces a new resource to be created.

BaselineResults []DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArgs

A baseline_result block as documented below. Multiple blocks can be defined.

DatabaseName string

Specifies the name of the MS SQL Database. Changing this forces a new resource to be created.

RuleId string

The vulnerability assessment rule ID. Changing this forces a new resource to be created.

ServerVulnerabilityAssessmentId string

The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created.

BaselineName string

The name of the vulnerability assessment rule baseline. Valid options are default and master. default implies a baseline on a database level rule and master for server level rule. Defaults to default. Changing this forces a new resource to be created.

baselineResults List<DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArgs>

A baseline_result block as documented below. Multiple blocks can be defined.

databaseName String

Specifies the name of the MS SQL Database. Changing this forces a new resource to be created.

ruleId String

The vulnerability assessment rule ID. Changing this forces a new resource to be created.

serverVulnerabilityAssessmentId String

The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created.

baselineName String

The name of the vulnerability assessment rule baseline. Valid options are default and master. default implies a baseline on a database level rule and master for server level rule. Defaults to default. Changing this forces a new resource to be created.

baselineResults DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArgs[]

A baseline_result block as documented below. Multiple blocks can be defined.

databaseName string

Specifies the name of the MS SQL Database. Changing this forces a new resource to be created.

ruleId string

The vulnerability assessment rule ID. Changing this forces a new resource to be created.

serverVulnerabilityAssessmentId string

The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created.

baselineName string

The name of the vulnerability assessment rule baseline. Valid options are default and master. default implies a baseline on a database level rule and master for server level rule. Defaults to default. Changing this forces a new resource to be created.

baseline_results Sequence[DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArgs]

A baseline_result block as documented below. Multiple blocks can be defined.

database_name str

Specifies the name of the MS SQL Database. Changing this forces a new resource to be created.

rule_id str

The vulnerability assessment rule ID. Changing this forces a new resource to be created.

server_vulnerability_assessment_id str

The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created.

baseline_name str

The name of the vulnerability assessment rule baseline. Valid options are default and master. default implies a baseline on a database level rule and master for server level rule. Defaults to default. Changing this forces a new resource to be created.

baselineResults List<Property Map>

A baseline_result block as documented below. Multiple blocks can be defined.

databaseName String

Specifies the name of the MS SQL Database. Changing this forces a new resource to be created.

ruleId String

The vulnerability assessment rule ID. Changing this forces a new resource to be created.

serverVulnerabilityAssessmentId String

The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created.

baselineName String

The name of the vulnerability assessment rule baseline. Valid options are default and master. default implies a baseline on a database level rule and master for server level rule. Defaults to default. Changing this forces a new resource to be created.

Outputs

All input properties are implicitly available as output properties. Additionally, the DatabaseVulnerabilityAssessmentRuleBaseline 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 DatabaseVulnerabilityAssessmentRuleBaseline Resource

Get an existing DatabaseVulnerabilityAssessmentRuleBaseline 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?: DatabaseVulnerabilityAssessmentRuleBaselineState, opts?: CustomResourceOptions): DatabaseVulnerabilityAssessmentRuleBaseline
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        baseline_name: Optional[str] = None,
        baseline_results: Optional[Sequence[DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArgs]] = None,
        database_name: Optional[str] = None,
        rule_id: Optional[str] = None,
        server_vulnerability_assessment_id: Optional[str] = None) -> DatabaseVulnerabilityAssessmentRuleBaseline
func GetDatabaseVulnerabilityAssessmentRuleBaseline(ctx *Context, name string, id IDInput, state *DatabaseVulnerabilityAssessmentRuleBaselineState, opts ...ResourceOption) (*DatabaseVulnerabilityAssessmentRuleBaseline, error)
public static DatabaseVulnerabilityAssessmentRuleBaseline Get(string name, Input<string> id, DatabaseVulnerabilityAssessmentRuleBaselineState? state, CustomResourceOptions? opts = null)
public static DatabaseVulnerabilityAssessmentRuleBaseline get(String name, Output<String> id, DatabaseVulnerabilityAssessmentRuleBaselineState 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:
BaselineName string

The name of the vulnerability assessment rule baseline. Valid options are default and master. default implies a baseline on a database level rule and master for server level rule. Defaults to default. Changing this forces a new resource to be created.

BaselineResults List<DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArgs>

A baseline_result block as documented below. Multiple blocks can be defined.

DatabaseName string

Specifies the name of the MS SQL Database. Changing this forces a new resource to be created.

RuleId string

The vulnerability assessment rule ID. Changing this forces a new resource to be created.

ServerVulnerabilityAssessmentId string

The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created.

BaselineName string

The name of the vulnerability assessment rule baseline. Valid options are default and master. default implies a baseline on a database level rule and master for server level rule. Defaults to default. Changing this forces a new resource to be created.

BaselineResults []DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArgs

A baseline_result block as documented below. Multiple blocks can be defined.

DatabaseName string

Specifies the name of the MS SQL Database. Changing this forces a new resource to be created.

RuleId string

The vulnerability assessment rule ID. Changing this forces a new resource to be created.

ServerVulnerabilityAssessmentId string

The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created.

baselineName String

The name of the vulnerability assessment rule baseline. Valid options are default and master. default implies a baseline on a database level rule and master for server level rule. Defaults to default. Changing this forces a new resource to be created.

baselineResults List<DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArgs>

A baseline_result block as documented below. Multiple blocks can be defined.

databaseName String

Specifies the name of the MS SQL Database. Changing this forces a new resource to be created.

ruleId String

The vulnerability assessment rule ID. Changing this forces a new resource to be created.

serverVulnerabilityAssessmentId String

The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created.

baselineName string

The name of the vulnerability assessment rule baseline. Valid options are default and master. default implies a baseline on a database level rule and master for server level rule. Defaults to default. Changing this forces a new resource to be created.

baselineResults DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArgs[]

A baseline_result block as documented below. Multiple blocks can be defined.

databaseName string

Specifies the name of the MS SQL Database. Changing this forces a new resource to be created.

ruleId string

The vulnerability assessment rule ID. Changing this forces a new resource to be created.

serverVulnerabilityAssessmentId string

The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created.

baseline_name str

The name of the vulnerability assessment rule baseline. Valid options are default and master. default implies a baseline on a database level rule and master for server level rule. Defaults to default. Changing this forces a new resource to be created.

baseline_results Sequence[DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArgs]

A baseline_result block as documented below. Multiple blocks can be defined.

database_name str

Specifies the name of the MS SQL Database. Changing this forces a new resource to be created.

rule_id str

The vulnerability assessment rule ID. Changing this forces a new resource to be created.

server_vulnerability_assessment_id str

The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created.

baselineName String

The name of the vulnerability assessment rule baseline. Valid options are default and master. default implies a baseline on a database level rule and master for server level rule. Defaults to default. Changing this forces a new resource to be created.

baselineResults List<Property Map>

A baseline_result block as documented below. Multiple blocks can be defined.

databaseName String

Specifies the name of the MS SQL Database. Changing this forces a new resource to be created.

ruleId String

The vulnerability assessment rule ID. Changing this forces a new resource to be created.

serverVulnerabilityAssessmentId String

The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created.

Supporting Types

DatabaseVulnerabilityAssessmentRuleBaselineBaselineResult

Results List<string>

A list representing a result of the baseline.

Results []string

A list representing a result of the baseline.

results List<String>

A list representing a result of the baseline.

results string[]

A list representing a result of the baseline.

results Sequence[str]

A list representing a result of the baseline.

results List<String>

A list representing a result of the baseline.

Import

Database Vulnerability Assessment Rule Baseline can be imported using the resource id, e.g.

 $ pulumi import azure:mssql/databaseVulnerabilityAssessmentRuleBaseline:DatabaseVulnerabilityAssessmentRuleBaseline example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acceptanceTestResourceGroup1/providers/Microsoft.Sql/servers/mssqlserver/databases/mysqldatabase/vulnerabilityAssessments/Default/rules/VA2065/baselines/master

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.