Skip to content

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

Merged
merged 2 commits into from
Aug 31, 2023
Merged

Conversation

matifali
Copy link
Member

@matifali matifali commented Aug 25, 2023

Continuation of #9325

  1. There was a typo after refactoring the aws_linux.
  2. Fixes coder agent showing unhealthy when the workspace is in the stopped state.

image

There was a typo after refactoring the aws_linux.
@matifali matifali requested a review from bpmct August 25, 2023 22:14
@matifali matifali changed the title fix: fix a typo in aws_linux template fix: fix aws_linux template Aug 28, 2023
@matifali matifali marked this pull request as ready for review August 31, 2023 01:18
@matifali
Copy link
Member Author

Hi @bpmct it is ready to merge. I have tested it on dev.coder.com

Copy link

@cdr-bot cdr-bot bot left a 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

@matifali matifali merged commit 73976dd into main Aug 31, 2023
@matifali matifali deleted the matifali/aws_linux-template_hotfix branch August 31, 2023 01:24
@github-actions github-actions bot locked and limited conversation to collaborators Aug 31, 2023
--//--
EOT
) : ""
Copy link
Member

@bpmct bpmct Sep 1, 2023

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. More cleaner

Copy link
Member Author

@matifali matifali Sep 2, 2023

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants