packer-cn/formatted.pkr.hcl
Adrien Delorme ed091163be
HCL2 Parse packer.required_plugins block + packer init (#10304)
This adds the new `required_plugins` block to be nested under the packer block.

Example:
```hcl
packer {
  required_plugins {
    aws = {
      version = ">= 2.7.0"
      source = "azr/aws"
    }
    azure = ">= 2.7.0"
  }
}
```

For example on darwin_amd64 Packer will install those under :
* "${PACKER_HOME_DIR}/plugin/github.com/azr/amazon/packer-plugin-amazon_2.7.0_x5.0_darwin_amd64"
* "${PACKER_HOME_DIR}/plugin/github.com/hashicorp/azure/packer-plugin-azure_2.7.0_x5.0_darwin_amd64_x5"

+ docs
+ tests
2021-02-02 18:05:04 +01:00

40 lines
637 B
HCL

source "amazon-ebs" "example" {
communicator = "none"
source_ami = "potato"
ami_name = "potato"
instance_type = "potato"
}
build {
name = "my-provisioners-are-cooler"
sources = ["source.amazon-ebs.example"]
provisioner "comment-that-works" {
}
}
packer {
required_plugins {
comment = {
source = "sylviamoss/comment"
version = "v0.2.15"
}
comment-that-works = {
source = "sylviamoss/comment"
version = "v0.2.19"
}
}
}
build {
sources = ["source.amazon-ebs.example"]
provisioner "comment-my-provisioner" {
}
provisioner "shell-local" {
inline = ["yo"]
}
}