Skip to content

chore: add prettier terraform formatting in markdown files #134

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 5 commits into from
Jan 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .sample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tags: [helper]

<!-- Describes what this module does -->

```hcl
```tf
module "MODULE_NAME" {
source = "registry.coder.com/modules/MODULE_NAME/coder"
version = "1.0.0"
Expand All @@ -26,7 +26,7 @@ module "MODULE_NAME" {

Install the Dracula theme from [OpenVSX](https://open-vsx.org/):

```hcl
```tf
module "MODULE_NAME" {
source = "registry.coder.com/modules/MODULE_NAME/coder"
version = "1.0.0"
Expand All @@ -43,7 +43,7 @@ Enter the `<author>.<name>` into the extensions array and code-server will autom

Configure VS Code's [settings.json](https://code.visualstudio.com/docs/getstarted/settings#_settingsjson) file:

```hcl
```tf
module "MODULE_NAME" {
source = "registry.coder.com/modules/MODULE_NAME/coder"
version = "1.0.0"
Expand All @@ -59,7 +59,7 @@ module "MODULE_NAME" {

Run code-server in the background, don't fetch it from GitHub:

```hcl
```tf
module "MODULE_NAME" {
source = "registry.coder.com/modules/MODULE_NAME/coder"
version = "1.0.0"
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $ bun test -t '<module>'

You can test a module locally by updating the source as follows

```hcl
```tf
module "example" {
source = "git::https://github.com/<USERNAME>/<REPO>.git//<MODULE-NAME>?ref=<BRANCH-NAME>"
}
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Modules extend Templates to create reusable components for your development envi

e.g.

```hcl
```tf
module "code-server" {
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.0"
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.0"
agent_id = coder_agent.main.id
}
```
Expand Down
18 changes: 9 additions & 9 deletions aws-region/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ the region closest to them.

Customize the preselected parameter value:

```hcl
```tf
module "aws-region" {
source = "registry.coder.com/modules/aws-region/coder"
source = "registry.coder.com/modules/aws-region/coder"
version = "1.0.0"
default = "us-east-1"
}
Expand All @@ -34,16 +34,16 @@ provider "aws" {

Change the display name and icon for a region using the corresponding maps:

```hcl
```tf
module "aws-region" {
source = "registry.coder.com/modules/aws-region/coder"
source = "registry.coder.com/modules/aws-region/coder"
version = "1.0.0"
default = "ap-south-1"
custom_names = {
"ap-south-1": "Awesome Mumbai!"
"ap-south-1" : "Awesome Mumbai!"
}
custom_icons = {
"ap-south-1": "/emojis/1f33a.png"
"ap-south-1" : "/emojis/1f33a.png"
}
}

Expand All @@ -58,11 +58,11 @@ provider "aws" {

Hide the Asia Pacific regions Seoul and Osaka:

```hcl
```tf
module "aws-region" {
source = "registry.coder.com/modules/aws-region/coder"
source = "registry.coder.com/modules/aws-region/coder"
version = "1.0.0"
exclude = [ "ap-northeast-2", "ap-northeast-3" ]
exclude = ["ap-northeast-2", "ap-northeast-3"]
}

provider "aws" {
Expand Down
16 changes: 8 additions & 8 deletions azure-region/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ tags: [helper, parameter, azure, regions]

This module adds a parameter with all Azure regions, allowing developers to select the region closest to them.

```hcl
```tf
module "azure_region" {
source = "registry.coder.com/modules/azure-region/coder"
source = "registry.coder.com/modules/azure-region/coder"
version = "1.0.0"
default = "eastus"
}
Expand All @@ -31,15 +31,15 @@ resource "azurem_resource_group" "example" {

Change the display name and icon for a region using the corresponding maps:

```hcl
```tf
module "azure-region" {
source = "registry.coder.com/modules/azure-region/coder"
source = "registry.coder.com/modules/azure-region/coder"
version = "1.0.0"
custom_names = {
"australia": "Go Australia!"
"australia" : "Go Australia!"
}
custom_icons = {
"australia": "/icons/smiley.svg"
"australia" : "/icons/smiley.svg"
}
}

Expand All @@ -54,9 +54,9 @@ resource "azurerm_resource_group" "example" {

Hide all regions in Australia except australiacentral:

```hcl
```tf
module "azure-region" {
source = "registry.coder.com/modules/azure-region/coder"
source = "registry.coder.com/modules/azure-region/coder"
version = "1.0.0"
exclude = [
"australia",
Expand Down
42 changes: 21 additions & 21 deletions code-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ tags: [helper, ide, web]

Automatically install [code-server](https://github.com/coder/code-server) in a workspace, create an app to access it via the dashboard, install extensions, and pre-configure editor settings.

```hcl
```tf
module "code-server" {
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.0"
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.0"
agent_id = coder_agent.example.id
}
```
Expand All @@ -25,7 +25,7 @@ module "code-server" {

### Pin Versions

```hcl
```tf
module "code-server" {
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.0"
Expand All @@ -38,10 +38,10 @@ module "code-server" {

Install the Dracula theme from [OpenVSX](https://open-vsx.org/):

```hcl
```tf
module "code-server" {
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.0"
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.0"
agent_id = coder_agent.example.id
extensions = [
"dracula-theme.theme-dracula"
Expand All @@ -55,12 +55,12 @@ Enter the `<author>.<name>` into the extensions array and code-server will autom

Configure VS Code's [settings.json](https://code.visualstudio.com/docs/getstarted/settings#_settingsjson) file:

```hcl
```tf
module "settings" {
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.0"
agent_id = coder_agent.example.id
extensions = [ "dracula-theme.theme-dracula" ]
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.0"
agent_id = coder_agent.example.id
extensions = ["dracula-theme.theme-dracula"]
settings = {
"workbench.colorTheme" = "Dracula"
}
Expand All @@ -71,24 +71,24 @@ module "settings" {

Just run code-server in the background, don't fetch it from GitHub:

```hcl
```tf
module "settings" {
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.0"
agent_id = coder_agent.example.id
extensions = [ "dracula-theme.theme-dracula", "ms-azuretools.vscode-docker" ]
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.0"
agent_id = coder_agent.example.id
extensions = ["dracula-theme.theme-dracula", "ms-azuretools.vscode-docker"]
}
```

### Offline Mode

Just run code-server in the background, don't fetch it from GitHub:

```hcl
```tf
module "settings" {
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.0"
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.0"
agent_id = coder_agent.example.id
offline = true
offline = true
}
```
2 changes: 1 addition & 1 deletion coder-login/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tags: [helper]

Automatically logs the user into Coder when creating their workspace.

```hcl
```tf
module "coder-login" {
source = "registry.coder.com/modules/coder-login/coder"
version = "1.0.0"
Expand Down
6 changes: 3 additions & 3 deletions dotfiles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ tags: [helper]

Allow developers to optionally bring their own [dotfiles repository](https://dotfiles.github.io)! Under the hood, this module uses the [coder dotfiles](https://coder.com/docs/v2/latest/dotfiles) command.

```hcl
```tf
module "dotfiles" {
source = "registry.coder.com/modules/dotfiles/coder"
version = "1.0.0"
source = "registry.coder.com/modules/dotfiles/coder"
version = "1.0.0"
agent_id = coder_agent.example.id
}
```
28 changes: 14 additions & 14 deletions exoscale-instance-type/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ their desired virtuell machine for the workspace.

Customize the preselected parameter value:

```hcl
```tf
module "exoscale-instance-type" {
source = "registry.coder.com/modules/exoscale-instance-type/coder"
source = "registry.coder.com/modules/exoscale-instance-type/coder"
version = "1.0.0"
default = "standard.medium"
}

resource "exoscale_compute_instance" "instance" {
type = module.exoscale-instance-type.value
...
type = module.exoscale-instance-type.value
# ...
}

resource "coder_metadata" "workspace_info" {
Expand All @@ -42,22 +42,22 @@ resource "coder_metadata" "workspace_info" {

Change the display name a type using the corresponding maps:

```hcl
```tf
module "exoscale-instance-type" {
source = "registry.coder.com/modules/exoscale-instance-type/coder"
source = "registry.coder.com/modules/exoscale-instance-type/coder"
version = "1.0.0"
default = "standard.medium"
custom_names = {
"standard.medium": "Mittlere Instanz" # German translation
"standard.medium" : "Mittlere Instanz" # German translation
}
custom_descriptions = {
"standard.medium": "4 GB Arbeitsspeicher, 2 Kerne, 10 - 400 GB Festplatte" # German translation
"standard.medium" : "4 GB Arbeitsspeicher, 2 Kerne, 10 - 400 GB Festplatte" # German translation
}
}

resource "exoscale_compute_instance" "instance" {
type = module.exoscale-instance-type.value
...
type = module.exoscale-instance-type.value
# ...
}

resource "coder_metadata" "workspace_info" {
Expand All @@ -74,13 +74,13 @@ resource "coder_metadata" "workspace_info" {

Show only gpu1 types

```hcl
```tf
module "exoscale-instance-type" {
source = "registry.coder.com/modules/exoscale-instance-type/coder"
version = "1.0.0"
default = "gpu.large"
type_category = ["gpu"]
exclude = [
exclude = [
"gpu2.small",
"gpu2.medium",
"gpu2.large",
Expand All @@ -93,8 +93,8 @@ module "exoscale-instance-type" {
}

resource "exoscale_compute_instance" "instance" {
type = module.exoscale-instance-type.value
...
type = module.exoscale-instance-type.value
# ...
}

resource "coder_metadata" "workspace_info" {
Expand Down
Loading