- Latest
- 2024-11-01-preview
- 2024-05-01-preview
- 2023-08-01
- 2023-08-01-preview
- 2023-05-01-preview
- 2023-02-01-preview
- 2022-11-01-preview
- 2022-08-01-preview
- 2022-05-01-preview
- 2022-02-01-preview
- 2021-11-01
- 2021-11-01-preview
- 2021-08-01-preview
- 2021-05-01-preview
- 2021-02-01-preview
- 2020-11-01-preview
- 2020-08-01-preview
- 2020-02-02-preview
- 2018-06-01-preview
Bicep 리소스 정의
서버/vulnerabilityAssessments 리소스 종류는 다음을 대상으로 하는 작업으로 배포할 수 있습니다.
- 리소스 그룹 - 리소스 그룹 배포 명령 참조
각 API 버전에서 변경된 속성 목록은 변경 로그참조하세요.
리소스 형식
Microsoft.Sql/servers/vulnerabilityAssessments 리소스를 만들려면 템플릿에 다음 Bicep을 추가합니다.
resource symbolicname 'Microsoft.Sql/servers/vulnerabilityAssessments@2024-11-01-preview' = {
parent: resourceSymbolicName
name: 'string'
properties: {
recurringScans: {
emails: [
'string'
]
emailSubscriptionAdmins: bool
isEnabled: bool
}
storageAccountAccessKey: 'string'
storageContainerPath: 'string'
storageContainerSasKey: 'string'
}
}
속성 값
Microsoft.Sql/servers/vulnerabilityAssessments
| Name | Description | Value |
|---|---|---|
| name | 리소스 이름 | 'default'(필수) |
| parent | Bicep에서 자식 리소스에 대한 부모 리소스를 지정할 수 있습니다. 자식 리소스가 부모 리소스 외부에서 선언된 경우에만 이 속성을 추가해야 합니다. 자세한 내용은 부모 리소스외부의 자식 리소스 |
형식 리소스의 기호 이름: 서버 |
| properties | 리소스 속성입니다. | ServerVulnerabilityAssessmentProperties |
ServerVulnerabilityAssessmentProperties
| Name | Description | Value |
|---|---|---|
| recurringScans | 되풀이 검사 설정 | VulnerabilityAssessmentRecurringScansProperties |
| storageAccountAccessKey | 취약성 평가 검사 결과에 대한 스토리지 계정의 식별자 키를 지정합니다. 'StorageContainerSasKey'를 지정하지 않으면 storageAccountAccessKey가 필요합니다. 스토리지 계정이 Vnet 또는 방화벽 뒤에 있지 않은 경우에만 적용됩니다. | string |
| storageContainerPath | 검사 결과(예: https://myStorage.blob.core.windows.net/VaScans/)를 저장할 Blob Storage 컨테이너 경로입니다. |
string(필수) |
| storageContainerSasKey | 'storageContainerPath' 매개 변수에 지정된 Blob 컨테이너에 대한 쓰기 권한이 있는 SAS 키(공유 액세스 서명)입니다. 'storageAccountAccessKey'를 지정하지 않으면 StorageContainerSasKey가 필요합니다. 스토리지 계정이 Vnet 또는 방화벽 뒤에 있지 않은 경우에만 적용됩니다. | string |
VulnerabilityAssessmentRecurringScansProperties
| Name | Description | Value |
|---|---|---|
| emails | 스캔 알림이 전송되는 전자 메일 주소 배열을 지정합니다. | string[] |
| emailSubscriptionAdmins | 일정 검사 알림이 구독 관리자에게 전송되도록 지정합니다. | bool |
| isEnabled | 되풀이 검사 상태입니다. | bool |
ARM 템플릿 리소스 정의
서버/vulnerabilityAssessments 리소스 종류는 다음을 대상으로 하는 작업으로 배포할 수 있습니다.
- 리소스 그룹 - 리소스 그룹 배포 명령 참조
각 API 버전에서 변경된 속성 목록은 변경 로그참조하세요.
리소스 형식
Microsoft.Sql/servers/vulnerabilityAssessments 리소스를 만들려면 템플릿에 다음 JSON을 추가합니다.
{
"type": "Microsoft.Sql/servers/vulnerabilityAssessments",
"apiVersion": "2024-11-01-preview",
"name": "string",
"properties": {
"recurringScans": {
"emails": [ "string" ],
"emailSubscriptionAdmins": "bool",
"isEnabled": "bool"
},
"storageAccountAccessKey": "string",
"storageContainerPath": "string",
"storageContainerSasKey": "string"
}
}
속성 값
Microsoft.Sql/servers/vulnerabilityAssessments
| Name | Description | Value |
|---|---|---|
| apiVersion | api 버전 | '2024-11-01-preview' |
| name | 리소스 이름 | 'default'(필수) |
| properties | 리소스 속성입니다. | ServerVulnerabilityAssessmentProperties |
| type | 리소스 종류 | 'Microsoft.Sql/servers/vulnerabilityAssessments' |
ServerVulnerabilityAssessmentProperties
| Name | Description | Value |
|---|---|---|
| recurringScans | 되풀이 검사 설정 | VulnerabilityAssessmentRecurringScansProperties |
| storageAccountAccessKey | 취약성 평가 검사 결과에 대한 스토리지 계정의 식별자 키를 지정합니다. 'StorageContainerSasKey'를 지정하지 않으면 storageAccountAccessKey가 필요합니다. 스토리지 계정이 Vnet 또는 방화벽 뒤에 있지 않은 경우에만 적용됩니다. | string |
| storageContainerPath | 검사 결과(예: https://myStorage.blob.core.windows.net/VaScans/)를 저장할 Blob Storage 컨테이너 경로입니다. |
string(필수) |
| storageContainerSasKey | 'storageContainerPath' 매개 변수에 지정된 Blob 컨테이너에 대한 쓰기 권한이 있는 SAS 키(공유 액세스 서명)입니다. 'storageAccountAccessKey'를 지정하지 않으면 StorageContainerSasKey가 필요합니다. 스토리지 계정이 Vnet 또는 방화벽 뒤에 있지 않은 경우에만 적용됩니다. | string |
VulnerabilityAssessmentRecurringScansProperties
| Name | Description | Value |
|---|---|---|
| emails | 스캔 알림이 전송되는 전자 메일 주소 배열을 지정합니다. | string[] |
| emailSubscriptionAdmins | 일정 검사 알림이 구독 관리자에게 전송되도록 지정합니다. | bool |
| isEnabled | 되풀이 검사 상태입니다. | bool |
사용 예제
Terraform(AzAPI 공급자) 리소스 정의
서버/vulnerabilityAssessments 리소스 종류는 다음을 대상으로 하는 작업으로 배포할 수 있습니다.
- 리소스 그룹
각 API 버전에서 변경된 속성 목록은 변경 로그참조하세요.
리소스 형식
Microsoft.Sql/servers/vulnerabilityAssessments 리소스를 만들려면 템플릿에 다음 Terraform을 추가합니다.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Sql/servers/vulnerabilityAssessments@2024-11-01-preview"
name = "string"
parent_id = "string"
body = {
properties = {
recurringScans = {
emails = [
"string"
]
emailSubscriptionAdmins = bool
isEnabled = bool
}
storageAccountAccessKey = "string"
storageContainerPath = "string"
storageContainerSasKey = "string"
}
}
}
속성 값
Microsoft.Sql/servers/vulnerabilityAssessments
| Name | Description | Value |
|---|---|---|
| name | 리소스 이름 | 'default'(필수) |
| parent_id | 이 리소스의 부모인 리소스의 ID입니다. | 유형의 리소스에 대한 ID: 서버 |
| properties | 리소스 속성입니다. | ServerVulnerabilityAssessmentProperties |
| type | 리소스 종류 | "Microsoft.Sql/servers/vulnerabilityAssessments@2024-11-01-preview" |
ServerVulnerabilityAssessmentProperties
| Name | Description | Value |
|---|---|---|
| recurringScans | 되풀이 검사 설정 | VulnerabilityAssessmentRecurringScansProperties |
| storageAccountAccessKey | 취약성 평가 검사 결과에 대한 스토리지 계정의 식별자 키를 지정합니다. 'StorageContainerSasKey'를 지정하지 않으면 storageAccountAccessKey가 필요합니다. 스토리지 계정이 Vnet 또는 방화벽 뒤에 있지 않은 경우에만 적용됩니다. | string |
| storageContainerPath | 검사 결과(예: https://myStorage.blob.core.windows.net/VaScans/)를 저장할 Blob Storage 컨테이너 경로입니다. |
string(필수) |
| storageContainerSasKey | 'storageContainerPath' 매개 변수에 지정된 Blob 컨테이너에 대한 쓰기 권한이 있는 SAS 키(공유 액세스 서명)입니다. 'storageAccountAccessKey'를 지정하지 않으면 StorageContainerSasKey가 필요합니다. 스토리지 계정이 Vnet 또는 방화벽 뒤에 있지 않은 경우에만 적용됩니다. | string |
VulnerabilityAssessmentRecurringScansProperties
| Name | Description | Value |
|---|---|---|
| emails | 스캔 알림이 전송되는 전자 메일 주소 배열을 지정합니다. | string[] |
| emailSubscriptionAdmins | 일정 검사 알림이 구독 관리자에게 전송되도록 지정합니다. | bool |
| isEnabled | 되풀이 검사 상태입니다. | bool |
사용 예제
Terraform 샘플
MS SQL Server에 대한 취약성 평가를 배포하는 기본 예입니다.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "centralus"
}
variable "administrator_login_password" {
type = string
sensitive = true
description = "The administrator login password for the SQL server"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "server" {
type = "Microsoft.Sql/servers@2023-08-01-preview"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
administratorLogin = "mradministrator"
administratorLoginPassword = var.administrator_login_password
minimalTlsVersion = "1.2"
publicNetworkAccess = "Enabled"
restrictOutboundNetworkAccess = "Disabled"
version = "12.0"
}
}
}
resource "azapi_resource" "storageAccount" {
type = "Microsoft.Storage/storageAccounts@2023-05-01"
parent_id = azapi_resource.resourceGroup.id
name = "${var.resource_name}sa"
location = var.location
body = {
kind = "StorageV2"
properties = {
accessTier = "Hot"
allowBlobPublicAccess = true
allowCrossTenantReplication = false
allowSharedKeyAccess = true
defaultToOAuthAuthentication = false
dnsEndpointType = "Standard"
encryption = {
keySource = "Microsoft.Storage"
services = {
queue = {
keyType = "Service"
}
table = {
keyType = "Service"
}
}
}
isHnsEnabled = false
isLocalUserEnabled = true
isNfsV3Enabled = false
isSftpEnabled = false
minimumTlsVersion = "TLS1_2"
networkAcls = {
bypass = "AzureServices"
defaultAction = "Allow"
ipRules = []
resourceAccessRules = []
virtualNetworkRules = []
}
publicNetworkAccess = "Enabled"
supportsHttpsTrafficOnly = true
}
sku = {
name = "Standard_GRS"
}
}
}
resource "azapi_resource_action" "storageAccountKeys" {
type = "Microsoft.Storage/storageAccounts@2023-05-01"
resource_id = azapi_resource.storageAccount.id
action = "listKeys"
response_export_values = ["keys"]
}
resource "azapi_resource" "storageContainer" {
type = "Microsoft.Storage/storageAccounts/blobServices/containers@2023-05-01"
parent_id = "${azapi_resource.storageAccount.id}/blobServices/default"
name = "vulnerability-assessment"
body = {
properties = {}
}
}
resource "azapi_resource" "securityAlertPolicy" {
type = "Microsoft.Sql/servers/securityAlertPolicies@2023-08-01-preview"
parent_id = azapi_resource.server.id
name = "default"
body = {
properties = {
state = "Enabled"
}
}
}
resource "azapi_resource" "vulnerabilityAssessment" {
type = "Microsoft.Sql/servers/vulnerabilityAssessments@2023-08-01-preview"
parent_id = azapi_resource.server.id
name = "default"
body = {
properties = {
recurringScans = {
emailSubscriptionAdmins = false
emails = []
isEnabled = false
}
storageAccountAccessKey = azapi_resource_action.storageAccountKeys.output.keys[0].value
storageContainerPath = "${azapi_resource.storageAccount.output.properties.primaryEndpoints.blob}${azapi_resource.storageContainer.name}/"
}
}
depends_on = [azapi_resource.securityAlertPolicy]
}