diff --git a/faq/iam.mdx b/faq/iam.mdx index 4341396643..1ac9f59bf7 100644 --- a/faq/iam.mdx +++ b/faq/iam.mdx @@ -27,7 +27,7 @@ IAM enables you to manage access control to all Scaleway products. You may decide yourself whether to leave these automatically-created IAM applications and policies in place, [edit the policies](/iam/how-to/manage-policies/) to change permissions as required, or [generate new API keys for individual users](/iam/how-to/create-api-keys/) to define rights per-user via the creation of [new policies](/iam/how-to/create-policy/) for those users. ## What are applications, and why do I need them? -Applications represent the identity of non-human users (such as a CI pipeline, a custom script, or a Terraform provider). They are used to attach permissions and API keys to these operations - without being linked to specific users and their own rights. +Applications represent the identity of non-human users (such as a CI pipeline, a custom script, or a Terraform/OpenTofu provider). They are used to attach permissions and API keys to these operations - without being linked to specific users and their own rights. ## Why do I have to select a preferred Project for Object Storage when I create an API key? Due to limitations on the Object Storage API, API keys cannot perform Object Storage actions on several projects at the same time. Whenever you generate an API key that will be used on Object Storage, you must specify a preferred project where the API key will be able to perform actions. For more information, refer to the [Using IAM API keys with Object Storage](/iam/api-cli/using-api-key-object-storage/) documentation page. diff --git a/faq/messaging-and-queuing.mdx b/faq/messaging-and-queuing.mdx index 3fb2f5f958..ac227136be 100644 --- a/faq/messaging-and-queuing.mdx +++ b/faq/messaging-and-queuing.mdx @@ -31,9 +31,9 @@ The following subscriber types are supported: For more details on supported and unsupported Topics and Events features, see our [dedicated page](/messaging/reference-content/sns-support/). -## Can I configure Scaleway NATS via Terraform? +## Can I configure Scaleway NATS via Terraform/OpenTofu? -Yes, check out our [tutorial](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/guides/mnq_with_nats_terraform_provider) on how to configure Scaleway NATS with the Terraform [NATS Jetstream provider](https://registry.terraform.io/providers/nats-io/jetstream/latest/docs). +Yes, check out our [tutorial](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/guides/mnq_with_nats_terraform_provider) on how to configure Scaleway NATS with the Terraform/OpenTofu [NATS Jetstream provider](https://registry.terraform.io/providers/nats-io/jetstream/latest/docs). ## How are NATS, Queues, and Topics and Events billed? diff --git a/macros/developer-tools/scaleway-environment-variables.mdx b/macros/developer-tools/scaleway-environment-variables.mdx index 21145c94ff..a65e812194 100644 --- a/macros/developer-tools/scaleway-environment-variables.mdx +++ b/macros/developer-tools/scaleway-environment-variables.mdx @@ -8,15 +8,15 @@ The following standardized Scaleway environment variables are used for the CLI a | Variable | Description | Legacy variables | | :----------------------------- | :----------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------ | -| `$SCW_ACCESS_KEY` | The [access key](/iam/how-to/create-api-keys/) of a token | `$SCALEWAY_ACCESS_KEY` (used by Terraform) | -| `$SCW_SECRET_KEY` | The [secret key](/iam/how-to/create-api-keys/) of a token | `$SCW_TOKEN` (used by the CLI), `$SCALEWAY_TOKEN` (used by Terraform), `$SCALEWAY_ACCESS_KEY` (used by Terraform) | | -| `$SCW_DEFAULT_REGION` | Your default [region](https://www.scaleway.com/en/developers/api/#regions-and-zones) | `$SCW_REGION` (used by the CLI),`$SCALEWAY_REGION` (used by Terraform) | -| `$SCW_DEFAULT_ZONE` | Your default [Availability Zone](https://www.scaleway.com/en/developers/api/#regions-and-zones) | `$SCW_ZONE` (used by the CLI),`$SCALEWAY_ZONE` (used by Terraform) | +| `$SCW_ACCESS_KEY` | The [access key](/iam/how-to/create-api-keys/) of a token | `$SCALEWAY_ACCESS_KEY` (used by Terraform/OpenTofu) | +| `$SCW_SECRET_KEY` | The [secret key](/iam/how-to/create-api-keys/) of a token | `$SCW_TOKEN` (used by the CLI), `$SCALEWAY_TOKEN` (used by Terraform/OpenTofu), `$SCALEWAY_ACCESS_KEY` (used by Terraform/OpenTofu) | | +| `$SCW_DEFAULT_REGION` | Your default [region](https://www.scaleway.com/en/developers/api/#regions-and-zones) | `$SCW_REGION` (used by the CLI),`$SCALEWAY_REGION` (used by Terraform/OpenTofu) | +| `$SCW_DEFAULT_ZONE` | Your default [Availability Zone](https://www.scaleway.com/en/developers/api/#regions-and-zones) | `$SCW_ZONE` (used by the CLI),`$SCALEWAY_ZONE` (used by Terraform/OpenTofu) | | `$SCW_API_URL` | URL of the API | - | | `$SCW_INSECURE` | Set this variable to `true` to enable the [insecure mode](/iot-hub/concepts/#insecure-connection) | `$SCW_TLSVERIFY` (inverse flag used by the CLI) | | `$SCW_PROFILE` | Set the configuration profile to use | - | | `$SCW_PROJECT_ID` | Your [Project ID](https://console.scaleway.com/project/settings) | `$SCW_DEFAULT_PROJECT_ID` | -| `$SCW_ORGANIZATION_ID` | Your [Organization ID](https://console.scaleway.com/organization/settings) | `$SCW_DEFAULT_ORGANIZATION_ID`, `$SCW_ORGANIZATION` (used by the CLI),`$SCALEWAY_ORGANIZATION` (used by Terraform) | +| `$SCW_ORGANIZATION_ID` | Your [Organization ID](https://console.scaleway.com/organization/settings) | `$SCW_DEFAULT_ORGANIZATION_ID`, `$SCW_ORGANIZATION` (used by the CLI),`$SCALEWAY_ORGANIZATION` (used by Terraform/OpenTofu) | ## Environment variables priority @@ -26,6 +26,6 @@ The order of precedence, from highest to lowest is the following. 1. Environment variables defined in your command-line environment. -2. Static variables (i.e. variables set in a Terraform configuration file). +2. Static variables (i.e. variables set in a Terraform/OpenTofu configuration file). 3. Variables defined in the [Scaleway configuration file](/scaleway-sdk/reference-content/scaleway-configuration-file/) \ No newline at end of file diff --git a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx index 1e3c0907ac..d6994338df 100644 --- a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx +++ b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx @@ -13,7 +13,7 @@ dates: posted: 2025-01-20 --- -In this page, we will show you how to send application logs from your Kubernetes cluster to your Cockpit using either a Helm chart or deploying a Helm chart with [Terraform](https://www.terraform.io/). +In this page, we will show you how to send application logs from your Kubernetes cluster to your Cockpit using either a Helm chart or deploying a Helm chart with [Terraform](https://www.terraform.io/) or [OpenTofu](https://opentofu.org/). We will use the [k8s-monitoring](https://artifacthub.io/packages/helm/grafana/k8s-monitoring/1.6.16) Helm Chart, which installs an Alloy Daemon set to export your Kubernetes cluster's logs to your Cockpit. @@ -100,11 +100,11 @@ Once you have configured your `values.yml` file, you can use Helm to deploy the helm list ``` -## Send Kubernetes logs using Helm chart with Terraform +## Send Kubernetes logs using Helm chart with Terraform/OpenTofu -You can also use Terraform to manage and deploy Helm charts, providing you with more automation and consistency to manage your Kubernetes resources. +You can also use Terraform/OpenTofu to manage and deploy Helm charts, providing you with more automation and consistency to manage your Kubernetes resources. -1. Create a `provider.tf` file and paste the following template to set up the Helm Terraform provider: +1. Create a `provider.tf` file and paste the following template to set up the Helm Terraform/OpenTofu provider: ```terraform provider "helm" { kubernetes { @@ -130,7 +130,7 @@ You can also use Terraform to manage and deploy Helm charts, providing you with } ``` 3. Save your changes. -4. Run `terraform init` to initialize your Terraform configuration and download any necessary providers. +4. Run `terraform init` to initialize your Terraform/OpenTofu configuration and download any necessary providers. 5. Run `terraform apply` to apply your configuration. 6. Type `yes` when prompted to confirm the actions. diff --git a/pages/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx b/pages/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx index ffc6d1f220..cd48411a58 100644 --- a/pages/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx +++ b/pages/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx @@ -14,7 +14,7 @@ dates: --- -In this page we will show you how to send application metrics from your Kubernetes cluster to your Cockpit, either by using a Helm chart or deploying a Helm chart with [Terraform](https://www.terraform.io/). +On this page, we will show you how to send application metrics from your Kubernetes cluster to your Cockpit, either by using a Helm chart or deploying a Helm chart with [Terraform](https://www.terraform.io/) or [OpenTofu](https://opentofu.org/). We will use the [k8s-monitoring](https://artifacthub.io/packages/helm/grafana/k8s-monitoring/1.6.16) Helm Chart, which installs an Alloy Daemon set to export your Kubernetes cluster's metrics to your Cockpit. @@ -88,7 +88,7 @@ spec: ... ``` -### Terraform deployment template +### Terraform/OpenTofu deployment template ```terraform resource "kubernetes_deployment_v1" "your_application_deployment" { @@ -109,9 +109,9 @@ resource "kubernetes_deployment_v1" "your_application_deployment" { } ``` -## Send Kubernetes metrics using Helm chart with Terraform +## Send Kubernetes metrics using Helm chart with Terraform/OpenTofu -1. Create a `provider.tf` file and paste the following template to set up the Helm Terraform provider: +1. Create a `provider.tf` file and paste the following template to set up the Helm Terraform/OpenTofu provider: ```terraform provider "helm" { kubernetes { @@ -137,7 +137,7 @@ resource "kubernetes_deployment_v1" "your_application_deployment" { } ``` 3. Save your changes. -4. Run `terraform init` to initialize your Terraform configuration and download any necessary providers. +4. Run `terraform init` to initialize your Terraform/OpenTofu configuration and download any necessary providers. 5. Run `terraform apply` to apply your configuration. 6. Type `yes` when prompted to confirm the actions. diff --git a/pages/cockpit/index.mdx b/pages/cockpit/index.mdx index 47f7b6f743..34144c0aae 100644 --- a/pages/cockpit/index.mdx +++ b/pages/cockpit/index.mdx @@ -52,7 +52,7 @@ meta: diff --git a/pages/elastic-metal/api-cli/elastic-metal-with-api.mdx b/pages/elastic-metal/api-cli/elastic-metal-with-api.mdx index 7fc794bfd2..d9077df07a 100644 --- a/pages/elastic-metal/api-cli/elastic-metal-with-api.mdx +++ b/pages/elastic-metal/api-cli/elastic-metal-with-api.mdx @@ -16,7 +16,7 @@ categories: Scaleway's [Elastic Metal servers](https://www.scaleway.com/en/elastic-metal/) provide 100% dedicated resources while offering the flexibility and scalability of the cloud, including hourly billing and full customization. The hardware is entirely dedicated to you — free from virtualization, overallocation, or neighboring tenants. -Elastic Metal servers also feature a robust [REST API](https://www.scaleway.com/en/developers/api/elastic-metal/) that enables seamless automation of tasks and deployments. Integration with tools like [Terraform](https://www.terraform.io/) further streamlines infrastructure management. +Elastic Metal servers also feature a robust [REST API](https://www.scaleway.com/en/developers/api/elastic-metal/) that enables seamless automation of tasks and deployments. Integration with tools like [Terraform](https://www.terraform.io/) or [OpenTofu](https://opentofu.org/) further streamlines infrastructure management. The **one-command deployment feature** accelerates server provisioning by combining delivery and setup into a single API call. This simplifies server provisioning, ensuring your machine is fully operational in less than 15 minutes. diff --git a/pages/gpu/how-to/use-scratch-storage-h100-instances.mdx b/pages/gpu/how-to/use-scratch-storage-h100-instances.mdx index 05938b51d0..9331a36838 100644 --- a/pages/gpu/how-to/use-scratch-storage-h100-instances.mdx +++ b/pages/gpu/how-to/use-scratch-storage-h100-instances.mdx @@ -52,7 +52,7 @@ You need to add an extra volume, for example: "volumes":{"1":{"name":"scratch-volume","volume_type":"scratch","size":3000000000000}} ``` -## How can I add scratch storage to my GPU Instance using Terraform? +## How can I add scratch storage to my GPU Instance using Terraform/OpenTofu? ``` resource “scaleway_instance_volume” “scratch_volume” { size_in_gb = 3000 diff --git a/pages/guidelines.mdx b/pages/guidelines.mdx index 10912cacf2..c6df49c490 100644 --- a/pages/guidelines.mdx +++ b/pages/guidelines.mdx @@ -62,7 +62,7 @@ All documentation pages must fall into one of the following categories: | Quickstart | Shows how to do the main series of actions necessary to start using a Scaleway product via the console, e.g. [Instances Quickstart](/instances/quickstart/) | | Concepts | Defines and briefly explains the main terminology associated with a Scaleway product, e.g. [Kubernetes Concepts](/kubernetes/concepts/) | | Troubleshooting | Gives solutions to help resolve a common issue with a Scaleway product, e.g. [VPC auto-config is not working](/vpc/troubleshooting/autoconfig-not-working/) | -| API/CLI | Presents information and tips for creating and configuring a Scaleway product via both official and third-party APIs, CLIs, SDKs and other developer tools, e.g. Terraform, e.g. [Using Object Storage with the AWS-CLI](/object-storage/api-cli/object-storage-aws-cli/). These pages complement the [main developer reference documentation](https://www.scaleway.com/en/developers/). | +| API/CLI | Presents information and tips for creating and configuring a Scaleway product via both official and third-party APIs, CLIs, SDKs and other developer tools, e.g. Terraform/OpenTofu, e.g. [Using Object Storage with the AWS-CLI](/object-storage/api-cli/object-storage-aws-cli/). These pages complement the [main developer reference documentation](https://www.scaleway.com/en/developers/). | | Additional Content | Provides detailed information on specific subjects and features associated with a Scaleway product, e.g. [Optimize your Object Storage performance](/object-storage/reference-content/optimize-object-storage-performance/) | | Tutorial | Explains how to use a Scaleway product with a third-party tool, or how to use multiple Scaleway products together for a specific use-case, e.g. [Deploying Strapi on an Instance](/tutorials/strapi/) | | FAQ | Gives answers to the most frequently asked questions about Scaleway products, e.g. [Cockpit FAQ](/faq/cockpit/) | diff --git a/pages/iam/api-cli/using-api-key-object-storage.mdx b/pages/iam/api-cli/using-api-key-object-storage.mdx index 4b3b058597..f3ecabf622 100644 --- a/pages/iam/api-cli/using-api-key-object-storage.mdx +++ b/pages/iam/api-cli/using-api-key-object-storage.mdx @@ -29,7 +29,7 @@ When you create new Projects, you can choose the Project in which you want to ad ## API keys -You need an API key if you want to carry out actions on Scaleway products and resources via the Scaleway [API](https://www.scaleway.com/en/developers/api/) or other Scaleway developer tools like the [CLI](https://github.com/scaleway/scaleway-cli) and [Terraform](https://github.com/scaleway/terraform-provider-scaleway), or any third-party API/CLI compatible with Scaleway products. An API key is not necessary if you only use the [console](https://console.scaleway.com/) to create and manage your Scaleway resources. +You need an API key if you want to carry out actions on Scaleway products and resources via the Scaleway [API](https://www.scaleway.com/en/developers/api/) or other Scaleway developer tools like the [CLI](https://github.com/scaleway/scaleway-cli) and [Terraform/OpenTofu](https://github.com/scaleway/terraform-provider-scaleway), or any third-party API/CLI compatible with Scaleway products. An API key is not necessary if you only use the [console](https://console.scaleway.com/) to create and manage your Scaleway resources. When you generate an API key with IAM, the key is associated with a specific [IAM user](/iam/concepts/#user) or [IAM application](/iam/concepts/#application). The API key inherits the permissions of its bearer (the user or application it is associated with). The user/application may have permissions on one or several Scaleway Projects, accorded to them via [policies](/iam/concepts/#policy). diff --git a/pages/kubernetes/reference-content/multi-az-clusters.mdx b/pages/kubernetes/reference-content/multi-az-clusters.mdx index c7fd4a673f..d5fa962033 100644 --- a/pages/kubernetes/reference-content/multi-az-clusters.mdx +++ b/pages/kubernetes/reference-content/multi-az-clusters.mdx @@ -57,17 +57,17 @@ It is important to note that the scalability and reliability of Kubernetes does ### Prerequisites for setting up a multi-AZ cluster -- Your cluster must be compatible with, and connected to a Private Network. If it is not, you will need to migrate your cluster following the [procedure through the console, API, or Terraform](/kubernetes/reference-content/secure-cluster-with-private-network/). +- Your cluster must be compatible with, and connected to a Private Network. If it is not, you will need to migrate your cluster following the [procedure through the console, API, or Terraform/OpenTofu](/kubernetes/reference-content/secure-cluster-with-private-network/). - Ensure the node types required for your pool are available in your chosen AZs, as not all node types are available in every AZ and stocks might be limited. ### Network configuration -Start by setting up the network for our Kubernetes Kapsule cluster. This setup includes creating a multi-AZ VPC. Using Terraform, we can manage this infrastructure as shown below: +Start by setting up the network for our Kubernetes Kapsule cluster. This setup includes creating a multi-AZ VPC. Using Terraform/OpenTofu, we can manage this infrastructure as shown below: ```hcl -# Terraform configuration for Scaleway Kapsule multi-AZ VPC +# Terraform/OpenTofu configuration for Scaleway Kapsule multi-AZ VPC provider "scaleway" { #... your Scaleway credentials @@ -90,7 +90,7 @@ resource "scaleway_vpc_private_network" "pn_multi_az" { Once the network is ready, proceed to create the Kubernetes cluster and node pools spanning multiple AZs. Each node pool should correspond to a different AZ for high availability. ```hcl -# Terraform configuration for Scaleway Kapsule cluster and node pools +# Terraform/OpenTofu configuration for Scaleway Kapsule cluster and node pools resource "scaleway_k8s_cluster" "kapsule_multi_az" { name = "kapsule-multi-az" @@ -138,7 +138,7 @@ resource "scaleway_k8s_pool" "pool-multi-az" { } ``` -After applying this Terraform configuration, the cluster and node pools will be set up across the defined AZs. +After applying this Terraform/OpenTofu configuration, the cluster and node pools will be set up across the defined AZs. ### Deployments with topologySpreadConstraints @@ -263,11 +263,11 @@ Creating a volume ahead of this could lead to its arbitrary placement in an AZ, This method is an important point to maintain system resilience and operational consistency across multi-AZ deployments. - You now have a brief overview of how to set up a multi-AZ Kubernetes Kapsule cluster on Scaleway. For further information, refer to our complete step-by-step tutorial on [deploying a multi-AZ Kubernetes cluster with Terraform and Kapsule](/tutorials/k8s-kapsule-multi-az/). + You now have a brief overview of how to set up a multi-AZ Kubernetes Kapsule cluster on Scaleway. For further information, refer to our complete step-by-step tutorial on [deploying a multi-AZ Kubernetes cluster with Terraform/OpenTofu and Kapsule](/tutorials/k8s-kapsule-multi-az/). ## Additional resources -* Tutorial [Deploying a multi-AZ Kubernetes cluster with Terraform and Kapsule](/tutorials/k8s-kapsule-multi-az/) -* Complete [Terraform configuration files to deploy a multi-AZ cluster](https://github.com/scaleway/kapsule-terraform-multi-az-tutorial/) +* Tutorial [Deploying a multi-AZ Kubernetes cluster with Terraform/OpenTofu and Kapsule](/tutorials/k8s-kapsule-multi-az/) +* Complete [Terraform/OpenTofu configuration files to deploy a multi-AZ cluster](https://github.com/scaleway/kapsule-terraform-multi-az-tutorial/) * [Official Kubernetes best practices for running clusters in multiple zones](https://kubernetes.io/docs/setup/best-practices/multiple-zones/) diff --git a/pages/kubernetes/reference-content/secure-cluster-with-private-network.mdx b/pages/kubernetes/reference-content/secure-cluster-with-private-network.mdx index 8eb3a439be..d21becfb33 100644 --- a/pages/kubernetes/reference-content/secure-cluster-with-private-network.mdx +++ b/pages/kubernetes/reference-content/secure-cluster-with-private-network.mdx @@ -137,10 +137,10 @@ If you wish to allow access to the nodes through a public IP using a specific po 6. Click **Add inbound route** to configure a new rule and customize it according to your requirements. 7. Apply your custom rules by clicking . -### Using Terraform +### Using Terraform/OpenTofu -If you are using Terraform to create your cluster, you can create a security group resource after creating the cluster resource and before creating the pool resource. -You can find a Terraform configuration example below: +If you are using Terraform/OpenTofu to create your cluster, you can create a security group resource after creating the cluster resource and before creating the pool resource. +You can find a Terraform/OpenTofu configuration example below: ```json data "scaleway_k8s_version" "latest" { name = "latest" diff --git a/pages/kubernetes/reference-content/understanding-differences-kapsule-kosmos.mdx b/pages/kubernetes/reference-content/understanding-differences-kapsule-kosmos.mdx index 209be20778..ee24d5558e 100644 --- a/pages/kubernetes/reference-content/understanding-differences-kapsule-kosmos.mdx +++ b/pages/kubernetes/reference-content/understanding-differences-kapsule-kosmos.mdx @@ -23,7 +23,7 @@ Kapsule is Scaleway's **fully managed Kubernetes service**, enabling users to de - Available in multiple Scaleway regions (PAR, AMS, WAW), allowing users to deploy applications closer to their target audience for enhanced performance. - Allows users to deploy, manage, and scale containerized applications using Kubernetes without having to manage the underlying infrastructure. - Automatic scaling, rolling updates, and seamless integration with other Scaleway services like Load Balancers and Object Storage. - - Users can manage their Kubernetes clusters through the Kubernetes API, the intuitive Scaleway console or the Scaleway developer tools (namely [Scaleway CLI](/scaleway-cli/quickstart/) or the [Terraform provider](/terraform/quickstart/). + - Users can manage their Kubernetes clusters through the Kubernetes API, the intuitive Scaleway console or the Scaleway developer tools (namely [Scaleway CLI](/scaleway-cli/quickstart/) or the [Terraform/OpenTofu provider](/terraform/quickstart/). **Kapsule is ideal for:** Developers and organizations seeking to deploy containerized applications with Kubernetes without the operational overhead of managing Kubernetes infrastructure. diff --git a/pages/load-balancer/reference-content/public-private-accessibility.mdx b/pages/load-balancer/reference-content/public-private-accessibility.mdx index 2b567ae82b..5a6da5a383 100644 --- a/pages/load-balancer/reference-content/public-private-accessibility.mdx +++ b/pages/load-balancer/reference-content/public-private-accessibility.mdx @@ -30,7 +30,7 @@ A Load Balancer is defined as public when you choose the "public" accessibility - It must have a public IPv4 address, which can either be a new address created along with the Load Balancer, or an existing available flexible IP address held in your account. - It can optionally have an additional public IPv6 address. - The Load Balancer is accessible over the public internet via its public IP address(es), but can optionally also be attached to up to eight different Private Networks. -- It can be configured or deleted using the Scaleway API, console, CLI, Terraform or other devtools. +- It can be configured or deleted using the Scaleway API, console, CLI, Terraform/OpenTofu or other devtools. - It provides its metrics to [Scaleway Cockpit](/cockpit/concepts/#cockpit), allows the use of Let's Encrypt certificates, and (if the appropriate Load Balancer type is selected), supports multi-cloud IP addresses for its backend servers. @@ -42,7 +42,7 @@ A Load Balancer is defined as private when you choose the "private" accessibilit - It has no public IP address for sending requests or initiating TCP connections. - It only listens to requests or connections sent to its interface(s) on the [Private Network(s)](/vpc/concepts/#private-networks) it is attached to. It is not accessible over the public internet. - Like a public Load Balancer, it can be attached to up to eight different Private Networks. -- It can be configured or deleted using the Scaleway API, console, CLI, Terraform, or other devtools. +- It can be configured or deleted using the Scaleway API, console, CLI, Terraform/OpenTofu, or other devtools. - It provides its metrics to [Scaleway Cockpit](/cockpit/concepts/#cockpit), even though there is no traffic. - It does not allow the use of a Let's Encrypt [certificate](/load-balancer/concepts/#certificate) - only imported certificates are supported. - It does not support multi-cloud IP addresses for its backend servers, since it is not directly connected to the internet. Routes to them are thus, not guaranteed. diff --git a/pages/load-balancer/reference-content/sni-route-deprecation.mdx b/pages/load-balancer/reference-content/sni-route-deprecation.mdx index 11def42332..7e1119bd8e 100644 --- a/pages/load-balancer/reference-content/sni-route-deprecation.mdx +++ b/pages/load-balancer/reference-content/sni-route-deprecation.mdx @@ -136,7 +136,7 @@ Find below some sample configurations for HTTP Host header routes to HTTP backen ``` - + Assuming you are managing a route resource to a backend using HTTP protocol with the following resource definition: ```bash diff --git a/pages/managed-databases-for-postgresql-and-mysql/how-to/connect-database-private-network.mdx b/pages/managed-databases-for-postgresql-and-mysql/how-to/connect-database-private-network.mdx index 323c17fc4e..eaf5a4afa2 100644 --- a/pages/managed-databases-for-postgresql-and-mysql/how-to/connect-database-private-network.mdx +++ b/pages/managed-databases-for-postgresql-and-mysql/how-to/connect-database-private-network.mdx @@ -53,7 +53,7 @@ You can create new Database Instances to attach to your Private Network, or atta - Your private IP addresses are automatically allocated. They are managed via an IP Address Manager (IPAM). You can retrieve them on the Private Network tab of your Database Instance. To allocate IPs manually, you can use the Scaleway API and CLI, or Terraform. + Your private IP addresses are automatically allocated. They are managed via an IP Address Manager (IPAM). You can retrieve them on the Private Network tab of your Database Instance. To allocate IPs manually, you can use the Scaleway API and CLI, or Terraform/OpenTofu. 6. Click **Attach to Private Network** to conclude. diff --git a/pages/managed-databases-for-postgresql-and-mysql/how-to/create-read-replica.mdx b/pages/managed-databases-for-postgresql-and-mysql/how-to/create-read-replica.mdx index 2403d35bb4..1cbd8ec920 100644 --- a/pages/managed-databases-for-postgresql-and-mysql/how-to/create-read-replica.mdx +++ b/pages/managed-databases-for-postgresql-and-mysql/how-to/create-read-replica.mdx @@ -43,11 +43,11 @@ Read Replicas allow you to scale your Database Instance for read-heavy database - **Private Networks** - Private Networks allow you to create virtual Private Networks for your Databases, enabling them to communicate in an isolated network without the need for a public IP address. If you select this option, you must select an existing Private Network to attach to your Read Replica. - Your private IP addresses are automatically allocated. They are managed via an IP Address Manager (IPAM). You can retrieve them on the Private Network tab of your Database Instance. To allocate IPs manually, you can use the Scaleway API and CLI, or Terraform. + Your private IP addresses are automatically allocated. They are managed via an IP Address Manager (IPAM). You can retrieve them on the Private Network tab of your Database Instance. To allocate IPs manually, you can use the Scaleway API and CLI, or Terraform/OpenTofu. - If you select **Public network**, you can [attach a Private Network](/managed-databases-for-postgresql-and-mysql/how-to/manage-read-replica/#how-to-manage-private-networks) to your Read Replica after its creation. If you chose to attach your Read Replica to a Private Network, you will not be able to add a Public Network to the same Read Replica later via the Scaleway console. You can, however, use the [Managed Databases API](https://www.scaleway.com/en/developers/api/managed-database-postgre-mysql/) to do so via a command line or Terraform. + If you select **Public network**, you can [attach a Private Network](/managed-databases-for-postgresql-and-mysql/how-to/manage-read-replica/#how-to-manage-private-networks) to your Read Replica after its creation. If you choose to attach your Read Replica to a Private Network, you will not be able to add a Public Network to the same Read Replica later via the Scaleway console. You can, however, use the [Managed Databases API](https://www.scaleway.com/en/developers/api/managed-database-postgre-mysql/) to do so via a command line or Terraform/OpenTofu. 7. Click **Create Read Replica**. A list of your Read Replicas displays. diff --git a/pages/managed-databases-for-postgresql-and-mysql/how-to/manage-read-replica.mdx b/pages/managed-databases-for-postgresql-and-mysql/how-to/manage-read-replica.mdx index 036c074a1e..c3b1becf46 100644 --- a/pages/managed-databases-for-postgresql-and-mysql/how-to/manage-read-replica.mdx +++ b/pages/managed-databases-for-postgresql-and-mysql/how-to/manage-read-replica.mdx @@ -68,7 +68,7 @@ You can attach and detach your Read Replica to a Private Network even after its 4. Click > **Attach Private Network** next to the name of your selected Read Replica. A pop-up displays. 5. Select **Create and attach a new Private Network**. - Your private IP addresses are automatically allocated. They are managed via an IP Address Manager (IPAM). You can retrieve them on the Private Network tab of your Database Instance. To allocate IPs manually, you can use the Scaleway API and CLI, or Terraform. + Your private IP addresses are automatically allocated. They are managed via an IP Address Manager (IPAM). You can retrieve them on the Private Network tab of your Database Instance. To allocate IPs manually, you can use the Scaleway API and CLI, or Terraform/OpenTofu. 6. Click **Attach Private Network**. @@ -80,7 +80,7 @@ You can attach and detach your Read Replica to a Private Network even after its 4. Click > **Attach Private Network** next to the name of your selected Read Replica. A pop-up displays. 5. Select an existing Private Network to attach to your Read Replica. - Your private IP addresses are automatically allocated. They are managed via an IP Address Manager (IPAM). You can retrieve them on the Private Network tab of your Database Instance. To allocate IPs manually, you can use the Scaleway API and CLI, or Terraform. + Your private IP addresses are automatically allocated. They are managed via an IP Address Manager (IPAM). You can retrieve them on the Private Network tab of your Database Instance. To allocate IPs manually, you can use the Scaleway API and CLI, or Terraform/OpenTofu. 6. Click **Attach to Private Network** to confirm. diff --git a/pages/managed-databases-for-redis/how-to/create-a-database-for-redis.mdx b/pages/managed-databases-for-redis/how-to/create-a-database-for-redis.mdx index 81c5190bde..61a7ffbf91 100644 --- a/pages/managed-databases-for-redis/how-to/create-a-database-for-redis.mdx +++ b/pages/managed-databases-for-redis/how-to/create-a-database-for-redis.mdx @@ -44,7 +44,7 @@ Managed Database for Redis™* is a low-latency caching solution base - If you want to use Private Networks, you must select the option upon creation. It is not possible to add the Redis™ Database Instance to a Private Network once it has been created. - - Your private IP addresses are automatically allocated. They are managed via an IP Address Manager (IPAM). You can retrieve them on the Private Network tab of your Database Instance. To allocate IPs manually, you can use the Scaleway API and CLI, or Terraform. + - Your private IP addresses are automatically allocated. They are managed via an IP Address Manager (IPAM). You can retrieve them on the Private Network tab of your Database Instance. To allocate IPs manually, you can use the Scaleway API and CLI, or Terraform/OpenTofu. - Managed Databases for Redis™ are currently not compatible with the [Static NAT](/public-gateways/concepts/#nat) feature of [Scaleway Public Gateways](/public-gateways/concepts/#public-gateway). You can use Public Gateways in [SSH bastion](/public-gateways/how-to/use-ssh-bastion/) mode and perform port forwarding. diff --git a/pages/managed-databases-for-redis/quickstart.mdx b/pages/managed-databases-for-redis/quickstart.mdx index ac2913c784..ad61c72c64 100644 --- a/pages/managed-databases-for-redis/quickstart.mdx +++ b/pages/managed-databases-for-redis/quickstart.mdx @@ -49,7 +49,7 @@ Managed Database for Redis™ is a low-latency caching solution based on in-memo - Your private IP addresses are automatically allocated. They are managed via an IP Address Manager (IPAM). You can retrieve them on the Private Network tab of your Database Instance. To allocate IPs manually, you can use the Scaleway API and CLI, or Terraform. + Your private IP addresses are automatically allocated. They are managed via an IP Address Manager (IPAM). You can retrieve them on the Private Network tab of your Database Instance. To allocate IPs manually, you can use the Scaleway API and CLI, or Terraform/OpenTofu. - **Public network**: resources in a public network are publicly visible by default. The default Access Control List (ACL) settings allow anybody to connect to resources in your network. You can restrict access by configuring ACLs. diff --git a/pages/messaging/api-cli/nats-cli.mdx b/pages/messaging/api-cli/nats-cli.mdx index f8c747f081..0d96c9efab 100644 --- a/pages/messaging/api-cli/nats-cli.mdx +++ b/pages/messaging/api-cli/nats-cli.mdx @@ -18,7 +18,7 @@ The NATS CLI (`nats`) is the official NATS tool for managing your NATS resources Check out the official [NATS CLI documentation](https://docs.nats.io/using-nats/nats-tools/nats_cli/) for installation instructions, examples and more. - You can also configure Scaleway NATS with the Terraform NATS Jetstream provider using our [dedicated tutorial](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/guides/mnq_with_nats_terraform_provider). + You can also configure Scaleway NATS with the Terraform/OpenTofu NATS Jetstream provider using our [dedicated tutorial](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/guides/mnq_with_nats_terraform_provider). This page shows you how to get started with some basic actions via the NATS CLI. diff --git a/pages/messaging/index.mdx b/pages/messaging/index.mdx index 5d9dc55412..89f6a6c8a3 100644 --- a/pages/messaging/index.mdx +++ b/pages/messaging/index.mdx @@ -60,7 +60,7 @@ meta: label="Read more" /> diff --git a/pages/messaging/reference-content/nats-overview.mdx b/pages/messaging/reference-content/nats-overview.mdx index eeb9abb6e8..17747cf0e8 100644 --- a/pages/messaging/reference-content/nats-overview.mdx +++ b/pages/messaging/reference-content/nats-overview.mdx @@ -25,7 +25,7 @@ Scaleway NATS is a managed messaging service that enable seamless communication ## NATS accounts -You can easily create a NATS account from the [Scaleway console](https://console.scaleway.com/), via the [Scaleway API](https://www.scaleway.com/en/developers/api/messaging-and-queuing/nats-api/) or via [Terraform](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/guides/mnq_with_nats_terraform_provider). +You can easily create a NATS account from the [Scaleway console](https://console.scaleway.com/), via the [Scaleway API](https://www.scaleway.com/en/developers/api/messaging-and-queuing/nats-api/) or via [Terraform/OpenTofu](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/guides/mnq_with_nats_terraform_provider). ## NATS credentials @@ -78,4 +78,4 @@ The main difference you will find between the standard NATS documentation and Sc - [Publish/Subscribe in pure NATS (no message retention)](https://docs.nats.io/nats-concepts/core-nats/pubsub/pubsub_walkthrough) - [Introduction to JetStream](https://docs.nats.io/nats-concepts/jetstream) - [Learn NATS by Example](https://natsbyexample.com/) -- [How to use Scaleway NATS with the Terraform NATS Jetstream provider](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/guides/mnq_with_nats_terraform_provider) \ No newline at end of file +- [How to use Scaleway NATS with the Terraform/OpenTofu NATS Jetstream provider](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/guides/mnq_with_nats_terraform_provider) \ No newline at end of file diff --git a/pages/public-gateways/how-to/use-ssh-bastion.mdx b/pages/public-gateways/how-to/use-ssh-bastion.mdx index 0e7f98bccd..95ea705c99 100644 --- a/pages/public-gateways/how-to/use-ssh-bastion.mdx +++ b/pages/public-gateways/how-to/use-ssh-bastion.mdx @@ -63,7 +63,7 @@ You can connect to a resource behind the bastion using its private IP address on The domain to use is set when the Public Gateway is attached to the Private Network. Therefore, the FQDN to use depends on how you made this attachment: - **Via the Scaleway console**: The FQDN takes the form `resource-name.priv` -- **Via Terraform**: The FQDN takes the form `resource-name.dns_local_name` where `dns_local_name` is [this](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/vpc_public_gateway_dhcp#dns_local_name) Terraform option. +- **Via Terraform/OpenTofu**: The FQDN takes the form `resource-name.dns_local_name` where `dns_local_name` is [this](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/vpc_public_gateway_dhcp#dns_local_name) Terraform/OpenTofu option. - **Via the Scaleway CLI or API**: The FQDN takes the form `resource-name.dns_local_name` where `dns_local_name` follows the specification [here](https://www.scaleway.com/en/developers/api/public-gateway/#path-dhcp-create-a-dhcp-configuration), defaulting to `.priv`. Carry out the following command on your terminal to connect to a resource inside your Private Network. Remember to replace `FQDN` with the FQDN in the format specified above. @@ -81,7 +81,7 @@ Carry out the following steps to avoid the need to repeat `-J bastion@ -### Configure secrets using Terraform +### Configure secrets using Terraform/OpenTofu -Add the following [resource description](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/container) in Terraform: +Add the following [resource description](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/container) in Terraform/OpenTofu: ```hcl secret_environment_variables = { "key" = "secret" } diff --git a/pages/serverless-containers/reference-content/deploy-container.mdx b/pages/serverless-containers/reference-content/deploy-container.mdx index 001df56208..f7c300ef1b 100644 --- a/pages/serverless-containers/reference-content/deploy-container.mdx +++ b/pages/serverless-containers/reference-content/deploy-container.mdx @@ -38,11 +38,11 @@ Serverless Framework can be used in many use cases such as CI/CD, production dep Many of the examples found in our [Serverless Examples repository](https://github.com/scaleway/serverless-examples) make use of Serverless Framework, and may help you get started. -## Terraform +## Terraform/OpenTofu -Serverless Containers integrate easily with your infrastructure as code, via our [Terraform provider and resources](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/container). +Serverless Containers integrate easily with your infrastructure as code, via our [Terraform/OpenTofu provider and resources](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/container). -You can find examples using Terraform in our [Serverless Examples repository](https://github.com/scaleway/serverless-examples), such as our [example using Terraform to deploy an NGINX container](https://github.com/scaleway/serverless-examples/tree/main/containers/nginx-cors-private-python). +You can find examples using Terraform/OpenTofu in our [Serverless Examples repository](https://github.com/scaleway/serverless-examples), such as our [example using Terraform/OpenTofu to deploy an NGINX container](https://github.com/scaleway/serverless-examples/tree/main/containers/nginx-cors-private-python). ## API diff --git a/pages/serverless-functions/how-to/secure-a-function.mdx b/pages/serverless-functions/how-to/secure-a-function.mdx index 21bc3c2ff8..66cbdfd32f 100644 --- a/pages/serverless-functions/how-to/secure-a-function.mdx +++ b/pages/serverless-functions/how-to/secure-a-function.mdx @@ -56,9 +56,9 @@ secret: We strongly suggest that you do not commit this in a Version Control System (VCS), and do not share your Project ID or access key. This helps to ensure the security of your configuration file, which may contain sensitive data. -### Configure secrets using Terraform +### Configure secrets using Terraform/OpenTofu -Add the following [resource description](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/function) in Terraform: +Add the following [resource description](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/function) in Terraform/OpenTofu: ``` secret_environment_variables = { "key" = "secret" } @@ -95,11 +95,11 @@ curl -H "X-Auth-Token: " Refer to the [How to create an authentication token](/serverless-functions/how-to/create-auth-token-from-console/) documentation for more information. -### Restrict access using Terraform +### Restrict access using Terraform/OpenTofu -Set `privacy = "private"` in your Terraform [resource description](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/function). +Set `privacy = "private"` in your Terraform/OpenTofu [resource description](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/function). -You can generate access credentials to inject in other applications (containers, functions etc.) directly from Terraform using the [function_token resource](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/function_token). +You can generate access credentials to inject in other applications (containers, functions etc.) directly from Terraform/OpenTofu using the [function_token resource](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/function_token). ## Set up alerts in Observability Cockpit (upcoming feature) diff --git a/pages/serverless-functions/index.mdx b/pages/serverless-functions/index.mdx index 4852f82fc1..362eea9f0b 100644 --- a/pages/serverless-functions/index.mdx +++ b/pages/serverless-functions/index.mdx @@ -49,12 +49,12 @@ meta: diff --git a/pages/serverless-functions/reference-content/deploy-function.mdx b/pages/serverless-functions/reference-content/deploy-function.mdx index 598d348883..d5bbd1d001 100644 --- a/pages/serverless-functions/reference-content/deploy-function.mdx +++ b/pages/serverless-functions/reference-content/deploy-function.mdx @@ -40,11 +40,11 @@ Serverless Framework can be used in many use cases such as CI/CD, production dep Many of the examples found in our [Serverless Examples repository](https://github.com/scaleway/serverless-examples) make use of Serverless Framework, and can help you get started. -## Terraform +## Terraform/OpenTofu -Serverless Functions integrate easily with your infrastructure as code, via our [Terraform provider and resources](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/function). +Serverless Functions integrate easily with your infrastructure as code, via our [Terraform/OpenTofu provider and resources](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/function). -Examples using Terraform can be found in our [Serverless Examples repository](https://github.com/scaleway/serverless-examples), such as our [example using Terraform with Python](https://github.com/scaleway/serverless-examples/tree/main/functions/terraform-python-example). +Examples using Terraform/OpenTofu can be found in our [Serverless Examples repository](https://github.com/scaleway/serverless-examples), such as our [example using Terraform/OpenTofu with Python](https://github.com/scaleway/serverless-examples/tree/main/functions/terraform-python-example). ## API diff --git a/pages/serverless-jobs/concepts.mdx b/pages/serverless-jobs/concepts.mdx index d8d774b807..e0e900dc82 100644 --- a/pages/serverless-jobs/concepts.mdx +++ b/pages/serverless-jobs/concepts.mdx @@ -104,11 +104,11 @@ This means that each request is treated as a new and isolated event, and there i To store data you can use [Scaleway Object Storage](/object-storage/), [Scaleway Managed Databases](/managed-databases-for-postgresql-and-mysql/), and [Scaleway Serverless Databases](/serverless-sql-databases/). -## Terraform +## Terraform/OpenTofu -Terraform is an infrastructure-as-code tool, owned by Hashicorp. Serverless Jobs integrate easily with your infrastructure as code, via our [Terraform provider and resources](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/job_definition). +Terraform/OpenTofu is an infrastructure-as-code tool, owned by Hashicorp. Serverless Jobs integrate easily with your infrastructure as code, via our [Terraform/OpenTofu provider and resources](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/job_definition). -Examples using Terraform can be found in our [Serverless Examples repository](https://github.com/scaleway/serverless-examples), such as our [example using Terraform with Serverless Jobs](https://github.com/scaleway/serverless-examples/blob/main/jobs/terraform-hello-world). +Examples using Terraform/OpenTofu can be found in our [Serverless Examples repository](https://github.com/scaleway/serverless-examples), such as our [example using Terraform/OpenTofu with Serverless Jobs](https://github.com/scaleway/serverless-examples/blob/main/jobs/terraform-hello-world). ## vCPU-s diff --git a/pages/serverless-jobs/reference-content/deploy-job.mdx b/pages/serverless-jobs/reference-content/deploy-job.mdx index ac82dd581d..746faa5e80 100644 --- a/pages/serverless-jobs/reference-content/deploy-job.mdx +++ b/pages/serverless-jobs/reference-content/deploy-job.mdx @@ -22,9 +22,9 @@ The [Scaleway console](https://console.scaleway.com/) is the easiest way to get The console allows you to easily [create a job definition](/serverless-jobs/how-to/create-job/) and track your job runs. You can also monitor your jobs using [Scaleway Cockpit](/cockpit/quickstart/). -## Terraform +## Terraform/OpenTofu -You can easily integrate Serverless Jobs to your infrastructure as code, via our [Terraform provider and resources](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/job_definition). +You can easily integrate Serverless Jobs to your infrastructure as code, via our [Terraform/OpenTofu provider and resources](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/job_definition). ## API diff --git a/pages/serverless-sql-databases/reference-content/known-differences.mdx b/pages/serverless-sql-databases/reference-content/known-differences.mdx index d89f764b5d..523bd4cfb3 100644 --- a/pages/serverless-sql-databases/reference-content/known-differences.mdx +++ b/pages/serverless-sql-databases/reference-content/known-differences.mdx @@ -73,7 +73,7 @@ Serverless SQL Databases support the most popular PostgreSQL extensions. Refer t DISCARD ALL; ``` -- `pg_advisory_lock` command can be used, but the lock is not guaranteed. Consequently, third-party tools that use this feature, such as Terraform when storing [Terraform state using pg backend](https://developer.hashicorp.com/terraform/language/settings/backends/pg), are not fully supported. State locking is not guaranteed if multiple Terraform clients edit the same state concurrently. +- `pg_advisory_lock` command can be used, but the lock is not guaranteed. Consequently, third-party tools that use this feature, such as Terraform/OpenTofu when storing [Terraform/OpenTofu state using pg backend](https://developer.hashicorp.com/terraform/language/settings/backends/pg), are not fully supported. State locking is not guaranteed if multiple Terraform/OpenTofu clients edit the same state concurrently. ```sql SELECT * FROM pg_advisory_lock(1); @@ -95,11 +95,11 @@ Serverless SQL Databases support the most popular PostgreSQL extensions. Refer t - ETL tools such as Airbyte, Fivetran or Meltano cannot load data into a Serverless SQL Database, as they require `TEMPORARY TABLES`, which are currently not supported. However, data can be loaded from a Serverless SQL Database into another target, but not using Change Data Capture (CDC) options, as they require `SUBSCRIPTIONS`, which are currently not supported. -- Terraform: Storing [Terraform states using pg backend](https://developer.hashicorp.com/terraform/language/settings/backends/pg) can be done, but terraform state locking when multiple Terraform clients are editing the same state concurrently is not guaranteed (since this guarantees rely on `pg_advisory_lock` command usage, which is not supported currently). +- Terraform/OpenTofu: Storing [Terraform/OpenTofu states using pg backend](https://developer.hashicorp.com/terraform/language/settings/backends/pg) can be done, but terraform state locking when multiple Terraform/OpenTofu clients are editing the same state concurrently is not guaranteed (since this guarantees rely on `pg_advisory_lock` command usage, which is not supported currently). ## Unsupported configuration commands -- DDL (Data Definition Language) queries on objects such as databases and users cannot be performed. Corresponding actions can still be performed directly using the [Scaleway console](https://console.scaleway.com/), the API, Terraform, and [IAM](https://console.scaleway.com/iam/users). +- DDL (Data Definition Language) queries on objects such as databases and users cannot be performed. Corresponding actions can still be performed directly using the [Scaleway console](https://console.scaleway.com/), the API, Terraform/OpenTofu, and [IAM](https://console.scaleway.com/iam/users). ```sql CREATE/UPDATE/DELETE DATABASE database; diff --git a/pages/serverless-sql-databases/reference-content/serverless-sql-databases-overview.mdx b/pages/serverless-sql-databases/reference-content/serverless-sql-databases-overview.mdx index ec6dec920f..06020b9502 100644 --- a/pages/serverless-sql-databases/reference-content/serverless-sql-databases-overview.mdx +++ b/pages/serverless-sql-databases/reference-content/serverless-sql-databases-overview.mdx @@ -72,7 +72,7 @@ To avoid any impact on your applications, some actions will require manual actio - **Restoring backups**: Restoring a backup to your current database will overwrite all current data with the data stored when the backup was performed. If you want to keep your current data, either perform a manual backup of your current database before restoring, or restore your backup to another Serverless SQL Database. - You can automate these actions using APIs, CLI tools or Terraform. + You can automate these actions using APIs, CLI tools or Terraform/OpenTofu. ## Actions not managed by Scaleway diff --git a/pages/serverless-sql-databases/troubleshooting/connection-errors.mdx b/pages/serverless-sql-databases/troubleshooting/connection-errors.mdx index cb5a9497f9..9f512000f2 100644 --- a/pages/serverless-sql-databases/troubleshooting/connection-errors.mdx +++ b/pages/serverless-sql-databases/troubleshooting/connection-errors.mdx @@ -160,4 +160,4 @@ This error happens when the SQL client you are using does not support the TLS Se | N/A | IntelliJ (SQL Module) | Yes | | | N/A | navicat | No | | | N/A | Stitch | No | | -| N/A | Terraform | No | Terraform includes an older lib/pq version (v1.10.3) which does not support SNI. | +| N/A | Terraform/OpenTofu | No | Terraform/OpenTofu includes an older lib/pq version (v1.10.3) which does not support SNI. | diff --git a/pages/terraform/index.mdx b/pages/terraform/index.mdx index b27c3d2a9f..5c90f69d87 100644 --- a/pages/terraform/index.mdx +++ b/pages/terraform/index.mdx @@ -1,8 +1,8 @@ --- meta: - title: Terraform for Scaleway - description: Discover the Terraform provider for Scaleway + title: Terraform/OpenTofu for Scaleway + description: Discover the Terraform/OpenTofu provider for Scaleway content: - h1: Terraform for Scaleway - paragraph: Terraform for Scaleway + h1: Terraform/OpenTofu for Scaleway + paragraph: Terraform/OpenTofu for Scaleway --- \ No newline at end of file diff --git a/pages/terraform/quickstart.mdx b/pages/terraform/quickstart.mdx index 355a0825c3..143df4ad69 100644 --- a/pages/terraform/quickstart.mdx +++ b/pages/terraform/quickstart.mdx @@ -1,10 +1,10 @@ --- meta: - title: Terraform for Scaleway - Quickstart - description: This page explains how to install and configure Terraform with Scaleway as a provider + title: Terraform/OpenTofu for Scaleway - Quickstart + description: This page explains how to install and configure Terraform/OpenTofu with Scaleway as a provider content: - h1: Terraform for Scaleway - Quickstart - paragraph: This page explains how to install and configure Terraform with Scaleway as a provider + h1: Terraform/OpenTofu for Scaleway - Quickstart + paragraph: This page explains how to install and configure Terraform/OpenTofu with Scaleway as a provider tags: devtools terraform tf scaleway-provider scaleway-terraform dates: validation: 2024-11-27 @@ -13,21 +13,21 @@ categories: - devtools --- -[Terraform](https://www.terraform.io/) is an Infrastructure as Code (IaC) software environment tool that allows you to easily build and maintain your cloud resources. You can use it to safely and efficiently deploy Scaleway resources in a declarative way. +[Terraform](https://www.terraform.io/) or [OpenTofu](https://opentofu.org/) is an Infrastructure as Code (IaC) software environment tool that allows you to easily build and maintain your cloud resources. You can use it to safely and efficiently deploy Scaleway resources in a declarative way. -Check out the [Scaleway Terraform registry](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs) documentation for more information. +Check out the [Scaleway Terraform](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs) or [OpenTofu](https://search.opentofu.org/provider/opentofu/scaleway/latest) registry documentation for more information. - A Scaleway account logged into the [console](https://console.scaleway.com) - initialized the [Scaleway configuration file](/terraform/reference-content/scaleway-configuration-file/) -- [Installed Terraform](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli#install-terraform) +- Installed [Terraform](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli#install-terraform) or [OpenTofu](https://opentofu.org/docs/intro/install/) -## Creating and Deploying Scaleway resources using Terraform +## Creating and Deploying Scaleway resources using Terraform/OpenTofu For the sake of this example, we are going to create a Kubernetes Kapsule cluster. -### Creating the Terraform configuration file +### Creating the Terraform/OpenTofu configuration file 1. Create a new file called `main.tf` in a new folder. @@ -51,7 +51,7 @@ For the sake of this example, we are going to create a Kubernetes Kapsule cluste ``` - If you do not specify a Project ID, Terraform will use the default Project specified in the [Scaleway configuration file](/terraform/reference-content/scaleway-configuration-file/). + If you do not specify a Project ID, Terraform/OpenTofu will use the default Project specified in the [Scaleway configuration file](/terraform/reference-content/scaleway-configuration-file/). 4. Add the following blocks to create a Private Network, a Kubernetes cluster and its associated pool: @@ -81,19 +81,19 @@ For the sake of this example, we are going to create a Kubernetes Kapsule cluste } ``` - Refer to the [Scaleway provider documentation on the Terraform Registry](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs) to learn how to deploy other resources. + Refer to the Scaleway provider documentation on the [Terraform](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs) or [OpenTofu](https://search.opentofu.org/provider/opentofu/scaleway/latest) registry to learn how to deploy other resources. 5. Save your changes. Your configuration is now ready to be deployed on Scaleway's infrastructure. -### Deploying your configuration using Terraform +### Deploying your configuration using Terraform/OpenTofu -1. Open a terminal, access the folder you just created, and run the following command to initialize Terraform in this folder: +1. Open a terminal, access the folder you just created, and run the following command to initialize Terraform/OpenTofu in this folder: ``` terraform init ``` -2. Run the following command to display the actions that Terraform will perform: +2. Run the following command to display the actions that Terraform/OpenTofu will perform: ``` terraform plan ``` @@ -105,16 +105,16 @@ Your configuration is now ready to be deployed on Scaleway's infrastructure. Once the deployment is complete, log in to the [Scaleway console](https://console.scaleway.com) to see the resources you have just created. -## Deleting Scaleway resources using Terraform +## Deleting Scaleway resources using Terraform/OpenTofu -1. Open a terminal and access the folder containing the Terraform configuration you want to delete. +1. Open a terminal and access the folder containing the Terraform/OpenTofu configuration you want to delete. -2. Run the command below to delete the resources stated in the Terraform configuration file: +2. Run the command below to delete the resources stated in the Terraform/OpenTofu configuration file: ``` terraform destroy ``` - You can only delete resources created with Terraform and described in the configuration file. + You can only delete resources created with Terraform/OpenTofu and described in the configuration file. A `Destroy complete! Resources: X destroyed.` message appears, your Scaleway resources are now deleted. @@ -122,5 +122,6 @@ A `Destroy complete! Resources: X destroyed.` message appears, your Scaleway res ## Useful links - [Scaleway provider documentation on the Terraform Registry](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs) -- [Scaleway modules on Terraform registry](https://registry.terraform.io/namespaces/scaleway-terraform-modules) -- [Terraform provider Scaleway repository](https://github.com/scaleway/terraform-provider-scaleway) \ No newline at end of file +- [Scaleway provider documentation on the OpenTofu Registry](https://search.opentofu.org/provider/opentofu/scaleway/latest) +- [Scaleway modules on Terraform/OpenTofu registry](https://registry.terraform.io/namespaces/scaleway-terraform-modules) +- [Terraform/OpenTofu provider Scaleway repository](https://github.com/scaleway/terraform-provider-scaleway) \ No newline at end of file diff --git a/pages/terraform/reference-content/environment-variables.mdx b/pages/terraform/reference-content/environment-variables.mdx index 7fb84d2ef6..d00872695a 100644 --- a/pages/terraform/reference-content/environment-variables.mdx +++ b/pages/terraform/reference-content/environment-variables.mdx @@ -1,9 +1,9 @@ --- meta: - title: Terraform - Scaleway environment variables + title: Terraform/OpenTofu - Scaleway environment variables description: This page contains a list of standardized environment variables used throughout the Scaleway developer tools. content: - h1: Terraform - Scaleway environment variables + h1: Terraform/OpenTofu - Scaleway environment variables paragraph: This page contains a list of standardized environment variables used throughout the Scaleway developer tools. tags: devtools cli api variables terraform dates: diff --git a/pages/terraform/reference-content/index.mdx b/pages/terraform/reference-content/index.mdx index 1ce049d6c7..378749d759 100644 --- a/pages/terraform/reference-content/index.mdx +++ b/pages/terraform/reference-content/index.mdx @@ -1,8 +1,8 @@ --- meta: - title: Terraform for Scaleway - Additional content - description: Discover the Terraform provider for Scaleway + title: Terraform/OpenTofu for Scaleway - Additional content + description: Discover the Terraform/OpenTofu provider for Scaleway content: - h1: Terraform for Scaleway - Additional content - paragraph: Terraform for Scaleway + h1: Terraform/OpenTofu for Scaleway - Additional content + paragraph: Terraform/OpenTofu for Scaleway --- \ No newline at end of file diff --git a/pages/terraform/reference-content/scaleway-configuration-file.mdx b/pages/terraform/reference-content/scaleway-configuration-file.mdx index b1966fe14c..905654da1c 100644 --- a/pages/terraform/reference-content/scaleway-configuration-file.mdx +++ b/pages/terraform/reference-content/scaleway-configuration-file.mdx @@ -1,9 +1,9 @@ --- meta: - title: Terraform - Scaleway Configuration file + title: Terraform/OpenTofu - Scaleway Configuration file description: This page explains what is the Scaleway configuration file for developer tools and how to use it. content: - h1: Terraform - Scaleway Configuration file + h1: Terraform/OpenTofu - Scaleway Configuration file paragraph: This page explains what is the Scaleway configuration file for developer tools and how to use it. tags: developer tools cli api configuration config terraform dates: diff --git a/pages/transactional-email/how-to/autoconfigure-domain.mdx b/pages/transactional-email/how-to/autoconfigure-domain.mdx index 6dcb7958ba..2e1e1e5913 100644 --- a/pages/transactional-email/how-to/autoconfigure-domain.mdx +++ b/pages/transactional-email/how-to/autoconfigure-domain.mdx @@ -16,7 +16,7 @@ categories: With Scaleway domains, you can now benefit from automatic DNS record creation and updates (autoconfiguration) for domains already registered with the Transactional Email service. Automatic configuration of your DNS zone streamlines the setup of your domain for Transactional Email, allowing you to focus on sending emails and tracking traffic without manual configuration delays. -You can enable autoconfiguration directly from the Scaleway console (see instructions below), through the [Transactional Email API](https://www.scaleway.com/en/developers/api/transactional-email/#path-domains-register-a-domain-in-a-project), or via [Terraform](https://github.com/scaleway/terraform-provider-scaleway/blob/master/docs/data-sources/tem_domain.md) using the `autoconfig` parameter (`bool`). +You can enable autoconfiguration directly from the Scaleway console (see instructions below), through the [Transactional Email API](https://www.scaleway.com/en/developers/api/transactional-email/#path-domains-register-a-domain-in-a-project), or via [Terraform/OpenTofu](https://github.com/scaleway/terraform-provider-scaleway/blob/master/docs/data-sources/tem_domain.md) using the `autoconfig` parameter (`bool`). This documentation covers the use of DNS autoconfiguration for domains already registerd with Transactional Email. If you want to add a new domain, refer to [How to configure your sending domain with Transactional Email](/transactional-email/how-to/configure-domain-with-transactional-email/). diff --git a/pages/transactional-email/index.mdx b/pages/transactional-email/index.mdx index 4317446444..2f6f323361 100644 --- a/pages/transactional-email/index.mdx +++ b/pages/transactional-email/index.mdx @@ -55,7 +55,7 @@ meta: label="Read more" /> diff --git a/pages/vpc/how-to/create-private-network.mdx b/pages/vpc/how-to/create-private-network.mdx index 4195f03924..42ee45373c 100644 --- a/pages/vpc/how-to/create-private-network.mdx +++ b/pages/vpc/how-to/create-private-network.mdx @@ -49,7 +49,7 @@ While DHCP is built into all new Private Networks, it may not be automatically a 6. Click **Create Private Network** to finish. Your Private Network is created. -See our [Basic VPC use case](/vpc/reference-content/use-case-basic/) documentation for full details of how to create a simple infrastructure that leverages the advantages of Private Networks, including accompanying Terraform templates. +See our [Basic VPC use case](/vpc/reference-content/use-case-basic/) documentation for full details of how to create a simple infrastructure that leverages the advantages of Private Networks, including accompanying Terraform/OpenTofu templates. ## How to configure CIDR diff --git a/pages/vpc/index.mdx b/pages/vpc/index.mdx index 859561fb01..eb3019596d 100644 --- a/pages/vpc/index.mdx +++ b/pages/vpc/index.mdx @@ -8,7 +8,7 @@ meta: sentiment="info" title="VPC Basic Use Case" > - Read our [Basic VPC use case](/vpc/reference-content/use-case-basic/) documentation for full details of how to create a simple infrastructure that leverages the advantages of Private Networks, including accompanying Terraform templates. + Read our [Basic VPC use case](/vpc/reference-content/use-case-basic/) documentation for full details of how to create a simple infrastructure that leverages the advantages of Private Networks, including accompanying Terraform/OpenTofu templates. diff --git a/pages/vpc/reference-content/getting-most-private-networks.mdx b/pages/vpc/reference-content/getting-most-private-networks.mdx index 90d1be2c5a..edc9609178 100644 --- a/pages/vpc/reference-content/getting-most-private-networks.mdx +++ b/pages/vpc/reference-content/getting-most-private-networks.mdx @@ -50,7 +50,7 @@ For example, you may use one Private Network for frontend resources and another When [creating a Private Network](/vpc/how-to/create-private-network/), you can let Scaleway automatically generate a CIDR block for it that is guaranteed to be unique in this VPC. All resources attached to the Private Network get a private IP address from this block. However, you also have the option to define your own CIDR block for the network. Ensure you choose a prefix and network size that is appropriate for your needs, does not overlap with that of any other Private Network in the VPC, and contains enough IP addresses for all resources that will be attached to the Private Network. -See our [Basic VPC use case](/vpc/reference-content/use-case-basic/) documentation for full details of how to create a simple infrastructure that leverages the advantages of Private Networks, including accompanying Terraform templates. +See our [Basic VPC use case](/vpc/reference-content/use-case-basic/) documentation for full details of how to create a simple infrastructure that leverages the advantages of Private Networks, including accompanying Terraform/OpenTofu templates. ## Attaching resources to Private Networks diff --git a/pages/vpc/reference-content/use-case-basic.mdx b/pages/vpc/reference-content/use-case-basic.mdx index 652dfbfbba..8221e72af5 100644 --- a/pages/vpc/reference-content/use-case-basic.mdx +++ b/pages/vpc/reference-content/use-case-basic.mdx @@ -19,7 +19,7 @@ Knowing how to create, combine and configure resources such as Private Networks This is the first in a series of use cases designed to show you potentially interesting and useful infrastructures, illustrating how to use VPC and other network products to achieve a robust, secure and scalable cloud environment. -[Terraform templates](https://github.com/scaleway/terraform-examples/tree/main/demo-vpc-app) accompany each use case. +[Terraform/OpenTofu templates](https://github.com/scaleway/terraform-examples/tree/main/demo-vpc-app) accompany each use case. ## Overview @@ -35,7 +35,7 @@ This is a basic infrastructure to leverage VPC isolation: - Administrators can access the Instances via the [Public Gateway](/public-gateways/concepts/#public-gateway). - External services are accessed by the Instances via the Public Gateway. -Full [Terraform templates](#terraform) are available for this infrastructure. +Full [Terraform/OpenTofu templates](#terraform) are available for this infrastructure. ## Detail @@ -91,11 +91,11 @@ Follow the steps below to create this infrastructure using the [Scaleway console 12. [Create a frontend and backend for the Load Balancer](/load-balancer/how-to/create-frontends-backends/). Choose the most appropriate configuration for your purpose and application, following advice and tips in the linked documentation. When configuring the Load Balancer's backend servers, enter the private IP addresses of the Instances on the Private Network. 13. [Create your domain](/domains-and-dns/how-to/register-internal-domain/) and [add a DNS record](/domains-and-dns/how-to/manage-dns-records/#how-to-add-dns-records) (e.g. an A record) to point it to the public IP of your Load Balancer. While instructions show how to do this with Scaleway's **Domains and DNS** product, you can also use an external domain and configure it with another provider. -## Terraform +## Terraform/OpenTofu -Terraform templates for this architecture are provided in full on our [Scaleway Terraform Examples repo](https://github.com/scaleway/terraform-examples/tree/main/demo-vpc-app/). Terraform allows you to create Infrastructure as Code (IaC) to build, configure and manage your infrastructure with configuration files, rather than with the Scaleway console. +Terraform/OpenTofu templates for this architecture are provided in full on our [Scaleway Terraform/OpenTofu Examples repo](https://github.com/scaleway/terraform-examples/tree/main/demo-vpc-app/). Terraform/OpenTofu allows you to create Infrastructure as Code (IaC) to build, configure and manage your infrastructure with configuration files, rather than with the Scaleway console. -The templates include an example "Task Tracker" application to show how the infrastructure is used. The application is containerized using Docker, deployed on an Instance in the Private Network and leverages PostgreSQL for data storage. Full instructions are provided for creating the infrastructure with Terraform and deploying the test application. +The templates include an example "Task Tracker" application to show how the infrastructure is used. The application is containerized using Docker, deployed on an Instance in the Private Network and leverages PostgreSQL for data storage. Full instructions are provided for creating the infrastructure with Terraform/OpenTofu and deploying the test application. The following snippet shows an extract of one of the templates: @@ -124,4 +124,4 @@ resource "scaleway_vpc_public_gateway" "pgw01" { } ``` -[See the full Terraform templates](https://github.com/scaleway/terraform-examples/tree/main/demo-vpc-app/) \ No newline at end of file +[See the full Terraform/OpenTofu templates](https://github.com/scaleway/terraform-examples/tree/main/demo-vpc-app/) \ No newline at end of file diff --git a/pages/vpc/reference-content/vpc-migration.mdx b/pages/vpc/reference-content/vpc-migration.mdx index e593baa9dd..fbd4495cd8 100644 --- a/pages/vpc/reference-content/vpc-migration.mdx +++ b/pages/vpc/reference-content/vpc-migration.mdx @@ -141,7 +141,7 @@ The general availability of VPC brings the following changes to our devtools and - As the CLI does not support multiple versions of an API, new and future versions will drop the VPC v1 API in favor of v2. - DHCP reservations via the Public Gateway have been deprecated but are still available, to avoid breaking changes. IP reservations are also available through [the IPAM API](https://www.scaleway.com/en/developers/api/ipam/). -**Terraform** +**Terraform/OpenTofu** - The property that previously existed on Private Network resources, to specify whether they are regional or not and allow use of the correct underlying API (VPC v1 or v2), has been deprecated. - DHCP reservations via the Public Gateway are now deprecated but still available, to avoid breaking changes. IP reservations are also available through [the IPAM API](https://www.scaleway.com/en/developers/api/ipam/). diff --git a/tutorials/create-serverless-scraping/index.mdx b/tutorials/create-serverless-scraping/index.mdx index d307d9f348..784fb92789 100644 --- a/tutorials/create-serverless-scraping/index.mdx +++ b/tutorials/create-serverless-scraping/index.mdx @@ -1,10 +1,10 @@ --- meta: title: Create a serverless scraping architecture, with Scaleway Queues, Serverless Functions, and Managed Database. - description: Learn how to construct a scalable serverless scraping architecture with Scaleway Queues, Serverless Functions, and Managed Database. Dive into this Terraform-based tutorial for step-by-step guidance on asynchronous data processing. + description: Learn how to construct a scalable serverless scraping architecture with Scaleway Queues, Serverless Functions, and Managed Database. Dive into this Terraform/OpenTofu-based tutorial for step-by-step guidance on asynchronous data processing. content: h1: Create a serverless scraping architecture, with Scaleway Queues, Serverless Functions, and Managed Database. - paragraph: Learn how to construct a scalable serverless scraping architecture with Scaleway Queues, Serverless Functions, and Managed Database. Dive into this Terraform-based tutorial for step-by-step guidance on asynchronous data processing. + paragraph: Learn how to construct a scalable serverless scraping architecture with Scaleway Queues, Serverless Functions, and Managed Database. Dive into this Terraform/OpenTofu-based tutorial for step-by-step guidance on asynchronous data processing. categories: - functions - messaging @@ -21,7 +21,7 @@ In this tutorial, we show how to set up a simple application that reads [Hacker -We show how to provision all the required Scaleway resources via Terraform, but you can also use the [console](https://console.scaleway.com/), the [API](https://www.scaleway.com/en/developers/api/) or one of our other supported [developer tools](https://www.scaleway.com/en/developers/). The code for the functions is written in Python. +We show how to provision all the required Scaleway resources via Terraform/OpenTofu, but you can also use the [console](https://console.scaleway.com/), the [API](https://www.scaleway.com/en/developers/api/) or one of our other supported [developer tools](https://www.scaleway.com/en/developers/). The code for the functions is written in Python. This project exemplifies a decoupled architecture, where producer and consumer perform specific tasks independently. This kind of design is modular and allows for flexibility and scalability. It also adheres to the principles of microservices and serverless architectures, where individual functions or scripts focus on specific tasks. @@ -30,7 +30,7 @@ You can find all of the code on [GitHub](https://github.com/scaleway/serverless- - A Scaleway account logged into the [console](https://console.scaleway.com) -- Set up [authentication for the Terraform provider](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs#authentication) +- Set up [authentication for the Terraform/OpenTofu provider](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs#authentication) ## Create the scraper @@ -45,7 +45,7 @@ We start by creating the scraper program, or the "data producer". 3. Create a subdirectory `handlers` within the `scraper` directory, and add a `scrape_hn.py` file inside it. 4. Complete the `scrape_hn.py` file by adding the function code [as shown in the repository](https://github.com/scaleway/serverless-examples/blob/main/mnq/serverless-scraping/scraper/handlers/scrape_hn.py). The main code blocks are briefly explained as follows: - Queue credentials and URL are read by the function from environment variables. Those variables are set by Terraform as explained in [one of the next sections](#create-a-terraform-file-to-provision-the-necessary-scaleway-resources). *If you choose another deployment method, such as the [console](https://console.scaleway.com/), do not forget to set them.* + Queue credentials and URL are read by the function from environment variables. Those variables are set by Terraform/OpenTofu as explained in [one of the next sections](#create-a-terraform-file-to-provision-the-necessary-scaleway-resources). *If you choose another deployment method, such as the [console](https://console.scaleway.com/), do not forget to set them.* ```python queue_url = os.getenv('QUEUE_URL') sqs_access_key = os.getenv('SQS_ACCESS_KEY') @@ -80,7 +80,7 @@ We start by creating the scraper program, or the "data producer". body = json.dumps({'url': titleline.a["href"], 'title': titleline.a.get_text()}) response = sqs.send_message(QueueUrl=queue_url, MessageBody=body) ``` -As explained in the [Scaleway Functions documentation](/serverless-functions/how-to/package-function-dependencies-in-zip/#how-to-configure-your-package), dependencies need to be installed in a `package` folder, and uploaded as an archive. This is done via Terraform, but if you decide to deploy using another system, you can create the archive as follows: +As explained in the [Scaleway Functions documentation](/serverless-functions/how-to/package-function-dependencies-in-zip/#how-to-configure-your-package), dependencies need to be installed in a `package` folder, and uploaded as an archive. This is done via Terraform/OpenTofu, but if you decide to deploy using another system, you can create the archive as follows: ```bash cd scraper pip install -r requirements.txt --target ./package @@ -88,7 +88,7 @@ As explained in the [Scaleway Functions documentation](/serverless-functions/how ``` ## Create the consumer -Next, let's create our consumer function. When receiving a message containing the article's title and URL from the queue, it will scrape the page for some stats (number of `a`, `h1`, and `p` tags) and save these values in a Scaleway Managed PostgreSQL Database instance. We show how to create the database instance (and other underlying resources) via Terraform in the following steps. If you opt for another method to create the underlying resources, e.g. the console or API, do not forget to set the relevant function environment variables. +Next, let's create our consumer function. When receiving a message containing the article's title and URL from the queue, it will scrape the page for some stats (number of `a`, `h1`, and `p` tags) and save these values in a Scaleway Managed PostgreSQL Database instance. We show how to create the database instance (and other underlying resources) via Terraform/OpenTofu in the following steps. If you opt for another method to create the underlying resources, e.g. the console or API, do not forget to set the relevant function environment variables. 1. Create a directory called `consumer` (at the same level as the `scraper` directory previously created). 2. Inside it, create a file `requirements.txt`. We need the packages `requests`, `bs4`, and `pg8000`, as shown. We use `pg8000` as it does not depend on system packages, thus making it a good fit for a serverless function: ``` @@ -99,7 +99,7 @@ Next, let's create our consumer function. When receiving a message containing th 3. Create a subdirectory `handlers` within the `consumer` directory, and add a `consumer.py` file inside it. 4. Complete the `consumer.py` file by adding the function code [as shown in the repository](https://github.com/scaleway/serverless-examples/blob/main/mnq/serverless-scraping/consumer/handlers/consumer.py). The main code blocks are briefly explained as follows: - Queue credentials and URLs are accessed by the function as environment variables. These variables are set by Terraform as explained in [one of the next sections](#create-a-terraform-file-to-provision-the-necessary-scaleway-resources). If you choose another deployment method, such as the [console](https://console.scaleway.com/), do not forget to set them. + Queue credentials and URLs are accessed by the function as environment variables. These variables are set by Terraform/OpenTofu as explained in [one of the next sections](#create-a-terraform-file-to-provision-the-necessary-scaleway-resources). If you choose another deployment method, such as the [console](https://console.scaleway.com/), do not forget to set them. ```python db_host = os.getenv('DB_HOST') db_port = os.getenv('DB_PORT') @@ -126,7 +126,7 @@ Next, let's create our consumer function. When receiving a message containing th if conn is not None: conn.close() ``` -As explained in the [Scaleway Functions documentation](/serverless-functions/how-to/package-function-dependencies-in-zip/#how-to-configure-your-package), dependencies need to be installed in a `package` folder, and uploaded as an archive. This is done via Terraform, but if you decide to deploy using another system, you can create the archive as follows: +As explained in the [Scaleway Functions documentation](/serverless-functions/how-to/package-function-dependencies-in-zip/#how-to-configure-your-package), dependencies need to be installed in a `package` folder, and uploaded as an archive. This is done via Terraform/OpenTofu, but if you decide to deploy using another system, you can create the archive as follows: ```bash cd consumer pip install -r requirements.txt --target ./package @@ -134,12 +134,12 @@ As explained in the [Scaleway Functions documentation](/serverless-functions/how ``` -## Create a Terraform file to provision the necessary Scaleway resources +## Create a Terraform/OpenTofu file to provision the necessary Scaleway resources -For the purposes of this tutorial, we show how to provision all resources via Terraform. +For the purposes of this tutorial, we show how to provision all resources via Terraform/OpenTofu. -If you do not want to use Terraform, you can also create the required resources via the [console](https://console.scaleway.com/), the [Scaleway API](https://www.scaleway.com/en/developers/api/), or any other [developer tool](https://www.scaleway.com/en/developers/). Remember that if you do so, you will need to set up environment variables for functions as previously specified. The following documentation may help create the required resources: +If you do not want to use Terraform/OpenTofu, you can also create the required resources via the [console](https://console.scaleway.com/), the [Scaleway API](https://www.scaleway.com/en/developers/api/), or any other [developer tool](https://www.scaleway.com/en/developers/). Remember that if you do so, you will need to set up environment variables for functions as previously specified. The following documentation may help create the required resources: - **Scaleway Queues resources**: [console documentation](/messaging/quickstart/) | [API documentation](https://www.scaleway.com/en/developers/api/messaging-and-queuing/sqs-api/) - **Managed Database for PostgreSQL**: [console documentation](/managed-databases-for-postgresql-and-mysql/quickstart/) | [API documentation](https://www.scaleway.com/en/developers/api/managed-database-postgre-mysql/) - **Serverless Functions**: [console documentation](/serverless-functions/quickstart/) | [API documentation](https://www.scaleway.com/en/developers/api/serverless-functions/) @@ -148,7 +148,7 @@ If you do not want to use Terraform, you can also create the required resources 1. Create a directory called `terraform` (at the same level as the `scraper` and `consumer` directories created in the previous steps). 2. Inside it, create a file called `main.tf`. -3. In the file you just created, add the code below to set up the [Scaleway Terraform provider](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs) and your Project: +3. In the file you just created, add the code below to set up the [Scaleway Terraform/OpenTofu provider](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs) and your Project: ```hcl terraform { required_providers { @@ -374,7 +374,7 @@ If you do not want to use Terraform, you can also create the required resources ``` ## Put it all in motion -Terraform makes this very straightforward. To provision all the resources and get everything up and running, run the following commands: +Terraform/OpenTofu makes this very straightforward. To provision all the resources and get everything up and running, run the following commands: ``` cd terraform terraform init @@ -408,4 +408,4 @@ Here are some possible extensions to this basic example: - Replace the simple proposed logic with your own. What about counting how many times some keywords (e.g: copilot, serverless, microservice) appear in Hacker News articles? - Define multiple cron triggers for different websites and pass the website as an argument to the function. Or, create multiple functions that feed the same queue. - Use a [Serverless Container](/serverless-containers/quickstart/) instead of the consumer function, and use a command line tool such as `htmldoc` or `pandoc` to convert the scraped articles to PDF and upload the result to a [Scaleway Object Storage bucket](/object-storage/quickstart/). - - Replace the Managed Database for PostgreSQL with a [Scaleway Serverless Database](/serverless-sql-databases/quickstart/), so that all the infrastructure lives in the serverless ecosystem! *Note that at the moment there is no Terraform support for Serverless Database, hence the choice here to use Managed Database for PostgreSQL*. \ No newline at end of file + - Replace the Managed Database for PostgreSQL with a [Scaleway Serverless Database](/serverless-sql-databases/quickstart/), so that all the infrastructure lives in the serverless ecosystem! *Note that at the moment there is no Terraform/OpenTofu support for Serverless Database, hence the choice here to use Managed Database for PostgreSQL*. \ No newline at end of file diff --git a/tutorials/dagster-serverless-jobs/index.mdx b/tutorials/dagster-serverless-jobs/index.mdx index 9ef8aa2df7..48c6b2ae6f 100644 --- a/tutorials/dagster-serverless-jobs/index.mdx +++ b/tutorials/dagster-serverless-jobs/index.mdx @@ -238,7 +238,7 @@ Dagster writes small chunks of data in the Serverless SQL Database as long as th - Refer to the [official Dagster documentation](https://docs.dagster.io/getting-started/what-why-dagster) for more information. -- You can automate your Dagster deployment using Terraform. Refer to our [Terraform Quickstart](/terraform/quickstart/) and to the [Scaleway Provider registry](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs) for more information. +- You can automate your Dagster deployment using Terraform/OpenTofu. Refer to our [Terraform/OpenTofu Quickstart](/terraform/quickstart/) and to the [Scaleway Provider registry](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs) for more information. - You can replace the Serverless Database with a [Managed Database for postgreSQL](/managed-databases-for-postgresql-and-mysql/quickstart/) to keep the Dagster UI running and reduce your database costs. Refer to the [Dagster documentation](https://docs.dagster.io/deployment/dagster-instance#dagster-storage) to connect a database using Postgres credentials. diff --git a/tutorials/deploy-instances-packer-terraform/index.mdx b/tutorials/deploy-instances-packer-terraform/index.mdx index 182053b5eb..bbd69ac6b5 100644 --- a/tutorials/deploy-instances-packer-terraform/index.mdx +++ b/tutorials/deploy-instances-packer-terraform/index.mdx @@ -1,15 +1,15 @@ --- meta: - title: Deploying Cloud Instances with Packer and Terraform - description: This tutorial explains how to build and deploy Cloud Instances with Packer and Terraform + title: Deploying Cloud Instances with Packer and Terraform/OpenTofu + description: This tutorial explains how to build and deploy Cloud Instances with Packer and Terraform/OpenTofu content: - h1: Deploying Cloud Instances with Packer and Terraform - paragraph: This tutorial explains how to build and deploy Cloud Instances with Packer and Terraform + h1: Deploying Cloud Instances with Packer and Terraform/OpenTofu + paragraph: This tutorial explains how to build and deploy Cloud Instances with Packer and Terraform/OpenTofu categories: - instances - terraform - packer -tags: Packer Terraform +tags: Packer Terraform/OpenTofu dates: validation: 2024-10-03 posted: 2018-08-01 @@ -17,7 +17,7 @@ dates: **Packer** is a tool for creating identical machine images for multiple platforms from a single source configuration file. It can build images for multiple cloud hosting platforms, including Scaleway. -**Terraform** is an open-source tool for building, changing, and versioning infrastructure safely and efficiently. +**Terraform/OpenTofu** is an open-source tool for building, changing, and versioning infrastructure safely and efficiently. Both applications are available for Linux, macOS, Windows, FreeBSD, and NetBSD. @@ -223,9 +223,9 @@ As exemplified below, we will build an Ubuntu image with Apache preinstalled: 4. You can now start one or a series of servers with your new image. -## Deploying machine images with Terraform +## Deploying machine images with Terraform/OpenTofu -1. Download [Terraform](https://www.terraform.io/downloads.html) for your operating system. +1. Download [Terraform](https://www.terraform.io/downloads.html) or [OpenTofu](https://opentofu.org/docs/intro/install/) for your operating system. 2. Set your credentials as an environment variable on your computer. For example in bash, you have to edit the file `~/.bashrc`, for zsh the procedure is the same, but the file to edit is `~/.zshrc`: ```bash export SCW_DEFAULT_PROJECT_ID= @@ -282,7 +282,7 @@ As exemplified below, we will build an Ubuntu image with Apache preinstalled: } } ``` -3. Initialize Terraform: +3. Initialize Terraform/OpenTofu: ```bash terraform init ``` @@ -314,7 +314,7 @@ As exemplified below, we will build an Ubuntu image with Apache preinstalled: ```bash terraform plan ``` -5. Start your server from Terraform: +5. Start your server from Terraform/OpenTofu: ```bash terraform apply ``` @@ -344,4 +344,4 @@ As exemplified below, we will build an Ubuntu image with Apache preinstalled: Apply complete! Resources: 4 added, 0 changed, 0 destroyed. ``` -To find out more about all the resources that you can manage with Terraform, check out the [official documentation](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs). For more information about Packer, refer to the official [Packer documentation](https://www.packer.io/docs/builders/scaleway.html). \ No newline at end of file +To find out more about all the resources that you can manage with Terraform/OpenTofu, check out the [official documentation](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs). For more information about Packer, refer to the official [Packer documentation](https://www.packer.io/docs/builders/scaleway.html). \ No newline at end of file diff --git a/tutorials/deploy-meilisearch-instance/index.mdx b/tutorials/deploy-meilisearch-instance/index.mdx index 2d5e09bcff..ac8143defd 100644 --- a/tutorials/deploy-meilisearch-instance/index.mdx +++ b/tutorials/deploy-meilisearch-instance/index.mdx @@ -162,7 +162,7 @@ If you have created your Instance within a **Private Network** or if you are usi - Move your Instance inside a [Private Network](/instances/how-to/use-private-networks/) if you do not want it to be exposed publicly on the internet - Configure regular data backups using [Meilisearch Snapshots](https://www.meilisearch.com/docs/learn/advanced/snapshots/) or [Instances snapshots](/instances/how-to/create-a-snapshot/) -- **Fine-tune deployment configuration** such as [Instance type or disk size](/instances/reference-content/choosing-instance-type/), from the [Scaleway console](https://console.scaleway.com/instance/servers/), [the Scaleway API](https://www.scaleway.com/en/developers/api/instance/), [CLI](/instances/api-cli/cli-cheatsheet/) or [Terraform](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/instance_server/). +- **Fine-tune deployment configuration** such as [Instance type or disk size](/instances/reference-content/choosing-instance-type/), from the [Scaleway console](https://console.scaleway.com/instance/servers/), [the Scaleway API](https://www.scaleway.com/en/developers/api/instance/), [CLI](/instances/api-cli/cli-cheatsheet/), [Terraform](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/instance_server/), or [OpenTofu](https://search.opentofu.org/provider/opentofu/scaleway/latest). ## Troubleshooting diff --git a/tutorials/get-started-deploy-kapsule/index.mdx b/tutorials/get-started-deploy-kapsule/index.mdx index 85f42e0df6..0121fc1111 100644 --- a/tutorials/get-started-deploy-kapsule/index.mdx +++ b/tutorials/get-started-deploy-kapsule/index.mdx @@ -72,7 +72,7 @@ Before starting the practical steps of this tutorial, we review a few key Kubern * **Managed Kubernetes**: Managed Kubernetes is when third-party providers take over some of the responsibility for setting up and operating Kubernetes. Scaleway has two managed Kubernetes products: [Kubernetes Kapsule](https://www.scaleway.com/en/kubernetes-kapsule/) and [Kubernetes Kosmos](https://www.scaleway.com/en/kubernetes-kosmos/). Kapsule is our classic Kubernetes offer, where all nodes and their pods in the cluster are managed by Scaleway and hosted on Scaleway Instances. Kosmos allows you to have multi-cloud clusters, with pods hosted on nodes from different cloud providers. -In both cases, Scaleway walks you through the setup of your cluster and manages your control plane for free. All the control plane's components, and kubelets on the nodes, are fully managed. There is no need to connect to your nodes directly, as all actions and configurations can be done from the Scaleway console, via the `kubectl` command, the [Scaleway Kapsule API](https://www.scaleway.com/en/developers/api/kubernetes/) or via [Terraform](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/k8s_cluster). You can also monitor your cluster from the Kubernetes dashboard web interface. +In both cases, Scaleway walks you through the setup of your cluster and manages your control plane for free. All the control plane's components, and kubelets on the nodes, are fully managed. There is no need to connect to your nodes directly, as all actions and configurations can be done from the Scaleway console, via the `kubectl` command, the [Scaleway Kapsule API](https://www.scaleway.com/en/developers/api/kubernetes/), [Terraform](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/k8s_cluster), or via [OpenTofu](https://search.opentofu.org/provider/opentofu/scaleway/latest). You can also monitor your cluster from the Kubernetes dashboard web interface. ## Creating a Kubernetes Kapsule cluster diff --git a/tutorials/k8s-kapsule-multi-az/index.mdx b/tutorials/k8s-kapsule-multi-az/index.mdx index 238cd95a6a..44323ca01f 100644 --- a/tutorials/k8s-kapsule-multi-az/index.mdx +++ b/tutorials/k8s-kapsule-multi-az/index.mdx @@ -1,10 +1,10 @@ --- meta: - title: Deploying a multi-AZ Kubernetes cluster with Terraform and Kapsule - description: Learn how to deploy a multi-AZ Kubernetes cluster with Terraform and Kapsule + title: Deploying a multi-AZ Kubernetes cluster with Terraform/OpenTofu and Kapsule + description: Learn how to deploy a multi-AZ Kubernetes cluster with Terraform/OpenTofu and Kapsule content: - h1: Deploying a multi-AZ Kubernetes cluster with Terraform and Kapsule - paragraph: Learn how to deploy a multi-AZ Kubernetes cluster with Terraform and Kapsule + h1: Deploying a multi-AZ Kubernetes cluster with Terraform/OpenTofu and Kapsule + paragraph: Learn how to deploy a multi-AZ Kubernetes cluster with Terraform/OpenTofu and Kapsule tags: kubernetes multi-az terraform k8s categories: - terraform @@ -23,19 +23,19 @@ This configuration allows the system to withstand failures in one zone by replic - A Scaleway account logged into the [console](https://console.scaleway.com) - A domain managed on the Scaleway [Domains and DNS service](/domains-and-dns/quickstart/) -- Installed [Terraform](/tutorials/terraform-quickstart/) on your local computer +- Installed [Terraform/OpenTofu](/tutorials/terraform-quickstart/) on your local computer - You can download the complete [Terraform configuration files to deploy a multi-AZ cluster](https://github.com/scaleway/kapsule-terraform-multi-az-tutorial/) used in this tutorial from GitHub. + You can download the complete [Terraform/OpenTofu configuration files to deploy a multi-AZ cluster](https://github.com/scaleway/kapsule-terraform-multi-az-tutorial/) used in this tutorial from GitHub. ## Deploying the Kapsule Kubernetes cluster -Start by creating a multi-AZ cluster on `fr-par` region, in a dedicated VPC and Private Network, with three pools of nodes, one in `fr-par-1`, one in `fr-par-2`, and one in `fr-par-3`, with two nodes each. The steps for achieving this via Terraform are as follows: +Start by creating a multi-AZ cluster on `fr-par` region, in a dedicated VPC and Private Network, with three pools of nodes, one in `fr-par-1`, one in `fr-par-2`, and one in `fr-par-3`, with two nodes each. The steps for achieving this via Terraform/OpenTofu are as follows: -1. Create a `main.tf` file that will contain the Terraform part of this project, and set the required providers and their versions. +1. Create a `main.tf` file that will contain the Terraform/OpenTofu part of this project, and set the required providers and their versions. You can download the complete [`main.tf` configuration file](https://github.com/scaleway/kapsule-terraform-multi-az-tutorial/blob/main/main.tf) used in this tutorial from GitHub. @@ -66,7 +66,7 @@ Start by creating a multi-AZ cluster on `fr-par` region, in a dedicated VPC and required_version = ">= 1.0.0" } ``` -2. Add the Scaleway provider and its configuration. Refer to the Scaleway Terraform provider documentation for more information on how to [configure the provider](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs). +2. Add the Scaleway provider and its configuration. Refer to the Scaleway Terraform/OpenTofu provider documentation for more information on how to [configure the provider](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs). ``` provider "scaleway" { region = "fr-par" @@ -88,7 +88,7 @@ Start by creating a multi-AZ cluster on `fr-par` region, in a dedicated VPC and ``` 4. Add the Kapsule cluster and the three pools, each in a different Availability Zone but in the same Private Network, to effectively make the cluster multi-AZ. - Refer to the Scaleway Terraform provider documentation for available [Kapsule parameters](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/k8s_cluster). + Refer to the Scaleway Terraform/OpenTofu provider documentation for available [Kapsule parameters](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/k8s_cluster). - `scaleway_k8s_cluster` requires no specific configuration for the multi-AZ mode. - The [pools configuration](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/k8s_pool) `scaleway_k8s_pool` will get a `zone` parameter that allows placing each one in a different Availability Zone. ``` @@ -143,7 +143,7 @@ Start by creating a multi-AZ cluster on `fr-par` region, in a dedicated VPC and } ``` -5. Initialize your Terraform configuration and apply it to create your resources. +5. Initialize your Terraform/OpenTofu configuration and apply it to create your resources. ``` terraform init terraform apply @@ -175,7 +175,7 @@ Start by creating a multi-AZ cluster on `fr-par` region, in a dedicated VPC and A very common pattern is to deploy an ingress controller to externally expose applications hosted inside the Kapsule cluster. Configuring a multi-AZ deployment of your ingress controller will greatly improve its resilience and scalability. -In this part, we will deploy an [ingress-nginx](https://github.com/kubernetes/ingress-nginx) in a multi-AZ, production-ready configuration, using the previously created Kapsule cluster. The official Helm for the nginx controller is full-featured, so we will use it through the Terraform Helm provider. +In this part, we will deploy an [ingress-nginx](https://github.com/kubernetes/ingress-nginx) in a multi-AZ, production-ready configuration, using the previously created Kapsule cluster. The official Helm for the nginx controller is full-featured, so we will use it through the Terraform/OpenTofu Helm provider. * Healthy cluster @@ -248,7 +248,7 @@ The zone "scw.your-domain.tld" is now managed in your Scaleway account. ``` 3. Ensure you have at least two `ingress-nginx` pods per Availability Zone. To do so, set `replicaCount` to `6`. However, this alone won't guarantee distribution across zones. To that end, use `topologySpreadConstraints` to instruct the Kubernetes scheduler to distribute replicas based on the `topology.kubernetes.io/zone` label, which can have values like `fr-par-1`, `fr-par-2`, or `fr-par-3`. You can find detailed documentation for [Pod Topology Spread Constraints](https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/) in the Kubernetes documentation. Also, there's an anti-affinity to prevent the `ingress-nginx` pod from being scheduled on the same node in each AZ. -Then, disable the default Kubernetes service creation by the Helm chart as it will be created through Terraform later on to have multiple `LoadBalancers`. +Then, disable the default Kubernetes service creation by the Helm chart as it will be created through Terraform/OpenTofu later on to have multiple `LoadBalancers`. ``` resource "helm_release" "nginx_ingress" { name = "ingress-nginx" @@ -290,7 +290,7 @@ Then, disable the default Kubernetes service creation by the Helm chart as it wi ``` 4. Add Kubernetes services of type `LoadBalancer` to expose your `ingress-nginx` pods. The important part here is that we will use the `service.beta.kubernetes.io/scw-loadbalancer-zone` annotation to create one load balancer per AZ. This annotation is used by the `scaleway-cloud-controller-manager` to create a load balancer in a specific AZ. In the `fr-par` region, load balancers are available in two AZs, so we will have two load balancers. Each load balancer dispatches traffic to the healthy nodes of all the AZs. This means, in case of the loss of one AZ where one of the two load balancers is located, the other load balancer will still be available and will dispatch traffic to the healthy nodes, and their healthy `ingress-nginx` pods, on the other AZs. -The selector matches the labels set by the Helm chart on the ingress-nginx pods, and the service exposes both HTTP and HTTPS ports. At the end of the resource, we tell Terraform to ignore some labels and annotations that the `scaleway-cloud-controller-manager` sets automatically, and that we do not want to override on the next Terraform runs. +The selector matches the labels set by the Helm chart on the ingress-nginx pods, and the service exposes both HTTP and HTTPS ports. At the end of the resource, we tell Terraform/OpenTofu to ignore some labels and annotations that the `scaleway-cloud-controller-manager` sets automatically, and that we do not want to override on the next Terraform/OpenTofu runs. ``` resource "kubernetes_service" "nginx" { for_each = toset(["fr-par-1", "fr-par-2"]) @@ -443,7 +443,7 @@ It is important to use a storage class with the `volumeBindingMode` option set t This option ensures the volume is created only when the pod is scheduled on a node, addressing the specific AZ requirement. Creating the volume before scheduling the pod could result in the volume being placed randomly in an AZ, potentially causing attachment failures if the pod is scheduled in a different AZ. With the `WaitForFirstConsumer` option, volumes are created on the same AZ as the node where the pod is scheduled, effectively spreading volumes across different AZs as pods are distributed. -1. Create a new Terraform file `elasticsearch.tf` for this section. Deploying a clustered application commonly implies a more complex deployment logic. For Elasticsearch and Kibana, this logic is managed by ECK, the Elasticsearch operator for Kubernetes. It will be in charge of creating Elasticsearch nodes and configuring them to make a cluster. It will also automatically configure Kibana to connect to the Elasticsearch cluster. So the first thing to do is to deploy the ECK operator using its chart with the Helm provider. +1. Create a new Terraform/OpenTofu file `elasticsearch.tf` for this section. Deploying a clustered application commonly implies a more complex deployment logic. For Elasticsearch and Kibana, this logic is managed by ECK, the Elasticsearch operator for Kubernetes. It will be in charge of creating Elasticsearch nodes and configuring them to make a cluster. It will also automatically configure Kibana to connect to the Elasticsearch cluster. So the first thing to do is to deploy the ECK operator using its chart with the Helm provider. You can download the complete [`elasticsearch.tf` configuration file](https://github.com/scaleway/kapsule-terraform-multi-az-tutorial/blob/main/main.tf) used in this tutorial from GitHub. @@ -623,5 +623,5 @@ It is important to use a storage class with the `volumeBindingMode` option set t You have finished this tutorial, and have a full production-ready multi-AZ Kapsule cluster with a multi-AZ ingress controller and a multi-AZ Elasticsearch/Kibana cluster. You can now deploy your applications based on the same logic and enjoy the high availability of your Kubernetes cluster. - You can download the complete [Terraform configuration files to deploy a multi-AZ cluster](https://github.com/scaleway/kapsule-terraform-multi-az-tutorial/) used in this tutorial from GitHub. + You can download the complete [Terraform/OpenTofu configuration files to deploy a multi-AZ cluster](https://github.com/scaleway/kapsule-terraform-multi-az-tutorial/) used in this tutorial from GitHub. \ No newline at end of file diff --git a/tutorials/large-messages/index.mdx b/tutorials/large-messages/index.mdx index 6814bcfe11..09e3bbe826 100644 --- a/tutorials/large-messages/index.mdx +++ b/tutorials/large-messages/index.mdx @@ -1,10 +1,10 @@ --- meta: title: Set up a serverless architecture for handling large messages using Scaleway's NATS, Serverless Functions, and Object Storage. - description: Learn how to build a serverless architecture for handling large messages with Scaleway's NATS, Serverless Functions, and Object Storage. Follow our step-by-step Terraform-based tutorial for asynchronous file conversion using messaging, functions, and triggers. + description: Learn how to build a serverless architecture for handling large messages with Scaleway's NATS, Serverless Functions, and Object Storage. Follow our step-by-step Terraform/OpenTofu-based tutorial for asynchronous file conversion using messaging, functions, and triggers. content: h1: Create a serverless architecture for handling large messages using Scaleway's NATS, Serverless Functions, and Object Storage. - paragraph: Learn how to build a serverless architecture for handling large messages with Scaleway's NATS, Serverless Functions, and Object Storage. Follow our step-by-step Terraform-based tutorial for asynchronous file conversion using messaging, functions, and triggers. + paragraph: Learn how to build a serverless architecture for handling large messages with Scaleway's NATS, Serverless Functions, and Object Storage. Follow our step-by-step Terraform/OpenTofu-based tutorial for asynchronous file conversion using messaging, functions, and triggers. categories: - messaging - functions @@ -17,7 +17,7 @@ dates: In this tutorial, we will build a simple architecture to store and automatically convert images to PDF. The focus is on transferring large messages using a messaging service, specifically the [Scaleway NATS](/messaging/quickstart/) server. Our setup involves using the [Object Storage](/object-storage/quickstart/) service for image storage and the [Serverless Functions](/serverless-functions/quickstart/) service for conversion. -We show how to provision all the required Scaleway resources via Terraform, but you can also use the [console](https://console.scaleway.com/login), the [API](https://www.scaleway.com/en/developers/api/) or one of our other supported [developer tools](https://www.scaleway.com/en/developers/). +We show how to provision all the required Scaleway resources via Terraform/OpenTofu, but you can also use the [console](https://console.scaleway.com/login), the [API](https://www.scaleway.com/en/developers/api/) or one of our other supported [developer tools](https://www.scaleway.com/en/developers/). You can retrieve the full source code in [this repository](https://github.com/rouche-q/serverless-examples/tree/main/projects/large-messages/README.md), so you can choose to either jump straight into the code or else follow along with the step-by-step explanation below to create the architecture yourself. @@ -25,8 +25,8 @@ You can retrieve the full source code in [this repository](https://github.com/ro - A Scaleway account logged into the [console](https://console.scaleway.com) - [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization -- Installed [Terraform](/terraform/quickstart/) on your local machine -- [Set up authentication for the Terraform provider](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs#authentication) +- Installed [Terraform/OpenTofu](/terraform/quickstart/) on your local machine +- [Set up authentication for the Terraform/OpenTofu provider](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs#authentication) - Installed [Docker](/tutorials/install-docker-ubuntu-bionic/) on your local machine - Installed [NATS CLI](https://github.com/nats-io/natscli) on your local machine - [AWS CLI configured with Scaleway credentials](/object-storage/api-cli/object-storage-aws-cli/#how-to-install-the-aws-cli) @@ -96,7 +96,7 @@ Three essential services are required to ensure everything is working together: scw_secret_access_key = "YOUR_SCW_SECRET_KEY" ``` -4. Continuing in the `main.tf` file, add the following Terraform code to create an Object Storage bucket that will be used for storing your images. +4. Continuing in the `main.tf` file, add the following Terraform/OpenTofu code to create an Object Storage bucket that will be used for storing your images. ```hcl resource "random_id" "bucket" { byte_length = 8 @@ -148,7 +148,7 @@ Three essential services are required to ensure everything is working together: As mentioned earlier, the producer will be implemented as a straightforward shell script. -1. Create a file named `upload_img.sh`. Inside it, define two variables using Terraform commands to retrieve the bucket name and the NATS URL. +1. Create a file named `upload_img.sh`. Inside it, define two variables using Terraform/OpenTofu commands to retrieve the bucket name and the NATS URL. ```bash SCW_BUCKET="$(terraform output bucket_name)" SCW_NATS_URL="$(terraform output nats_url)" @@ -210,7 +210,7 @@ We continue using the Scaleway ecosystem and deploy the consumer using a Serverl } ``` -5. Before proceeding with the function's logic, improve the Terraform code by adding the following code to your `main.tf` file: +5. Before proceeding with the function's logic, improve the Terraform/OpenTofu code by adding the following code to your `main.tf` file: ```hcl resource "null_resource" "install_dependencies" { provisioner "local-exec" { diff --git a/tutorials/manage-instances-with-terraform-and-functions/index.mdx b/tutorials/manage-instances-with-terraform-and-functions/index.mdx index 6a3c9e9ace..7574c0ab2b 100644 --- a/tutorials/manage-instances-with-terraform-and-functions/index.mdx +++ b/tutorials/manage-instances-with-terraform-and-functions/index.mdx @@ -1,10 +1,10 @@ --- meta: - title: Deploying and managing Instances with Terraform and Functions - description: Discover how to deploy and manage your Scaleway Instances using Terraform, functions and python + title: Deploying and managing Instances with Terraform/OpenTofu and Functions + description: Discover how to deploy and manage your Scaleway Instances using Terraform/OpenTofu, functions and python content: - h1: Deploying and managing Instances with Terraform and Functions - paragraph: Discover how to deploy and manage your Scaleway Instances using Terraform, functions and python + h1: Deploying and managing Instances with Terraform/OpenTofu and Functions + paragraph: Discover how to deploy and manage your Scaleway Instances using Terraform/OpenTofu, functions and python tags: serverless python terraform categories: - instances @@ -16,7 +16,7 @@ dates: posted: 2021-12-21 --- -HashiCorp Terraform is an open-source software tool to deploy Infrastructure as Code (IaC). It allows you to automate the lifecycle of your Instances by using declarative configuration files. In this tutorial you will discover an example of Instance automation using Python and Terraform (automatically shut down / start Instances). +HashiCorp Terraform/OpenTofu is an open-source software tool to deploy Infrastructure as Code (IaC). It allows you to automate the lifecycle of your Instances by using declarative configuration files. In this tutorial you will discover an example of Instance automation using Python and Terraform/OpenTofu (automatically shut down / start Instances). @@ -24,30 +24,30 @@ HashiCorp Terraform is an open-source software tool to deploy Infrastructure as - [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization - A valid [API key](/iam/how-to/create-api-keys/) - Installed [Python](https://www.python.org/) on your machine -- Installed [Terraform](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs) on your machine +- Installed [Terraform/OpenTofu](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs) on your machine ## Context This tutorial will simulate a project with a production environment running all the time and a development environment that will be switched off on weekends to reduce costs. -## Initialize a Terraform project +## Initialize a Terraform/OpenTofu project -1. Create a new folder, called `Terraform`, to store your configuration. Then enter the folder: +1. Create a new folder, called `Terraform/OpenTofu`, to store your configuration. Then enter the folder: ``` - mkdir Terraform && cd Terraform + mkdir Terraform/OpenTofu && cd Terraform/OpenTofu ``` 2. Create five files to configure your infrastructure: - `main.tf`: will contain the main set of configurations for your project. Here, it will be our Instance - - `provider.tf`: Terraform relies on plugins called "[providers](https://www.terraform.io/language/providers)" to interact with remote systems - - `backend.tf`: each Terraform configuration can specify a backend, which defines where the state file of the current infrastructure will be stored. Terraform uses this file to keep track of the managed resources. This state can be stored locally or remotely. Configuring a remote backend allows multiple people to work on the same infrastructure - - `variables.tf`: will contain the variable definitions for your project. Since all Terraform values must be defined, any variables that are not given a default value will become required arguments + - `provider.tf`: Terraform/OpenTofu relies on plugins called "[providers](https://www.terraform.io/language/providers)" to interact with remote systems + - `backend.tf`: each Terraform/OpenTofu configuration can specify a backend, which defines where the state file of the current infrastructure will be stored. Terraform/OpenTofu uses this file to keep track of the managed resources. This state can be stored locally or remotely. Configuring a remote backend allows multiple people to work on the same infrastructure + - `variables.tf`: will contain the variable definitions for your project. Since all Terraform/OpenTofu values must be defined, any variables that are not given a default value will become required arguments - `terraform.tfvars`: allows you to set the actual value of the variables 3. Create the following folders: - `function`: to store your function code - `files`: to temporary store your zip function code Your folder structure should look like: ```bash - Terraform + Terraform/OpenTofu | -- files | -- function -- main.tf @@ -277,18 +277,18 @@ def handle(event, context): ## Deploying your infrastructure -Everything is configured now, so you can deploy your infrastructure using Terraform. +Everything is configured now, so you can deploy your infrastructure using Terraform/OpenTofu. 1. Add your Scaleway credentials to the environment variables: ```bash export SCW_ACCESS_KEY="my-access-key" export SCW_SECRET_KEY="my-secret-key" ``` -2. Initialize Terraform: +2. Initialize Terraform/OpenTofu: ```bash terraform init ``` -3. Let Terraform verify your configuration: +3. Let Terraform/OpenTofu verify your configuration: ```bash terraform plan ``` diff --git a/tutorials/nextjs-app-serverless-functions-sqldb/index.mdx b/tutorials/nextjs-app-serverless-functions-sqldb/index.mdx index 8735f5c688..4cb5ec6818 100644 --- a/tutorials/nextjs-app-serverless-functions-sqldb/index.mdx +++ b/tutorials/nextjs-app-serverless-functions-sqldb/index.mdx @@ -17,7 +17,7 @@ This tutorial will guide you through deploying a fully serverless Next.js applic You can either deploy your application: - [step by step using Scaleway CLI](#deploy-next.js-application-frontend-using-serverless-containers) to understand each detailed action performed, and the resources and subresources required - - [using a Terraform template](#deploy-a-next.js-application-using-terraform-templates) to deploy your application faster and have a ready-to-use Infrastructure as Code. + - [using a Terraform/OpenTofu template](#deploy-a-next.js-application-using-terraform-templates) to deploy your application faster and have a ready-to-use Infrastructure as Code. @@ -563,10 +563,10 @@ To secure your deployment, we will now add a dedicated [IAM application](/iam/co - **Fine-tune deployment options** such as autoscaling, targeted regions, and more. You can find more information by typing `scw container deploy --help` in your terminal, or by referring to the [dedicated documentation](/serverless-containers/how-to/manage-a-container/). -## Deploy a Next.js application using Terraform templates +## Deploy a Next.js application using Terraform/OpenTofu templates - You must have [Terraform](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli) installed and configured with [Scaleway Terraform Provider](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs) for this part. + You must have [Terraform/OpenTofu](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli) installed and configured with [Scaleway Terraform](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs) or [OpenTofu](https://search.opentofu.org/provider/opentofu/scaleway/latest) Provider for this part. ### Initialize the project @@ -652,16 +652,16 @@ To secure your deployment, we will now add a dedicated [IAM application](/iam/co docker push $REGISTRY_ENDPOINT/my-nextjs-blog:latest ``` -### Creating the Terraform configuration +### Creating the Terraform/OpenTofu configuration -1. Run the following command to create a new folder inside `my-nextjs-blog` to store your Terraform files, and access it: +1. Run the following command to create a new folder inside `my-nextjs-blog` to store your Terraform/OpenTofu files, and access it: ```bash cd .. mkdir terraform-nextjs-blog && cd terraform-nextjs-blog ``` -2. Create an empty `main.tf` Terraform file inside the folder. +2. Create an empty `main.tf` Terraform/OpenTofu file inside the folder. Your application folder should now be structured as follows: ```bash @@ -763,7 +763,7 @@ To secure your deployment, we will now add a dedicated [IAM application](/iam/co } ``` -The Terraform file creates several resources: +The Terraform/OpenTofu file creates several resources: - A [Serverless Containers namespace](/serverless-containers/concepts/#namespace), that contains a [Serverless Container](/serverless-containers/quickstart/), which hosts your Next.js application @@ -775,25 +775,25 @@ The Terraform file creates several resources: - An [IAM API key](/iam/concepts/#api-key) used as credentials to authenticate your application to the database -### Deploying the app with Terraform +### Deploying the app with Terraform/OpenTofu -1. Run the following command to initialize the Terraform working directory: +1. Run the following command to initialize the Terraform/OpenTofu working directory: ```bash terraform init ``` -2. Add the `REGISTRY_ENDPOINT` and `DEFAULT_PROJECT_ID` environment variables to Terraform: +2. Add the `REGISTRY_ENDPOINT` and `DEFAULT_PROJECT_ID` environment variables to Terraform/OpenTofu: ```bash export TF_VAR_REGISTRY_ENDPOINT=$REGISTRY_ENDPOINT export TF_VAR_DEFAULT_PROJECT_ID=$(scw config get default-project-id) ``` -3. Create and review the Terraform execution plan of your infrastructure: +3. Create and review the Terraform/OpenTofu execution plan of your infrastructure: ```bash terraform plan ``` -4. Deploy your application by executing the actions listed in your Terraform plan: +4. Deploy your application by executing the actions listed in your Terraform/OpenTofu plan: ```bash terraform apply ``` @@ -826,7 +826,7 @@ The Terraform file creates several resources: ### Adding content to the Serverless SQL Database -1. Run the following command to connect to your database using the link provided by Terraform's output: +1. Run the following command to connect to your database using the link provided by Terraform/OpenTofu's output: ```sql psql $(terraform output -json | jq -r '.database_connection_string.value') ``` diff --git a/tutorials/sem-terraform/index.mdx b/tutorials/sem-terraform/index.mdx index 01f49a0a30..7688a5bab4 100644 --- a/tutorials/sem-terraform/index.mdx +++ b/tutorials/sem-terraform/index.mdx @@ -1,10 +1,10 @@ --- meta: - title: Creating and accessing a Database Instance using Secret Manager and Terraform - description: Discover how to create and securely access a Database Instance using Secret Manager and Terraform + title: Creating and accessing a Database Instance using Secret Manager and Terraform/OpenTofu + description: Discover how to create and securely access a Database Instance using Secret Manager and Terraform/OpenTofu content: - h1: Creating and accessing a Database Instance using Secret Manager and Terraform - paragraph: Discover how to create and securely access a Database Instance using Secret Manager and Terraform + h1: Creating and accessing a Database Instance using Secret Manager and Terraform/OpenTofu + paragraph: Discover how to create and securely access a Database Instance using Secret Manager and Terraform/OpenTofu tags: secret-manager terraform categories: - security-identity @@ -15,7 +15,7 @@ dates: posted: 2024-06-03 --- -In this tutorial, you will use a Terraform configuration file that builds your entire infrastructure, such as a [Database Instance](/managed-databases-for-postgresql-and-mysql/concepts/#database-instance), a [secret](/secret-manager/concepts/#secret), and a [version](/secret-manager/concepts/#version) in which your database credentials are stored. You will then be able to access your database credentials securely from the Scaleway console. +In this tutorial, you will use a Terraform/OpenTofu configuration file that builds your entire infrastructure, such as a [Database Instance](/managed-databases-for-postgresql-and-mysql/concepts/#database-instance), a [secret](/secret-manager/concepts/#secret), and a [version](/secret-manager/concepts/#version) in which your database credentials are stored. You will then be able to access your database credentials securely from the Scaleway console. @@ -69,7 +69,7 @@ examples/ ```bash cd examples/key-value/infra ``` -2. Run the following command to download the dependencies and initialize Terraform: +2. Run the following command to download the dependencies and initialize Terraform/OpenTofu: ```bash terraform init ``` diff --git a/tutorials/send-emails-with-serverless-and-tem/index.mdx b/tutorials/send-emails-with-serverless-and-tem/index.mdx index 40406994b2..ae39e36bf0 100644 --- a/tutorials/send-emails-with-serverless-and-tem/index.mdx +++ b/tutorials/send-emails-with-serverless-and-tem/index.mdx @@ -1,10 +1,10 @@ --- meta: - title: Sending emails with Transactional Email and Serverless using Terraform - description: Discover how to send emails with Scaleway's Transactional Email and Serverless using Terraform + title: Sending emails with Transactional Email and Serverless using Terraform/OpenTofu + description: Discover how to send emails with Scaleway's Transactional Email and Serverless using Terraform/OpenTofu content: - h1: Sending emails with Transactional Email and Serverless using Terraform - paragraph: Discover how to send emails with Scaleway's Transactional Email and Serverless using Terraform + h1: Sending emails with Transactional Email and Serverless using Terraform/OpenTofu + paragraph: Discover how to send emails with Scaleway's Transactional Email and Serverless using Terraform/OpenTofu tags: transactional-email tem serverless terraform categories: - transactional-email @@ -16,14 +16,14 @@ dates: posted: 2023-04-27 --- -In this tutorial, you will learn how to send emails with [Transactional Email](/transactional-email/quickstart/) and [Serverless Functions](/serverless-functions/quickstart/) using a Terraform configuration file that builds your entire infrastructure, such as a Serverless Function and a website with a registration page hosted on an Object Storage bucket. It also allows you to configure SPF, DKIM, and MX records on your sending domain. +In this tutorial, you will learn how to send emails with [Transactional Email](/transactional-email/quickstart/) and [Serverless Functions](/serverless-functions/quickstart/) using a Terraform/OpenTofu configuration file that builds your entire infrastructure, such as a Serverless Function and a website with a registration page hosted on an Object Storage bucket. It also allows you to configure SPF, DKIM, and MX records on your sending domain. - A Scaleway account logged into the [console](https://console.scaleway.com) - [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization - A [domain name](/domains-and-dns/quickstart/) -- [Installed Terraform](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli) +- [Installed Terraform/OpenTofu](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli) ## Clone the GitHub repository @@ -37,9 +37,9 @@ git clone https://github.com/scaleway/tutorial-tem-serverless-terraform In the `tutorial-tem-serverless-terraform` directory, you will find three folders: `infra`, `signup-handler`, and `super-product`. -- The `infra` folder holds `main.tf`, the Terraform configuration file used to deploy your infrastructure. +- The `infra` folder holds `main.tf`, the Terraform/OpenTofu configuration file used to deploy your infrastructure. - The `signup-handler` folder contains the files that will configure your function. The `main.go` file is the entry point for your function. -- The `super-product` folder holds an `index.html.tftpl` file which is a Terraform template. This file contains an HTML template for the registration page of the website we are creating. This template allows you to automatically create and configure the SPF, MX, and DKIM records needed for your domain, as well as a Serverless Function. +- The `super-product` folder holds an `index.html.tftpl` file which is a Terraform/OpenTofu template. This file contains an HTML template for the registration page of the website we are creating. This template allows you to automatically create and configure the SPF, MX, and DKIM records needed for your domain, as well as a Serverless Function. If you want to use a specific function, you can replace `${DISPATCHER_ENDPOINT}` (line 74) in the `index.html.tftpl` file with your function's endpoint. @@ -54,7 +54,7 @@ In the `tutorial-tem-serverless-terraform` directory, you will find three folder cd tutorial-tem-serverless-terraform/infra ``` -2. Run the following command to download the dependencies and initialize Terraform: +2. Run the following command to download the dependencies and initialize Terraform/OpenTofu: ```shell terraform init @@ -75,11 +75,11 @@ In the `tutorial-tem-serverless-terraform` directory, you will find three folder + url = (known after apply) Do you want to perform these actions? - Terraform will perform the actions described above. + Terraform/OpenTofu will perform the actions described above. Only 'yes' will be accepted to approve. ``` -5. Type "yes", then **Enter**. Terraform will generate your resources. The following output displays once your resources are generated: +5. Type "yes", then **Enter**. Terraform/OpenTofu will generate your resources. The following output displays once your resources are generated: ```shell Apply complete! Resources: 14 added, 0 changed, 0 destroyed. diff --git a/tutorials/setup-nomad-cluster/index.mdx b/tutorials/setup-nomad-cluster/index.mdx index a517149e30..a1ad4da6a4 100644 --- a/tutorials/setup-nomad-cluster/index.mdx +++ b/tutorials/setup-nomad-cluster/index.mdx @@ -21,7 +21,7 @@ dates: - [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization - A valid [API key](/iam/how-to/create-api-keys/) - Installed [Packer 1.7.7 or a later version](https://developer.hashicorp.com/packer/tutorials/docker-get-started/get-started-install-cli) -- Installed [Terraform 1.2.0 or a later version](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli) +- Installed [Terraform/OpenTofu 1.2.0 or a later version](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli) - Installed [Nomad 1.3.3 or a later version](https://developer.hashicorp.com/nomad/tutorials/get-started/gs-install) ## Clone the GitHub repository @@ -45,8 +45,8 @@ cd learn-nomad-cluster-setup/scaleway In the `scaleway` directory, you will find the following files: - `image.pkr.hcl` - The Packer configuration file used to build the Nomad instance image. -- `main.tf` - The Terraform configuration file used to deploy the Nomad cluster. -- `variables.tf` - The Terraform variables file used to configure the Nomad cluster. +- `main.tf` - The Terraform/OpenTofu configuration file used to deploy the Nomad cluster. +- `variables.tf` - The Terraform/OpenTofu variables file used to configure the Nomad cluster. - `post-setup.sh` - The script used to bootstrap the Nomad cluster. - `variables.hcl.example` - An example file of variables used to configure the Nomad cluster. @@ -78,7 +78,7 @@ cp variables.hcl.example variables.hcl uuidgen | tr "[:upper:]" "[:lower:]" ``` -3. Optionally, you can also generate UUIDs through Terraform console's `uuid()` function: +3. Optionally, you can also generate UUIDs through Terraform/OpenTofu console's `uuid()` function: ```shell terraform console @@ -130,7 +130,7 @@ At this step, your `variables.hcl` file should look like the following. Make sur # Packer variables (all are required) zone = "fr-par-1" -# Terraform variables (all are required) +# Terraform/OpenTofu variables (all are required) nomad_consul_token_id = "4fda5224-6d40-20dd-5dd4-4ce95c1026fb" nomad_consul_token_secret = "6ae9f6f7-b6f1-4d3a-ea82-bcbea392daa0" instance_image = "hashistack-20230310141424" @@ -142,7 +142,7 @@ instance_image = "hashistack-20230310141424" # The retry join allows Consul to automatically # discover other nodes in the cluster. An IAM key will -# be created in Terraform and appended to the retry_join +# be created in Terraform/OpenTofu and appended to the retry_join # variable # retry_join = "provider=scaleway tag_name=consul-auto-join" @@ -162,9 +162,9 @@ instance_image = "hashistack-20230310141424" ## Deploy the Nomad cluster -Now that we have built the Nomad Instance image and configured our variables, we can deploy the Nomad cluster using Terraform. +Now that we have built the Nomad Instance image and configured our variables, we can deploy the Nomad cluster using Terraform/OpenTofu. -1. Use the following command to initialize Terraform: +1. Use the following command to initialize Terraform/OpenTofu: ```shell terraform init diff --git a/tutorials/sns-instances-notification-system/index.mdx b/tutorials/sns-instances-notification-system/index.mdx index 134bd54403..0028ee6306 100644 --- a/tutorials/sns-instances-notification-system/index.mdx +++ b/tutorials/sns-instances-notification-system/index.mdx @@ -1,10 +1,10 @@ --- meta: - title: Creating a simulated CPU monitor notification system with Terraform using Scaleway Instances and Topics and Events - description: Learn how to set up a simulated CPU monitor notification system with Terraform using Scaleway Instances and Topics and Events. Trigger alerts based on CPU usage with ease. + title: Creating a simulated CPU monitor notification system with Terraform/OpenTofu using Scaleway Instances and Topics and Events + description: Learn how to set up a simulated CPU monitor notification system with Terraform/OpenTofu using Scaleway Instances and Topics and Events. Trigger alerts based on CPU usage with ease. content: - h1: Creating a simulated CPU monitor notification system with Terraform using Scaleway Instances and Topics and Events - paragraph: Learn how to set up a simulated CPU monitor notification system with Terraform using Scaleway Instances and Topics and Events. Trigger alerts based on CPU usage with ease. + h1: Creating a simulated CPU monitor notification system with Terraform/OpenTofu using Scaleway Instances and Topics and Events + paragraph: Learn how to set up a simulated CPU monitor notification system with Terraform/OpenTofu using Scaleway Instances and Topics and Events. Trigger alerts based on CPU usage with ease. categories: - messaging - instances @@ -24,27 +24,27 @@ It involves two Scaleway [Instances](https://www.scaleway.com/en/virtual-instanc -We focus on setting up SNS with maximum automation, therefore all the infrastructure is handled with Terraform. +We focus on setting up SNS with maximum automation, therefore all the infrastructure is handled with Terraform/OpenTofu. To simplify this process, the web applications for each Instance are downloaded through a Docker image. You can find the code for the publisher and the subscriber servers on [GitHub](https://github.com/scaleway/serverless-examples/tree/main/mnq/sns-instances-notification-system). - A Scaleway account logged into the [console](https://console.scaleway.com) - - [Set up authentication for the Terraform provider](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs#authentication) + - [Set up authentication for the Terraform/OpenTofu provider](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs#authentication) - An [SSH key](/organizations-and-projects/how-to/create-ssh-key/) - [Set up the Scaleway CLI](/scaleway-cli/quickstart/) -## Create the base Terraform repository and files +## Create the base Terraform/OpenTofu repository and files -First, we export the SSH public key to a Terraform environment variable: +First, we export the SSH public key to a Terraform/OpenTofu environment variable: 1. Run the following command in your shell: ``` export TF_VAR_public_ssh_key=$(cat ~/.ssh/id_ed25519.pub) ``` - Next, we set up Terraform so we can use it to define our infrastructure: + Next, we set up Terraform/OpenTofu so we can use it to define our infrastructure: 2. Create a directory called `terraform`: @@ -61,7 +61,7 @@ First, we export the SSH public key to a Terraform environment variable: } ``` -4. Create the `main.tf` file still inside the `terraform` directory, and add the code below to set up the [Scaleway Terraform provider](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs): +4. Create the `main.tf` file still inside the `terraform` directory, and add the code below to set up the [Scaleway Terraform/OpenTofu provider](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs): ``` terraform { required_providers { @@ -78,7 +78,7 @@ First, we export the SSH public key to a Terraform environment variable: ### Create the base for the project sns_tutorial -Still in the `main.tf`, we set up Terraform so we can use it to define our infrastructure. Complete the steps below, adding the described code to `main.tf`: +Still in the `main.tf`, we set up Terraform/OpenTofu so we can use it to define our infrastructure. Complete the steps below, adding the described code to `main.tf`: 1. Create the project `sns_tutorial` in your Organization dashboard: ``` @@ -295,10 +295,10 @@ We continue to add to our `main.tf` file to create the subscriber and publisher ## Run and test your setup -We are now ready to run the command to create the infrastructure and resources we have defined in our Terraform files and test if the publisher is pushing alerts that are being received by the subscriber. The web applications we defined for each Instance (downloaded from a Docker image) allow us to easily view and check what is going on with each Instance. +We are now ready to run the command to create the infrastructure and resources we have defined in our Terraform/OpenTofu files and test if the publisher is pushing alerts that are being received by the subscriber. The web applications we defined for each Instance (downloaded from a Docker image) allow us to easily view and check what is going on with each Instance. 1. Run the commands `terraform init`, `terraform plan` and `terraform apply`. -2. From the [Instances section](https://console.scaleway.com/instance/servers) of the Scaleway console, access and copy the public IP address of the Instance we created via Terraform (identifiable from its name: `subscriber_server`). +2. From the [Instances section](https://console.scaleway.com/instance/servers) of the Scaleway console, access and copy the public IP address of the Instance we created via Terraform/OpenTofu (identifiable from its name: `subscriber_server`). 3. In a browser, go to the home page of your subscriber Instance by inserting the IP address copied in the previous step into the following address: `http://:8081`. 4. Still in the browser, click `Confirm subscription` to confirm the subscription to the SNS topic we created. You are directed to an AWS page that confirms your subscription. If you have an error because the URL hasn't been received, you can reload the page. It should take less than 30 seconds to appear. diff --git a/tutorials/strapi-app-serverless-containers-sqldb/index.mdx b/tutorials/strapi-app-serverless-containers-sqldb/index.mdx index f20641306a..4ab56e7316 100644 --- a/tutorials/strapi-app-serverless-containers-sqldb/index.mdx +++ b/tutorials/strapi-app-serverless-containers-sqldb/index.mdx @@ -18,7 +18,7 @@ This tutorial will guide you through deploying a fully serverless Strapi headles You can either deploy your application: - [step by step using the Scaleway CLI](#deploy-a-strapi-headless-cms-using-the-scaleway-cli) to understand each action performed in detail and the resources required - - [using a Terraform template](#deploy-strapi-using-scaleway-terraform-templates) to deploy your application faster and have ready-to-use Infrastructure as Code. + - [using a Terraform/OpenTofu template](#deploy-strapi-using-scaleway-terraform-templates) to deploy your application faster and have ready-to-use Infrastructure as Code. @@ -381,10 +381,10 @@ To secure your deployment, we will now add a dedicated [IAM application](/iam/co - Create a secondary development environment by duplicating your built container, building it in `NODE_ENV=development` environment, running `npm run develop`, and plugging it onto another **Serverless SQL Database**. This will let you, for instance, edit content types, which is not possible in production. -## Deploy Strapi using Scaleway Terraform templates +## Deploy Strapi using Scaleway Terraform/OpenTofu templates - You must have [Terraform](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli) installed and configured with the [Scaleway Terraform Provider](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs) for this part. + You must have [Terraform/OpenTofu](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli) installed and configured with the [Scaleway Terraform/OpenTofu Provider](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs) for this part. ### Initialize the project @@ -545,16 +545,16 @@ To secure your deployment, we will now add a dedicated [IAM application](/iam/co ``` -### Creating the Terraform configuration +### Creating the Terraform/OpenTofu configuration -1. Run the following command to create a new folder to store your Terraform files, and access it: +1. Run the following command to create a new folder to store your Terraform/OpenTofu files, and access it: ```bash cd .. mkdir terraform-strapi-blog && cd terraform-strapi-blog ``` -2. Create an empty `main.tf` Terraform file inside the folder. +2. Create an empty `main.tf` Terraform/OpenTofu file inside the folder. Your application folder should now be structured as follows: ```bash @@ -689,7 +689,7 @@ To secure your deployment, we will now add a dedicated [IAM application](/iam/co } ``` -The Terraform file creates several resources: +The Terraform/OpenTofu file creates several resources: - A [Serverless Containers namespace](/serverless-containers/concepts/#namespace), that contains a [Serverless Container](/serverless-containers/quickstart/), which hosts your Strapi application @@ -701,14 +701,14 @@ The Terraform file creates several resources: - An [API key](/iam/concepts/#api-key) used as credentials to authenticate your application to the database -### Deploying the app with Terraform +### Deploying the app with Terraform/OpenTofu -1. Run the following command to initialize the Terraform working directory: +1. Run the following command to initialize the Terraform/OpenTofu working directory: ```bash terraform init ``` -2. Add the `REGISTRY_ENDPOINT`, `DEFAULT_PROJECT_ID`, `ADMIN_EMAIL` and `ADMIN_PASSWORD` environment variables to Terraform: +2. Add the `REGISTRY_ENDPOINT`, `DEFAULT_PROJECT_ID`, `ADMIN_EMAIL` and `ADMIN_PASSWORD` environment variables to Terraform/OpenTofu: ```bash export TF_VAR_REGISTRY_ENDPOINT=$REGISTRY_ENDPOINT export TF_VAR_DEFAULT_PROJECT_ID=$(scw config get default-project-id) @@ -721,12 +721,12 @@ The Terraform file creates several resources: If the admin password or email does not meet the requirements, the container will not start. -3. Create and review the Terraform execution plan of your infrastructure: +3. Create and review the Terraform/OpenTofu execution plan of your infrastructure: ```bash terraform plan ``` -4. Deploy your application by executing the actions listed in your Terraform plan: +4. Deploy your application by executing the actions listed in your Terraform/OpenTofu plan: ```bash terraform apply ``` diff --git a/tutorials/terraform-quickstart/index.mdx b/tutorials/terraform-quickstart/index.mdx index 66f2782166..cac8244db6 100644 --- a/tutorials/terraform-quickstart/index.mdx +++ b/tutorials/terraform-quickstart/index.mdx @@ -1,22 +1,22 @@ --- meta: - title: Deploying Your First Infrastructure on Scaleway using Terraform - description: This page explains how to deploy and manage the lifecycle of Scaleway infrastructures using Terraform + title: Deploying Your First Infrastructure on Scaleway using Terraform/OpenTofu + description: This page explains how to deploy and manage the lifecycle of Scaleway infrastructures using Terraform/OpenTofu content: - h1: Deploying Your First Infrastructure on Scaleway using Terraform - paragraph: This page explains how to deploy and manage the lifecycle of Scaleway infrastructures using Terraform + h1: Deploying Your First Infrastructure on Scaleway using Terraform/OpenTofu + paragraph: This page explains how to deploy and manage the lifecycle of Scaleway infrastructures using Terraform/OpenTofu categories: - instances - terraform - elastic-metal -tags: Terraform Elastic-Metal Instances HashiCorp +tags: Terraform/OpenTofu Elastic-Metal Instances HashiCorp hero: assets/scaleway_terraform.webp dates: validation: 2024-10-29 posted: 2018-04-06 --- -HashiCorp [Terraform](http://terraform.io) is an open-source software tool to deploy **IaaC**: Infrastructure as Code. It means that you can automate infrastructure resources such as Network, Instances, Elastic Metal servers, and more. It allows you to use declarative configuration files to manage the full lifecycle — create new resources, manage existing ones, and delete those no longer needed. The configuration language used by Terraform is called [Hashicorp Configuration Language (HCL)](https://github.com/hashicorp/hcl). +HashiCorp [Terraform/OpenTofu](http://terraform.io) is an open-source software tool to deploy **IaaC**: Infrastructure as Code. It means that you can automate infrastructure resources such as Network, Instances, Elastic Metal servers, and more. It allows you to use declarative configuration files to manage the full lifecycle — create new resources, manage existing ones, and delete those no longer needed. The configuration language used by Terraform/OpenTofu is called [Hashicorp Configuration Language (HCL)](https://github.com/hashicorp/hcl). @@ -25,15 +25,15 @@ HashiCorp [Terraform](http://terraform.io) is an open-source software tool to de - An [SSH key](/organizations-and-projects/how-to/create-ssh-key/) - A valid [API key](/iam/how-to/create-api-keys/) -## Installing Terraform +## Installing Terraform/OpenTofu -The first step is to install Terraform on a server or on your computer to deploy and manage your resources. Terraform is installed on a user environment (which can either be your local computer or a remote server used to manage your infrastructures) to push configuration files to your cloud environment. We suggest adding your configuration files to a versioning system like [GitHub](https://www.github.com) or [Bitbucket](https://bitbucket.org/) to manage the versioning of your configurations. +The first step is to install Terraform/OpenTofu on a server or on your computer to deploy and manage your resources. Terraform/OpenTofu is installed on a user environment (which can either be your local computer or a remote server used to manage your infrastructures) to push configuration files to your cloud environment. We suggest adding your configuration files to a versioning system like [GitHub](https://www.github.com) or [Bitbucket](https://bitbucket.org/) to manage the versioning of your configurations. ### Installation on macOS -Terraform can be easily installed on computers running macOS X using the [Homebrew](https://brew.sh/) package manager. Run the following command in a terminal window to install the application: +Terraform/OpenTofu can be easily installed on computers running macOS X using the [Homebrew](https://brew.sh/) package manager. Run the following command in a terminal window to install the application: ``` brew install terraform @@ -41,7 +41,7 @@ Terraform can be easily installed on computers running macOS X using the [Homebr ### Installation on Windows -The installation of Terraform on Windows can be done in a single command line using the [Chocolatey](https://chocolatey.org/) package manager. Run the following command in a terminal window to install Terraform on computers running Microsoft Windows: +The installation of Terraform/OpenTofu on Windows can be done in a single command line using the [Chocolatey](https://chocolatey.org/) package manager. Run the following command in a terminal window to install Terraform/OpenTofu on computers running Microsoft Windows: ``` choco install terraform @@ -49,7 +49,7 @@ The installation of Terraform on Windows can be done in a single command line us ### Installation on Linux -The installation of Terraform on Linux can be done in a few simple steps. +The installation of Terraform/OpenTofu on Linux can be done in a few simple steps. 1. Ensure your system is up to date and you have installed the `gnupg`, `software-properties-common`, and `curl` packages. ``` @@ -76,26 +76,26 @@ The installation of Terraform on Linux can be done in a few simple steps. uid [ unknown] HashiCorp Security (HashiCorp Package Signing) sub rsa4096 XXXX-XX-XX [E] ``` -4. Add the Terraform repositories to the apt sources. +4. Add the Terraform/OpenTofu repositories to the apt sources. ``` echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] \ https://apt.releases.hashicorp.com $(lsb_release -cs) main" | \ sudo tee /etc/apt/sources.list.d/hashicorp.list ``` -5. Update the apt packet cache and install Terraform using `apt`. +5. Update the apt packet cache and install Terraform/OpenTofu using `apt`. ``` apt update && apt install terraform ``` 6. Test the installation by running the `terraform version` command. ``` terraform version - Terraform v1.9.8 + Terraform/OpenTofu v1.9.8 on linux_amd64 ``` -## Creating a first Instance using Terraform +## Creating a first Instance using Terraform/OpenTofu -To create a first Instance using Terraform, a declarative configuration file is required. This file contains all information on machine characteristics required to deploy. It has to be written in the Hashicorp Configuration Language (HCL). The deployment of Scaleway resources is done using the [Scaleway Provider for Terraform](https://www.terraform.io/docs/providers/scaleway/index.html). For more information about HCL, refer to the [official documentation](https://www.terraform.io/docs/configuration/syntax.html). +To create a first Instance using Terraform/OpenTofu, a declarative configuration file is required. This file contains all information on machine characteristics required to deploy. It has to be written in the Hashicorp Configuration Language (HCL). The deployment of Scaleway resources is done using the [Scaleway Provider for Terraform/OpenTofu](https://www.terraform.io/docs/providers/scaleway/index.html). For more information about HCL, refer to the [official documentation](https://www.terraform.io/docs/configuration/syntax.html). 1. Create a project folder (for example `scaleway-terraform`) and navigate into the newly created directory: ``` @@ -147,9 +147,9 @@ To create a first Instance using Terraform, a declarative configuration file is Save the file and exit the text editor. - Though it is the simplest way for a beginner, we do not generally recommend hard-coding your API key credentials into the configuration file. See the [Authentication section of official Scaleway Terraform documentation](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/#authentication) to find out about other ways to manage your credentials. + Though it is the simplest way for a beginner, we do not generally recommend hard-coding your API key credentials into the configuration file. See the [Authentication section of official Scaleway Terraform/OpenTofu documentation](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/#authentication) to find out about other ways to manage your credentials. -4. Run `terraform init` to load the newly created configuration file into Terraform: +4. Run `terraform init` to load the newly created configuration file into Terraform/OpenTofu: ``` terraform init @@ -163,28 +163,28 @@ To create a first Instance using Terraform, a declarative configuration file is If you'd like to know more about provider signing, you can read about it here: https://www.terraform.io/docs/cli/plugins/signing.html - Terraform has created a lock file .terraform.lock.hcl to record the provider + Terraform/OpenTofu has created a lock file .terraform.lock.hcl to record the provider selections it made above. Include this file in your version control repository - so that Terraform can guarantee to make the same selections by default when + so that Terraform/OpenTofu can guarantee to make the same selections by default when you run "terraform init" in the future. - Terraform has been successfully initialized! + Terraform/OpenTofu has been successfully initialized! - You may now begin working with Terraform. Try running "terraform plan" to see - any changes that are required for your infrastructure. All Terraform commands + You may now begin working with Terraform/OpenTofu. Try running "terraform plan" to see + any changes that are required for your infrastructure. All Terraform/OpenTofu commands should now work. - If you ever set or change modules or backend configuration for Terraform, + If you ever set or change modules or backend configuration for Terraform/OpenTofu, rerun this command to reinitialize your working directory. If you forget, other commands will detect it and remind you to do so if necessary. ``` 5. Plan the execution of the tasks to be done by terraform using the command `terraform plan`: ``` terraform plan - Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + Terraform/OpenTofu used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create - Terraform will perform the following actions: + Terraform/OpenTofu will perform the following actions: # scaleway_instance_ip.public_ip will be created + resource "scaleway_instance_ip" "public_ip" { @@ -244,18 +244,18 @@ To create a first Instance using Terraform, a declarative configuration file is + zone = (known after apply) } - Note: You didn't specify an "-out" parameter to save this plan, so Terraform + Note: You didn't specify an "-out" parameter to save this plan, so Terraform/OpenTofu cannot guarantee that exactly these actions will be performed if "terraform apply" is subsequently run. ``` -6. Apply the new configuration and create the Instance using Terraform by running `terraform apply`, if the output obtained is the same as the one above. Confirm the execution of the plan by typing `yes` when prompted: +6. Apply the new configuration and create the Instance using Terraform/OpenTofu by running `terraform apply`, if the output obtained is the same as the one above. Confirm the execution of the plan by typing `yes` when prompted: ``` terraform apply - Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + Terraform/OpenTofu used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create - Terraform will perform the following actions: + Terraform/OpenTofu will perform the following actions: # scaleway_instance_ip.public_ip will be created + resource "scaleway_instance_ip" "public_ip" { @@ -318,7 +318,7 @@ To create a first Instance using Terraform, a declarative configuration file is Plan: 3 to add, 0 to change, 0 to destroy. Do you want to perform these actions? - Terraform will perform the actions described above. + Terraform/OpenTofu will perform the actions described above. Only 'yes' will be accepted to approve. Enter a value: yes @@ -342,7 +342,7 @@ To create a first Instance using Terraform, a declarative configuration file is 7. Go to the Instances section in your [Scaleway console](https://console.scaleway.com). You can see that the Instance has been created: -## Modifying an Instance using Terraform +## Modifying an Instance using Terraform/OpenTofu We now have a first Instance up and running. Next, we will modify it by restricting access using [security groups](/instances/how-to/use-security-groups/). We are going to `DROP` all traffic to the Instance by default: only traffic to ports 80 (HTTP), 443 (HTTPS) and 22 (SSH) will be allowed. To do this, we have to add some more lines to our existing configuration file `scaleway.tf`. @@ -415,18 +415,18 @@ We now have a first Instance up and running. Next, we will modify it by restrict } ``` Save the file and exit the text editor. -2. Run `terraform apply` again to see how Terraform applies the new configuration to the existing instance: +2. Run `terraform apply` again to see how Terraform/OpenTofu applies the new configuration to the existing instance: ``` terraform apply scaleway_instance_ip.public_ip: Refreshing state... [id=fr-par-1/377ba8cc-e2c0-46cf-a651-df2e1ec71a8f] scaleway_instance_volume.data: Refreshing state... [id=fr-par-1/02522ca3-0ece-454a-9240-087a1248f08a] scaleway_instance_server.my-instance: Refreshing state... [id=fr-par-1/eb731c89-0cb7-4148-9b5f-18470143aa7e] - Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + Terraform/OpenTofu used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create ~ update in-place - Terraform will perform the following actions: + Terraform/OpenTofu will perform the following actions: # scaleway_instance_security_group.my-security-group will be created + resource "scaleway_instance_security_group" "my-security-group" { @@ -475,7 +475,7 @@ We now have a first Instance up and running. Next, we will modify it by restrict Plan: 1 to add, 1 to change, 0 to destroy. Do you want to perform these actions? - Terraform will perform the actions described above. + Terraform/OpenTofu will perform the actions described above. Only 'yes' will be accepted to approve. Enter a value: yes @@ -487,12 +487,12 @@ We now have a first Instance up and running. Next, we will modify it by restrict Apply complete! Resources: 1 added, 1 changed, 0 destroyed. ``` -3. Terraform has created the security group and modified the configuration of the existing Instance by adding it to the newly created group. You can see the group from the Scaleway console and check the rules that have been created: +3. Terraform/OpenTofu has created the security group and modified the configuration of the existing Instance by adding it to the newly created group. You can see the group from the Scaleway console and check the rules that have been created: ## Adding resources to an infrastructure -Terraform allows us to add additional resources to infrastructures and is capable of managing both [Instances](https://www.scaleway.com/en/virtual-instances/) and [Elastic Metal servers](https://www.scaleway.com/en/elastic-metal/). Let us add an Elastic Metal server to our Terraform project using the [Elastic Metal module](https://www.terraform.io/docs/providers/scaleway/r/baremetal_server.html) of the Scaleway provider. +Terraform/OpenTofu allows us to add additional resources to infrastructures and is capable of managing both [Instances](https://www.scaleway.com/en/virtual-instances/) and [Elastic Metal servers](https://www.scaleway.com/en/elastic-metal/). Let us add an Elastic Metal server to our Terraform/OpenTofu project using the [Elastic Metal module](https://www.terraform.io/docs/providers/scaleway/r/baremetal_server.html) of the Scaleway provider. - Open the file `scaleway.tf` in a text editor and add the `"scaleway_account_ssh_key"` data source and the `scaleway_baremetal_server` resource as follows: @@ -566,7 +566,7 @@ resource "scaleway_baremetal_server" "base" { } ``` -Apply the new configuration using `terraform apply`. Terraform will add an Elastic Metal server to the existing infrastructure +Apply the new configuration using `terraform apply`. Terraform/OpenTofu will add an Elastic Metal server to the existing infrastructure ``` # scaleway_baremetal_server.base will be created @@ -588,7 +588,7 @@ Apply the new configuration using `terraform apply`. Terraform will add an Elast Plan: 1 to add, 0 to change, 0 to destroy. Do you want to perform these actions? - Terraform will perform the actions described above. + Terraform/OpenTofu will perform the actions described above. Only 'yes' will be accepted to approve. Enter a value: yes scaleway_baremetal_server.base: Creating... @@ -611,9 +611,9 @@ Apply the new configuration using `terraform apply`. Terraform will add an Elast -## Storing the Terraform state in the cloud +## Storing the Terraform/OpenTofu state in the cloud -Optionally, you can store your Terraform state with [Scaleway Object Storage](https://www.scaleway.com/en/object-storage/). Configure your backend as follows: +Optionally, you can store your Terraform/OpenTofu state with [Scaleway Object Storage](https://www.scaleway.com/en/object-storage/). Configure your backend as follows: ```json terraform { @@ -633,9 +633,9 @@ terraform { } ``` -## Deleting infrastructures using Terraform +## Deleting infrastructures using Terraform/OpenTofu -Now you have deployed a Terraform infrastructure, modified its settings, and added additional resources. If you want to destroy the infrastructure, you can clean up everything using the `terraform destroy` command. +Now you have deployed a Terraform/OpenTofu infrastructure, modified its settings, and added additional resources. If you want to destroy the infrastructure, you can clean up everything using the `terraform destroy` command. Run `terraform destroy` in your terminal. The infrastructure created previously will be destroyed: @@ -647,11 +647,11 @@ scaleway_instance_security_group.my-security-group: Refreshing state... [id=fr-p scaleway_baremetal_server.base: Refreshing state... [id=fr-par-2/f761ff74-de50-44c3-afab-3c1ef00b16b7] scaleway_instance_server.my-instance: Refreshing state... [id=fr-par-1/eb731c89-0cb7-4148-9b5f-18470143aa7e] -Terraform used the selected providers to generate the following execution plan. Resource actions are +Terraform/OpenTofu used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: - destroy -Terraform will perform the following actions: +Terraform/OpenTofu will perform the following actions: # scaleway_baremetal_server.base will be destroyed - resource "scaleway_baremetal_server" "base" { @@ -773,7 +773,7 @@ Terraform will perform the following actions: Plan: 0 to add, 0 to change, 5 to destroy. Do you really want to destroy all resources? - Terraform will destroy all your managed infrastructure, as shown above. + Terraform/OpenTofu will destroy all your managed infrastructure, as shown above. There is no undo. Only 'yes' will be accepted to confirm. Enter a value: yes @@ -806,32 +806,32 @@ scaleway_instance_volume.data: Destruction complete after 0s Destroy complete! Resources: 5 destroyed. ``` -You have now managed the complete lifecycle of an infrastructure using Terraform. To discover more Terraform commands, use the `terraform -h` command. Common Terraform commands include for example: +You have now managed the complete lifecycle of an infrastructure using Terraform/OpenTofu. To discover more Terraform/OpenTofu commands, use the `terraform -h` command. Common Terraform/OpenTofu commands include for example: - `apply`: Builds or changes infrastructure -- `console`: Interactive console for Terraform interpolations -- `destroy`: Destroy Terraform-managed infrastructure env Workspace management +- `console`: Interactive console for Terraform/OpenTofu interpolations +- `destroy`: Destroy Terraform/OpenTofu-managed infrastructure env Workspace management - `fmt`: Rewrites configuration files to canonical format - `get`: Download and install modules for the configuration -- `graph`: Create a visual graph of Terraform resources -- `import`: Import existing infrastructure into Terraform -- `init`: Initialize a Terraform working directory +- `graph`: Create a visual graph of Terraform/OpenTofu resources +- `import`: Import existing infrastructure into Terraform/OpenTofu +- `init`: Initialize a Terraform/OpenTofu working directory - `output`: Read an output from a state file - `plan`: Generate and show an execution plan - `providers`: Prints a tree of the providers used in the configuration - `refresh`: Update local state file against real resources -- `show`: Inspect Terraform state or plan +- `show`: Inspect Terraform/OpenTofu state or plan - `taint`: Manually mark a resource for recreation - `untaint`: Manually unmark a resource as tainted -- `validate` Validates the Terraform files -- `version`: Prints the Terraform version +- `validate` Validates the Terraform/OpenTofu files +- `version`: Prints the Terraform/OpenTofu version - `workspace`: Workspace management -To create configurations that are shareable and version-controlled, it is recommended that you organize your code with modules. Modules are used to encapsulate logic and design a layer of abstraction for Terraform code. +To create configurations that are shareable and version-controlled, it is recommended that you organize your code with modules. Modules are used to encapsulate logic and design a layer of abstraction for Terraform/OpenTofu code. Most modules manage a few closely related resources from a single provider and allow you to parameterize the configurations. You can define variables to simplify the management of your infrastructure and duplicate it in no time. -For example, create a configuration file `variables.tf` in your Terraform Project directory and edit it as follows: +For example, create a configuration file `variables.tf` in your Terraform/OpenTofu Project directory and edit it as follows: ```json variable "zone" { @@ -845,4 +845,4 @@ You have 3 options to use these variables: - As a command-line parameter variable: `terraform apply -var zone=${var.zone}` - As a variables file: `terraform apply -var-file=variables.tf` -To learn more, discover how to deploy your cloud resources using [Packer and Terraform](/tutorials/deploy-instances-packer-terraform/) and check out the full [Scaleway Provider documentation for Terraform](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs). +To learn more, discover how to deploy your cloud resources using [Packer and Terraform/OpenTofu](/tutorials/deploy-instances-packer-terraform/) and check out the full [Scaleway Provider documentation for Terraform/OpenTofu](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs). diff --git a/tutorials/transform-bucket-images-triggers-functions-set-up/index.mdx b/tutorials/transform-bucket-images-triggers-functions-set-up/index.mdx index e2adb201ec..2b34e17d34 100644 --- a/tutorials/transform-bucket-images-triggers-functions-set-up/index.mdx +++ b/tutorials/transform-bucket-images-triggers-functions-set-up/index.mdx @@ -111,5 +111,5 @@ Identity and Access Management (IAM) credentials allow you to secure access to y You have created all the necessary resources, it is now time to [create functions](/tutorials/transform-bucket-images-triggers-functions-deploy/). -Setting up an environment with all the necessary resources can be time-consuming. You can use IaC (Infrastructure as Code) tools such as [Terraform](/tutorials/manage-instances-with-terraform-and-functions/) to automate a project's configuration. +Setting up an environment with all the necessary resources can be time-consuming. You can use IaC (Infrastructure as Code) tools such as [Terraform/OpenTofu](/tutorials/manage-instances-with-terraform-and-functions/) to automate a project's configuration. \ No newline at end of file diff --git a/tutorials/use-cockpit-with-terraform/index.mdx b/tutorials/use-cockpit-with-terraform/index.mdx index 259160e1f4..c569cd77a1 100644 --- a/tutorials/use-cockpit-with-terraform/index.mdx +++ b/tutorials/use-cockpit-with-terraform/index.mdx @@ -1,9 +1,9 @@ --- meta: - title: Using Cockpit with Terraform - description: Discover how to use Terraform to configure your Scaleway Cockpit. This detailed guide walks you through creating a token, setting up a Grafana user, and configuring Scaleway and custom data sources. + title: Using Cockpit with Terraform/OpenTofu + description: Discover how to use Terraform/OpenTofu to configure your Scaleway Cockpit. This detailed guide walks you through creating a token, setting up a Grafana user, and configuring Scaleway and custom data sources. content: - h1: Using Cockpit with Terraform + h1: Using Cockpit with Terraform/OpenTofu paragraph: Master the steps needed to monitor and analyze your infrastructure efficiently with our comprehensive tutorial. tags: observability cockpit terraform grafana monitoring categories: @@ -13,7 +13,7 @@ dates: posted: 2024-06-04 --- -In this tutorial, you will learn how to get started with Cockpit using a Terraform configuration file containing all the code you need to create: +In this tutorial, you will learn how to get started with Cockpit using a Terraform/OpenTofu configuration file containing all the code you need to create: - A [Grafana user](/cockpit/concepts/#grafana-users) - A folder in the Grafana user interface @@ -25,14 +25,14 @@ In this tutorial, you will learn how to get started with Cockpit using a Terrafo - A Scaleway account logged into the [console](https://console.scaleway.com) - [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization - [Configured an SSH key](/organizations-and-projects/how-to/create-ssh-key/#how-to-generate-an-ed25519-ssh-key-pair-on-macos-and-linux) -- [Installed Terraform](https://www.terraform.io/downloads.html) on your local machine +- [Installed Terraform](https://www.terraform.io/downloads.html) or [OpenTofu](https://opentofu.org/docs/intro/install/) on your local machine ## Configuring your environment ### Clone the repository -Open a terminal on your local machine and clone the `cockpit-terraform` repository containing the Terraform configuration file: +Open a terminal on your local machine and clone the `cockpit-terraform` repository containing the Terraform/OpenTofu configuration file: ``` git clone git@github.com:scaleway/cockpit-terraform.git @@ -55,12 +55,12 @@ Open a terminal on your local machine and clone the `cockpit-terraform` reposito ``` cd cockpit-terraform ``` -2. Run the following command to download the dependencies and initialize Terraform: +2. Run the following command to download the dependencies and initialize Terraform/OpenTofu: ``` terraform init ``` -3. Run the following command to deploy your infrastructure. Terraform generates an execution plan showing you what actions are about to be performed. +3. Run the following command to deploy your infrastructure. Terraform/OpenTofu generates an execution plan showing you what actions are about to be performed. ``` terraform apply diff --git a/tutorials/waypoint-plugin-scaleway/index.mdx b/tutorials/waypoint-plugin-scaleway/index.mdx index d4dc853a70..438597cc8d 100644 --- a/tutorials/waypoint-plugin-scaleway/index.mdx +++ b/tutorials/waypoint-plugin-scaleway/index.mdx @@ -73,7 +73,7 @@ A list of all options can be found in [container plugin documentation](https://g - A Scaleway account logged into the [console](https://console.scaleway.com) - Installed [Docker](https://www.docker.com/) -- Installed [Terraform](https://developer.hashicorp.com/terraform/downloads) +- Installed [Terraform](https://developer.hashicorp.com/terraform/downloads) or [OpenTofu](https://opentofu.org/docs/intro/install/) - Installed [Waypoint](https://developer.hashicorp.com/waypoint/downloads) - Installed [`jq`](https://github.com/jqlang/jq) - Installed the Waypoint plugin for Scaleway @@ -83,7 +83,7 @@ A list of all options can be found in [container plugin documentation](https://g ``` docker login rg.fr-par.scw.cloud -u nologin -p ${SCW_SECRET_KEY} ``` -3. Initialize a new Terraform project. +3. Initialize a new Terraform/OpenTofu project. ``` terraform init ```