Skip to content

Commit

Permalink
Add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zliang-akamai committed Apr 23, 2024
1 parent c701eef commit 0a5304e
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .web-docs/components/builder/linode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ can also be supplied to override the typical auto-generated key:

- `cloud_init` (bool) - Whether the newly created image supports cloud-init.

- `firewall_id` (int) - The ID of the Firewall to attach this Linode to upon creation.

- `metadata` ((Metadata)[#metadata]) - An object containing user-defined data relevant
to the creation of Linodes.

#### Interface

This section outlines the fields configurable for a single interface object.
Expand All @@ -123,6 +128,12 @@ VPC-specific fields:

- `nat_1_1` (string) - The public IPv4 address assigned to this Linode to be 1:1 NATed with the VPC IPv4 address.

#### Metadata

This section outlines the fields configurable for a single metadata object.

- `user_data` (string) - Base64-encoded (cloud-config)[https://www.linode.com/docs/products/compute/compute-instances/guides/metadata-cloud-config/] data.

## Examples

### Basic Example
Expand Down Expand Up @@ -200,7 +211,9 @@ source "linode" "example" {
region = "us-east"
ssh_username = "root"
private_ip = true
firewall_id = 12345
instance_tags = ["abc", "foo=bar"]
authorized_users = ["your_authorized_username"]
authorized_keys = ["ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer"]
stackscript_id = 1177256
Expand All @@ -220,6 +233,20 @@ source "linode" "example" {
nat_1_1 = "any"
}
}
metadata {
user_data = base64encode(<<EOF
#cloud-config
write_files:
- path: /root/helloworld.txt
content: |
Hello, world!
owner: 'root:root'
permissions: '0644'
EOF
)
}
}
build {
Expand Down
27 changes: 27 additions & 0 deletions docs/builders/linode.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ can also be supplied to override the typical auto-generated key:

- `cloud_init` (bool) - Whether the newly created image supports cloud-init.

- `firewall_id` (int) - The ID of the Firewall to attach this Linode to upon creation.

- `metadata` ((Metadata)[#metadata]) - An object containing user-defined data relevant
to the creation of Linodes.

#### Interface

This section outlines the fields configurable for a single interface object.
Expand All @@ -129,6 +134,12 @@ VPC-specific fields:

- `nat_1_1` (string) - The public IPv4 address assigned to this Linode to be 1:1 NATed with the VPC IPv4 address.

#### Metadata

This section outlines the fields configurable for a single metadata object.

- `user_data` (string) - Base64-encoded (cloud-config)[https://www.linode.com/docs/products/compute/compute-instances/guides/metadata-cloud-config/] data.

## Examples

### Basic Example
Expand Down Expand Up @@ -206,7 +217,9 @@ source "linode" "example" {
region = "us-east"
ssh_username = "root"
private_ip = true
firewall_id = 12345

instance_tags = ["abc", "foo=bar"]
authorized_users = ["your_authorized_username"]
authorized_keys = ["ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer"]
stackscript_id = 1177256
Expand All @@ -226,6 +239,20 @@ source "linode" "example" {
nat_1_1 = "any"
}
}

metadata {
user_data = base64encode(<<EOF
#cloud-config

write_files:
- path: /root/helloworld.txt
content: |
Hello, world!
owner: 'root:root'
permissions: '0644'
EOF
)
}
}

build {
Expand Down

0 comments on commit 0a5304e

Please sign in to comment.