Forum Discussion

ssherif's avatar
ssherif
Copper Contributor
Aug 31, 2020

Virtual Machine Vulnerability Assessment (powered by Qualys) extension installation via Terraform

Hello All,

I'm trying to install Virtual Machine Vulnerability Assessment (powered by Qualys) extension via Terraform. I imported the existing VM extension configuration then I saw LicenseCode, CustomerID, and Resource ID were written in the tfsate file. How do I get this information (LicenseCode, CustomerID, and Resource ID) for writing in my .tf files? Could Microsoft or Qualys provide this info?

5 Replies

  • chwmmh610's avatar
    chwmmh610
    Copper Contributor
    Hey wanted to send a helpful update to everyone who looks at this. You can now dow this via https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/azurerm_security_center_server_vulnerability_assessment
  • cityofships's avatar
    cityofships
    Copper Contributor

    These values are landing in /var/lib/waagent/Qualys.LinuxAgent.AzureSecurityCenter-1.0.0.13/config/0.settings file in case of Linux VM. I believe you can obtain LicenseCode from it and apply to the others, for the other values I'm not sure yet - trying to figure this out for myself as well.

     

    EDIT:

    LicenseCode parameter has in fact next 4 values encoded: customer ID, activation ID, activation URL and port. This particular customer ID used for activation is different than what's found under 'GrayLabel' settings.