terraform-provider-environment

command module
v0.2.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

README

Terraform Provider Environment release

The environment provider reads shell environment variables and makes them available as a terraform data source.

Documentation

The documentation for this provider is available on the Terraform Registry.

Example

terraform {
  required_providers {
    environment = {
      source = "registry.terraform.io/morganpeat/environment"
    }
  }
}

provider "environment" {}


data "environment_variable" "path" {
  name = "PATH"
}

output "path" {
  value = data.environment_variable.path.value
}
terraform init && terraform plan

Requirements

Building the Provider

To build the provider, you'll need to clone the repository and execute the Go install command from inside the repository's directory.

go install

Using the provider

The provider can be used by adding it to the provider requirements.

terraform {
  required_providers {
    environment = {
      source = "registry.terraform.io/morganpeat/environment"
    }
  }
}

If you wish to use a local provider binary instead, it will need to added to the development overrides.

provider_installation {
  dev_overrides {
    "morganpeat/environment" = "/home/developer/go/bin/terraform-provider-environment"
  }

  direct {}
}

Developing the Provider

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

To compile the provider, run go install. This will build the provider and put the provider binary in the $GOPATH/bin directory.

To generate or update documentation, run go generate.

LICENSE

This project is under MPL-2.0 license.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL