Skip to content

[New Feature]: Add parameter to keep null or empty keys in taskdefΒ #780

@gzub-resonate

Description

@gzub-resonate

Feature Description

Add a parameter to allow for keys that are empty to not be discarded when the new taskdef is created.
This parameter would be called keep-null-value-keys and would accept a list of key names to not filter out if they are empty.

For example you could pass in:

    keep-null-value-keys: tag

to retain any keys with the name tag

Problem Statement

We wanted to set our logging configuration in the taskdef to be this:

"logConfiguration": {
                "logDriver": "splunk",
                "options": {
                    "splunk-url": "http://splunk.dev.aws.resonatedigital.net:8088/",
                    "splunk-verify-connection": "false",
                    "splunk-sourcetype": "docker:json",
                    "splunk-index": "services-general-purpose",
                    "tag": "",
                    "splunk-format": "raw"
                }

but when the taskdef was created by the action the key tag was dropped from the newly created taskdef, this would result in tag being assigned the default value which is not what we wanted.

Alternatives Considered/ Work-arounds

  • disabling all discarding of null or empty values
  • Tried alternate solutions done on the splunk side that are sub-optimal

Additional Context

N/A

Willingness to Contribute

Are you willing to submit a Pull Request for this feature? Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestA feature should be added or improved.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions