github.com/khulnasoft-lab/defsec@v1.0.5-0.20230827010352-5e9f46893d95/rules/cloud/policies/digitalocean/compute/enforce_https.tf.go (about)

     1  package compute
     2  
     3  var terraformEnforceHttpsGoodExamples = []string{
     4  	`
     5   resource "digitalocean_loadbalancer" "bad_example" {
     6     name   = "bad_example-1"
     7     region = "nyc3"
     8     
     9     forwarding_rule {
    10   	entry_port     = 443
    11   	entry_protocol = "https"
    12     
    13   	target_port     = 443
    14   	target_protocol = "https"
    15     }
    16     
    17     droplet_ids = [digitalocean_droplet.web.id]
    18   }
    19   `,
    20  }
    21  
    22  var terraformEnforceHttpsBadExamples = []string{
    23  	`
    24   resource "digitalocean_loadbalancer" "bad_example" {
    25     name   = "bad_example-1"
    26     region = "nyc3"
    27   
    28     forwarding_rule {
    29       entry_port     = 80
    30       entry_protocol = "http"
    31   
    32       target_port     = 80
    33       target_protocol = "http"
    34     }
    35   
    36     droplet_ids = [digitalocean_droplet.web.id]
    37   }
    38   `,
    39  }
    40  
    41  var terraformEnforceHttpsLinks = []string{
    42  	`https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/loadbalancer`,
    43  }
    44  
    45  var terraformEnforceHttpsRemediationMarkdown = ``