Skip to content

Latest commit

 

History

History
68 lines (43 loc) · 2.25 KB

provider.md

File metadata and controls

68 lines (43 loc) · 2.25 KB
permalink
/provider/

provider

provider represents the null Terraform provider config.

This package contains functions and utilities for setting up the provider using Jsonnet code.

Index

Fields

fn new

new()

null.provider.new injects a new null Terraform provider block into the root module document.

Optionally, this inserts the provider into the required_providers terraform sub block if the src and/or version parameters are set.

Args:

  • alias (string): The provider alias to set for this instance of the provider block. When null, the alias field will be omitted from the resulting provider block.
  • src (string): The provider source to set on the resulting required_providers block. If src or version is set and is not null, a required_providers block and entry for the provider will be injected into the document.
  • version (string): The provider version to set on the resulting required_providers block. If src or version is set and is not null, a required_providers block and entry for the provider will be injected into the document.

Returns:

  • A mixin object that injects the new provider (and optionally, required_providers block) into the root Terraform configuration.

fn newAttrs

newAttrs()

null.provider. constructs a new object with attributes and blocks configured for the null Terraform provider.

Unlike null.provider.new, this function will not inject the provider block into the root Terraform document. Instead, this must be passed in as the attrs argument for the tf.withProvider function to build a complete block.

This is most useful when you need to preprocess the attributes with functions, conditional, or looping logic prior to injecting into a complete block.

Returns:

  • An attribute object that can be used with tf.withProvider to construct a new null provider configuration into the root Terraform configuration.