Skip to content

Commit 32dbfc0

Browse files
authored
fix: consolidate terraform apply command across cloud-account cmds (#1256)
* fix: consolidate terraform apply command across cloud-account cmds * docs: update for azure cloud-account command options
1 parent f9cc31a commit 32dbfc0

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

cli/cmd/generate_azure.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,14 @@ func initGenerateAzureTfCommandFlags() {
458458
false,
459459
"run terraform apply for the generated hcl")
460460

461+
_ = generateAzureTfCommand.PersistentFlags().MarkHidden("terraform-apply")
462+
463+
generateAzureTfCommand.PersistentFlags().BoolVar(
464+
&GenerateAzureCommandExtraState.TerraformApply,
465+
"apply",
466+
false,
467+
"run terraform apply for the generated hcl")
468+
461469
generateAzureTfCommand.PersistentFlags().StringVar(
462470
&GenerateAzureCommandExtraState.Output,
463471
"output",

cli/docs/lacework_generate_cloud-account_azure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ lacework generate cloud-account azure [flags]
3838
--ad_pass string existing active directory application password
3939
--ad_pid string existing active directory application service principle id
4040
--all_subscriptions subscription ids grant read access to ALL subscriptions within Tenant (overrides subscription ids)
41+
--apply run terraform apply for the generated hcl
4142
--configuration enable configuration integration
4243
--configuration_name string specify a custom configuration integration name
4344
--existing_storage use existing storage account
@@ -50,7 +51,6 @@ lacework generate cloud-account azure [flags]
5051
--storage_resource_group string specify storage resource group
5152
--subscription_id string specify the Azure Subscription ID to be used to provision Lacework resources
5253
--subscription_ids strings list of subscriptions to grant read access; format is id1,id2,id3
53-
--terraform-apply run terraform apply for the generated hcl
5454
```
5555

5656
### Options inherited from parent commands

integration/test_resources/help/generate_cloud-account_azure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Flags:
2525
--ad_pass string existing active directory application password
2626
--ad_pid string existing active directory application service principle id
2727
--all_subscriptions subscription ids grant read access to ALL subscriptions within Tenant (overrides subscription ids)
28+
--apply run terraform apply for the generated hcl
2829
--configuration enable configuration integration
2930
--configuration_name string specify a custom configuration integration name
3031
--existing_storage use existing storage account
@@ -37,7 +38,6 @@ Flags:
3738
--storage_resource_group string specify storage resource group
3839
--subscription_id string specify the Azure Subscription ID to be used to provision Lacework resources
3940
--subscription_ids strings list of subscriptions to grant read access; format is id1,id2,id3
40-
--terraform-apply run terraform apply for the generated hcl
4141

4242
Global Flags:
4343
-a, --account string account subdomain of URL (i.e. <ACCOUNT>.lacework.net)

0 commit comments

Comments
 (0)