fixed suggested changes from atif

pull/47/head
Stephen Kirby 2 years ago
parent 5aa7ee9946
commit 02c57643a8

@ -19,8 +19,8 @@ The credentials can be populated from the workspace owner's information.
```hcl ```hcl
module "git-config" { module "git-config" {
source = "git::https://github.com/coder/modules.git//git-config?ref=git-config" source = "https://registry.coder.com/modules/git-config"
agent_id = coder_agent.main.id agent_id = coder_agent.example.id
username = data.coder_workspace.me.owner username = data.coder_workspace.me.owner
user_email = data.coder_workspace.me.owner_email user_email = data.coder_workspace.me.owner_email
} }
@ -31,8 +31,8 @@ Credentials can also be set manually.
```hcl ```hcl
module "git-config" { module "git-config" {
source = "git::https://github.com/coder/modules.git//git-config?ref=git-config" source = "https://registry.coder.com/modules/git-config"
agent_id = coder_agent.main.id agent_id = coder_agent.example.id
username = "michael" username = "michael"
user_email = "michael@example.com" user_email = "michael@example.com"
} }

@ -24,13 +24,13 @@ variable "user_email" {
description = "The email of the Coder workspace owner." description = "The email of the Coder workspace owner."
} }
resource "coder_script" "personalize" { resource "coder_script" "git_config" {
agent_id = var.agent_id agent_id = var.agent_id
script = templatefile("${path.module}/run.sh", { script = templatefile("${path.module}/run.sh", {
CODER_USERNAME = var.username, CODER_USERNAME = var.username,
CODER_EMAIL = var.user_email CODER_EMAIL = var.user_email
}) })
display_name = "Git Config" display_name = "Git Config"
icon = "/emojis/1f58c.png" icon = "/icon/git.svg"
run_on_start = true run_on_start = true
} }

Loading…
Cancel
Save