Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

example: aws-linux: resize and use non-root user#2186

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
bpmct merged 3 commits intomainfrombpmct/aws-ec2-user
Jun 9, 2022

Conversation

bpmct
Copy link
Member

This runs the aws-linux template as a non-root user and resizes to support JetBrains Gateway.

50% of the way there for#2179.

code-server support is trivial (I have done it inhttps://github.com/bpmct/coder-templates/tree/main/aws-spot), but we need to host the IDE icon statically as well, like this example:https://registry.terraform.io/providers/coder/coder/latest/docs/resources/app#example-usage

@bpmctbpmct requested a review fromspikecurtisJune 8, 2022 20:20
Comment on lines -39 to -50
variable "disk_size" {
description = "Specify your disk size (GiBs)"
default = "20"
type = number
validation {
condition = (
var.disk_size >= 8 &&
var.disk_size <= 256
)
error_message = "Disk size must be between 8 and 256."
}
}
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

this was never used

@@ -93,6 +80,11 @@ Content-Disposition: attachment; filename="cloud-config.txt"
#cloud-config
cloud_final_modules:
- [scripts-user, always]
hostname: ${lower(data.coder_workspace.me.name)}
users:
- name: ${lower(data.coder_workspace.me.owner)}
Copy link
Contributor

Choose a reason for hiding this comment

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

what restrictions do we have on coder usernames? Is it a subset of the valid Linux usernames?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I'm actually not sure here. I could change it to "coder" to be safe

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, so a little googling: Linux usernames can have uppercase, lowercase, digits, hyphens and underscores -- we restrict our usernames to this minus the hyphens, so all good on character set. However, Linux usernames can only be 32 characters long, at least in some flavors/system utilities and we allow unlimited. I think it's fine to just truncate if the name is too long.

Copy link
MemberAuthor

@bpmctbpmctJun 9, 2022
edited
Loading

Choose a reason for hiding this comment

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

Cool, thanks for looking into this. Usernames are now truncated, if longer than 32 characters using Terraform'ssubstr. If usernames are shorter, nothing happens

@bpmctbpmct requested a review fromspikecurtisJune 9, 2022 13:56
Copy link
Contributor

@spikecurtisspikecurtis left a comment

Choose a reason for hiding this comment

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

:shipit:

@bpmctbpmctenabled auto-merge (squash)June 9, 2022 18:00
@bpmctbpmct merged commit0ec1e8f intomainJun 9, 2022
@bpmctbpmct deleted the bpmct/aws-ec2-user branchJune 9, 2022 18:10
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@spikecurtisspikecurtisspikecurtis approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@bpmct@spikecurtis

[8]ページ先頭

©2009-2025 Movatter.jp