Skip to content

lablabs/terraform-provider-lara-utils

Repository files navigation

About us:
Labyrinth Labs is a one-stop-shop for DevOps, Cloud & Kubernetes! We specialize in creating powerful, scalable and cloud-native platforms tailored to elevate your business.

As a team of experienced DevOps engineers, we know how to help our customers start their journey in the cloud, address the issues they have in their current setups and provide a strategic solution to transform their infrastructure.


Terraform Provider LARA Utils

The LARA Utils provider offers a collection of utility functions that extend Terraform's built-in capabilities. Currently, it provides advanced deep merging functionality for complex data structures.

Usage

Warning

This provider is in active development and considered experimental. Features and APIs may change without notice. Use with caution.

terraform {
  required_providers {
    lara-utils = {
      source = "lablabs/lara-utils"
    }
  }
}

Functions

  • deep_merge - Recursively merge nested maps and objects with various merge strategies
  • yaml_deep_merge - Functionally same as deep_merge but for YAML encoded strings

Note

Terraform map deep merging functionality is taken from https://github.com/isometry/terraform-provider-deepmerge. If you are interested in this functionality particually, consider supporting original project.

Requirements

Installation

See documentation on how to integrate provider into your project.

From Terraform Registry

The provider is available on the Terraform Registry.

From GitHub Releases

You can also download the provider binary from the GitHub releases page and install it manually.

Developing the Provider

If you wish to work on the provider, you'll first need Go installed on your machine (see Requirements above).

Building the Provider

To compile the provider, run:

mise run build

Alternatively, you can install it to your $GOPATH/bin directory:

mise run install

Local Development

For local development and testing, you can use the provider locally by creating a dev_overrides block in your ~/.terraformrc file:

provider_installation {
  dev_overrides {
    "lablabs/lara-utils" = "/path/to/your/provider/binary"
  }
  direct {}
}

Documentation

To generate or update documentation, run:

mise run generate

Testing

To run unit tests:

mise run test

In order to run the full suite of acceptance tests, run:

mise run testacc

Note

Acceptance tests create real resources, and often cost money to run.

Code Quality

Before submitting a pull request, ensure your code passes all checks:

mise run

Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Reporting Issues

If you find a bug or have a feature request, please open an issue on our GitHub repository.

Pull Requests

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for your changes
  5. Ensure all tests pass
  6. Submit a pull request

Development Guidelines

  • Follow Go best practices and conventions
  • Add tests for new functionality
  • Update documentation as needed
  • Use descriptive commit messages

Troubleshooting

Common Issues

Provider Not Found

If you encounter "provider not found" errors, ensure that:

  1. The provider is properly declared in your required_providers block
  2. You've run terraform init after adding the provider
  3. The version constraint allows for available versions

Function Not Available

If the functions are not recognized:

  1. Verify you're using Terraform >= 1.8 (required for provider-defined functions)
  2. Ensure the provider is properly configured
  3. Check that you're using the correct function syntax: provider::lara-utils::deep_merge()

Getting Help

Maintainers

This provider is maintained by Labyrinth Labs.

License

This provider is distributed under the Mozilla Public License 2.0.