|
| 1 | +--- |
| 2 | +page_title: "oxide_silo Resource - terraform-provider-oxide" |
| 3 | +--- |
| 4 | + |
| 5 | +# oxide_silo (Resource) |
| 6 | + |
| 7 | +This resource manages the creation of an Oxide silo. |
| 8 | + |
| 9 | +-> Only the `quotas` attribute supports in-place modification. Changes to other |
| 10 | +attributes will result in the silo being destroyed and created anew. |
| 11 | + |
| 12 | +## Example Usage |
| 13 | + |
| 14 | +```hcl |
| 15 | +resource "oxide_silo" "example" { |
| 16 | + name = "showcase" |
| 17 | + description = "Demo and event silo." |
| 18 | + admin_group_name = "showcase_admin" |
| 19 | + identity_mode = "saml_jit" |
| 20 | + discoverable = true |
| 21 | + mapped_fleet_roles = { |
| 22 | + admin = ["admin", "collaborator"] |
| 23 | + viewer = ["viewer"] |
| 24 | + } |
| 25 | + quotas = { |
| 26 | + cpus = 64 |
| 27 | + memory = 137438953472 # 128 GiB |
| 28 | + storage = 549755813888 # 512 GiB |
| 29 | + } |
| 30 | + tls_certificates = [ |
| 31 | + { |
| 32 | + name = "wildcard_cert" |
| 33 | + description = "Wildcard cert for *.sys.oxide.example.com." |
| 34 | + cert = file("cert.pem") |
| 35 | + key = file("key.pem") |
| 36 | + service = "external_api" |
| 37 | + }, |
| 38 | + ] |
| 39 | +} |
| 40 | +``` |
| 41 | + |
| 42 | +## Schema |
| 43 | + |
| 44 | +### Required |
| 45 | + |
| 46 | +- `name` (String) Name of the Oxide silo. |
| 47 | +- `description` (String) Description for the Oxide silo. |
| 48 | +- `quotas` (Set of Object) Limits the amount of provisionable CPU, memory, and storage in the silo. (See [below for nested schema](#nestedatt--quotas).) |
| 49 | +- `tls_certificates` (String, Write-only) TLS certificates to be used for the silo's console and API endpoints. This is a [write-only attribute](https://developer.hashicorp.com/terraform/plugin/framework/resources/write-only-arguments) since TLS certificates can only be specified during silo creation. Refer to the [Silo Management guide](https://docs.oxide.computer/guides/operator/silo-management) for instructions on replacing the TLS certificates of an existing silo _without_ destroying it and creating it anew. Alternatively, if it's acceptable to destroy the silo and create it anew you can modify this attribute and [replace the resource](https://developer.hashicorp.com/terraform/cli/state/taint). (See [below for nested schema](#nestedatt--tls).) |
| 50 | +- `discoverable` (Boolean) Whether this silo is present in the silo_list output. Defaults to `true`. |
| 51 | + |
| 52 | +### Optional |
| 53 | + |
| 54 | +- `identity_mode` (String) How identities are managed and users are authenticated in this silo. Valid values are `saml_jit` and `local_only`. Defaults to `local_only`. |
| 55 | +- `admin_group_name` (String) This group will be created during silo creation and granted the "Silo Admin" role. Identity providers can assert that users belong to this group and those users can log in and further initialize the Silo. |
| 56 | +- `mapped_fleet_roles` (Map) Setting that defines the association between silo roles and fleet roles. By default, silo roles do not grant any fleet roles. To establish a connection, you create entries in this map. The key for each entry must be a silo role: `admin`, `collaborator`, or `viewer`. The value is a list of fleet roles (`admin`, `collaborator`, or `viewer`) that the key silo role will grant. |
| 57 | +- `timeouts` (Attribute, Optional) Timeouts for performing API operations. See [below for nested schema](#nestedatt--timeouts). |
| 58 | + |
| 59 | +### Read-Only |
| 60 | + |
| 61 | +- `id` (String) Unique, immutable, system-controlled identifier of the silo. |
| 62 | +- `time_created` (String) Timestamp of when this Silo was created. |
| 63 | +- `time_modified` (String) Timestamp of when this Silo was last modified. |
| 64 | + |
| 65 | +<a id="nestedatt--quotas"></a> |
| 66 | + |
| 67 | +### Nested Schema for `quotas` |
| 68 | + |
| 69 | +### Required |
| 70 | + |
| 71 | +- `cpus` (Number) The amount of virtual CPUs available for running instances in the silo. |
| 72 | +- `memory` (Number) The amount of RAM, in bytes, available for running instances in the silo. |
| 73 | +- `storage` (Number) The amount of storage, in bytes, available for disks or snapshots. |
| 74 | + |
| 75 | +<a id="nestedatt--tls"></a> |
| 76 | + |
| 77 | +### Nested Schema for `tls_certificates` |
| 78 | + |
| 79 | +### Required |
| 80 | + |
| 81 | +- `name` (String) The name associated with the certificate. |
| 82 | +- `description` (String) Description of the certificate. |
| 83 | +- `cert` (String) PEM-formatted string containing public certificate chain. |
| 84 | +- `key` (String) PEM-formatted string containing private key. |
| 85 | +- `service` (String) The service associated with the certificate. The only valid value is `external_api`. |
| 86 | + |
| 87 | +<a id="nestedatt--timeouts"></a> |
| 88 | + |
| 89 | +### Nested Schema for `timeouts` |
| 90 | + |
| 91 | +#### Optional |
| 92 | + |
| 93 | +- `create` (String, Default `10m`) |
| 94 | +- `delete` (String, Default `10m`) |
| 95 | +- `read` (String, Default `10m`) |
| 96 | +- `update` (String, Default `10m`) |
0 commit comments