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

How to pass firelensConfiguration to an ecs_taskdefinition? #1425

Closed
1 task done
threewordphrase opened this issue Aug 26, 2022 · 5 comments
Closed
1 task done

How to pass firelensConfiguration to an ecs_taskdefinition? #1425

threewordphrase opened this issue Aug 26, 2022 · 5 comments
Labels
docs module module plugins plugin (any type)

Comments

@threewordphrase
Copy link

Summary

I am trying to use the ecs_taskdefinition module to replicate a fluentd logging setup I currently have in production. I see where all of the options I need are, except I do not see how I can set firelensConfiguration on my fluentd sidecar container. Here is the JSON for my taskdefinition.

"cpu": ...,
"memory": ...,
"firelensConfiguration": {
        "type": "fluentd",
        "options": {
          "config-file-type": "file",
          "enable-ecs-log-metadata": "true",
          "config-file-value": "/fluentd/etc/fluent.conf"
        }
      },

How can I do this with the ansible module?

Issue Type

Documentation Report

Component Name

ecs_taskdefinition

Ansible Version

2.9

Collection Versions

No response

Configuration

No response

OS / Environment

debian

Additional Information

No response

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link

@alinabuzachis
Copy link
Contributor

@threewordphrase Thank you for raising this. Unfortunately, this option doesn't seem to be document. However, it should work if you specify it as a suboption of containers, something like this:

- name: Create task definition
  community.aws.ecs_taskdefinition:
    family: nginx
    containers:
    - name: '...'
      essential: true
      image: "..."
      portMappings:
      - containerPort: 8080
         hostPort: 8080
      cpu: 512
      memory: 1024
      firelensConfiguration:
        type: "fluentd"
        options:
          "config-file-type": "file"
          "enable-ecs-log-metadata": "true"
          "config-file-value": "/fluentd/etc/fluent.conf"

Can you please try it and let us know? Would you be interested opening a pull request to update the module's documentation or add any patch wether necessary?

@threewordphrase
Copy link
Author

@alinabuzachis I will try and report back

@threewordphrase
Copy link
Author

Looks like it worked! I did not know that I could pass extra options through to ECS like that. Thank you for your help @alinabuzachis

softwarefactory-project-zuul bot pushed a commit that referenced this issue Feb 1, 2023
Update docs

SUMMARY

Update ecs_taskdefinition documentation with firelensConfiguration option (see also #1425)

ISSUE TYPE


Docs Pull Request

COMPONENT NAME

ecs_taskdefinition
ADDITIONAL INFORMATION

Reviewed-by: Mark Chappell <None>
patchback bot pushed a commit that referenced this issue Feb 1, 2023
Update docs

SUMMARY

Update ecs_taskdefinition documentation with firelensConfiguration option (see also #1425)

ISSUE TYPE

Docs Pull Request

COMPONENT NAME

ecs_taskdefinition
ADDITIONAL INFORMATION

Reviewed-by: Mark Chappell <None>
(cherry picked from commit a67cb9e)
softwarefactory-project-zuul bot pushed a commit that referenced this issue Feb 1, 2023
[PR #1426/a67cb9ed backport][stable-5] Update docs

This is a backport of PR #1426 as merged into main (a67cb9e).
SUMMARY

Update ecs_taskdefinition documentation with firelensConfiguration option (see also #1425)

ISSUE TYPE


Docs Pull Request

COMPONENT NAME

ecs_taskdefinition
ADDITIONAL INFORMATION

Reviewed-by: Mark Chappell <None>
abikouo added a commit to abikouo/community.aws that referenced this issue Oct 24, 2023
…ent_auto_update_1

Automate update of collection variable using gha
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs module module plugins plugin (any type)
Projects
None yet
Development

No branches or pull requests

3 participants