Dagger
Search

terraform

No long description provided.

Installation

dagger install github.com/Excoriate/daggerverse/terraform@v1.7.0

Entrypoint

Return Type
Terraform !
Arguments
NameTypeDescription
versionString the Version of the Terraform to use, e.g., "0.12.24". by default, it uses the latest Version.
imageString Image of the container to use. by default, it uses the official HashiCorp Terraform Image hashicorp/terraform.
srcDirectory !Src is the directory that contains all the source code, including the module directory.
ctrContainer ctr is the container to use as a base container. It's an optional parameter. If it's not set, it's going to create a new container.
envVarsString envVars is a string of environment variables in the form of "key1=value1,key2=value2"
Example
func (m *myModule) example(src *Directory) *Terraform  {
	return dag.
			Terraform(src)
}
@function
def example(src: dagger.Directory, ) -> dag.Terraform:
	return (
		dag.terraform(src)
	)
@func()
example(src: Directory, ): Terraform {
	return dag
		.terraform(src)
}

Types

Terraform

version()

The Version of the Terraform to use, e.g., “0.12.24”.

Return Type
String !
Example
dagger -m github.com/Excoriate/daggerverse/terraform@aac14886243868ff0cbf25077f5893586b55fefd call \
 --src DIR_PATH version
func (m *myModule) example(ctx context.Context, src *Directory) string  {
	return dag.
			Terraform(src).
			Version(ctx)
}
@function
async def example(src: dagger.Directory, ) -> str:
	return await (
		dag.terraform(src)
		.version()
	)
@func()
async example(src: Directory, ): Promise<string> {
	return dag
		.terraform(src)
		.version()
}

image()

Image of the container to use.

Return Type
String !
Example
dagger -m github.com/Excoriate/daggerverse/terraform@aac14886243868ff0cbf25077f5893586b55fefd call \
 --src DIR_PATH image
func (m *myModule) example(ctx context.Context, src *Directory) string  {
	return dag.
			Terraform(src).
			Image(ctx)
}
@function
async def example(src: dagger.Directory, ) -> str:
	return await (
		dag.terraform(src)
		.image()
	)
@func()
async example(src: Directory, ): Promise<string> {
	return dag
		.terraform(src)
		.image()
}

src()

Src is the directory that contains all the source code, including the module directory.

Return Type
Directory !
Example
dagger -m github.com/Excoriate/daggerverse/terraform@aac14886243868ff0cbf25077f5893586b55fefd call \
 --src DIR_PATH src
func (m *myModule) example(src *Directory) *Directory  {
	return dag.
			Terraform(src).
			Src()
}
@function
def example(src: dagger.Directory, ) -> dagger.Directory:
	return (
		dag.terraform(src)
		.src()
	)
@func()
example(src: Directory, ): Directory {
	return dag
		.terraform(src)
		.src()
}

baseCtr()

BaseCtr is the container to use as a base container.

Return Type
Container !
Example
dagger -m github.com/Excoriate/daggerverse/terraform@aac14886243868ff0cbf25077f5893586b55fefd call \
 --src DIR_PATH base-ctr
func (m *myModule) example(src *Directory) *Container  {
	return dag.
			Terraform(src).
			BaseCtr()
}
@function
def example(src: dagger.Directory, ) -> dagger.Container:
	return (
		dag.terraform(src)
		.base_ctr()
	)
@func()
example(src: Directory, ): Container {
	return dag
		.terraform(src)
		.baseCtr()
}

base()

Base sets up the Container with a Terraform Image and cache volumes

Return Type
Terraform !
Example
dagger -m github.com/Excoriate/daggerverse/terraform@aac14886243868ff0cbf25077f5893586b55fefd call \
 --src DIR_PATH base \
 init --tfmod string
func (m *myModule) example(src *Directory) *Terraform  {
	return dag.
			Terraform(src).
			Base()
}
@function
def example(src: dagger.Directory, ) -> dag.Terraform:
	return (
		dag.terraform(src)
		.base()
	)
@func()
example(src: Directory, ): Terraform {
	return dag
		.terraform(src)
		.base()
}

withModule()

WithModule specifies the module to use in the Terraform module by the ‘Src’ directory.

Return Type
Terraform !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-No description provided
Example
dagger -m github.com/Excoriate/daggerverse/terraform@aac14886243868ff0cbf25077f5893586b55fefd call \
 --src DIR_PATH with-module --src DIR_PATH \
 init --tfmod string
func (m *myModule) example(src *Directory, src1 *Directory) *Terraform  {
	return dag.
			Terraform(src).
			WithModule(src1)
}
@function
def example(src: dagger.Directory, src1: dagger.Directory) -> dag.Terraform:
	return (
		dag.terraform(src)
		.with_module(src1)
	)
@func()
example(src: Directory, src1: Directory): Terraform {
	return dag
		.terraform(src)
		.withModule(src1)
}

withContainer()

WithContainer specifies the container to use in the Terraform module.

Return Type
Terraform !
Arguments
NameTypeDefault ValueDescription
ctrContainer !-No description provided
Example
dagger -m github.com/Excoriate/daggerverse/terraform@aac14886243868ff0cbf25077f5893586b55fefd call \
 --src DIR_PATH with-container --ctr IMAGE:TAG \
 init --tfmod string
