github.com/hashicorp/packer@v1.14.3/command/test-fixtures/hcl2_upgrade/without-annotations/input.json (about) 1 { 2 "min_packer_version": "1.6.0", 3 "variables": { 4 "secret_account": "🤷", 5 "aws_region": null, 6 "aws_secondary_region": "{{ env `AWS_DEFAULT_REGION` }}", 7 "aws_secret_key": "", 8 "aws_access_key": "", 9 "password": "{{ aws_secretsmanager `sample/app/password` }}", 10 "password_key": "MY_KEY_{{ aws_secretsmanager `sample/app/passwords` `api_key` }}" 11 }, 12 "sensitive-variables": [ 13 "aws_secret_key", 14 "aws_access_key", 15 "secret_account", 16 "potato", 17 "password" 18 ], 19 "builders": [ 20 { 21 "type": "amazon-ebs", 22 "region": "{{ user `aws_region` }}", 23 "secret_key": "{{ user `aws_secret_key` }}", 24 "access_key": "{{ user `aws_access_key` }}", 25 "ami_name": "ubuntu-16-04-test-{{ timestamp }}", 26 "ami_description": "Ubuntu 16.04 LTS - expand root partition", 27 "source_ami_filter": { 28 "filters": { 29 "virtualization-type": "hvm", 30 "name": "ubuntu/images/*/ubuntu-xenial-16.04-amd64-server-*", 31 "root-device-type": "ebs" 32 }, 33 "owners": [ 34 "099720109477" 35 ], 36 "most_recent": true 37 }, 38 "launch_block_device_mappings": [ 39 { 40 "delete_on_termination": true, 41 "device_name": "/dev/sda1", 42 "volume_type": "gp2", 43 "volume_size": 48 44 } 45 ], 46 "spot_price": "0.0075", 47 "spot_instance_types": [ 48 "t2.small", 49 "t2.medium", 50 "t2.large" 51 ], 52 "encrypt_boot": true, 53 "ssh_username": "ubuntu", 54 "temporary_iam_instance_profile_policy_document": { 55 "Version": "2012-10-17", 56 "Statement": [ 57 { 58 "Effect": "Allow", 59 "Action": [ 60 "*" 61 ], 62 "Resource": ["*"] 63 } 64 ] 65 }, 66 "ssh_interface": "session_manager" 67 }, 68 { 69 "type": "amazon-ebs", 70 "name": "named_builder", 71 "region": "{{ user `aws_region` }}", 72 "secret_key": "{{ user `aws_secret_key` }}", 73 "access_key": "{{ user `aws_access_key` }}", 74 "ami_name": "ubuntu-16-04-test-{{ timestamp }}", 75 "ami_description": "Ubuntu 16.04 LTS - expand root partition", 76 "source_ami_filter": { 77 "filters": { 78 "virtualization-type": "hvm", 79 "name": "ubuntu/images/*/ubuntu-xenial-16.04-amd64-server-*", 80 "root-device-type": "ebs" 81 }, 82 "owners": [ 83 "099720109477" 84 ], 85 "most_recent": true 86 }, 87 "launch_block_device_mappings": [ 88 { 89 "delete_on_termination": true, 90 "device_name": "/dev/sda1", 91 "volume_type": "gp2", 92 "volume_size": 48 93 } 94 ], 95 "spot_price": "0.0075", 96 "spot_instance_types": [ 97 "t2.small", 98 "t2.medium", 99 "t2.large" 100 ], 101 "encrypt_boot": true, 102 "ssh_username": "ubuntu", 103 "temporary_iam_instance_profile_policy_document": { 104 "Version": "2012-10-17", 105 "Statement": [ 106 { 107 "Effect": "Allow", 108 "Action": [ 109 "*" 110 ], 111 "Resource": ["*"] 112 } 113 ] 114 }, 115 "ssh_interface": "session_manager" 116 } 117 ], 118 "provisioners": [ 119 { 120 "type": "shell", 121 "except": [ 122 "amazon-ebs" 123 ], 124 "max_retries": 5, 125 "inline": [ 126 "echo {{ user `secret_account` }}", 127 "echo {{ build `ID` }}", 128 "echo {{ build `SSHPublicKey` }} | head -c 14", 129 "echo {{ template_dir }} is not {{ pwd }}", 130 "echo {{ packer_version }}", 131 "echo {{ uuid }}" 132 ] 133 }, 134 { 135 "type": "shell", 136 "inline": [ 137 "echo {{ user `password` }}", 138 "echo {{ aws_secretsmanager `sample/app/password` }}", 139 "echo {{ user `password_key` }}", 140 "echo {{ aws_secretsmanager `sample/app/passwords` `api_key` }}" 141 ] 142 }, 143 { 144 "type": "shell", 145 "inline": [ 146 "echo {{ aws_secretsmanager `some_secret` }}", 147 "echo {{ aws_secretsmanager `some_secret` `with_key` }}" 148 ] 149 }, 150 { 151 "type": "shell", 152 "inline": [ 153 "echo mybuild-{{isotime | clean_resource_name}}" 154 ] 155 }, 156 { 157 "type": "shell", 158 "inline": [ 159 "echo {{ `SOMETHING` | lower }}" 160 ] 161 }, 162 { 163 "type": "shell", 164 "inline": [ 165 "echo {{ `something` | upper }}" 166 ] 167 }, 168 { 169 "type": "shell", 170 "inline": [ 171 "echo {{ split `some-string` `-` 0 }}" 172 ] 173 }, 174 { 175 "type": "shell", 176 "inline": [ 177 "echo {{ replace_all `-` `/` build_name }}" 178 ] 179 }, 180 { 181 "type": "shell", 182 "inline": [ 183 "echo {{ replace `some-string` `-` 1 `/` }}" 184 ] 185 }, 186 { 187 "type": "shell-local", 188 "only": [ 189 "amazon-ebs" 190 ], 191 "timeout": "5s", 192 "inline": [ 193 "sleep 100000" 194 ] 195 } 196 ], 197 "post-processors": [ 198 [ 199 { 200 "type": "amazon-import", 201 "region": "eu-west-3", 202 "s3_bucket_name": "hashicorp.adrien", 203 "license_type": "BYOL", 204 "format": "vmdk", 205 "tags": { 206 "Description": "packer amazon-import {{timestamp}}" 207 } 208 } 209 ], 210 [ 211 { 212 "only": [ 213 "amazon-ebs" 214 ], 215 "files": [ 216 "path/something.ova" 217 ], 218 "keep_input_artifact": true, 219 "name": "very_special_artifice_post-processor", 220 "type": "artifice" 221 }, 222 { 223 "except": [ 224 "amazon-ebs" 225 ], 226 "type": "amazon-import", 227 "s3_bucket_name": "hashicorp.adrien", 228 "license_type": "BYOL", 229 "tags": { 230 "Description": "packer amazon-import {{timestamp}}" 231 } 232 } 233 ] 234 ] 235 }