Deploy Qualys Container Security Registry Sensor across AWS, Azure, and GCP with Terraform.
Terraform configurations for deploying Qualys Container Security Registry Sensor on:
- AWS ECS: EC2-based ECS cluster with optional VPC creation
- AWS EKS: Managed Kubernetes with EC2 node groups
- Azure AKS: Managed Kubernetes with Azure Container Registry
- GCP GKE: Managed Kubernetes with Google Container Registry
./deploy.shThis wizard will:
- Check prerequisites
- Prompt for Qualys credentials
- Configure cloud-specific settings
- Deploy infrastructure and sensor
make help # Show all commands
make deploy-aws # Deploy to AWS ECS
make deploy-aws-eks # Deploy to AWS EKS
make deploy-azure # Deploy to Azure AKS
make deploy-gcp # Deploy to GCP GKETerraform configuration for ECS cluster on EC2 instances with optional VPC creation.
- AWS CLI configured with appropriate credentials
- Terraform >= 1.0
- Private ECR repository with Qualys container image
Copy and edit the example configuration:
cp aws/terraform.tfvars.example aws/terraform.tfvarsEdit aws/terraform.tfvars:
region = "us-east-1"
cluster_name = "qualys-registry-cluster"
instance_type = "t3.medium"
desired_capacity = 2
create_vpc = true
qualys_image = "123456789012.dkr.ecr.us-east-1.amazonaws.com/qualys/qcs-sensor:latest"
qualys_activation_id = "YOUR_ACTIVATION_ID"
qualys_customer_id = "YOUR_CUSTOMER_ID"
qualys_pod_url = "https://qualysapi.qualys.com"To use an existing VPC instead, set create_vpc = false and provide vpc_id and subnet_ids.
# Using Make (recommended)
make deploy-aws
# Or manually
cd aws
terraform init
terraform plan
terraform applyWith create_vpc=true:
- VPC: 172.20.250.0/24
- 2x Public subnets with NAT gateways
- 2x Private subnets for ECS instances
- Auto-scaling group with EC2 instances
- One Qualys Container Security Registry Sensor task per instance
With create_vpc=false:
- Uses existing VPC and subnets
- Requires NAT gateway or internet access for ECR
terraform output cluster_name
terraform output cluster_arn
terraform output task_definition_arnTerraform configuration for EKS cluster with managed node groups and optional VPC creation.
- AWS CLI configured with appropriate credentials
- Terraform >= 1.0
- kubectl
- Private ECR repository with Qualys container image
Copy and edit the example configuration:
cp aws-eks/terraform.tfvars.example aws-eks/terraform.tfvarsEdit aws-eks/terraform.tfvars:
region = "us-east-1"
cluster_name = "qualys-registry-cluster"
instance_type = "t3.medium"
desired_capacity = 2
create_vpc = true
qualys_image = "123456789012.dkr.ecr.us-east-1.amazonaws.com/qualys/qcs-sensor:latest"
qualys_activation_id = "YOUR_ACTIVATION_ID"
qualys_customer_id = "YOUR_CUSTOMER_ID"
qualys_pod_url = "https://qualysapi.qualys.com"# Using Make (recommended) - deploys infra + k8s resources
make deploy-aws-eks
# Or manually
cd aws-eks
terraform init
terraform plan
terraform applyaws eks update-kubeconfig --name qualys-registry-cluster --region us-east-1Update image in kubernetes/qualys-daemonset.yaml with your ECR location, then:
kubectl apply -f kubernetes/qualys-daemonset.yaml
kubectl get pods -n qualys-sensor- EKS cluster with managed node groups (auto-scaling 1-10 nodes)
- VPC: 172.20.0.0/16 with public and private subnets
- NAT gateways for outbound internet access
- OIDC provider for IAM Roles for Service Accounts
- KMS encryption for secrets
- DaemonSet deployment (one Registry Sensor pod per node)
terraform output cluster_name
terraform output cluster_endpoint
terraform output get_credentials_commandTerraform configuration for AKS cluster with managed node pools and optional ACR.
- Azure CLI configured with valid subscription
- Terraform >= 1.0
- kubectl
Copy and edit the example configuration:
cp azure/terraform.tfvars.example azure/terraform.tfvarsEdit azure/terraform.tfvars:
resource_group_name = "qualys-registry-sensor-rg"
location = "eastus"
cluster_name = "qualys-registry-cluster"
node_count = 2
node_vm_size = "Standard_B2s"
create_acr = true
qualys_activation_id = "YOUR_ACTIVATION_ID"
qualys_customer_id = "YOUR_CUSTOMER_ID"
qualys_pod_url = "https://qualysapi.qualys.com"# Using Make (recommended) - deploys infra + k8s resources
make deploy-azure
# Or manually
cd azure
terraform init
terraform plan
terraform applyaz aks get-credentials \
--resource-group qualys-registry-sensor-rg \
--name qualys-registry-clusterEdit kubernetes/qualys-namespace-secret.yaml with your credentials, then:
kubectl apply -f ../kubernetes/qualys-namespace-secret.yamlUpdate image in kubernetes/qualys-daemonset.yaml with your ACR location, then:
kubectl apply -f ../kubernetes/qualys-daemonset.yaml
kubectl get pods -n qualys-sensor- AKS cluster with auto-scaling node pools (1-10 nodes)
- VNet: 10.1.0.0/16 with dedicated subnet
- Azure Container Registry for Qualys Container Security Registry Sensor images
- Log Analytics workspace for monitoring
- DaemonSet deployment (one Registry Sensor pod per node)
terraform output aks_cluster_name
terraform output acr_login_server
terraform output get_credentials_commandTerraform configuration for GKE regional cluster with multi-zone node pools.
- Google Cloud SDK configured with valid project
- Terraform >= 1.0
- kubectl
Copy and edit the example configuration:
cp gcp/terraform.tfvars.example gcp/terraform.tfvarsEdit gcp/terraform.tfvars:
project_id = "your-gcp-project-id"
region = "us-central1"
cluster_name = "qualys-registry-cluster"
node_count = 1
machine_type = "e2-medium"
create_gcr = true
qualys_activation_id = "YOUR_ACTIVATION_ID"
qualys_customer_id = "YOUR_CUSTOMER_ID"
qualys_pod_url = "https://qualysapi.qualys.com"gcloud auth login
gcloud auth application-default login
gcloud config set project YOUR_PROJECT_ID# Using Make (recommended) - deploys infra + k8s resources
make deploy-gcp
# Or manually
cd gcp
terraform init
terraform plan
terraform applygcloud container clusters get-credentials qualys-registry-cluster \
--region us-central1 \
--project YOUR_PROJECT_IDEdit kubernetes/qualys-namespace-secret.yaml with your credentials, then:
kubectl apply -f ../kubernetes/qualys-namespace-secret.yamlUpdate image in kubernetes/qualys-daemonset.yaml with your GCR location, then:
kubectl apply -f ../kubernetes/qualys-daemonset.yaml
kubectl get pods -n qualys-sensor- Regional GKE cluster with multi-zone node pools
- Custom VPC with dedicated subnet ranges
- Google Container Registry for Qualys Container Security Registry Sensor images
- Cloud Monitoring and Logging integration
- Workload Identity enabled
- DaemonSet deployment (one Registry Sensor pod per node)
terraform output cluster_name
terraform output cluster_endpoint
terraform output get_credentials_command# Using Make
make logs-aws # AWS ECS
make logs-aws-eks # AWS EKS
make logs-azure # Azure
make logs-gcp # GCP
# Or manually (Kubernetes)
kubectl logs -n qualys-sensor -l app=qualys-container-sensor --tail=100
kubectl logs -n qualys-sensor <pod-name> -fmake status-aws # AWS ECS
make status-aws-eks # AWS EKS
make status-azure # Azure
make status-gcp # GCPkubectl set image daemonset/qualys-container-sensor \
qualys-container-sensor=<new-image> \
-n qualys-sensorkubectl describe daemonset qualys-container-sensor -n qualys-sensor
kubectl get secret qualys-credentials -n qualys-sensorCredentials:
- Store Qualys credentials securely (AWS Secrets Manager, Azure Key Vault, GCP Secret Manager)
- Never commit credentials to version control
- Rotate credentials regularly
Network:
- Registry Sensor requires outbound internet access to Qualys platform
- Use private subnets with NAT gateway
- Configure appropriate security groups and firewall rules
Permissions:
- Registry Sensor requires elevated capabilities for container scanning
- Review required permissions before deployment
- Follow principle of least privilege
Images:
- Store Qualys Container Security Registry Sensor images in private registries
- Keep Registry Sensor images updated
- Scan images for vulnerabilities
# Using Make
make destroy-aws
make destroy-aws-eks
make destroy-azure
make destroy-gcp
# Or manually
cd <cloud> && terraform destroyFor issues related to:
- Qualys Container Security Registry Sensor: Contact Qualys Support
- Deployment Templates: Open an issue in this repository
- Cloud Providers: Consult respective cloud provider documentation