// Apply runs "terraform apply" in the given directory. It returns the absolute
// path of the tfstate file, rooted in the specified directory, along with any
// errors from Terraform.
Apply runs "terraform apply" in the given directory. It returns the absolute
path of the tfstate file, rooted in the specified directory, along with any
errors from Terraform.
// Apply runs " terraform apply " in the given directory . It returns the absolute // path of the tfstate file rooted in the specified directory along with any // errors from Terraform .
func Apply(dir string, extraArgs ...string) (string, error) {
	stateFileName := "terraform.tfstate"
	defaultArgs := []string{
		"apply",
		"-auto-approve",
		"-no-color",
		fmt.Sprintf("-state=%s", stateFileName),
	}
	args := append(defaultArgs, extraArgs...)
	return path.Join(dir, stateFileName), terraformExec(dir, args...)
}
func Apply ( dir string , extraArgs ... string ) ( string , error ) { stateFileName := " " defaultArgs := [ ] string { " " , " " , " " , fmt . Sprintf ( " " , stateFileName ) , } args := append ( defaultArgs , extraArgs ... ) return path . Join ( dir , stateFileName ) , terraformExec ( dir , args ... ) }
Apply runs "terraform apply" in the given directory.
Apply runs " terraform apply " in the given directory .