update plugin configspec docs
This commit is contained in:
parent
3a131b3a03
commit
0649c3f7dc
|
@ -36,6 +36,12 @@ type Builder interface {
|
|||
Run(context.Context, ui Ui, hook Hook) (Artifact, error)
|
||||
}
|
||||
```
|
||||
### The "ConfigSpec" Method
|
||||
|
||||
This method returns a hcldec.ObjectSpec, which is a spec necessary for using
|
||||
HCL2 templates with Packer. For information on how to use and implement this
|
||||
function, check our
|
||||
[object spec docs](https://www.packer.io/guides/hcl/component-object-spec)
|
||||
|
||||
### The "Prepare" Method
|
||||
|
||||
|
|
|
@ -42,6 +42,13 @@ type PostProcessor interface {
|
|||
}
|
||||
```
|
||||
|
||||
### The "ConfigSpec" Method
|
||||
|
||||
This method returns a hcldec.ObjectSpec, which is a spec necessary for using
|
||||
HCL2 templates with Packer. For information on how to use and implement this
|
||||
function, check our
|
||||
[object spec docs](https://www.packer.io/guides/hcl/component-object-spec)
|
||||
|
||||
### The "Configure" Method
|
||||
|
||||
The `Configure` method for each post-processor is called early in the build
|
||||
|
|
|
@ -67,6 +67,13 @@ validate the configuration.
|
|||
The `Prepare` method is called very early in the build process so that errors
|
||||
may be displayed to the user before anything actually happens.
|
||||
|
||||
### The "ConfigSpec" Method
|
||||
|
||||
This method returns a hcldec.ObjectSpec, which is a spec necessary for using
|
||||
HCL2 templates with Packer. For information on how to use and implement this
|
||||
function, check our
|
||||
[object spec docs](https://www.packer.io/guides/hcl/component-object-spec)
|
||||
|
||||
### The "Provision" Method
|
||||
|
||||
The `Provision` method is called when a machine is running and ready to be
|
||||
|
@ -79,6 +86,10 @@ connected at this point.
|
|||
|
||||
The provision method should not return until provisioning is complete.
|
||||
|
||||
The map[string]interface{} provides users with build-specific information,
|
||||
like host and IP, provided by the `build` template engine. Provisioners may use
|
||||
this information however they please, or not use it.
|
||||
|
||||
## Using the Communicator
|
||||
|
||||
The `packer.Communicator` parameter and interface is used to communicate with
|
||||
|
|
Loading…
Reference in New Issue