HIGH
Source
Trivy
ID
AVD-CLDSTK-0001

No sensitive data stored in user_data

When creating instances, user data can be used during the initial configuration. User data must not contain sensitive information

Impact

Follow the appropriate remediation steps below to resolve the issue.

Don’t use sensitive data in the user data section

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
resource "cloudstack_instance" "web" {
  name             = "server-1"
  service_offering = "small"
  network_id       = "6eb22f91-7454-4107-89f4-36afcdf33021"
  template         = "CentOS 6.5"
  zone             = "zone-1"
  user_data        = <<EOF
 export GREETING="Hello there"
 EOF
}
1
2
3
4
5
6
7
8
resource "cloudstack_instance" "web" {
  name             = "server-1"
  service_offering = "small"
  network_id       = "6eb22f91-7454-4107-89f4-36afcdf33021"
  template         = "CentOS 6.5"
  zone             = "zone-1"
  user_data        = "ZXhwb3J0IEVESVRPUj12aW1hY3M="
}