github.com/hashicorp/packer@v1.14.3/command/test-fixtures/hcl2_upgrade/complete/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": "breakpoint", 121 "only": [ 122 "amazon-ebs" 123 ], 124 "pause_before": "5s" 125 }, 126 { 127 "type": "shell", 128 "except": [ 129 "amazon-ebs" 130 ], 131 "max_retries": 5, 132 "inline": [ 133 "echo {{ user `secret_account` }}", 134 "echo {{ build `ID` }}", 135 "echo {{ build `SSHPublicKey` }} | head -c 14", 136 "echo {{ template_dir }} is not {{ pwd }}", 137 "echo {{ packer_version }}", 138 "echo {{ uuid }}" 139 ] 140 }, 141 { 142 "type": "shell", 143 "inline": [ 144 "echo {{ user `password` }}", 145 "echo {{ aws_secretsmanager `sample/app/password` }}", 146 "echo {{ user `password_key` }}", 147 "echo {{ aws_secretsmanager `sample/app/passwords` `api_key` }}" 148 ] 149 }, 150 { 151 "type": "shell", 152 "inline": [ 153 "echo {{ aws_secretsmanager `some_secret` }}", 154 "echo {{ aws_secretsmanager `some_secret` `with_key` }}" 155 ] 156 }, 157 { 158 "type": "shell", 159 "inline": [ 160 "echo mybuild-{{isotime | clean_resource_name}}" 161 ] 162 }, 163 { 164 "type": "shell", 165 "inline": [ 166 "echo {{ `SOMETHING` | lower }}" 167 ] 168 }, 169 { 170 "type": "shell", 171 "inline": [ 172 "echo {{ `something` | upper }}" 173 ] 174 }, 175 { 176 "type": "shell", 177 "inline": [ 178 "echo {{ split `some-string` `-` 0 }}" 179 ] 180 }, 181 { 182 "type": "shell", 183 "inline": [ 184 "echo {{ replace_all `-` `/` build_name }}" 185 ] 186 }, 187 { 188 "type": "shell", 189 "inline": [ 190 "echo {{ replace `some-string` `-` 1 `/` }}" 191 ] 192 }, 193 { 194 "type": "shell-local", 195 "only": [ 196 "amazon-ebs" 197 ], 198 "timeout": "5s", 199 "pause_before": "5s", 200 "inline": [ 201 "sleep 100000" 202 ] 203 } 204 ], 205 "post-processors": [ 206 [ 207 { 208 "type": "amazon-import", 209 "region": "eu-west-3", 210 "s3_bucket_name": "hashicorp.adrien", 211 "license_type": "BYOL", 212 "format": "vmdk", 213 "tags": { 214 "Description": "packer amazon-import {{timestamp}}" 215 } 216 } 217 ], 218 [ 219 { 220 "only": [ 221 "amazon-ebs" 222 ], 223 "files": [ 224 "path/something.ova" 225 ], 226 "keep_input_artifact": true, 227 "name": "very_special_artifice_post-processor", 228 "type": "artifice" 229 }, 230 { 231 "except": [ 232 "amazon-ebs" 233 ], 234 "type": "amazon-import", 235 "s3_bucket_name": "hashicorp.adrien", 236 "license_type": "BYOL", 237 "tags": { 238 "Description": "packer amazon-import {{timestamp}}" 239 } 240 }, 241 { 242 "type": "compress" 243 } 244 ] 245 ] 246 }