Skip to content

Commit 2256074

Browse files
authored
chore(cli): update command logging verbiage to include jobs (#1552)
Include `jobs` in command logging wording in `env_init` and `app_init`. Addresses #1542 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
1 parent 870a6a7 commit 2256074

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

internal/pkg/cli/app_init.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ import (
2222
)
2323

2424
const (
25-
fmtAppInitStart = "Creating the infrastructure to manage services under application %s."
26-
fmtAppInitComplete = "Created the infrastructure to manage services under application %s.\n"
27-
fmtAppInitFailed = "Failed to create the infrastructure to manage services under application %s.\n"
25+
fmtAppInitStart = "Creating the infrastructure to manage services and jobs under application %s."
26+
fmtAppInitComplete = "Created the infrastructure to manage services and jobs under application %s.\n"
27+
fmtAppInitFailed = "Failed to create the infrastructure to manage services and jobs under application %s.\n"
2828

2929
fmtAppInitNamePrompt = "What would you like to %s your application?"
3030
fmtAppInitNewNamePrompt = `Ok, let's create a new application then.
3131
What would you like to %s your application?`
32-
appInitNameHelpPrompt = "Services in the same application share the same VPC and ECS Cluster and are discoverable via service discovery."
32+
appInitNameHelpPrompt = "Services and jobs in the same application share the same VPC and ECS Cluster and services are discoverable via service discovery."
3333
)
3434

3535
type initAppVars struct {
@@ -216,7 +216,7 @@ func (o *initAppOpts) validateDomain(domainName string) error {
216216
// RecommendedActions returns a list of suggested additional commands users can run after successfully executing this command.
217217
func (o *initAppOpts) RecommendedActions() []string {
218218
return []string{
219-
fmt.Sprintf("Run %s to add a new service to your application.", color.HighlightCode("copilot init")),
219+
fmt.Sprintf("Run %s to add a new service or job to your application.", color.HighlightCode("copilot init")),
220220
}
221221
}
222222

@@ -239,7 +239,7 @@ func (o *initAppOpts) askSelectExistingAppName(existingApps []*config.Applicatio
239239
names = append(names, p.Name)
240240
}
241241
name, err := o.prompt.SelectOne(
242-
fmt.Sprintf("Which %s do you want to add a new service to?", color.Emphasize("existing application")),
242+
fmt.Sprintf("Which %s do you want to add a new service or job to?", color.Emphasize("existing application")),
243243
appInitNameHelpPrompt,
244244
names,
245245
prompt.WithFinalMessage("Application name:"))

internal/pkg/cli/env_init.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const (
3535
envInitDefaultEnvConfirmPrompt = `Would you like to use the default configuration for a new environment?
3636
- A new VPC with 2 AZs, 2 public subnets and 2 private subnets
3737
- A new ECS Cluster
38-
- New IAM Roles to manage services in your environment
38+
- New IAM Roles to manage services and jobs in your environment
3939
`
4040
envInitVPCSelectPrompt = "Which VPC would you like to use?"
4141
envInitPublicSubnetsSelectPrompt = "Which public subnets would you like to use?"
@@ -377,7 +377,7 @@ func (o *initEnvOpts) askImportResources() error {
377377
}
378378
if !dnsSupport {
379379
log.Errorln(`Looks like you're creating an environment using a VPC with DNS support *disabled*.
380-
Copilot cannot create services in VPCs without DNS support. We recommend enabling this property.
380+
Copilot cannot create services or jobs in VPCs without DNS support. We recommend enabling this property.
381381
To learn more about the issue:
382382
https://aws.amazon.com/premiumsupport/knowledge-center/ecs-pull-container-api-error-ecr/`)
383383
return fmt.Errorf("VPC %s has no DNS support enabled", o.importVPC.ID)

internal/pkg/cli/progress.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ var defaultResourceCounts = map[termprogress.Text]int{
2727

2828
// Row descriptions displayed while deploying an environment.
2929
const (
30-
textVPC termprogress.Text = "- Virtual private cloud on 2 availability zones to hold your services"
30+
textVPC termprogress.Text = "- Virtual private cloud on 2 availability zones to hold your services and jobs"
3131
textInternetGateway termprogress.Text = " - Internet gateway to connect the network to the internet"
32-
textPublicSubnets termprogress.Text = " - Public subnets for internet facing services "
33-
textPrivateSubnets termprogress.Text = " - Private subnets for services that can't be reached from the internet"
34-
textRouteTables termprogress.Text = " - Routing tables for services to talk with each other"
35-
textECSCluster termprogress.Text = "- ECS Cluster to hold your services "
32+
textPublicSubnets termprogress.Text = " - Public subnets for internet facing services and jobs"
33+
textPrivateSubnets termprogress.Text = " - Private subnets for services and jobs that can't be reached from the internet"
34+
textRouteTables termprogress.Text = " - Routing tables for services and jobs to talk with each other"
35+
textECSCluster termprogress.Text = "- ECS Cluster to hold your services and jobs"
3636
textALB termprogress.Text = "- Application load balancer to distribute traffic "
3737
)

0 commit comments

Comments
 (0)