Giter VIP home page Giter VIP logo

terraform-provider-ext's Introduction

Terraform Extensions Provider

This is a plugin for HashiCorp Terraform, which provides one with abilities to:

  • Fetch remote resources by URLs
  • Use variables with interpolated values
  • Create local files/directories

Usage

  • Download the plugin from Releases page.
  • Install it, or put into a directory with configuration files.
  • Create a sample configuration file example.tf:
data "ext_remote" "readme" {
  url = "https://raw.githubusercontent.com/maxmanuylov/terraform-provider-ext/master/README.md"
}

data "ext_var" "readme_storage_path" {
  value = "${path.root}/readme_storage"
}

resource "ext_local_dir" "readme_storage" {
  path = "${data.ext_var.readme_storage_path.value}"
  permissions = "777"
}

resource "ext_local_file" "readme" {
  path = "${ext_local_dir.readme_storage.dir}/README.md"
  content = "${data.ext_remote.readme.content}"
  permissions = "644"
}
  • Run:
$ terraform apply

The "ext_remote" resource / data source type

Fetches resource content from the specified URL and provides it as a computed attribute. Data source performs fetch on every refresh, while resource caches the result and refetches it only in case of URL change.

Mandatory Parameters

  • url - remote resource URL to fetch

Computed Parameters

  • content - fetched content

The "ext_local_dir" resource type

Manages the local directory by the specified path. All parent directories are created as well if needed.

Mandatory Parameters

  • path - local directory path

Optional Parameters

  • permissions - string with octal directory permissions (e.g. "644")

Computed Parameters

  • dir - equal to path but is set after the directory is created (so you can depend on this resource and be sure the directory already exists by the time you use it)

The "ext_local_file" resource type

Saves the specified content to the local file.

Mandatory Parameters

  • path - local file path
  • content - content to save

Optional Parameters

  • permissions - string with octal file permissions (e.g. "644")

Computed Parameters

  • file - equal to path but is set after the file is written (so you can depend on this resource and be sure the file already exists by the time you use it)

The "ext_var" data source type

Provides simple named variable. Unlike the built-in Terraform variables these variables can have interpolations in its values.

Mandatory Parameters

  • value - variable value

The "ext_svar" data source type

Same as above, but its value is marked as sensitive to be not displayed in logs.

terraform-provider-ext's People

Contributors

giacomocariello avatar maxmanuylov avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.