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

ecs_task doesn't have assignPublicIp param in network_configuration #319

Closed
kagarlickij opened this issue Dec 5, 2020 · 3 comments · Fixed by #395
Closed

ecs_task doesn't have assignPublicIp param in network_configuration #319

kagarlickij opened this issue Dec 5, 2020 · 3 comments · Fixed by #395
Labels
bug This issue/PR relates to a bug has_pr module module plugins plugin (any type)

Comments

@kagarlickij
Copy link

SUMMARY

ecs_task doesn't have assignPublicIp param in network_configuration

ISSUE TYPE
  • Bug Report
COMPONENT NAME

ecs_task

ANSIBLE VERSION
2.10.3
CONFIGURATION

all default

OS / ENVIRONMENT

Ubuntu 18.04

STEPS TO REPRODUCE
- name: RUN a task on Fargate
  ecs_task:
    aws_access_key: "{{ aws_access_key }}"
    aws_secret_key: "{{ aws_secret_key }}"
    region: "{{ aws_region }}"
    operation: run
    cluster: "{{ cluster_name }}"
    task_definition: "{{ task_definition_name }}"
    count: 1
    started_by: ansible_user
    launch_type: FARGATE
    network_configuration:
      subnets:
      - "{{ subnet_id }}"
      security_groups:
      - "{{ security_group_id }}"
      assignPublicIp: "ENABLED"
  register: task_output
EXPECTED RESULTS

I expect assignPublicIp: "ENABLED" to create task with Public IP as per AWS documentation: "assignPublicIp -> (string)
Whether the task's elastic network interface receives a public IP address. The default value is DISABLED ."

Without Public IP task can't pull Docker image and use CloudWatch

ACTUAL RESULTS

https://docs.ansible.com/ansible/latest/collections/community/aws/ecs_task_module.html#parameter-network_configuration doesn't have this option

@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

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module module plugins plugin (any type) labels Jan 13, 2021
@goneri
Copy link
Member

goneri commented Mar 17, 2021

Hi @kagarlickij,

Can you please test this PR: #395 It should address your problem and any feedback would be helpful to speed up the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug has_pr module module plugins plugin (any type)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants