We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
Manages an Azure Server Vulnerability Assessment (Qualys) to a VM.
NOTE Azure Defender has to be enabled on the subscription in order for this resource to work. See this documentation to get started.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("exampleVirtualNetwork", new Azure.Network.VirtualNetworkArgs
{
ResourceGroupName = exampleResourceGroup.Name,
AddressSpaces =
{
"192.168.1.0/24",
},
Location = exampleResourceGroup.Location,
});
var exampleSubnet = new Azure.Network.Subnet("exampleSubnet", new Azure.Network.SubnetArgs
{
ResourceGroupName = exampleResourceGroup.Name,
VirtualNetworkName = exampleVirtualNetwork.Name,
AddressPrefix = "192.168.1.0/24",
});
var exampleNetworkInterface = new Azure.Network.NetworkInterface("exampleNetworkInterface", new Azure.Network.NetworkInterfaceArgs
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
IpConfigurations =
{
new Azure.Network.Inputs.NetworkInterfaceIpConfigurationArgs
{
Name = "vm-example",
SubnetId = exampleSubnet.Id,
PrivateIpAddressAllocation = "Dynamic",
},
},
});
var exampleLinuxVirtualMachine = new Azure.Compute.LinuxVirtualMachine("exampleLinuxVirtualMachine", new Azure.Compute.LinuxVirtualMachineArgs
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
Size = "Standard_B1s",
AdminUsername = "testadmin",
AdminPassword = "Password1234!",
DisablePasswordAuthentication = false,
SourceImageReference = new Azure.Compute.Inputs.LinuxVirtualMachineSourceImageReferenceArgs
{
Publisher = "OpenLogic",
Offer = "CentOS",
Sku = "7.5",
Version = "latest",
},
OsDisk = new Azure.Compute.Inputs.LinuxVirtualMachineOsDiskArgs
{
Caching = "ReadWrite",
StorageAccountType = "Standard_LRS",
},
NetworkInterfaceIds =
{
exampleNetworkInterface.Id,
},
});
var exampleServerVulnerabilityAssessment = new Azure.SecurityCenter.ServerVulnerabilityAssessment("exampleServerVulnerabilityAssessment", new Azure.SecurityCenter.ServerVulnerabilityAssessmentArgs
{
VirtualMachineId = exampleLinuxVirtualMachine.Id,
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/compute"
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/network"
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/securitycenter"
"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{
ResourceGroupName: exampleResourceGroup.Name,
AddressSpaces: pulumi.StringArray{
pulumi.String("192.168.1.0/24"),
},
Location: exampleResourceGroup.Location,
})
if err != nil {
return err
}
exampleSubnet, err := network.NewSubnet(ctx, "exampleSubnet", &network.SubnetArgs{
ResourceGroupName: exampleResourceGroup.Name,
VirtualNetworkName: exampleVirtualNetwork.Name,
AddressPrefix: pulumi.String("192.168.1.0/24"),
})
if err != nil {
return err
}
exampleNetworkInterface, err := network.NewNetworkInterface(ctx, "exampleNetworkInterface", &network.NetworkInterfaceArgs{
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
IpConfigurations: network.NetworkInterfaceIpConfigurationArray{
&network.NetworkInterfaceIpConfigurationArgs{
Name: pulumi.String("vm-example"),
SubnetId: exampleSubnet.ID(),
PrivateIpAddressAllocation: pulumi.String("Dynamic"),
},
},
})
if err != nil {
return err
}
exampleLinuxVirtualMachine, err := compute.NewLinuxVirtualMachine(ctx, "exampleLinuxVirtualMachine", &compute.LinuxVirtualMachineArgs{
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
Size: pulumi.String("Standard_B1s"),
AdminUsername: pulumi.String("testadmin"),
AdminPassword: pulumi.String("Password1234!"),
DisablePasswordAuthentication: pulumi.Bool(false),
SourceImageReference: &compute.LinuxVirtualMachineSourceImageReferenceArgs{
Publisher: pulumi.String("OpenLogic"),
Offer: pulumi.String("CentOS"),
Sku: pulumi.String("7.5"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.LinuxVirtualMachineOsDiskArgs{
Caching: pulumi.String("ReadWrite"),
StorageAccountType: pulumi.String("Standard_LRS"),
},
NetworkInterfaceIds: pulumi.StringArray{
exampleNetworkInterface.ID(),
},
})
if err != nil {
return err
}
_, err = securitycenter.NewServerVulnerabilityAssessment(ctx, "exampleServerVulnerabilityAssessment", &securitycenter.ServerVulnerabilityAssessmentArgs{
VirtualMachineId: exampleLinuxVirtualMachine.ID(),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
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", {
resourceGroupName: exampleResourceGroup.name,
addressSpaces: ["192.168.1.0/24"],
location: exampleResourceGroup.location,
});
const exampleSubnet = new azure.network.Subnet("exampleSubnet", {
resourceGroupName: exampleResourceGroup.name,
virtualNetworkName: exampleVirtualNetwork.name,
addressPrefix: "192.168.1.0/24",
});
const exampleNetworkInterface = new azure.network.NetworkInterface("exampleNetworkInterface", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
ipConfigurations: [{
name: "vm-example",
subnetId: exampleSubnet.id,
privateIpAddressAllocation: "Dynamic",
}],
});
const exampleLinuxVirtualMachine = new azure.compute.LinuxVirtualMachine("exampleLinuxVirtualMachine", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
size: "Standard_B1s",
adminUsername: "testadmin",
adminPassword: "Password1234!",
disablePasswordAuthentication: false,
sourceImageReference: {
publisher: "OpenLogic",
offer: "CentOS",
sku: "7.5",
version: "latest",
},
osDisk: {
caching: "ReadWrite",
storageAccountType: "Standard_LRS",
},
networkInterfaceIds: [exampleNetworkInterface.id],
});
const exampleServerVulnerabilityAssessment = new azure.securitycenter.ServerVulnerabilityAssessment("exampleServerVulnerabilityAssessment", {virtualMachineId: exampleLinuxVirtualMachine.id});
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_virtual_network = azure.network.VirtualNetwork("exampleVirtualNetwork",
resource_group_name=example_resource_group.name,
address_spaces=["192.168.1.0/24"],
location=example_resource_group.location)
example_subnet = azure.network.Subnet("exampleSubnet",
resource_group_name=example_resource_group.name,
virtual_network_name=example_virtual_network.name,
address_prefix="192.168.1.0/24")
example_network_interface = azure.network.NetworkInterface("exampleNetworkInterface",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
ip_configurations=[azure.network.NetworkInterfaceIpConfigurationArgs(
name="vm-example",
subnet_id=example_subnet.id,
private_ip_address_allocation="Dynamic",
)])
example_linux_virtual_machine = azure.compute.LinuxVirtualMachine("exampleLinuxVirtualMachine",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
size="Standard_B1s",
admin_username="testadmin",
admin_password="Password1234!",
disable_password_authentication=False,
source_image_reference=azure.compute.LinuxVirtualMachineSourceImageReferenceArgs(
publisher="OpenLogic",
offer="CentOS",
sku="7.5",
version="latest",
),
os_disk=azure.compute.LinuxVirtualMachineOsDiskArgs(
caching="ReadWrite",
storage_account_type="Standard_LRS",
),
network_interface_ids=[example_network_interface.id])
example_server_vulnerability_assessment = azure.securitycenter.ServerVulnerabilityAssessment("exampleServerVulnerabilityAssessment", virtual_machine_id=example_linux_virtual_machine.id)
Example coming soon!
Create ServerVulnerabilityAssessment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ServerVulnerabilityAssessment(name: string, args?: ServerVulnerabilityAssessmentArgs, opts?: CustomResourceOptions);@overload
def ServerVulnerabilityAssessment(resource_name: str,
args: Optional[ServerVulnerabilityAssessmentArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def ServerVulnerabilityAssessment(resource_name: str,
opts: Optional[ResourceOptions] = None,
hybrid_machine_id: Optional[str] = None,
virtual_machine_id: Optional[str] = None)func NewServerVulnerabilityAssessment(ctx *Context, name string, args *ServerVulnerabilityAssessmentArgs, opts ...ResourceOption) (*ServerVulnerabilityAssessment, error)public ServerVulnerabilityAssessment(string name, ServerVulnerabilityAssessmentArgs? args = null, CustomResourceOptions? opts = null)
public ServerVulnerabilityAssessment(String name, ServerVulnerabilityAssessmentArgs args)
public ServerVulnerabilityAssessment(String name, ServerVulnerabilityAssessmentArgs args, CustomResourceOptions options)
type: azure:securitycenter:ServerVulnerabilityAssessment
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 ServerVulnerabilityAssessmentArgs
- 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 ServerVulnerabilityAssessmentArgs
- 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 ServerVulnerabilityAssessmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServerVulnerabilityAssessmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServerVulnerabilityAssessmentArgs
- 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 azureServerVulnerabilityAssessmentResource = new Azure.SecurityCenter.ServerVulnerabilityAssessment("azureServerVulnerabilityAssessmentResource", new()
{
HybridMachineId = "string",
VirtualMachineId = "string",
});
example, err := securitycenter.NewServerVulnerabilityAssessment(ctx, "azureServerVulnerabilityAssessmentResource", &securitycenter.ServerVulnerabilityAssessmentArgs{
HybridMachineId: pulumi.String("string"),
VirtualMachineId: pulumi.String("string"),
})
var azureServerVulnerabilityAssessmentResource = new com.pulumi.azure.securitycenter.ServerVulnerabilityAssessment("azureServerVulnerabilityAssessmentResource", com.pulumi.azure.securitycenter.ServerVulnerabilityAssessmentArgs.builder()
.hybridMachineId("string")
.virtualMachineId("string")
.build());
azure_server_vulnerability_assessment_resource = azure.securitycenter.ServerVulnerabilityAssessment("azureServerVulnerabilityAssessmentResource",
hybrid_machine_id="string",
virtual_machine_id="string")
const azureServerVulnerabilityAssessmentResource = new azure.securitycenter.ServerVulnerabilityAssessment("azureServerVulnerabilityAssessmentResource", {
hybridMachineId: "string",
virtualMachineId: "string",
});
type: azure:securitycenter:ServerVulnerabilityAssessment
properties:
hybridMachineId: string
virtualMachineId: string
ServerVulnerabilityAssessment Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ServerVulnerabilityAssessment resource accepts the following input properties:
- Hybrid
Machine stringId - The ID of the Azure ARC server to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
- Virtual
Machine stringId - The ID of the virtual machine to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
- Hybrid
Machine stringId - The ID of the Azure ARC server to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
- Virtual
Machine stringId - The ID of the virtual machine to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
- hybrid
Machine StringId - The ID of the Azure ARC server to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
- virtual
Machine StringId - The ID of the virtual machine to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
- hybrid
Machine stringId - The ID of the Azure ARC server to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
- virtual
Machine stringId - The ID of the virtual machine to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
- hybrid_
machine_ strid - The ID of the Azure ARC server to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
- virtual_
machine_ strid - The ID of the virtual machine to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
- hybrid
Machine StringId - The ID of the Azure ARC server to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
- virtual
Machine StringId - The ID of the virtual machine to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the ServerVulnerabilityAssessment 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 ServerVulnerabilityAssessment Resource
Get an existing ServerVulnerabilityAssessment 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?: ServerVulnerabilityAssessmentState, opts?: CustomResourceOptions): ServerVulnerabilityAssessment@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
hybrid_machine_id: Optional[str] = None,
virtual_machine_id: Optional[str] = None) -> ServerVulnerabilityAssessmentfunc GetServerVulnerabilityAssessment(ctx *Context, name string, id IDInput, state *ServerVulnerabilityAssessmentState, opts ...ResourceOption) (*ServerVulnerabilityAssessment, error)public static ServerVulnerabilityAssessment Get(string name, Input<string> id, ServerVulnerabilityAssessmentState? state, CustomResourceOptions? opts = null)public static ServerVulnerabilityAssessment get(String name, Output<String> id, ServerVulnerabilityAssessmentState state, CustomResourceOptions options)resources: _: type: azure:securitycenter:ServerVulnerabilityAssessment get: id: ${id}- 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.
- Hybrid
Machine stringId - The ID of the Azure ARC server to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
- Virtual
Machine stringId - The ID of the virtual machine to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
- Hybrid
Machine stringId - The ID of the Azure ARC server to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
- Virtual
Machine stringId - The ID of the virtual machine to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
- hybrid
Machine StringId - The ID of the Azure ARC server to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
- virtual
Machine StringId - The ID of the virtual machine to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
- hybrid
Machine stringId - The ID of the Azure ARC server to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
- virtual
Machine stringId - The ID of the virtual machine to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
- hybrid_
machine_ strid - The ID of the Azure ARC server to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
- virtual_
machine_ strid - The ID of the virtual machine to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
- hybrid
Machine StringId - The ID of the Azure ARC server to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
- virtual
Machine StringId - The ID of the virtual machine to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
Import
Server Vulnerability Assessments can be imported using the resource id, e.g.
$ pulumi import azure:securitycenter/serverVulnerabilityAssessment:ServerVulnerabilityAssessment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.Compute/virtualMachines/vm-name/providers/Microsoft.Security/serverVulnerabilityAssessments/Default
or
$ pulumi import azure:securitycenter/serverVulnerabilityAssessment:ServerVulnerabilityAssessment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.HybridCompute/machines/machine-name/providers/Microsoft.Security/serverVulnerabilityAssessments/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
azurermTerraform Provider.
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
