github.com/hashicorp/packer@v1.14.3/command/test-fixtures/hcl2_upgrade/variables-only/expected.pkr.hcl (about)

     1  
     2  variable "aws_access_key" {
     3    type      = string
     4    default   = ""
     5    sensitive = true
     6  }
     7  
     8  variable "aws_region" {
     9    type = string
    10  }
    11  
    12  variable "aws_secondary_region" {
    13    type    = string
    14    default = "${env("AWS_DEFAULT_REGION")}"
    15  }
    16  
    17  variable "aws_secret_key" {
    18    type      = string
    19    default   = ""
    20    sensitive = true
    21  }
    22  
    23  variable "secret_account" {
    24    type      = string
    25    default   = "🤷"
    26    sensitive = true
    27  }
    28  
    29  data "amazon-secretsmanager" "autogenerated_1" {
    30    name = "sample/app/password"
    31  }
    32  
    33  data "amazon-secretsmanager" "autogenerated_2" {
    34    key  = "api_key"
    35    name = "sample/app/passwords"
    36  }
    37  # The "legacy_strftime" function has been provided for backwards compatability, but we recommend switching to the timestamp and formatdate functions.
    38  
    39  local "password" {
    40    sensitive  = true
    41    expression = "${data.amazon-secretsmanager.autogenerated_1.value}"
    42  }
    43  
    44  locals {
    45    ami_description = "AMI ${legacy_strftime("%Y-%m")}"
    46    password_key    = "MY_KEY_${data.amazon-secretsmanager.autogenerated_2.value}"
    47  }