Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align aws_ecs_service security_connect_configuration schema with API #28813

Merged
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
11 changes: 11 additions & 0 deletions .changelog/28813.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
```release-note:bug
resource/aws_ecs_service: Allow multiple `service` blocks within `service_connect_configuration`
```

```release-note:bug
resource/aws_ecs_service: Require `service_connect_configuration.log_configuration.log_driver` to be provided
```

```release-note:bug
resource/aws_ecs_service: Mark `service_connect_configuration.service.client_alias` as optional and ensure that only 1 such block can be provided
```
10 changes: 5 additions & 5 deletions internal/service/ecs/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ func ResourceService() *schema.Resource {
Schema: map[string]*schema.Schema{
"log_driver": {
Type: schema.TypeString,
Optional: true,
Required: true,
ValidateFunc: validation.StringInSlice(ecs.LogDriver_Values(), false),
},
"options": {
Expand Down Expand Up @@ -371,12 +371,12 @@ func ResourceService() *schema.Resource {
"service": {
Type: schema.TypeList,
Optional: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"client_alias": {
Type: schema.TypeList,
Required: true,
Optional: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"dns_name": {
Expand All @@ -386,7 +386,7 @@ func ResourceService() *schema.Resource {
"port": {
Type: schema.TypeInt,
Required: true,
ValidateFunc: validation.IntBetween(1, 65535),
ValidateFunc: validation.IntBetween(0, 65535),
},
},
},
Expand All @@ -398,7 +398,7 @@ func ResourceService() *schema.Resource {
"ingress_port_override": {
Type: schema.TypeInt,
Optional: true,
ValidateFunc: validation.IntBetween(1, 65535),
ValidateFunc: validation.IntBetween(0, 65535),
},
"port_name": {
Type: schema.TypeString,
Expand Down
6 changes: 3 additions & 3 deletions website/docs/r/ecs_service.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -245,16 +245,16 @@ For more information, see [Task Networking](https://docs.aws.amazon.com/AmazonEC

`log_configuration` supports the following:

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

### secret_option

`secret_option` supports the following:

* `name` - (Optional) The name of the secret.
* `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.
* `name` - (Required) The name of the secret.
* `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.

### service

Expand Down