Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Allow userdata to be passed as a string #1960

@rashidnhm

Description

@rashidnhm

Overview of the Issue

Currently the module allows the userdata set on the aws_launch_template to be overriden if the variable userdata_template is passed. However, that variable currently only accepts path to a userdata script as the value of it is passed to templatefile here.

It would be good to have a way to pass the userdata script as a string itself rather than a path to a file.

Motivation for or Use Case

I ran into this issue while attempting to setup multiple runners on the same instance. I have my own scripts that are loaded and rendered through templatefile that I want to pass as userdata to the module.

However, I am not finding any straightforward way of doing this, the only way I can currently do it is:

Module version being used

0.40.0

Suggest a Fix

A fix would be to introduce another variable with would allow the user to pass the userdata script as a string instead of a path to a file.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions