Merge pull request #63 from coder/module-screenshots
docs: added screenshots for all visual modules
BIN
.images/aws-custom.png
Normal file
|
After Width: | Height: | Size: 93 KiB |
BIN
.images/aws-exclude.png
Normal file
|
After Width: | Height: | Size: 98 KiB |
BIN
.images/azure-custom.png
Normal file
|
After Width: | Height: | Size: 66 KiB |
BIN
.images/azure-default.png
Normal file
|
After Width: | Height: | Size: 102 KiB |
BIN
.images/azure-exclude.png
Normal file
|
After Width: | Height: | Size: 57 KiB |
BIN
.images/filebrowser.png
Normal file
|
After Width: | Height: | Size: 308 KiB |
BIN
.images/vscode-desktop.png
Normal file
|
After Width: | Height: | Size: 155 KiB |
@@ -29,18 +29,19 @@ provider "aws" {
|
|||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
### Customize Regions
|
### Customize regions
|
||||||
|
|
||||||
Change the display name and icon for a region:
|
Change the display name and icon for a region using the corresponding maps:
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
module "aws-region" {
|
module "aws-region" {
|
||||||
source = "https://registry.coder.com/modules/aws-region"
|
source = "https://registry.coder.com/modules/aws-region"
|
||||||
|
default = "ap-south-1"
|
||||||
custom_names = {
|
custom_names = {
|
||||||
"fra": "Awesome Germany!"
|
"ap-south-1": "Awesome Mumbai!"
|
||||||
}
|
}
|
||||||
custom_icons = {
|
custom_icons = {
|
||||||
"fra": "/icons/smiley.svg"
|
"ap-south-1": "/emojis/1f33a.png"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,17 +50,28 @@ provider "aws" {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Exclude Regions
|

|
||||||
|
|
||||||
Hide the `fra` region:
|
### Exclude regions
|
||||||
|
|
||||||
|
Hide the Asia Pacific regions Seoul and Osaka:
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
module "aws-region" {
|
module "aws-region" {
|
||||||
source = "https://registry.coder.com/modules/aws-region"
|
source = "https://registry.coder.com/modules/aws-region"
|
||||||
exclude = [ "fra" ]
|
exclude = [ "ap-northeast-2", "ap-northeast-3" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
provider "aws" {
|
provider "aws" {
|
||||||
region = module.aws_region.value
|
region = module.aws_region.value
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Related templates
|
||||||
|
|
||||||
|
For a complete AWS EC2 template, see the following examples in the [Coder Registry](https://registry.coder.com/).
|
||||||
|
|
||||||
|
- [AWS EC2 (Linux)](https://registry.coder.com/templates/aws-linux)
|
||||||
|
- [AWS EC2 (Windows)](https://registry.coder.com/templates/aws-windows)
|
||||||
|
|||||||
@@ -22,20 +22,22 @@ resource "azurem_resource_group" "example" {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
### Customize existing regions
|
### Customize existing regions
|
||||||
|
|
||||||
Change the display name for a region:
|
Change the display name and icon for a region using the corresponding maps:
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
module "azure-region" {
|
module "azure-region" {
|
||||||
source = "https://registry.coder.com/modules/azure-region"
|
source = "https://registry.coder.com/modules/azure-region"
|
||||||
custom_names = {
|
custom_names = {
|
||||||
"eastus": "Eastern United States!"
|
"australia": "Go Australia!"
|
||||||
}
|
}
|
||||||
custom_icons = {
|
custom_icons = {
|
||||||
"eastus": "/icons/smiley.svg"
|
"australia": "/icons/smiley.svg"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,17 +46,33 @@ resource "azurerm_resource_group" "example" {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
### Exclude Regions
|
### Exclude Regions
|
||||||
|
|
||||||
Hide the `westus2` region:
|
Hide all regions in Australia except australiacentral:
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
module "azure-region" {
|
module "azure-region" {
|
||||||
source = "https://registry.coder.com/modules/azure-region"
|
source = "https://registry.coder.com/modules/azure-region"
|
||||||
exclude = [ "westus2" ]
|
exclude = [
|
||||||
|
"australia",
|
||||||
|
"australiacentral2",
|
||||||
|
"australiaeast",
|
||||||
|
"australiasoutheast"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "azurerm_resource_group" "example" {
|
resource "azurerm_resource_group" "example" {
|
||||||
location = module.azure_region.value
|
location = module.azure_region.value
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Related templates
|
||||||
|
|
||||||
|
For a complete Azure template, see the following examples in the [Coder Registry](https://registry.coder.com/).
|
||||||
|
|
||||||
|
- [Azure VM (Linux)](https://registry.coder.com/templates/azure-linux)
|
||||||
|
- [Azure VM (Windows)](https://registry.coder.com/templates/azure-windows)
|
||||||
|
|||||||
@@ -310,6 +310,7 @@ data "coder_parameter" "region" {
|
|||||||
description = var.description
|
description = var.description
|
||||||
default = var.default
|
default = var.default
|
||||||
mutable = var.mutable
|
mutable = var.mutable
|
||||||
|
icon = "/icon/azure.png"
|
||||||
dynamic "option" {
|
dynamic "option" {
|
||||||
for_each = { for k, v in local.all_regions : k => v if !(contains(var.exclude, k)) }
|
for_each = { for k, v in local.all_regions : k => v if !(contains(var.exclude, k)) }
|
||||||
content {
|
content {
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ module "filebrowser" {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
### Serve a specific directory
|
### Serve a specific directory
|
||||||
|
|||||||
@@ -19,3 +19,5 @@ module "vscode" {
|
|||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|

|
||||||
|
|||||||