{
    "variables": {
        "aws_region": "cn-northwest-1",
	"aws_accountId": "405306994013",
        "aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
        "aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}",
        "aws_session_token": "{{env `AWS_SESSION_TOKEN`}}"
    },
    "builders": [
        {
            "type": "amazon-ebs",
	    "access_key":               "{{user `aws_access_key`}}",
            "secret_key":               "{{user `aws_secret_key`}}",
            "token":                    "{{user `aws_session_token`}}",
            "ami_name": "K3S-NeuVector-{{timestamp}}",
            "instance_type": "t2.large",
            "region": "{{user `aws_region`}}",
            "source_ami_filter": {
              "filters": {
              "virtualization-type": "hvm",
              "name": "ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20220706",
              "root-device-type": "ebs"
              },
              "owners": ["{{user `aws_accountId`}}"],
              "most_recent": true
            },
            "ssh_username": "ubuntu"
        }
    ],

  "provisioners": [
    {
            "type": "shell",
            "script": "./scripts/ubuntu/bootstrap.sh"
    }
  ]
}
