25 lines
312 B
Go
25 lines
312 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"log"
|
|
)
|
|
|
|
func Apply(ctx context.Context) error {
|
|
terraform, err := bootstrap(ctx)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
out, err := terraform.WithExec([]string{
|
|
"apply", "-auto-approve",
|
|
}).
|
|
Stdout(ctx)
|
|
log.Printf("%s", out)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|