Commit Graph

7 Commits

Author SHA1 Message Date
Adrien Delorme 8208f425c8 addrs: remove Plugin.ForDisplay func, the String one does the job
to make things less confusing
2021-02-15 15:32:42 +01:00
Adrien Delorme 4487152d1e cosmetic commit 2021-02-15 14:07:22 +01:00
Adrien Delorme fe12d53e77 addr: remove support for defaulting plugin namespace and host 2021-02-15 13:47:39 +01:00
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
Adrien Delorme fd873b8811 Referenceable: explain a bit more of the whys 2020-11-04 13:21:41 +01:00
Adrien Delorme 20b7fd9687 add hcl2template/addrs/doc.go 2020-11-02 17:48:29 +01:00
Adrien Delorme 91d7332471 add basic code for variable validation parsing
* hcl2template/addrs.ParseRef will parse a reference and tell for example if we
  are referring to a variable and its name, for now it can only do that and in
  the future it improved when we need to most of it is from the TF code. This
  is used to tell wether a variable vas referenced in a variable validation
  condition; for now.
* Added Validations blocks to the hcl2 Variable struct and code to
  parse/validate that.
2020-10-30 12:26:22 +01:00