Skip to content

Commit

Permalink
Add the same args to overmind terraform plan/apply
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanratcliffe committed Nov 27, 2024
1 parent 79960f3 commit 80ab934
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/terraform.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ everything that happened, including any unexpected repercussions.`,

func init() {
rootCmd.AddCommand(terraformCmd)

addChangeCreationFlags(terraformCmd)
}

var applyOnlyArgs = []string{
Expand Down
6 changes: 6 additions & 0 deletions cmd/terraform_plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,11 @@ func TerraformPlanImpl(ctx context.Context, cmd *cobra.Command, oi sdp.OvermindI
if repoUrl == "" {
repoUrl, _ = DetectRepoURL(AllDetectors)
}
tags, err := parseTagsArgument()
if err != nil {
uploadChangesSpinner.Fail(fmt.Sprintf("Uploading planned changes: failed to parse tags: %v", err))
return nil
}

properties := &sdp.ChangeProperties{
Title: title,
Expand All @@ -233,6 +238,7 @@ func TerraformPlanImpl(ctx context.Context, cmd *cobra.Command, oi sdp.OvermindI
RawPlan: string(tfPlanOutput),
CodeChanges: codeChangesOutput,
Repo: repoUrl,
Tags: tags,
}

if changeUuid == uuid.Nil {
Expand Down

0 comments on commit 80ab934

Please sign in to comment.