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

feat: Add support for multiple service inside service_connect_configuration #163

Conversation

CaerusKaru
Copy link

@CaerusKaru CaerusKaru commented Feb 9, 2024

Copied from #123

Description

Add support for multiple services inside service_connect_configuration

Motivation and Context

According to the Documentation of ECS, service_connect_configuration can configure multiple client-server services and hashicorp/aws provider supports for deploying it (as far as I know) after the major version 5.

service_connect_configuration supports the following:

  • enabled - (Required) Specifies whether to use Service Connect with this service.
  • log_configuration - (Optional) The log configuration for the container. See below.
  • namespace - (Optional) The namespace name or ARN of the aws_service_discovery_http_namespace for use with Service Connect.
  • service - (Optional) The list of Service Connect service objects. See below.

Quote: https://registry.terraform.io/providers/hashicorp/aws/5.0.0/docs/resources/ecs_service#service_connect_configuration

However this module does not accept the list of Service Connect service objects and that is the issue this PR wants to fix.

Breaking Changes

None

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)

  • I have tested and validated these changes using one or more of the provided examples/* projects

  • I have executed pre-commit run -a on my pull request

@CaerusKaru CaerusKaru force-pushed the feature/support_multiple_service_on_service_connect branch from e9c17cf to c4d091f Compare February 9, 2024 00:27
@CaerusKaru
Copy link
Author

@bryantbiggs I believe this will add backwards-compatibility to the service block and allow us to merge this change in now. The logic is as follows:

  1. Use lookup as an alias for "is this variable a map".
  2. If it fails, that means we have an array, so pass that clean (if it's undefined/invalid, we pass an empty array)
  3. If it succeeds, we have an individual entry. Wrap it in an array and continue

I haven't had a chance to deploy the examples; is that something you can do to carry this over the line?

@bryantbiggs
Copy link
Member

closed in #123

@CaerusKaru CaerusKaru deleted the feature/support_multiple_service_on_service_connect branch February 12, 2024 15:52
@CaerusKaru
Copy link
Author

For those of us stuck on the 4.x provider, can we at least get a release of this feature on a 4.x compatible branch? 😢

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants