Skip to content
New issue

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

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

Already on GitHub? # to your account

Add ASSIGN_PUBLIC_IP configuration option #28

Merged
merged 2 commits into from
Oct 29, 2020
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- Add ASSIGN_PUBLIC_IP configuration option [#28](https://github.com/azavea/django-ecsmanage/pull/28)

## [2.0.0] - 2020-10-13
### Added
Expand Down
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ environment. For example:
'Environment': 'Staging',
'Project': 'ProjectName'
},
'ASSIGN_PUBLIC_IP': 'DISABLED',
'AWS_REGION': 'us-east-1',
},
}
Expand Down Expand Up @@ -149,6 +150,9 @@ the appropriate AWS resources for your cluster:
| ``SUBNET_TAGS`` | A dictionary of tags to use to identify a subnet | |
| | for your task. | |
+--------------------------+------------------------------------------------------------------+---------------+
| ``ASSIGN_PUBLIC_IP`` | Whether to automatically assign a public IP address to your | ``DISABLED`` |
| | task. Can be ``ENABLED`` or ``DISABLED``. | |
+--------------------------+------------------------------------------------------------------+---------------+
| ``LAUNCH_TYPE`` | The ECS launch type for your task. | ``FARGATE`` |
+--------------------------+------------------------------------------------------------------+---------------+
| ``PLATFORM_VERSION`` | The Fargate platform version, if ``LAUNCH_TYPE`` is ``FARGATE``. | ``LATEST`` |
Expand Down
2 changes: 2 additions & 0 deletions ecsmanage/management/commands/ecsmanage.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def parse_config(self):
"CLUSTER_NAME": "",
"SECURITY_GROUP_TAGS": "",
"SUBNET_TAGS": "",
"ASSIGN_PUBLIC_IP": "DISABLED",
"LAUNCH_TYPE": "FARGATE",
"PLATFORM_VERSION": "LATEST",
"AWS_REGION": "us-east-1",
Expand Down Expand Up @@ -189,6 +190,7 @@ def run_task(self, config, task_def_arn, security_group_id, subnet_id, cmd):
"awsvpcConfiguration": {
"subnets": [subnet_id],
"securityGroups": [security_group_id],
"assignPublicIp": config["ASSIGN_PUBLIC_IP"],
}
}

Expand Down