Skip to content

Commit

Permalink
fix: only ask for existing topic/sub when pub/sub audit log enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Manan-Bhatia-0 committed Jul 28, 2023
1 parent eb13db3 commit 809a443
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cli/cmd/generate_gcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -540,27 +540,27 @@ func promptGcpAuditLogQuestions(
{
Prompt: &survey.Confirm{Message: QuestionGcpUseExistingPubSubTopic,
Default: extraState.UseExistingPubSubTopic},
Checks: []*bool{&config.AuditLog},
Checks: []*bool{&config.AuditLog, &config.UsePubSubAudit},
Required: true,
Response: &extraState.UseExistingPubSubTopic,
},
{
Prompt: &survey.Input{Message: QuestionGcpExistingPubSubTopicId, Default: config.ExistingPubSubTopicId},
Checks: []*bool{&config.AuditLog, &extraState.UseExistingPubSubTopic},
Checks: []*bool{&config.AuditLog, &config.UsePubSubAudit, &extraState.UseExistingPubSubTopic},
Required: true,
Response: &config.ExistingPubSubTopicId,
},
{
Prompt: &survey.Confirm{Message: QuestionGcpUseExistingPubSubSubscription,
Default: extraState.UseExistingPubSubSubscription},
Checks: []*bool{&config.AuditLog},
Checks: []*bool{&config.AuditLog, &config.UsePubSubAudit},
Required: true,
Response: &extraState.UseExistingPubSubSubscription,
},
{
Prompt: &survey.Input{Message: QuestionGcpExistingPubSubSubscriptionName,
Default: config.ExistingPubSubSubscriptionName},
Checks: []*bool{&config.AuditLog, &extraState.UseExistingPubSubSubscription},
Checks: []*bool{&config.AuditLog, &config.UsePubSubAudit, &extraState.UseExistingPubSubSubscription},
Required: true,
Response: &config.ExistingPubSubSubscriptionName,
},
Expand Down

0 comments on commit 809a443

Please sign in to comment.