schema

package
v0.0.0-...-44d6a2b Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FileProvisioner = &schema.BodySchema{
	Description: lang.Markdown("Provisioner used to copy files or directories from the machine executing Terraform" +
		" to the newly created resource."),
	HoverURL: "https://www.terraform.io/docs/language/resources/provisioners/file.html",
	Attributes: map[string]*schema.AttributeSchema{
		"source": {
			IsOptional: true,
			Constraint: schema.AnyExpression{OfType: cty.String},
			Description: lang.Markdown("The source file or folder. It can be specified as relative " +
				"to the current working directory or as an absolute path. This attribute cannot be " +
				"specified with `content`."),
		},
		"content": {
			IsOptional: true,
			Constraint: schema.AnyExpression{OfType: cty.String},
			Description: lang.Markdown("The content to copy on the destination. If destination is a file," +
				" the content will be written on that file, in case of a directory a file named `tf-file-content`" +
				" is created. It's recommended to use a file as the destination. This attribute cannot be " +
				"specified with `source`."),
		},
		"destination": {
			IsRequired:  true,
			Constraint:  schema.AnyExpression{OfType: cty.String},
			Description: lang.Markdown("The destination path. It must be specified as an absolute path."),
		},
	},
}
View Source
var LocalExecProvisioner = &schema.BodySchema{
	Description: lang.Markdown("Invokes a local executable after a resource is created. " +
		"This invokes a process on the machine running Terraform, not on the resource."),
	HoverURL: "https://www.terraform.io/docs/language/resources/provisioners/local-exec.html",
	Attributes: map[string]*schema.AttributeSchema{
		"command": {
			IsRequired: true,
			Constraint: schema.AnyExpression{OfType: cty.String},
			Description: lang.Markdown("This is the command to execute. It can be provided as a relative path " +
				"to the current working directory or as an absolute path. It is evaluated in a shell, " +
				"and can use environment variables or Terraform variables."),
		},
		"interpreter": {
			IsOptional: true,
			Constraint: schema.List{
				Elem: schema.AnyExpression{OfType: cty.String},
			},
			Description: lang.Markdown("If provided, this is a list of interpreter arguments used to execute " +
				"the command. The first argument is the interpreter itself. It can be provided as a relative " +
				"path to the current working directory or as an absolute path. The remaining arguments are " +
				"appended prior to the command. This allows building command lines of the form " +
				"`\"/bin/bash\", \"-c\", \"echo foo\"`. If interpreter is unspecified, sensible defaults " +
				"will be chosen based on the system OS."),
		},
		"working_dir": {
			IsOptional: true,
			Constraint: schema.AnyExpression{OfType: cty.String},
			Description: lang.Markdown("If provided, specifies the working directory where command will be executed. " +
				"It can be provided as as a relative path to the current working directory or as an absolute path. " +
				"The directory must exist."),
		},
		"environment": {
			IsOptional: true,
			Constraint: schema.Map{
				Elem: schema.AnyExpression{OfType: cty.String},
			},
			Description: lang.Markdown("Map of key value pairs representing the environment of the executed command. " +
				"Inherits the current process environment."),
		},
	},
}
View Source
var RemoteExecProvisioner = &schema.BodySchema{
	Description: lang.Markdown("Invokes a script on a remote resource after it is created. " +
		"This can be used to run a configuration management tool, bootstrap into a cluster, etc."),
	HoverURL: "https://www.terraform.io/docs/language/resources/provisioners/remote-exec.html",
	Attributes: map[string]*schema.AttributeSchema{
		"inline": {
			IsOptional: true,
			Constraint: schema.List{
				Elem: schema.AnyExpression{OfType: cty.String},
			},
			Description: lang.Markdown("A list of command strings. They are executed in the order they are provided." +
				" This cannot be provided with `script` or `scripts`."),
		},
		"script": {
			IsOptional: true,
			Constraint: schema.AnyExpression{OfType: cty.String},
			Description: lang.Markdown("A path (relative or absolute) to a local script that will be copied " +
				"to the remote resource and then executed. This cannot be provided with `inline` or `scripts`."),
		},
		"scripts": {
			IsOptional: true,
			Constraint: schema.List{
				Elem: schema.AnyExpression{OfType: cty.String},
			},
			Description: lang.Markdown("A list of paths (relative or absolute) to local scripts that will be copied " +
				"to the remote resource and then executed. They are executed in the order they are provided." +
				" This cannot be provided with `inline` or `script`."),
		},
	},
}

Functions

func ConnectionDependentBodies

func ConnectionDependentBodies(v *version.Version) map[schema.SchemaKey]*schema.BodySchema

func ModuleSchema

func ModuleSchema(v *version.Version) *schema.BodySchema

func ProvisionerDependentBodies

func ProvisionerDependentBodies(v *version.Version) map[schema.SchemaKey]*schema.BodySchema

Types

This section is empty.

Jump to

Keyboard shortcuts

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