0

I'm not sure what I'm missing, but my custom CentOS AMI is being ignored by test ktichen. Instead of spinning up the correct AMI it spins up an Ubuntu AMI. Here is my kitchen.yml:

---
driver:
  name: ec2
  aws_ssh_key_id: chef
  security_group_ids: ["sg-b57021c0", "sg-fga04293"]
  subnet_id: subnet-58721c1d
  region: us-east-2
  require_chef_omnibus: true
  instance_type: t2.micro
  associate_public_ip: true


provisioner:
  name: chef_zero
  policyfile: Policyfile.rb

platforms:
  - name: import-ami-ffpxv46d
    image_id: ami-ffpxv46d
    transport:
      ssh_key: /user/ami.pem
      username: root

suites:
  - name: default
    provisioner:
      policyfile: Policyfile.rb
TyMac
  • 783
  • 2
  • 9
  • 32

1 Answers1

2

You have to put the image_id under the driver config like this:

platforms:
  - name: import-ami-ffpxv46d
    driver:
      image_id: ami-ffpxv46d
    transport:
      ssh_key: /user/ami.pem
      username: root

Otherwise TK sees it as part of the instance config.

coderanger
  • 52,400
  • 4
  • 52
  • 75