Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Make ecs platform alb.load_balancer_arn optional #4729

Merged
merged 2 commits into from
Jun 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/4729.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
plugin/ecs: Make `alb.load_balancer_arn` optional
```
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ parameter {
key = "alb"
description = "Provides additional configuration for using an ALB with ECS"
type = "category"
required = true
required = false
}

parameter {
Expand Down Expand Up @@ -38,7 +38,7 @@ parameter {
key = "alb.load_balancer_arn"
description = "the ARN on an existing ALB to configure\nwhen this is set, Waypoint will use this ALB instead of creating its own. A target group will still be created for each deployment, and will be added to a listener on the configured ALB port (Waypoint will the listener if it doesn't exist). This allows users to configure their ALB outside Waypoint but still have Waypoint hook the application to that ALB"
type = "string"
required = true
required = false
}

parameter {
Expand Down
2 changes: 1 addition & 1 deletion builtin/aws/ecs/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -2787,7 +2787,7 @@ type ALBConfig struct {

// When set, waypoint will configure the target group into the load balancer.
// This allows for usage of existing ALBs.
LoadBalancerArn string `hcl:"load_balancer_arn"`
LoadBalancerArn string `hcl:"load_balancer_arn,optional"`

// Indicates, when creating an ALB, that it should be internal rather than
// internet facing.
Expand Down
218 changes: 109 additions & 109 deletions embedJson/gen/platform-aws-ecs.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,115 @@
"mappers": null,
"name": "aws-ecs",
"optionalFields": [
{
"Field": "alb",
"Type": "ecs.ALBConfig",
"Synopsis": "Provides additional configuration for using an ALB with ECS",
"Summary": "",
"Optional": true,
"Default": "",
"EnvVar": "",
"Category": true,
"Example": "",
"SubFields": [
{
"Field": "certificate",
"Type": "string",
"Synopsis": "the ARN of an AWS Certificate Manager cert to associate with the ALB",
"Summary": "",
"Optional": true,
"Default": "",
"EnvVar": "",
"Category": false,
"Example": "",
"SubFields": null
},
{
"Field": "domain_name",
"Type": "string",
"Synopsis": "Fully qualified domain name to set for the ALB",
"Summary": "set along with zone_id to have DNS automatically setup for the ALB. this value should include the full hostname and domain name, for instance app.example.com",
"Optional": true,
"Default": "",
"EnvVar": "",
"Category": false,
"Example": "",
"SubFields": null
},
{
"Field": "ingress_port",
"Type": "int64",
"Synopsis": "Internet-facing traffic port. Defaults to 80 if 'certificate' is unset, 443 if set.",
"Summary": "used to set the ALB listener port, and the ALB security group ingress port",
"Optional": true,
"Default": "",
"EnvVar": "",
"Category": false,
"Example": "",
"SubFields": null
},
{
"Field": "internal",
"Type": "bool",
"Synopsis": "Whether or not the created ALB should be internal",
"Summary": "used when listener_arn is not set. If set, the created ALB will have a scheme of `internal`, otherwise by default it has a scheme of `internet-facing`.",
"Optional": true,
"Default": "",
"EnvVar": "",
"Category": false,
"Example": "",
"SubFields": null
},
{
"Field": "load_balancer_arn",
"Type": "string",
"Synopsis": "the ARN on an existing ALB to configure",
"Summary": "when this is set, Waypoint will use this ALB instead of creating its own. A target group will still be created for each deployment, and will be added to a listener on the configured ALB port (Waypoint will the listener if it doesn't exist). This allows users to configure their ALB outside Waypoint but still have Waypoint hook the application to that ALB",
"Optional": true,
"Default": "",
"EnvVar": "",
"Category": false,
"Example": "",
"SubFields": null
},
{
"Field": "security_group_ids",
"Type": "list of string",
"Synopsis": "",
"Summary": "",
"Optional": true,
"Default": "",
"EnvVar": "",
"Category": false,
"Example": "",
"SubFields": null
},
{
"Field": "subnets",
"Type": "list of string",
"Synopsis": "the VPC subnets to use for the ALB",
"Summary": "",
"Optional": true,
"Default": "public subnets in the default VPC",
"EnvVar": "",
"Category": false,
"Example": "",
"SubFields": null
},
{
"Field": "zone_id",
"Type": "string",
"Synopsis": "Route53 ZoneID to create a DNS record into",
"Summary": "set along with alb.domain_name to have DNS automatically setup for the ALB",
"Optional": true,
"Default": "",
"EnvVar": "",
"Category": false,
"Example": "",
"SubFields": null
}
]
},
{
"Field": "architecture",
"Type": "string",
Expand Down Expand Up @@ -311,115 +420,6 @@
],
"outputAttrsHelp": "Output attributes can be used in your `waypoint.hcl` as [variables](/waypoint/docs/waypoint-hcl/variables) via [`artifact`](/waypoint/docs/waypoint-hcl/variables/artifact) or [`deploy`](/waypoint/docs/waypoint-hcl/variables/deploy).",
"requiredFields": [
{
"Field": "alb",
"Type": "ecs.ALBConfig",
"Synopsis": "Provides additional configuration for using an ALB with ECS",
"Summary": "",
"Optional": false,
"Default": "",
"EnvVar": "",
"Category": true,
"Example": "",
"SubFields": [
{
"Field": "certificate",
"Type": "string",
"Synopsis": "the ARN of an AWS Certificate Manager cert to associate with the ALB",
"Summary": "",
"Optional": true,
"Default": "",
"EnvVar": "",
"Category": false,
"Example": "",
"SubFields": null
},
{
"Field": "domain_name",
"Type": "string",
"Synopsis": "Fully qualified domain name to set for the ALB",
"Summary": "set along with zone_id to have DNS automatically setup for the ALB. this value should include the full hostname and domain name, for instance app.example.com",
"Optional": true,
"Default": "",
"EnvVar": "",
"Category": false,
"Example": "",
"SubFields": null
},
{
"Field": "ingress_port",
"Type": "int64",
"Synopsis": "Internet-facing traffic port. Defaults to 80 if 'certificate' is unset, 443 if set.",
"Summary": "used to set the ALB listener port, and the ALB security group ingress port",
"Optional": true,
"Default": "",
"EnvVar": "",
"Category": false,
"Example": "",
"SubFields": null
},
{
"Field": "internal",
"Type": "bool",
"Synopsis": "Whether or not the created ALB should be internal",
"Summary": "used when listener_arn is not set. If set, the created ALB will have a scheme of `internal`, otherwise by default it has a scheme of `internet-facing`.",
"Optional": true,
"Default": "",
"EnvVar": "",
"Category": false,
"Example": "",
"SubFields": null
},
{
"Field": "load_balancer_arn",
"Type": "string",
"Synopsis": "the ARN on an existing ALB to configure",
"Summary": "when this is set, Waypoint will use this ALB instead of creating its own. A target group will still be created for each deployment, and will be added to a listener on the configured ALB port (Waypoint will the listener if it doesn't exist). This allows users to configure their ALB outside Waypoint but still have Waypoint hook the application to that ALB",
"Optional": false,
"Default": "",
"EnvVar": "",
"Category": false,
"Example": "",
"SubFields": null
},
{
"Field": "security_group_ids",
"Type": "list of string",
"Synopsis": "",
"Summary": "",
"Optional": true,
"Default": "",
"EnvVar": "",
"Category": false,
"Example": "",
"SubFields": null
},
{
"Field": "subnets",
"Type": "list of string",
"Synopsis": "the VPC subnets to use for the ALB",
"Summary": "",
"Optional": true,
"Default": "public subnets in the default VPC",
"EnvVar": "",
"Category": false,
"Example": "",
"SubFields": null
},
{
"Field": "zone_id",
"Type": "string",
"Synopsis": "Route53 ZoneID to create a DNS record into",
"Summary": "set along with alb.domain_name to have DNS automatically setup for the ALB",
"Optional": true,
"Default": "",
"EnvVar": "",
"Category": false,
"Example": "",
"SubFields": null
}
]
},
{
"Field": "health_check",
"Type": "ecs.AppHealthCheck",
Expand Down
Loading