Skip to content

Commit 468259f

Browse files
authored
Merge pull request #28813 from mattburgess/fix-ecs-service-connect-configurations
Align aws_ecs_service security_connect_configuration schema with API
2 parents 5e85d6d + 57aea96 commit 468259f

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
lines changed

.changelog/28813.txt

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
```release-note:bug
2+
resource/aws_ecs_service: Allow multiple `service` blocks within `service_connect_configuration`
3+
```
4+
5+
```release-note:bug
6+
resource/aws_ecs_service: Require `service_connect_configuration.log_configuration.log_driver` to be provided
7+
```
8+
9+
```release-note:bug
10+
resource/aws_ecs_service: Mark `service_connect_configuration.service.client_alias` as optional and ensure that only 1 such block can be provided
11+
```

internal/service/ecs/service.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ func ResourceService() *schema.Resource {
338338
Schema: map[string]*schema.Schema{
339339
"log_driver": {
340340
Type: schema.TypeString,
341-
Optional: true,
341+
Required: true,
342342
ValidateFunc: validation.StringInSlice(ecs.LogDriver_Values(), false),
343343
},
344344
"options": {
@@ -373,12 +373,12 @@ func ResourceService() *schema.Resource {
373373
"service": {
374374
Type: schema.TypeList,
375375
Optional: true,
376-
MaxItems: 1,
377376
Elem: &schema.Resource{
378377
Schema: map[string]*schema.Schema{
379378
"client_alias": {
380379
Type: schema.TypeList,
381-
Required: true,
380+
Optional: true,
381+
MaxItems: 1,
382382
Elem: &schema.Resource{
383383
Schema: map[string]*schema.Schema{
384384
"dns_name": {
@@ -388,7 +388,7 @@ func ResourceService() *schema.Resource {
388388
"port": {
389389
Type: schema.TypeInt,
390390
Required: true,
391-
ValidateFunc: validation.IntBetween(1, 65535),
391+
ValidateFunc: validation.IntBetween(0, 65535),
392392
},
393393
},
394394
},
@@ -400,7 +400,7 @@ func ResourceService() *schema.Resource {
400400
"ingress_port_override": {
401401
Type: schema.TypeInt,
402402
Optional: true,
403-
ValidateFunc: validation.IntBetween(1, 65535),
403+
ValidateFunc: validation.IntBetween(0, 65535),
404404
},
405405
"port_name": {
406406
Type: schema.TypeString,

website/docs/r/ecs_service.html.markdown

+3-3
Original file line numberDiff line numberDiff line change
@@ -245,16 +245,16 @@ For more information, see [Task Networking](https://docs.aws.amazon.com/AmazonEC
245245

246246
`log_configuration` supports the following:
247247

248-
* `log_driver` - (Optional) The log driver to use for the container.
248+
* `log_driver` - (Required) The log driver to use for the container.
249249
* `options` - (Optional) The configuration options to send to the log driver.
250250
* `secret_option` - (Optional) The secrets to pass to the log configuration. See below.
251251

252252
### secret_option
253253

254254
`secret_option` supports the following:
255255

256-
* `name` - (Optional) The name of the secret.
257-
* `value_from` - (Optional) The secret to expose to the container. The supported values are either the full ARN of the AWS Secrets Manager secret or the full ARN of the parameter in the SSM Parameter Store.
256+
* `name` - (Required) The name of the secret.
257+
* `value_from` - (Required) The secret to expose to the container. The supported values are either the full ARN of the AWS Secrets Manager secret or the full ARN of the parameter in the SSM Parameter Store.
258258

259259
### service
260260

0 commit comments

Comments
 (0)