diff --git a/docs/data-sources/bloc_snapshot.md b/docs/data-sources/bloc_snapshot.md index f46d78a05..d2cd741db 100644 --- a/docs/data-sources/bloc_snapshot.md +++ b/docs/data-sources/bloc_snapshot.md @@ -5,9 +5,17 @@ page_title: "Scaleway: scaleway_block_snapshot" # scaleway_block_snapshot -Gets information about a Block Snapshot. +The `scaleway_block_snapshot` data source is used to retrieve information about a Block Storage volume snapshot. -## Example Usage +Refer to the Block Storage [product documentation](https://www.scaleway.com/en/docs/storage/block/) and [API documentation](https://www.scaleway.com/en/developers/api/block/) for more information. + +## Retrieve a volume's snapshot + +The following commands allow you to: + +- retrieve a snapshot specified by its name +- retrieve a snapshot specified by its name and the ID of the Block Storage volume it is associated with +- retrieve a snapshot specified by its ID ```terraform // Get info by snapshot name @@ -29,14 +37,14 @@ data "scaleway_block_snapshot" "my_snapshot" { ## Argument Reference -The following arguments are supported: +This section lists the arguments that you can provide to the `scaleway_block_snapshot` data source to filter and retrieve the desired snapshot. Each argument has a specific purpose: -- `snapshot_id` - (Optional) The ID of the snapshot. Only one of `name` and `snapshot_id` should be specified. -- `name` - (Optional) The name of the snapshot. Only one of `name` and `snapshot_id` should be specified. -- `volume_id` - (Optional) The ID of the volume from which the snapshot has been created. -- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the snapshot exists. -- `project_id` - (Optional) The ID of the project the snapshot is associated with. +- `snapshot_id` - (Optional) The unique identifier of the snapshot. Only one of `name` and `snapshot_id` should be specified. +- `name` - (Optional) The name of the snapshot. Only one of name or snapshot_id should be specified. +- `volume_id` - (Optional) The unique identifier of the volume from which the snapshot was created. +- `zone` - (Defaults to the zone specified in the [provider configuration](../index.md#zone)) The [zone](../guides/regions_and_zones.md#zones) in which the snapshot exists. +- `project_id` - (Optional) The unique identifier of the Project to which the snapshot is associated. ## Attributes Reference -Exported attributes are the ones from `scaleway_block_snapshot` [resource](../resources/block_snapshot.md) +The `scaleway_block_snapshot` data source exports certain attributes once the snapshot information is retrieved. These attributes can be referenced in other parts of your Terraform configuration. The exported attributes are those that come from the `scaleway_block_snapshot` [resource](../resources/block_snapshot.md) diff --git a/docs/data-sources/block_volume.md b/docs/data-sources/block_volume.md index bb442e6b4..e9ce38b23 100644 --- a/docs/data-sources/block_volume.md +++ b/docs/data-sources/block_volume.md @@ -5,9 +5,16 @@ page_title: "Scaleway: scaleway_block_volume" # scaleway_block_volume -Gets information about a Block Volume. +The `scaleway_block_volume` data source is used to retrieve information about a Block Storage volume. +Refer to the Block Storage [product documentation](https://www.scaleway.com/en/docs/storage/block/) and [API documentation](https://www.scaleway.com/en/developers/api/block/) for more information. + +## Retrieve a Block Storage volume + +The following commands allow you to: + +- retrieve a Block Storage volume specified by its name +- retrieve a Block Storage volume specified by its ID -## Example Usage ```terraform // Get info by volume name @@ -23,13 +30,13 @@ data "scaleway_block_volume" "my_volume" { ## Argument Reference -The following arguments are supported: +This section lists the arguments that you can provide to the `scaleway_block_volume` data source to filter and retrieve the desired volume. -- `volume_id` - (Optional) The ID of the volume. Only one of `name` and `volume_id` should be specified. +- `volume_id` - (Optional) The unique identifier of the volume. Only one of `name` and `volume_id` should be specified. - `name` - (Optional) The name of the volume. Only one of `name` and `volume_id` should be specified. -- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the volume exists. -- `project_id` - (Optional) The ID of the project the volume is associated with. +- `zone` - (Defaults to the zone specified in the [provider configuration](../index.md#zone)). The [zone](../guides/regions_and_zones.md#zones) in which the volume exists. +- `project_id` - (Optional) The unique identifier of the Project to which the volume is associated. ## Attributes Reference -Exported attributes are the ones from `scaleway_block_volume` [resource](../resources/block_volume.md) +The `scaleway_block_volume` data source exports certain attributes once the volume information is retrieved. These attributes can be referenced in other parts of your Terraform configuration. The exported attributes are those that come from the `scaleway_block_volume` [resource](../resources/block_volume.md). diff --git a/docs/data-sources/cockpit.md b/docs/data-sources/cockpit.md index 51954064e..51cd02b84 100644 --- a/docs/data-sources/cockpit.md +++ b/docs/data-sources/cockpit.md @@ -8,39 +8,48 @@ page_title: "Scaleway: scaleway_cockpit" ~> **Important:** The data source `scaleway_cockpit` has been deprecated and will no longer be supported. Instead, use resource `scaleway_cockpit`. -> **Note:** -As of April 2024, Cockpit has introduced regionalization to offer more flexibility and resilience. -If you have customized dashboards in Grafana for monitoring Scaleway resources, please update your queries to accommodate the new regionalized [data sources](../resources/cockpit_source.md). +As of April 2024, Cockpit has introduced [regionalization](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#region) to offer more flexibility and resilience. +If you have created customized dashboards with data for your Scaleway resources before April 2024, you will need to update your queries in Grafana, with the new regionalized [data sources](../resources/cockpit_source.md). -Gets information about the Scaleway Cockpit. +The `scaleway_cockpit` data source is used to retrieve information about a Scaleway Cockpit associated with a given Project. This can be the default Project or a specific Project identified by its ID. -For more information consult the [documentation](https://www.scaleway.com/en/docs/observability/cockpit/concepts/). +Refer to Cockpit's [product documentation](https://www.scaleway.com/en/docs/observability/cockpit/concepts/) and [API documentation](https://www.scaleway.com/en/developers/api/cockpit/regional-api) for more information. -## Example Usage +## Retrieve a Cockpit + +The following commands allow you to: + +- get information on the Cockpit associated with your Scaleway default Project +- get information on the Cockpit associated with a specific Scaleway Project ```hcl -// Get default project's cockpit +// Get the default Project's Cockpit data "scaleway_cockpit" "main" {} ``` ```hcl -// Get a specific project's cockpit +// Get a specific Project's Cockpit data "scaleway_cockpit" "main" { project_id = "11111111-1111-1111-1111-111111111111" } ``` -## Arguments Reference +## Argument Reference + +This section lists the arguments that you can provide to the `scaleway_cockpit` data source to filter and retrieve the desired Cockpit. + +- `project_id` - Specifies the ID of the Scaleway Project that the Cockpit is associated with. If not specified, it defaults to the Project ID specified in the [provider configuration](../index.md#project_id). -- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the cockpit is associated with. +- `plan` - (Optional) Specifies the name or ID of the pricing plan to use. ## Attributes Reference -In addition to all arguments above, the following attributes are exported: +The `scaleway_cockpit` data source exports certain attributes once the Cockpit information is retrieved. These attributes can be referenced in other parts of your Terraform configuration. -- `plan_id` - (Deprecated) The ID of the current plan -- `endpoints` - (Deprecated) Endpoints - - `metrics_url` - (Deprecated) The metrics URL - - `logs_url` - (Deprecated) The logs URL - - `alertmanager_url` - (Deprecated) The alertmanager URL - - `grafana_url` - (Deprecated) The grafana URL \ No newline at end of file +- `plan_id` - (Deprecated) ID of the current pricing plan +- `endpoints` - (Deprecated) A list of [endpoints](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#endpoints) related to Cockpit, each with specific URLs: + - `metrics_url` - (Deprecated) URL for [metrics](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#metric) to retrieve in the [Data sources tab](https://console.scaleway.com/cockpit/dataSource) of the Scaleway console. + - `logs_url` - (Deprecated) URL for [logs](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#logs) to retrieve in the [Data sources tab](https://console.scaleway.com/cockpit/dataSource) of the Scaleway console. + - `alertmanager_url` - (Deprecated) URL for the [Alert manager](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#alert-manager). + - `grafana_url` - (Deprecated) URL for Grafana. diff --git a/docs/data-sources/cockpit_plan.md b/docs/data-sources/cockpit_plan.md index 0ca1a6718..b18424221 100644 --- a/docs/data-sources/cockpit_plan.md +++ b/docs/data-sources/cockpit_plan.md @@ -4,9 +4,15 @@ page_title: "Scaleway: scaleway_cockpit_plan" --- # scaleway_cockpit_plan -Gets information about a Scaleway Cockpit plan. +The `scaleway_cockpit_plan` data source is used to fetch details about a specific Scaleway Cockpit pricing plan. This information can then be used to configure resources like `scaleway_cockpit`. -## Example Usage +Find out more about [pricing plans](https://console.scaleway.com/cockpit/plans) in the Scaleway console. + +Refer to Cockpit's [product documentation](https://www.scaleway.com/en/docs/observability/cockpit/concepts/) and [API documentation](https://www.scaleway.com/en/developers/api/cockpit/regional-api) for more information. + +## Fetch and associate a pricing plan to a Cockpit + +The following command shows how to fetch information about the `premium` pricing plan and how to associate it with the Cockpit of your Scaleway default Project. ```hcl data "scaleway_cockpit_plan" "premium" { @@ -18,6 +24,8 @@ resource "scaleway_cockpit" "main" { } ``` -## Arguments Reference +## Argument reference + +This section lists the arguments that you can provide to the `scaleway_cockpit_plan` data source to filter and retrieve the desired plan. -- `name` - (Required) The name of the plan. +- `name` - (Required) Name of the pricing plan you want to retrieve information about. diff --git a/docs/data-sources/domain_record.md b/docs/data-sources/domain_record.md index 27bc593d8..76c5b9d67 100644 --- a/docs/data-sources/domain_record.md +++ b/docs/data-sources/domain_record.md @@ -5,12 +5,20 @@ page_title: "Scaleway: scaleway_domain_record" # scaleway_domain_record -Gets information about a domain record. +The `scaleway_domain_record` data source is used to get information about an existing domain record. -## Example Usage +Refer to the Domains and DNS [product documentation](https://www.scaleway.com/en/docs/network/domains-and-dns/) and [API documentation](https://www.scaleway.com/en/developers/api/domains-and-dns/) for more information. + + +## Query domain records + +The following commands allow you to: + +- query a domain record specified by the DNS zone (`domain.tld`), the record name (`www`), the record type (`A`), and the record content (`1.2.3.4`). +- query a domain record specified by the DNS zone (`domain.tld`) and the unique record ID (`11111111-1111-1111-1111-111111111111`). ```hcl -# Get record by name, type and data +# Query record by DNS zone, record name, type and content data "scaleway_domain_record" "by_content" { dns_zone = "domain.tld" name = "www" @@ -18,7 +26,7 @@ data "scaleway_domain_record" "by_content" { data = "1.2.3.4" } -# Get info by ID +# Query record by DNS zone and record ID data "scaleway_domain_record" "by_id" { dns_zone = "domain.tld" record_id = "11111111-1111-1111-1111-111111111111" @@ -27,33 +35,31 @@ data "scaleway_domain_record" "by_id" { ## Argument Reference -- `dns_zone` - (Optional) The IP address. +This section lists the arguments that you can provide to the `scaleway_domain_record` data source to filter and retrieve the desired record: + +- `dns_zone` - (Optional) The DNS zone (domain) to which the record belongs. This is a required field in both examples above but is optional in the context of defining the data source. -- `name` - (Required) The name of the record (can be an empty string for a root record). - Cannot be used with `record_id`. +- `name` - (Required when not using `record_id`) The name of the record, which can be an empty string for a root record. Cannot be used with `record_id`. -- `type` - (Required) The type of the record (`A`, `AAAA`, `MX`, `CNAME`, `DNAME`, `ALIAS`, `NS`, `PTR`, `SRV`, `TXT`, `TLSA`, or `CAA`). - Cannot be used with `record_id`. +- `type` - (Required when not using `record_id`) The type of the record (`A`, `AAAA`, `MX`, `CNAME`, etc.). Cannot be used with `record_id`. -- `data` - (Required) The content of the record (an IPv4 for an `A`, a string for a `TXT`...). - Cannot be used with `record_id`. +- `data` - (Required when not using `record_id`) The content of the record (e.g., an IPv4 address for an `A` record or a string for a `TXT` record). Cannot be used with `record_id`. -- `record_id` - (Optional) The record ID. - Cannot be used with `name`, `type` and `data`. +- `record_id` - (Optional) The unique identifier of the record. Cannot be used with `name`, `type`, and `data`. -- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the domain is associated with. +- `project_id` - (Defaults to the Project ID specified in the [provider configuration](../index.md#project_id)). The ID of the Project associated with the domain. ## Attributes Reference In addition to all arguments above, the following attributes are exported: -- `id` - The ID of the record. +- `id` - The unique identifier of the record. -~> **Important:** Domain records' IDs are of the form `{dns_zone}/{id}`, e.g. `subdomain.domain.tld/11111111-1111-1111-1111-111111111111` +~> **Important:** Domain records' IDs are formatted as `{dns_zone}/{id}` (e.g. `subdomain.domain.tld/11111111-1111-1111-1111-111111111111`). -- `ttl` - Time To Live of the record in seconds. -- `priority` - The priority of the record (mostly used with an `MX` record) -- `geo_ip` - Dynamic record base on user geolocalisation ([More information about dynamic records](../resources/domain_record.md#dynamic-records)) -- `http_service` - Dynamic record base on URL resolve ([More information about dynamic records](../resources/domain_record.md#dynamic-records)) -- `weighted` - Dynamic record base on IP weights ([More information about dynamic records](../resources/domain_record.md#dynamic-records)) -- `view` - Dynamic record based on the client’s (resolver) subnet ([More information about dynamic records](../resources/domain_record.md#dynamic-records)) +- `ttl` - The Time To Live (TTL) of the record in seconds. +- `priority` - The priority of the record, mainly used with `MX` records. +- `geo_ip` - Information about dynamic records based on user geolocation. [Find out more about dynamic records](../resources/domain_record.md#dynamic-records). +- `http_service` - Information about dynamic records based on URL resolution. [Find out more about dynamic records](../resources/domain_record.md#dynamic-records). +- `weighted` - Information about dynamic records based on IP weights. [Find out more about dynamic records](../resources/domain_record.md#dynamic-records). +- `view` - Information about dynamic records based on the client’s (resolver) subnet. [Find out more about dynamic records](../resources/domain_record.md#dynamic-records). diff --git a/docs/data-sources/domain_zone.md b/docs/data-sources/domain_zone.md index 7687450af..aaf6e59f3 100644 --- a/docs/data-sources/domain_zone.md +++ b/docs/data-sources/domain_zone.md @@ -5,10 +5,16 @@ page_title: "Scaleway: scaleway_domain_zone" # scaleway_domain_zone -Gets information about a domain zone. +The `scaleway_domain_zone` data source is used to get information about a DNS zone within a specific domain and subdomain in Scaleway Domains and DNS. + +Refer to the Domains and DNS [product documentation](https://www.scaleway.com/en/docs/network/domains-and-dns/) and [API documentation](https://www.scaleway.com/en/developers/api/domains-and-dns/) for more information. ## Example Usage +### Query a domain zone + +The following command allows you to retrieve information about the DNS zone for the subdomain `test` within the domain `scaleway-terraform.com`. + ```hcl # Get zone data "scaleway_domain_zone" "main" { @@ -19,28 +25,29 @@ data "scaleway_domain_zone" "main" { ## Argument Reference -The following arguments are supported: +This section lists the arguments that you can provide to the `scaleway_domain_zone` data source to filter and retrieve the desired DNS zone: + -- `domain` - (Required) The domain where the DNS zone will be created. +- `domain` - (Required) The primary domain name where the DNS zone is located. This is a mandatory field. -- `subdomain` - (Required) The subdomain(zone name) to create in the domain. +- `subdomain` - (Required) The subdomain (or zone name) within the primary domain. This is a mandatory field. -- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the domain is associated with. +- `project_id` - (Defaults to Project ID specified in [the provider configuration](../index.md#project_id)). The ID of the Scaleway Project associated with the domain. If not specified, it defaults to the `project_id` set in the provider configuration. ## Attributes Reference In addition to all arguments above, the following attributes are exported: -- `id` - The ID of the zone, which is of the form `{subdomain}.{domain}` +- `id` - The unique identifier of the zone, in the `{subdomain}.{domain}` format. -- `ns` - NameServer list for zone. +- `ns` - The list of name servers for the zone. -- `ns_default` - NameServer default list for zone. +- `ns_default` - The default list of name servers for the zone. -- `ns_master` - NameServer master list for zone. +- `ns_master` - The master list of name servers for the zone. -- `status` - The domain zone status. +- `status` - The status of the domain zone. -- `message` - Message +- `message` - Message associated with the domain zone (typically used for status or error messages). -- `updated_at` - The date and time of the last update of the DNS zone. +- `updated_at` - The date and time of the last update to the DNS zone. diff --git a/docs/data-sources/secret.md b/docs/data-sources/secret.md index 075e72705..fe56caea3 100644 --- a/docs/data-sources/secret.md +++ b/docs/data-sources/secret.md @@ -5,25 +5,33 @@ page_title: "Scaleway: scaleway_secret" # scaleway_secret -Gets information about Scaleway Secrets. -For more information, see [the documentation](https://developers.scaleway.com/en/products/secret_manager/api/v1alpha1/). +The `scaleway_secret` data source is used to get information about a specific secret in Scaleway's Secret Manager. -## Examples +Refer to the Secret Manager [product documentation](https://www.scaleway.com/en/docs/identity-and-access-management/secret-manager/) and [API documentation](https://www.scaleway.com/en/developers/api/secret-manager/) for more information. -### Basic +## Example Usage + +### Create a secret and get its information + +The following commands allow you to: + +- create a secret named `foo` with the description `barr` +- retrieve the secret's information using the secret's ID +- retrieve the secret's information using the secret's name ```hcl +// Create a secret resource "scaleway_secret" "main" { name = "foo" description = "barr" } -// Get info by secret ID +// Get the secret information specified by the secret ID data "scaleway_secret" "my_secret" { secret_id = "11111111-1111-1111-1111-111111111111" } -// Get info by secret Name +// Get the secret information specified by the secret name data "scaleway_secret" "by_name" { name = "your_secret_name" } @@ -31,24 +39,26 @@ data "scaleway_secret" "by_name" { ## Argument Reference -- `name` - (Optional) The secret name. +This section lists the arguments that you can provide to the `scaleway_secret` data source to filter and retrieve the desired secret: + + +- `name` - (Optional) The name of the secret. Only one of `name` and `secret_id` should be specified. -- `path` - (Optional) The secret path. +- `path` - (Optional) The path of the secret. Conflicts with `secret_id`. -- `secret_id` - (Optional) The secret id. +- `secret_id` - (Optional) The ID of the secret. Only one of `name` and `secret_id` should be specified. -- `organization_id` - (Optional) The organization ID the Project is associated with. - If no default organization_id is set, one must be set explicitly in this datasource +- `organization_id` - (Optional) The ID of the Scaleway Organization the Project is associated with. If no default `organization_id` is set, it must be set explicitly in this data source. -- `region` - (Defaults to [provider](../index.md#region) `region`) The [region](../guides/regions_and_zones.md#regions) in which the secret exists. +- `region` - (Defaults to the region specified in the [provider's configuration](../index.md#region)). The [region](../guides/regions_and_zones.md#regions) in which the secret exists. -- `project_id` - (Optional. Defaults to [provider](../index.md#project_id) `project_id`) The ID of the - project the secret is associated with. +- `project_id` - (Optional. Defaults to the Project specified in [provider's configuration](../index.md#project_id)). The ID of the + Project the secret is associated with. ## Attributes Reference -Exported attributes are the ones from `scaleway_secret` [resource](../resources/secret.md) +Exported attributes are the ones from the `scaleway_secret` [resource](../resources/secret.md). diff --git a/docs/data-sources/secret_version.md b/docs/data-sources/secret_version.md index c84b3ad2d..e4661beb1 100644 --- a/docs/data-sources/secret_version.md +++ b/docs/data-sources/secret_version.md @@ -5,82 +5,94 @@ page_title: "Scaleway: scaleway_secret_version" # scaleway_secret_version -Gets information about Scaleway a Secret Version. -For more information, see [the documentation](https://developers.scaleway.com/en/products/secret_manager/api/v1alpha1/#secret-versions-079501). +The `scaleway_secret_version` data source is used to get information about a specific secret version stored in Scaleway Secret Manager. -## Examples +Refer to the Secret Manager [product documentation](https://www.scaleway.com/en/docs/identity-and-access-management/secret-manager/) and [API documentation](https://www.scaleway.com/en/developers/api/secret-manager/) for more information. + + +## Example Usage + +### Use Secret Manager + +The following commands allow you to: + +- create a secret named `fooii` +- create a new version of `fooii` containing data (`your_secret`) +- retrieve the secret version specified by the secret ID and the desired version +- retrieve the secret version specified by the secret name and the desired version + +The output blocks display the sensitive data contained in your secret version. -### Basic ```hcl +# Create a secret named fooii resource "scaleway_secret" "main" { name = "fooii" description = "barr" } +# Create a version of fooii containing data resource "scaleway_secret_version" "main" { description = "your description" secret_id = scaleway_secret.main.id data = "your_secret" } +# Retrieve the secret version specified by the secret ID and the desired version data "scaleway_secret_version" "data_by_secret_id" { secret_id = scaleway_secret.main.id revision = "1" depends_on = [scaleway_secret_version.main] } +# Retrieve the secret version specified by the secret name and the desired version data "scaleway_secret_version" "data_by_secret_name" { secret_name = scaleway_secret.main.name revision = "1" depends_on = [scaleway_secret_version.main] } -#Output Sensitive data +# Display sensitive data output "scaleway_secret_access_payload" { value = data.scaleway_secret_version.data_by_secret_name.data } -#Output Sensitive data +# Display sensitive data output "scaleway_secret_access_payload_by_id" { value = data.scaleway_secret_version.data_by_secret_id.data } ``` -## Arguments Reference +## Argument Reference -The following arguments are supported: +This section lists the arguments that you can provide to the `scaleway_secret_version` data source to filter and retrieve the desired version: -- `secret_id` - (Optional) The Secret ID associated wit the secret version. - Only one of `secret_id` and `secret_name` should be specified. +- `secret_id` - (Optional) The ID of the secret associated with the secret version. Only one of `secret_id` and `secret_name` should be specified. -- `secret_name` - (Optional) The Name of Secret associated wit the secret version. +- `secret_name` - (Optional) The name of the secret associated with the secret version. Only one of `secret_id` and `secret_name` should be specified. -- `revision` - The revision for this Secret Version. Alternative values (ex: `latest`) can be found in [API documentation](https://www.scaleway.com/en/developers/api/secret-manager/#path-secret-versions-access-a-secrets-version-using-the-secrets-id) - -- `region` - (Defaults to [provider](../index.md#region) `region`) The [region](../guides/regions_and_zones.md#regions) - in which the resource exists. +- `revision` - The revision for this secret version. Refer to alternative values (ex: `latest`) in the [API documentation](https://www.scaleway.com/en/developers/api/secret-manager/#path-secret-versions-access-a-secrets-version-using-the-secrets-id) -- `project_id` - (Optional) The ID of the project the Secret version is associated with. +- `project_id` - (Optional) The ID of the Scaleway Project associated with the secret version. -## Data +## Data information -Note: This Data Source give you **access** to the secret payload encoded en base64. +Note: This data source provides you with access to the secret payload, which is encoded in base64. -Be aware that this is a sensitive attribute. For more information, +Keep in mind that this is a sensitive attribute. For more information, see [Sensitive Data in State](https://developer.hashicorp.com/terraform/language/state/sensitive-data). -~> **Important:** This property is sensitive and will not be displayed in the plan. +~> **Important:** This property is sensitive and will not be displayed in the Terraform plan, for security reasons. ## Attributes Reference -In addition to all arguments above, the following attributes are exported: +This section lists the attributes that are exported by the `scaleway_secret_version` data source. These attributes can be referenced in other parts of your Terraform configuration: -- `description` - (Optional) Description of the secret version (e.g. `my-new-description`). -- `data` - The data payload of the secret version. more on the [data section](#data) -- `status` - The status of the Secret Version. -- `created_at` - Date and time of secret version's creation (RFC 3339 format). -- `updated_at` - Date and time of secret version's last update (RFC 3339 format). +- `description` - (Optional) The description of the secret version (e.g. `my-new-description`). +- `data` - The data payload of the secret version. This is a sensitive attribute containing the secret value. Learn more in the [data section](/#data-information). +- `status` - The status of the secret version. +- `created_at` - The date and time of the secret version's creation in RFC 3339 format. +- `updated_at` - The date and time of the secret version's last update in RFC 3339 format. -Exported attributes are the ones from `scaleway_secret_version` [resource](../resources/secret_version.md) +Exported attributes are the ones from the `scaleway_secret_version` [resource](../resources/secret_version.md). diff --git a/docs/resources/block_snapshot.md b/docs/resources/block_snapshot.md index 364dfe7af..bb0751df1 100644 --- a/docs/resources/block_snapshot.md +++ b/docs/resources/block_snapshot.md @@ -5,11 +5,17 @@ page_title: "Scaleway: scaleway_block_snapshot" # Resource: scaleway_block_snapshot -Creates and manages Scaleway Block Snapshots. -For more information, see [the documentation](https://www.scaleway.com/en/developers/api/block/). +The `scaleway_block_snapshot` resource is used to create and manage snapshots of Block Storage volumes. + +Refer to the Block Storage [product documentation](https://www.scaleway.com/en/docs/storage/block/) and [API documentation](https://www.scaleway.com/en/developers/api/block/) for more information. + ## Example Usage +### Create a snapshot of a Block Storage volume + +The following command allows you to create a snapshot (`some-snapshot-name`) from a Block Storage volume specified by its ID. + ```terraform resource "scaleway_block_volume" "block_volume" { iops = 5000 @@ -25,12 +31,12 @@ resource "scaleway_block_snapshot" "block_snapshot" { ## Argument Reference -The following arguments are supported: +This section lists the arguments that are supported: - `volume_id` - (Optional) The ID of the volume to take a snapshot from. -- `name` - (Optional) The name of the snapshot. If not provided it will be randomly generated. -- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the snapshot should be created. -- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the snapshot is associated with. +- `name` - (Optional) The name of the snapshot. If not provided, a name will be randomly generated. +- `zone` - (Defaults to the zone specified in the [provider configuration](../index.md#zone)). The [zone](../guides/regions_and_zones.md#zones) in which the snapshot should be created. +- `project_id` - (Defaults to the Project ID specified in the [provider configuration](../index.md#project_id)). The ID of the Scaleway Project the snapshot is associated with. - `tags` - (Optional) A list of tags to apply to the snapshot. ## Attributes Reference @@ -39,11 +45,11 @@ In addition to all arguments above, the following attributes are exported: - `id` - The ID of the snapshot. -~> **Important:** Block snapshots' IDs are [zoned](../guides/regions_and_zones.md#resource-ids), which means they are of the form `{zone}/{id}`, e.g. `fr-par-1/11111111-1111-1111-1111-111111111111` +~> **Important:** The IDs of Block Storage volumes snapshots are [zoned](../guides/regions_and_zones.md#resource-ids), meaning that the zone is part of the ID, in the form `{zone}/{id}`. For example, a snapshot ID migt be `fr-par-1/11111111-1111-1111-1111-111111111111`. ## Import -Block Snapshots can be imported using the `{zone}/{id}`, e.g. +This section explains how to import the snapshot of a Block Storage volume using the zoned ID format (`{zone}/{id}`). ```bash terraform import scaleway_block_snapshot.main fr-par-1/11111111-1111-1111-1111-111111111111 diff --git a/docs/resources/block_volume.md b/docs/resources/block_volume.md index 1e476a3ee..7112f58ab 100644 --- a/docs/resources/block_volume.md +++ b/docs/resources/block_volume.md @@ -5,12 +5,16 @@ page_title: "Scaleway: scaleway_block_volume" # Resource: scaleway_block_volume -Creates and manages Scaleway Block Volumes. -For more information, see [the documentation](https://www.scaleway.com/en/developers/api/block/). +The `scaleway_block_volume` resource is used to create and manage Scaleway Block Storage volumes. + +Refer to the Block Storage [product documentation](https://www.scaleway.com/en/docs/storage/block/) and [API documentation](https://www.scaleway.com/en/developers/api/block/) for more information. + ## Example Usage -### Basic +### Create a Block Storage volume + +The following command allows you to create a Block Storage volume of 20 GB with a 5000 [IOPS](https://www.scaleway.com/en/docs/storage/block/concepts/#iops). ```terraform resource "scaleway_block_volume" "block_volume" { @@ -43,15 +47,15 @@ resource "scaleway_block_volume" "main" { ## Argument Reference -The following arguments are supported: +This section lists the arguments that are supported: -- `iops` - (Required) The maximum IO/s expected, must match available options. -- `name` - (Optional) The name of the volume. If not provided it will be randomly generated. -- `size_in_gb` - (Optional) The size of the volume. Only one of `size_in_gb`, and `snapshot_id` should be specified. +- `iops` - (Required) The maximum [IOPs](https://www.scaleway.com/en/docs/storage/block/concepts/#iops) expected, must match available options. +- `name` - (Optional) The name of the volume. If not provided, a name will be randomly generated. +- `size_in_gb` - (Optional) The size of the volume in gigabytes. Only one of `size_in_gb`, and `snapshot_id` should be specified. - `snapshot_id` - (Optional) If set, the new volume will be created from this snapshot. Only one of `size_in_gb`, `snapshot_id` should be specified. - `tags` - (Optional) A list of tags to apply to the volume. -- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the volume should be created. -- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the volume is associated with. +- `zone` - (Defaults to the zone specified in the [provider configuration](../index.md#zone)). The [zone](../guides/regions_and_zones.md#zones) in which the volume should be created. +- `project_id` - (Defaults to the Project ID specified in the [provider configurqtion](../index.md#project_id)). The ID of the Project the volume is associated with. ## Attributes Reference @@ -59,13 +63,13 @@ In addition to all arguments above, the following attributes are exported: - `id` - The ID of the volume. -~> **Important:** Block volumes' IDs are [zoned](../guides/regions_and_zones.md#resource-ids), which means they are of the form `{zone}/{id}`, e.g. `fr-par-1/11111111-1111-1111-1111-111111111111` +~> **Important:** The IDs of Block Storage volumes are [zoned](../guides/regions_and_zones.md#resource-ids), meaning that the zone is part of the ID, in the `{zone}/{id}` format. For example, a volume ID might look like the following: `fr-par-1/11111111-1111-1111-1111-111111111111`. -- `organization_id` - The organization ID the volume is associated with. +- `organization_id` - The Organization ID the volume is associated with. ## Import -Block Volumes can be imported using the `{zone}/{id}`, e.g. +This section explains how to import a Block Storage volume using the zoned ID (`{zone}/{id}`) format. ```bash terraform import scaleway_block_volume.block_volume fr-par-1/11111111-1111-1111-1111-111111111111 diff --git a/docs/resources/cockpit.md b/docs/resources/cockpit.md index a26651c2d..bed9ff659 100644 --- a/docs/resources/cockpit.md +++ b/docs/resources/cockpit.md @@ -6,30 +6,32 @@ page_title: "Scaleway: scaleway_cockpit" # Resource: scaleway_cockpit -> **Note:** -As of April 2024, Cockpit has introduced regionalization to offer more flexibility and resilience. -If you have customized dashboards in Grafana for monitoring Scaleway resources, please update your queries to accommodate the new regionalized [data sources](./cockpit_source.md). +As of April 2024, Cockpit has introduced [regionalization](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#region) to offer more flexibility and resilience. +If you have created customized dashboards with data for your Scaleway resources before April 2024, you will need to update your queries in Grafana, with the new regionalized [data sources](../resources/cockpit_source.md). -Creates and manages Scaleway Cockpit. +The `scaleway_cockpit` resource allows you to create and manage Scaleway Cockpit instances. -For more information consult the [documentation](https://www.scaleway.com/en/docs/observability/cockpit/concepts/). +Refer to Cockpit's [product documentation](https://www.scaleway.com/en/docs/observability/cockpit/concepts/) and [API documentation](https://www.scaleway.com/en/developers/api/cockpit/regional-api) for more information. ## Example Usage -### Manage Cockpit in the default project +### Manage Cockpit in the Scaleway default Project ```terraform +// Activate Cockpit in the default Project resource "scaleway_cockpit" "main" {} ``` -### Manage Cockpit in a specific project +### Manage Cockpit in a specific Project ```terraform +// Activate Cockpit in a specific Project resource "scaleway_cockpit" "main" { project_id = "11111111-1111-1111-1111-111111111111" } ``` -### Choose a specific plan for Cockpit +### Choose a specific pricing plan for Cockpit ```terraform resource "scaleway_cockpit" "main" { @@ -41,6 +43,7 @@ resource "scaleway_cockpit" "main" { ### Use the Grafana Terraform provider ```terraform +// Use the Grafana Terraform provider to create a Grafana user and a Grafana folder in the default Project's Cockpit resource "scaleway_cockpit" "main" {} resource "scaleway_cockpit_grafana_user" "main" { @@ -61,25 +64,24 @@ resource "grafana_folder" "test_folder" { ## Argument Reference -- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the cockpit is associated with. -- `plan` - (Optional) Name of the plan to use. Available plans are free, premium, and custom. - +- `project_id` - (Defaults to the Project specified in the [provider's configuration](../index.md#project_id)) The ID of the Project the Cockpit is associated with. +- `plan` - (Optional) Name of the plan to use. Available plans are: free, premium, and custom. ## Attributes Reference In addition to all arguments above, the following attributes are exported: -- `plan_id` - (Deprecated) The ID of the current plan. Please use plan instead. -- `endpoints` - (Deprecated) Endpoints. Please use scaleway_cockpit_source instead. - - `metrics_url` - (Deprecated) The metrics URL. - - `logs_url` - (Deprecated) The logs URL. - - `alertmanager_url` - (Deprecated) The alertmanager URL. - - `grafana_url` - (Deprecated) The grafana URL. - - `traces_url` - (Deprecated) The traces URL. +- `plan_id` - (Deprecated) The ID of the current pricing plan. +- `endpoints` - (Deprecated) A list of [endpoints](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#endpoints) related to Cockpit, each with specific URLs: + - `metrics_url` - (Deprecated) URL for [metrics](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#metric) to retrieve in the [Data sources tab](https://console.scaleway.com/cockpit/dataSource) of the Scaleway console. + - `logs_url` - (Deprecated) URL for [logs](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#logs) to retrieve in the [Data sources tab](https://console.scaleway.com/cockpit/dataSource) of the Scaleway console. + - `alertmanager_url` - (Deprecated) URL for the [Alert manager](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#alert-manager). + - `grafana_url` - (Deprecated) URL for Grafana. + - `traces_url` - (Deprecated) URL for [traces](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#traces) to retrieve in the [Data sources tab](https://console.scaleway.com/cockpit/dataSource) of the Scaleway console. ## Import -Cockpits can be imported using the `{project_id}`, e.g. +This section explains how to import a Cockpit using its `{project_id}`. ```bash terraform import scaleway_cockpit.main 11111111-1111-1111-1111-111111111111 diff --git a/docs/resources/cockpit_alert_manager.md b/docs/resources/cockpit_alert_manager.md index 7d16219d2..0609b88b0 100644 --- a/docs/resources/cockpit_alert_manager.md +++ b/docs/resources/cockpit_alert_manager.md @@ -5,12 +5,21 @@ page_title: "Scaleway: scaleway_cockpit_alert_manager" # Resource: scaleway_cockpit_alert_manager -Creates and manages Scaleway Cockpit Alert Managers. +The `scaleway_cockpit_alert_manager` resource allows you to enable and manage the Scaleway Cockpit [alert manager](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#alert-manager). + +Refer to Cockpit's [product documentation](https://www.scaleway.com/en/docs/observability/cockpit/concepts/) and [API documentation](https://www.scaleway.com/en/developers/api/cockpit/regional-api) for more information. -For more information consult the [documentation](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#grafana-users). ## Example Usage +### Enable the alert manager and configure managed alerts + +The following commands allow you to: + +- enable the alert manager in a Project named `tf_test_project` +- enable [managed alerts](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#managed-alerts) +- set up [contact points](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#contact-points) to receive alert notifications + ```terraform resource "scaleway_account_project" "project" { @@ -33,21 +42,23 @@ resource "scaleway_cockpit_alert_manager" "alert_manager" { ## Argument Reference -- `enable_managed_alerts` - (Optional, Boolean) Indicates whether the alert manager should be enabled. Defaults to true. -- `contact_points` - (Optional, List of Map) A list of contact points with email addresses for the alert receivers. Each map should contain a single key email. -- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the cockpit is associated with. -- `region` - (Defaults to [provider](../index.md#arguments-reference) `region`) The [region](../guides/regions_and_zones.md#regions) in which alert_manager should be created. +This section lists the arguments that are supported: + +- `enable_managed_alerts` - (Optional, Boolean) Specifies whether the alert manager should be enabled. Defaults to true. +- `contact_points` - (Optional, List of Map) A list of contact points with email addresses that will receive alerts. Each map should contain a single key email. +- `project_id` - (Defaults to the Project ID specified in the [provider configuration](../index.md#project_id)) The ID of the Project the Cockpit is associated with. +- `region` - (Defaults to the region specified in the [provider configuration](../index.md#arguments-reference)) The [region](../guides/regions_and_zones.md#regions) where the [alert manager](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#alert-manager) should be enabled. ## Attributes Reference In addition to all arguments above, the following attributes are exported: -- `alert_manager_url` - Alert manager URL. +- `alert_manager_url` - The URL of the alert manager. ## Import -Alert managers can be imported using the project ID, e.g. +This section explains how to import alert managers using the ID of the Project associated with Cockpit. ```bash terraform import scaleway_cockpit_alert_manager.main fr-par/11111111-1111-1111-1111-111111111111 diff --git a/docs/resources/cockpit_grafana_user.md b/docs/resources/cockpit_grafana_user.md index 14f9a20d9..c597a8f2d 100644 --- a/docs/resources/cockpit_grafana_user.md +++ b/docs/resources/cockpit_grafana_user.md @@ -5,12 +5,16 @@ page_title: "Scaleway: scaleway_cockpit_grafana_user" # Resource: scaleway_cockpit_grafana_user -Creates and manages Scaleway Cockpit Grafana Users. +The `scaleway_cockpit_grafana_user` resource allows you to create and manage [Grafana users](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#grafana-users) in Scaleway Cockpit. -For more information consult the [documentation](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#grafana-users). +Refer to Cockpit's [product documentation](https://www.scaleway.com/en/docs/observability/cockpit/concepts/) and [API documentation](https://www.scaleway.com/en/developers/api/cockpit/regional-api) for more information. ## Example Usage +### Create a Grafana user + +The following command allows you to create a Grafana user within a specific Scaleway Project. + ```terraform resource "scaleway_account_project" "project" { name = "test project grafana user" @@ -26,19 +30,21 @@ resource "scaleway_cockpit_grafana_user" "main" { ## Argument Reference -- `login` - (Required) The login of the grafana user. -- `role` - (Required) The role of the grafana user. Must be `editor` or `viewer`. -- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the cockpit is associated with. +This section lists the arguments that are supported: + +- `login` - (Required) The username of the Grafana user. The `admin` user is not yet available for creation. You need your Grafana username to log in to Grafana and access your dashboards. +- `role` - (Required) The role assigned to the Grafana user. Must be `editor` or `viewer`. +- `project_id` - (Defaults to Project ID speficied in the [provider configuration](../index.md#project_id)) The ID of the Project the Cockpit is associated with. ## Attributes Reference In addition to all arguments above, the following attributes are exported: -- `password` - The password of the grafana user +- `password` - The password of the Grafana user. ## Import -Cockpits Grafana Users can be imported using the project ID and the grafana user ID formatted `{project_id}/{grafana_user_id}`, e.g. +This section explains how to import Grafana users using the ID of the Project associated with Cockpit, and the Grafana user ID in the `{project_id}/{grafana_user_id}` format. ```bash terraform import scaleway_cockpit_grafana_user.main 11111111-1111-1111-1111-111111111111/2 diff --git a/docs/resources/cockpit_source.md b/docs/resources/cockpit_source.md index c907037c9..d124f9927 100644 --- a/docs/resources/cockpit_source.md +++ b/docs/resources/cockpit_source.md @@ -5,12 +5,16 @@ page_title: "Scaleway: scaleway_cockpit_source" # Resource: scaleway_cockpit_source -Creates and manages Scaleway Cockpit Data Sources. +The `scaleway_cockpit_source` resource allows you to create and manage [data sources](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#data-sources) in Scaleway's Cockpit. -For more information consult the [documentation](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#data-sources). +Refer to Cockpit's [product documentation](https://www.scaleway.com/en/docs/observability/cockpit/concepts/) and [API documentation](https://www.scaleway.com/en/developers/api/cockpit/regional-api) for more information. ## Example Usage +### Create a data source + +The following command allows you to create a [metrics](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#metric) data source named `my-data-source` in a given Project. + ```terraform resource "scaleway_account_project" "project" { name = "test project data source" @@ -25,29 +29,31 @@ resource "scaleway_cockpit_source" "main" { ## Argument Reference -- `name` - (Required) The name of the cockpit data source. -- `type` - (Required) The type of the cockpit data source. Possible values are: `metrics`, `logs` or `traces`. -- `region` - (Defaults to [provider](../index.md#region) `region`) The [region](../guides/regions_and_zones.md#regions) of the cockpit datasource. -- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the cockpit data source is associated with. +This section lists the arguments that are supported: + +- `name` - (Required) The name of the data source. +- `type` - (Required) The [type](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#data-types) of data source. Possible values are: `metrics`, `logs`, or `traces`. +- `region` - (Defaults to the region specified in the [provider configuration](../index.md#region)) The [region](../guides/regions_and_zones.md#regions) where the data source is located. +- `project_id` - (Defaults to the Project ID specified in the [provider configuration](../index.md#project_id)) The ID of the Project the data source is associated with. ## Attributes Reference In addition to all arguments above, the following attributes are exported: -- `id` - The ID of the cockpit data source. +- `id` - The ID of the data source. -~> **Important:** cockpit data sources' IDs are [regional](../guides/regions_and_zones.md#resource-ids), which means they are of the form `{region}/{id}`, e.g. `fr-par/11111111-1111-1111-1111-111111111111 +~> **Important:** Data sources' IDs are [regional](../guides/regions_and_zones.md#resource-ids), which means that they include the region, in the `{region}/{id}` format. For example, if your data source is located in the `fr-par` region, its ID would look like the following: `fr-par/11111111-1111-1111-1111-111111111111`. -- `url` - The URL of the cockpit data source. -- `push_url` - The URL endpoint used for pushing data to the cockpit data source. -- `origin` - The origin of the cockpit data source. +- `url` - The URL of the Cockpit data source. +- `push_url` - The URL endpoint used for pushing data to the Cockpit data source. +- `origin` - The origin of the Cockpit data source. - `synchronized_with_grafana` - Indicates whether the data source is synchronized with Grafana. -- `created_at` - Date and time of the cockpit data source's creation (RFC 3339 format). -- `updated_at` - Date and time of the cockpit datas ource's last update (RFC 3339 format). +- `created_at` - The date and time the data source was created (in RFC 3339 format). +- `updated_at` - The date and time the data source was last updated (in RFC 3339 format). ## Import -Cockpits Data Sources can be imported using the `{region}/{id}`, e.g. +This section explains how to import a data source using the ID of the region it is located in, in the `{region}/{id}` format. ```bash terraform import scaleway_cockpit_source.main fr-par/11111111-1111-1111-1111-111111111111 diff --git a/docs/resources/cockpit_token.md b/docs/resources/cockpit_token.md index 517b27f14..b2241cd91 100644 --- a/docs/resources/cockpit_token.md +++ b/docs/resources/cockpit_token.md @@ -5,12 +5,21 @@ page_title: "Scaleway: scaleway_cockpit_token" # Resource: scaleway_cockpit_token -Creates and manages Scaleway Cockpit Tokens. +The `scaleway_cockpit_token` resource allows you to create and manage your Cockpit [tokens](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#tokens). -For more information consult the [documentation](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#tokens). +Refer to Cockpit's [product documentation](https://www.scaleway.com/en/docs/observability/cockpit/concepts/) and [API documentation](https://www.scaleway.com/en/developers/api/cockpit/regional-api) for more information. ## Example Usage +### Use a Cockpit token + +The following commands allow you to: + +- create a Scaleway Project named `my-project` +- create a Cockpit token named `my-awesome-token` inside the Project +- assign `read` permissions to the token for metrics and logs +- disable `write` permissions for metrics and logs + ```terraform resource "scaleway_account_project" "project" { name = "my-project" @@ -44,33 +53,35 @@ resource "scaleway_cockpit_token" "main" { ## Argument Reference +This section lists the arguments that are supported: + - `name` - (Required) The name of the token. -- `scopes` - (Optional) Allowed scopes. - - `query_metrics` - (Defaults to `false`) Query metrics. - - `write_metrics` - (Defaults to `true`) Write metrics. - - `setup_metrics_rules` - (Defaults to `false`) Setup metrics rules. - - `query_logs` - (Defaults to `false`) Query logs. - - `write_logs` - (Defaults to `true`) Write logs. - - `setup_logs_rules` - (Defaults to `false`) Setup logs rules. - - `setup_alerts` - (Defaults to `false`) Setup alerts. - - `query_traces` - (Defaults to `false`) Query traces. - - `write_traces` - (Defaults to `false`) Write traces. -- `region` - (Defaults to [provider](../index.md#region) `region`) The [region](../guides/regions_and_zones.md#regions) of the cockpit token. -- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the cockpit is associated with. +- `scopes` - (Optional) Scopes allowed, each with default values: + - `query_metrics` - (Defaults to `false`) Permission to query metrics. + - `write_metrics` - (Defaults to `true`) Permission to write metrics. + - `setup_metrics_rules` - (Defaults to `false`) Permission to set up metrics rules. + - `query_logs` - (Defaults to `false`) Permission to query logs. + - `write_logs` - (Defaults to `true`) Permission to write logs. + - `setup_logs_rules` - (Defaults to `false`) Permission to set up logs rules. + - `setup_alerts` - (Defaults to `false`) Permission to set up alerts. + - `query_traces` - (Defaults to `false`) Permission to query traces. + - `write_traces` - (Defaults to `false`) Permission to write traces. +- `region` - (Defaults to the region specified in the [provider configuration](../index.md#region)) The [region](../guides/regions_and_zones.md#regions) where the Cockpit token is located. +- `project_id` - (Defaults to the Project ID specified in the [provider configuration](../index.md#project_id)) The ID of the Project the Cockpit is associated with. ## Attributes Reference In addition to all arguments above, the following attributes are exported: -- `id` - The ID of the cockpit token. +- `id` - The ID of the Cockpit token. -~> **Important:** cockpit tokens' IDs are [regional](../guides/regions_and_zones.md#resource-ids), which means they are of the form `{region}/{id}`, e.g. `fr-par/11111111-1111-1111-1111-111111111111 +~> **Important:** Cockpit tokens' IDs are [regional](../guides/regions_and_zones.md#resource-ids), which means that they include the region, in the `{region}/{id}` format. For example, if your token is located in the `fr-par` region, its ID would look like the following: `fr-par/11111111-1111-1111-1111-111111111111`. - `secret_key` - The secret key of the token. ## Import -Cockpits tokens can be imported using the `{region}/{id}`, e.g. +This section explains how to import a Cockpit token using the `{region}/{id}` format. ```bash terraform import scaleway_cockpit_token.main fr-par/11111111-1111-1111-1111-111111111111 diff --git a/docs/resources/domain_record.md b/docs/resources/domain_record.md index 5162d38f8..5d5ea78cc 100644 --- a/docs/resources/domain_record.md +++ b/docs/resources/domain_record.md @@ -5,12 +5,19 @@ page_title: "Scaleway: scaleway_domain_record" # Resource: scaleway_domain_record -Creates and manages Scaleway Domain record. -For more information, see [the documentation](https://www.scaleway.com/en/docs/network/domains-and-dns/how-to/manage-dns-records/). +The `scaleway_domain_record` resource allows you to create and manage DNS records for Scaleway domains. + +Refer to the Domains and DNS [product documentation](https://www.scaleway.com/en/docs/network/domains-and-dns/) and [API documentation](https://www.scaleway.com/en/developers/api/domains-and-dns/) for more information. ## Example Usage -### Basic +### Create basic DNS records + +The folllowing commands allow you to: + +- create an A record for the `www.domain.tld` domain, pointing to `1.2.3.4` and another one pointing to `1.2.3.5` + +- create an MX record with the `mx.online.net.` mail server and a priority of 10, and another one with the `mx-cache.online.net.` mail server and a priority of 20 ```terraform resource "scaleway_domain_record" "www" { @@ -48,7 +55,17 @@ resource "scaleway_domain_record" "mx2" { } ``` -### With dynamic records +### Create dynamic records + +The folllowing commands allow you to: + +- create a Geo IP record for `images.domain.tld` that points to different IPs based on the user's location: `1.2.3.5` for users in France (EU), and `4.3.2.1` for users in North America (NA) + +- create an HTTP service record for `app.domain.tld` that checks the health of specified IPs and responds based on their status. + +- create view-based records for `db.domain.tld` that resolve differently based on the client's subnet. + +- create a weighted record for `web.domain.tld` that directs traffic to different IPs based on their weights. ```terraform resource "scaleway_domain_record" "geo_ip" { @@ -125,7 +142,12 @@ resource "scaleway_domain_record" "weighted" { } ``` -### Create an instance and add records with the new instance IP +### Create an Instance and add records with the new Instance IP + +The following commands allow you to: + +- create a Scaleway Instance +- assign The Instance's IP address to various DNS records for a specified DNS zone ```terraform variable "project_id" { @@ -183,44 +205,44 @@ resource "scaleway_domain_record" "web_alias" { The following arguments are supported: -- `dns_zone` - (Required) The DNS Zone of the domain. If the DNS zone doesn't exist, it will be automatically created. +- `dns_zone` - (Required) The DNS zone of the domain. If the domain has no DNS zone, one will be automatically created. -- `keep_empty_zone` - (Optional, default: `false`) When destroying a resource, if only NS records remain and this is set to `false`, the zone will be deleted. Please note, each zone not deleted will [cost you money](https://www.scaleway.com/en/dns/) +- `keep_empty_zone` - (Optional, defaults to `false`) When destroying a resource, if only NS records remain and this is set to `false`, the zone will be deleted. Note that each zone not deleted will [be billed](https://www.scaleway.com/en/dns/). - `name` - (Optional) The name of the record (can be an empty string for a root record). - `type` - (Required) The type of the record (`A`, `AAAA`, `MX`, `CNAME`, `DNAME`, `ALIAS`, `NS`, `PTR`, `SRV`, `TXT`, `TLSA`, or `CAA`). -- `data` - (Required) The content of the record (an IPv4 for an `A`, a string for a `TXT`...). +- `data` - (Required) The content of the record (an IPv4 for an `A` record, a string for a `TXT` record, etc.). + +- `ttl` - (Optional, defaults to `3600`) Time To Live of the record in seconds. -- `ttl` - (Optional, default: `3600`) Time To Live of the record in seconds. - -- `priority` - (Optional, default: `0`) The priority of the record (mostly used with an `MX` record) +- `priority` - (Optional, defaults to `0`) The priority of the record (mostly used with an `MX` record). ### Dynamic records -- `geo_ip` - (Optional) The Geo IP feature provides DNS resolution, based on the user’s geographical location. You can define a default IP that resolves if no Geo IP rule matches, and specify IPs for each geographical zone. [Documentation and usage example](https://www.scaleway.com/en/docs/network/domains-and-dns/how-to/manage-dns-records/#geo-ip-records) - - `matches` - (Required) The list of matches. *(Can be more than 1)* - - `countries` - (Optional) List of countries (eg: `FR` for France, `US` for the United States, `GB` for Great Britain...). [List of all countries code](https://api.scaleway.com/domain-private/v2beta1/countries) - - `continents` - (Optional) List of continents (eg: `EU` for Europe, `NA` for North America, `AS` for Asia...). [List of all continents code](https://api.scaleway.com/domain-private/v2beta1/continents) - - `data` (Required) The data of the match result +- `geo_ip` - (Optional) The Geo IP provides DNS resolution based on the user’s geographical location. You can define a default IP that resolves if no Geo IP rule matches, and specify IPs for each geographical zone. [Check the documentation for more information](https://www.scaleway.com/en/docs/network/domains-and-dns/how-to/manage-dns-records/#geo-ip-records). + - `matches` - (Required) The list of matches. *(Can be more than one)*. + - `countries` - (Optional) List of countries (eg: `FR` for France, `US` for the United States, `GB` for Great Britain, etc.). [Check the list of all country codes](https://api.scaleway.com/domain-private/v2beta1/countries). + - `continents` - (Optional) List of continents (eg: `EU` for Europe, `NA` for North America, `AS` for Asia, etc.). [Check the list of all continent codes](https://api.scaleway.com/domain-private/v2beta1/continents). + - `data` (Required) The data of the match result. -- `http_service` - (Optional) The DNS service checks the provided URL on the configured IPs and resolves the request to one of the IPs by excluding the ones not responding to the given string to check. [Documentation and usage example](https://www.scaleway.com/en/docs/network/domains-and-dns/how-to/manage-dns-records/#healthcheck-records) - - `ips` - (Required) List of IPs to check - - `must_contain` - (Required) Text to search - - `url` - (Required) URL to match the `must_contain` text to validate an IP - - `user_agent` - (Optional) User-agent used when checking the URL - - `strategy` - (Required) Strategy to return an IP from the IPs list. Can be `random`, `hashed` or `all` +- `http_service` - (Optional) The DNS service checks the provided URL on the configured IPs and resolves the request to one of the IPs, by excluding the ones not responding to the given string to check. [Check the documentation for more information](https://www.scaleway.com/en/docs/network/domains-and-dns/how-to/manage-dns-records/#healthcheck-records). + - `ips` - (Required) List of IPs to check. + - `must_contain` - (Required) Text to search. + - `url` - (Required) URL to match the `must_contain` text to validate an IP. + - `user_agent` - (Optional) User-agent used when checking the URL. + - `strategy` - (Required) Strategy to return an IP from the IPs list. Can be `random`, `hashed`, or `all`. -- `view` - (Optional) The answer to a DNS request is based on the client’s (resolver) subnet. *(Can be more than 1)* [Documentation and usage example](https://www.scaleway.com/en/docs/network/domains-and-dns/how-to/manage-dns-records/#views-records) - - `subnet` - (Required) The subnet of the view - - `data` - (Required) The data of the view record +- `view` - (Optional) The answer to a DNS request is based on the client’s (resolver) subnet. *(Can be more than 1)* [Check the documentation for more information](https://www.scaleway.com/en/docs/network/domains-and-dns/how-to/manage-dns-records/#views-records). + - `subnet` - (Required) The subnet of the view. + - `data` - (Required) The data of the view record. -- `weighted` - (Optional) You provide a list of IPs with their corresponding weights. These weights are used to proportionally direct requests to each IP. Depending on the weight of a record more or fewer requests are answered with its related IP compared to the others in the list. *(Can be more than 1)* [Documentation and usage example](https://www.scaleway.com/en/docs/network/domains-and-dns/how-to/manage-dns-records/#weight-records) - - `ip` - (Required) The weighted IP +- `weighted` - (Optional) You provide a list of IPs with their corresponding weights. These weights are used to proportionally direct requests to each IP. Depending on the weight of a record more or fewer requests are answered with their related IP compared to the others in the list. *(Can be more than 1)* [Check the documentation for more information](https://www.scaleway.com/en/docs/network/domains-and-dns/how-to/manage-dns-records/#weight-records). + - `ip` - (Required) The weighted IP. - `weight` - (Required) The weight of the IP as an integer UInt32. ## Attributes Reference @@ -231,18 +253,17 @@ In addition to all arguments above, the following attributes are exported: - `fqdn` - The FQDN of the record. -~> **Important:** Domain records' IDs are of the form `{dns_zone}/{id}`, e.g. `subdomain.domain.tld/11111111-1111-1111-1111-111111111111` +~> **Important:** Domain records' IDs are in the `{dns_zone}/{id}` format. The ID of a record should look like the following: `subdomain.domain.tld/11111111-1111-1111-1111-111111111111`. ## Multiple records -Some record types can have multiple `data` with the same `name` (eg: `A`, `AAAA`, `MX`, `NS`...). -You can duplicate a resource `scaleway_domain_record` with the same `name`, the records will be added. +Some record types can have multiple data with the same name (e.g., `A`, `AAAA`, `MX`, `NS`, etc.). You can duplicate a `scaleway_domain_record` resource with the same `name`, and the records will be added. -Please note, some record (eg: `CNAME`, Multiple dynamic records of different types...) has to be unique. +Note however, that some records (e.g., CNAME, multiple dynamic records of different types) must be unique. ## Import -Record can be imported using the `{dns_zone}/{id}`, e.g. +This section explains how to import a record using the `{dns_zone}/{id}` format. ```bash terraform import scaleway_domain_record.www subdomain.domain.tld/11111111-1111-1111-1111-111111111111 diff --git a/docs/resources/domain_zone.md b/docs/resources/domain_zone.md index adaf69323..7d38929bd 100644 --- a/docs/resources/domain_zone.md +++ b/docs/resources/domain_zone.md @@ -5,11 +5,16 @@ page_title: "Scaleway: scaleway_domain_zone" # Resource: scaleway_domain_zone -Creates and manages Scaleway Domain zone. -For more information, see [the documentation](https://www.scaleway.com/en/docs/network/domains-and-dns/how-to/configure-dns-zones/). +The `scaleway_domain_zone` resource allows you to create and manage Scaleway DNS zones. + +Refer to the Domains and DNS [product documentation](https://www.scaleway.com/en/docs/network/domains-and-dns/) and [API documentation](https://www.scaleway.com/en/developers/api/domains-and-dns/) for more information. ## Example Usage +### Create a DNS zone + +The following command allows you to create a DNS zone for the `test.scaleway-terraform.com` subdomain. + ```terraform resource "scaleway_domain_zone" "test" { @@ -22,34 +27,34 @@ resource "scaleway_domain_zone" "test" { The following arguments are supported: -- `domain` - (Required) The domain where the DNS zone will be created. +- `domain` - (Required) The main domain where the DNS zone will be created. -- `subdomain` - (Required) The subdomain(zone name) to create in the domain. +- `subdomain` - (Required) The name of the subdomain (zone name) to create within the domain. -- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the domain is associated with. +- `project_id` - (Defaults to Project ID specified in the [provider configuration](../index.md#project_id) `project_id`) The ID of the Project associated with the domain. ## Attributes Reference In addition to all arguments above, the following attributes are exported: -- `id` - The ID of the zone, which is of the form `{subdomain}.{domain}` +- `id` - The ID of the zone, in the `{subdomain}.{domain}` format. -- `ns` - NameServer list for zone. +- `ns` - The list of same servers for the zone. -- `ns_default` - NameServer default list for zone. +- `ns_default` - The default list of same servers for the zone. -- `ns_master` - NameServer master list for zone. +- `ns_master` - The master list of same servers for the zone. -- `status` - The domain zone status. +- `status` - The status of the domain zone. -- `message` - Message +- `message` - Message. -- `updated_at` - The date and time of the last update of the DNS zone. +- `updated_at` - The date and time at which the DNS zone was last updated. ## Import -Zone can be imported using the `{subdomain}.{domain}`, e.g. +This section explains how to import a zone using the `{subdomain}.{domain}` format. ```bash terraform import scaleway_domain_zone.test test.scaleway-terraform.com diff --git a/docs/resources/secret.md b/docs/resources/secret.md index 94ee5ec51..33317a0c6 100644 --- a/docs/resources/secret.md +++ b/docs/resources/secret.md @@ -5,12 +5,15 @@ page_title: "Scaleway: scaleway_secret" # Resource: scaleway_secret -Creates and manages Scaleway Secrets. -For more information, see [the documentation](https://www.scaleway.com/en/developers/api/secret-manager/). +The `scaleway_secret` resource allows you to create and manage secrets in Scaleway Secret Manager. + +Refer to the Secret Manager [product documentation](https://www.scaleway.com/en/docs/identity-and-access-management/secret-manager/) and [API documentation](https://www.scaleway.com/en/developers/api/secret-manager/) for more information. ## Example Usage -### Basic +### Create a secret + +The following command allows you to create a secret named `foo` with a description (`barr`), and tags (`foo` and `terraform`). ```terraform resource "scaleway_secret" "main" { @@ -20,7 +23,11 @@ resource "scaleway_secret" "main" { } ``` -### Ephemeral Policy +### Apply the ephemeral policy on a secret + +The following command shows you how to apply the [ephemeral policy](https://www.scaleway.com/en/docs/identity-and-access-management/secret-manager/concepts/#ephemeral-policy) on your secret named `foo`. + +In the example below, your secret's lifetime is of 24 hours, your secret versions will expire once they are accessed, and they are disabled after being accessed. ```terraform resource "scaleway_secret" "ephemeral" { @@ -55,14 +62,14 @@ The following arguments are supported: In addition to all arguments above, the following attributes are exported: -- `version_count` - The number of versions for this Secret. -- `status` - The status of the Secret. -- `created_at` - Date and time of secret's creation (RFC 3339 format). -- `updated_at` - Date and time of secret's last update (RFC 3339 format). +- `version_count` - The amount of secret versions. +- `status` - The status of the secret. +- `created_at` - Date and time of the secret's creation (in RFC 3339 format). +- `updated_at` - Date and time of the secret's last update (in RFC 3339 format). ## Import -The Secret can be imported using the `{region}/{id}`, e.g. +This section explains how to import a secret using the `{region}/{id}` format. ```bash terraform import scaleway_secret.main fr-par/11111111-1111-1111-1111-111111111111 diff --git a/docs/resources/secret_version.md b/docs/resources/secret_version.md index c52bb21c4..26217da71 100644 --- a/docs/resources/secret_version.md +++ b/docs/resources/secret_version.md @@ -5,12 +5,18 @@ page_title: "Scaleway: scaleway_secret_version" # Resource: scaleway_secret_version -Creates and manages Scaleway Secret Versions. -For more information, see [the documentation](https://www.scaleway.com/en/developers/api/secret-manager/#secret-versions-079501). +The `scaleway_secret_version` resource allows you to create and manage secret versions in Scaleway Secret Manager. + +Refer to the Secret Manager [product documentation](https://www.scaleway.com/en/docs/identity-and-access-management/secret-manager/) and [API documentation](https://www.scaleway.com/en/developers/api/secret-manager/) for more information. ## Example Usage -### Basic +### Create a secret and a version + +The following commands allow you to: + +- create a secret named `foo` +- create a version of this secret containing the `my_new_secret` data ```terraform resource "scaleway_secret" "main" { @@ -30,36 +36,35 @@ resource "scaleway_secret_version" "v1" { The following arguments are supported: -- `secret_id` - (Required) The Secret ID associated wit the secret version. -- `data` - (Required) The data payload of the secret version. Must be no larger than 64KiB. (e.g. `my-secret-version-payload`). more on the [data section](#data) +- `secret_id` - (Required) The ID of the secret associated with the version. +- `data` - (Required) The data payload of the secret version. Must not exceed 64KiB in size (e.g. `my-secret-version-payload`). Find out more on the [data section](/#data-information). - `description` - (Optional) Description of the secret version (e.g. `my-new-description`). -- `region` - (Defaults to [provider](../index.md#region) `region`) The [region](../guides/regions_and_zones.md#regions) - in which the resource exists. +- `region` - (Defaults to the region specified in the [provider configuration](../index.md#region)). The [region](../guides/regions_and_zones.md#regions) where the resource exists. ### Data -Note: The `data` should be a base64 encoded string when sent from the API. **It is already handled by the provider so you don't need to encode it yourself.** +Note: The `data` should be a base64-encoded string when sent from the API. **The provider handles this encoding so you do not need to encode the data yourself.** -Updating `data` will force creating a new the secret version. +Updating `data` will force the creation of a new secret version. -Be aware that this is a sensitive attribute. For more information, see [Sensitive Data in State](https://developer.hashicorp.com/terraform/language/state/sensitive-data). +Keep in mind that this is a sensitive attribute. For more information, see [Sensitive Data in State](https://developer.hashicorp.com/terraform/language/state/sensitive-data). -~> **Important:** This property is sensitive and will not be displayed in the plan. +~> **Important:** This property will not be displayed in the Terraform plan, for security reasons. ## Attributes Reference In addition to all arguments above, the following attributes are exported: -- `revision` - The revision for this Secret Version. -- `status` - The status of the Secret Version. -- `created_at` - Date and time of secret version's creation (RFC 3339 format). -- `updated_at` - Date and time of secret version's last update (RFC 3339 format). +- `revision` - The revision number of the secret version. +- `status` - The status of the secret version. +- `created_at` - The date and time of the secret version's creation (in RFC 3339 format). +- `updated_at` - The date and time of the secret version's last update (in RFC 3339 format). ## Import -The Secret Version can be imported using the `{region}/{id}/{revision}`, e.g. +This section explains how to import a secret version using the `{region}/{id}/{revision}` format. -~> **Important:** Be aware if you import with revision `latest` you will overwrite the version you used before. +~> **Important:** Keep in mind that if you import with the `latest` revision, you will overwrite the previous version you might have been using. ```bash terraform import scaleway_secret_version.main fr-par/11111111-1111-1111-1111-111111111111/2