Skip to content

Latest commit

 

History

History
59 lines (40 loc) · 1.99 KB

component_dev.md

File metadata and controls

59 lines (40 loc) · 1.99 KB

Terraform Engine Component Development Guide

New Resource

  1. Verify if the resource already exists in the resources list.

  2. If it does not exist, add a new component.

    See Storage Buckets for an example to copy.

  3. When implementing the template, prefer to use Cloud Foundation Toolkit modules.

    If none is available, consider writing a new CFT module if you anticipate it would be useful to the community (or file a feature request).

    If a module would not add much value, use a resource directly from the Terraform Google Provider.

  4. Add the resource in resources recipe.

  5. Add an example in the team module.

  6. Regenerate docs and examples by running scripts/regen.sh from the root repo dir.

  7. Run go test ./... from root repo dir to verify the resource works as intended.

New Field

This should be done if the resource already exists.

  1. Add the field in the resource's component.

    Note: If the resource uses a Cloud Foundation Toolkit module, you may need to add the field there first by sending a pull request and then waiting for a release.

  2. Update the resource schema.

  3. Add an example in the team module.

  4. Regenerate docs and examples by running scripts/regen.sh from the root repo dir.

  5. Run go test ./... from root repo dir to verify the resource works as intended.