-
Notifications
You must be signed in to change notification settings - Fork 887
fix: fix aws_linux template #9349
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
Conversation
There was a typo after refactoring the aws_linux.
Hi @bpmct it is ready to merge. I have tested it on dev.coder.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is a hotfix and has been automatically approved.
- ✅ Base is main
- ✅ Has hotfix label
- ✅ Head is from coder/coder
- ✅ Less than 100 lines
--//-- | ||
EOT | ||
) : "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! TIL!
You can also use try
so that Terraform provides a value even if something fails.
For example:
user_data = <<EOT
Content-Type: multipart/mixed; boundary="//"
MIME-Version: 1.0
@@ -239,17 +240,18 @@ Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="userdata.txt"
#!/bin/bash
sudo -u ${local.linux_user} sh -c '${try(coder_agent.dev[0].init_script, "N/A")}'
--//--
EOT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. More cleaner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bpmct This works and is cleaner. Feel free to update the template.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
Continuation of #9325