func (m *myModule) example(src *Directory, ctr *Container) *Terraform  {
	return dag.
			Terraform(src).
			WithContainer(ctr)
}
@function
def example(src: dagger.Directory, ctr: dagger.Container) -> dag.Terraform:
	return (
		dag.terraform(src)
		.with_container(ctr)
	)
@func()
example(src: Directory, ctr: Container): Terraform {
	return dag
		.terraform(src)
		.withContainer(ctr)
}

init()

Init initializes the Terraform module.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
tfmodString !-The tfmod is the Terraform module to use.
argsString -args are the n number of arguments to pass to the Terraform init command.
Example
dagger -m github.com/Excoriate/daggerverse/terraform@aac14886243868ff0cbf25077f5893586b55fefd call \
 --src DIR_PATH init --tfmod string
func (m *myModule) example(src *Directory, tfmod string) *Container  {
	return dag.
			Terraform(src).
			Init(tfmod)
}
@function
def example(src: dagger.Directory, tfmod: str) -> dagger.Container:
	return (
		dag.terraform(src)
		.init(tfmod)
	)
@func()
example(src: Directory, tfmod: string): Container {
	return dag
		.terraform(src)
		.init(tfmod)
}

plan()

Plan creates an execution plan for the Terraform module.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
tfmodString !-The tfmod is the Terraform module to use.
argsString -args are the n number of arguments to pass to the Terraform plan command.
initArgsString -initArgs are the n number of arguments to pass to the Terraform init command.
Example
dagger -m github.com/Excoriate/daggerverse/terraform@aac14886243868ff0cbf25077f5893586b55fefd call \
 --src DIR_PATH plan --tfmod string
func (m *myModule) example(src *Directory, tfmod string) *Container  {
	return dag.
			Terraform(src).
			Plan(tfmod)
}
@function
def example(src: dagger.Directory, tfmod: str) -> dagger.Container:
	return (
		dag.terraform(src)
		.plan(tfmod)
	)
@func()
example(src: Directory, tfmod: string): Container {
	return dag
		.terraform(src)
		.plan(tfmod)
}

apply()

Apply creates an execution plan for the Terraform module.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
tfmodString !-The tfmod is the Terraform module to use.
argsString -args are the n number of arguments to pass to the Terraform apply command.
initArgsString -initArgs are the n number of arguments to pass to the Terraform init command.
Example
dagger -m github.com/Excoriate/daggerverse/terraform@aac14886243868ff0cbf25077f5893586b55fefd call \
 --src DIR_PATH apply --tfmod string
func (m *myModule) example(src *Directory, tfmod string) *Container  {
	return dag.
			Terraform(src).
			Apply(tfmod)
}
@function
def example(src: dagger.Directory, tfmod: str) -> dagger.Container:
	return (
		dag.terraform(src)
		.apply(tfmod)
	)
@func()
example(src: Directory, tfmod: string): Container {
	return dag
		.terraform(src)
		.apply(tfmod)
}

destroy()

Destroy creates an execution plan for the Terraform module.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
tfmodString !-The tfmod is the Terraform module to use.
argsString -args are the n number of arguments to pass to the Terraform destroy command.
initArgsString -initArgs are the n number of arguments to pass to the Terraform init command.
Example
dagger -m github.com/Excoriate/daggerverse/terraform@aac14886243868ff0cbf25077f5893586b55fefd call \
 --src DIR_PATH destroy --tfmod string
func (m *myModule) example(src *Directory, tfmod string) *Container  {
	return dag.
			Terraform(src).
			Destroy(tfmod)
}
@function
def example(src: dagger.Directory, tfmod: str) -> dagger.Container:
	return (
		dag.terraform(src)
		.destroy(tfmod)
	)
@func()
example(src: Directory, tfmod: string): Container {
	return dag
		.terraform(src)
		.destroy(tfmod)
}

validate()

Validate creates an execution plan for the Terraform module.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
tfmodString !-The tfmod is the Terraform module to use.
argsString -args are the n number of arguments to pass to the Terraform validate command.
initArgsString -initArgs are the n number of arguments to pass to the Terraform init command.
Example
dagger -m github.com/Excoriate/daggerverse/terraform@aac14886243868ff0cbf25077f5893586b55fefd call \
 --src DIR_PATH validate --tfmod string
func (m *myModule) example(src *Directory, tfmod string) *Container  {
	return dag.
			Terraform(src).
			Validate(tfmod)
}
@function
def example(src: dagger.Directory, tfmod: str) -> dagger.Container:
	return (
		dag.terraform(src)
		.validate(tfmod)
	)
@func()
example(src: Directory, tfmod: string): Container {
	return dag
		.terraform(src)
		.validate(tfmod)
}

format()

Format creates an execution plan for the Terraform module.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
tfmodString !-The tfmod is the Terraform module to use.
argsString -args are the n number of arguments to pass to the Terraform fmt command.
Example
dagger -m github.com/Excoriate/daggerverse/terraform@aac14886243868ff0cbf25077f5893586b55fefd call \
 --src DIR_PATH format --tfmod string
func (m *myModule) example(src *Directory, tfmod string) *Container  {
	return dag.
			Terraform(src).
			Format(tfmod)
}
@function
def example(src: dagger.Directory, tfmod: str) -> dagger.Container:
	return (
		dag.terraform(src)
		.format(tfmod)
	)
@func()
example(src: Directory, tfmod: string): Container {
	return dag
		.terraform(src)
		.format(tfmod)
}