diff --git a/tutorials/configure-nextcloud-ubuntu/assets/scaleway-nextcloud-files.webp b/tutorials/configure-nextcloud-ubuntu/assets/scaleway-nextcloud-files.webp new file mode 100644 index 0000000000..dfc9d21162 Binary files /dev/null and b/tutorials/configure-nextcloud-ubuntu/assets/scaleway-nextcloud-files.webp differ diff --git a/tutorials/configure-nextcloud-ubuntu/assets/scaleway-nextcloud_files.webp b/tutorials/configure-nextcloud-ubuntu/assets/scaleway-nextcloud_files.webp deleted file mode 100644 index 545b31580b..0000000000 Binary files a/tutorials/configure-nextcloud-ubuntu/assets/scaleway-nextcloud_files.webp and /dev/null differ diff --git a/tutorials/configure-nextcloud-ubuntu/index.mdx b/tutorials/configure-nextcloud-ubuntu/index.mdx index fd5352fd5d..0c215a8e95 100644 --- a/tutorials/configure-nextcloud-ubuntu/index.mdx +++ b/tutorials/configure-nextcloud-ubuntu/index.mdx @@ -9,7 +9,7 @@ categories: - instances tags: Nextcloud Ubuntu-Bionic-Beaver dates: - validation: 2024-10-29 + validation: 2025-05-14 posted: 2018-10-26 --- @@ -39,30 +39,25 @@ It provides a large portfolio of [different applications](https://nextcloud.com/ ``` snap install nextcloud ``` -4. Finish the installation by running the following command. Note that a username and password must be provided when you run the script. +4. Run the following command to finish the installation. Make sure that you replace `your-username` and `your-password` with credentials of your choice, and that you note them as you will need them to login to your Nextcloud Instance. ``` - nextcloud.manual-install user password + nextcloud.manual-install your-username your-password ``` - - Replace `user` with the identifier of your user and `password` with the password of your user in the command above. - + The following output should display: - You will see the following message: - - `Nextcloud is not installed - only a limited number of commands are available` - - Some minutes later the following message appears: `Nextcloud was successfully installed`. Your Nextcloud installation has been successful. + `Nextcloud was successfully installed` ## Configuring trusted domains -By the default, the access to your Nextcloud Instance is limited to `localhost`. To access it via your domain name, you have to add it to the list of trusted domains. +By default, access to your Nextcloud Instance is limited to `localhost`. To access it via your domain name, you have to add it to the list of trusted domains. -1. Run the following command to allow the connection via the domain `your.domain.com` to your Nextcloud. +Run the following command to allow the connection via the domain `your.domain.com` to your Nextcloud. ``` nextcloud.occ config:system:set trusted_domains 1 --value=your.domain.com ``` -2. The following message appears when the domain is successfully added: `System config value trusted_domains => 1 set to string your.domain.com` + +The following message should appear, confirming that the domain was added: `System config value trusted_domains => 1 set to string your-domain.com` ## Securing the web interface with a Let's Encrypt TLS/SSL certificate @@ -102,7 +97,7 @@ By default, the Nextcloud installation via Snap provides a plain HTTP connection Have you met these requirements? (y/n) ``` -3. Enter your email address when asked to do so and confirm by pressing **Enter**: +3. Enter your email address when prompted and confirm by pressing **Enter**: ``` Please enter an email address (for urgent notices or key recovery): you@your.domain.com ``` @@ -110,7 +105,7 @@ By default, the Nextcloud installation via Snap provides a plain HTTP connection ``` Please enter your domain name(s) (space-separated): your.domain.com ``` -5. Your certificate is being requested and Apache will be restarted. The following messages will appear, once the certificate has been obtained: +The following output should display once the certificate has been obtained: ``` Attempting to obtain certificates... done Restarting apache... done @@ -118,9 +113,10 @@ By default, the Nextcloud installation via Snap provides a plain HTTP connection ## Accessing Nextcloud -You will now be able to access your Nextcloud Instance for the first time. +You can now access your Nextcloud Instance. -1. Open your browser and type the address of your Instance (For example: `https://your.domain.com`). You will see a login screen where you have to enter the user and password that you have created previously. -2. Once connected you will see your personal cloud storage space. You can upload, share, or download files from the interface: - -3. Optionally, you can download one of the several [Nextcloud clients](https://nextcloud.com/install/#install-clients) to manage your cloud storage space directly from your computer. \ No newline at end of file +1. Open your browser and type the address of your Instance (For example: `https://your.domain.com`). A login screen displays. +2. Enter the username and password that you have created in the previous steps. Your personal cloud storage space displays. +3. Upload, share, or download files from the interface: + +4. Optionally, download one of the several [Nextcloud clients](https://nextcloud.com/install/#install-clients) to manage your cloud storage space directly from your computer. \ No newline at end of file diff --git a/tutorials/configure-tem-smtp-with-wordpress-plugin/index.mdx b/tutorials/configure-tem-smtp-with-wordpress-plugin/index.mdx index 49c933864c..d98f9508c8 100644 --- a/tutorials/configure-tem-smtp-with-wordpress-plugin/index.mdx +++ b/tutorials/configure-tem-smtp-with-wordpress-plugin/index.mdx @@ -10,7 +10,7 @@ categories: - transactional-email - instances dates: - validation: 2025-05-14 + validation: 2025-05-22 posted: 2024-04-24 --- @@ -25,7 +25,7 @@ dates: 1. [Create an API key](/iam/how-to/create-api-keys/) from the Scaleway console. Make sure that you take note of your secret key. 2. [Create an Instance](/instances/how-to/create-an-instance/) with a **WordPress** image from the **InstantApps** tab. -3. [Create](/instances/how-to/use-security-groups/#how-to-create-a-security-group) a security group, check the **Enable SMTP ports** box, click **+ Add Instance**, and select your Instance in the drop-down. +3. [Create](/instances/how-to/use-security-groups/#how-to-create-a-security-group) a security group, choose your Instance to it to the security group, and check the **Enable SMTP ports** box. ## Configuring and logging in to your WordPress website @@ -47,7 +47,7 @@ dates: ## Configuring the WordPress plug-in -1. Hover over **WP Mail SMTP** in the WordPress left-side menu, and click **Settings**. You are redirected to the **General** tab. +1. Click **Settings** under **WP Mail SMTP**. You are redirected to the **General** tab. 2. Click the **Launch Setup Wizard** button to configure the plug-in. You are redirected to the WP Mail SMTP welcome page. 3. Click **Let's Get Started**. 4. Choose **Other SMTP**, then click **Save and Continue**. @@ -55,7 +55,7 @@ dates: 6. Select **TLS** in the **Encryption** field. 7. In the **SMTP Port** enter either of the Transactional Email TLS connection ports: `465` or `2465`. 8. Switch on the **Enable Authentication** toggle. -9. Retrieve your **SMTP username** in the **Overview** tab of your Transactional Email domain in the Scaleway console, and paste it in the **SMTP Username** field. +9. Access your [Transactional Email domain](https://console.scaleway.com/transactional-email/domains), retrieve your **Username** in the **SMTP configuration** section of the **Overview** tab, and paste it in the **SMTP Username** field. 10. Use your Scaleway API secret key as your SMTP password. 11. Enter the name you want your emails to originate from in the **From Name** field. diff --git a/tutorials/deploy-penpot-with-docker-instantapp/assets/scaleway-penpot-account-creation.webp b/tutorials/deploy-penpot-with-docker-instantapp/assets/scaleway-penpot-account-creation.webp new file mode 100644 index 0000000000..6926276806 Binary files /dev/null and b/tutorials/deploy-penpot-with-docker-instantapp/assets/scaleway-penpot-account-creation.webp differ diff --git a/tutorials/deploy-penpot-with-docker-instantapp/assets/scaleway-penpot-dashboard.webp b/tutorials/deploy-penpot-with-docker-instantapp/assets/scaleway-penpot-dashboard.webp index 14759d26eb..2f66683c11 100644 Binary files a/tutorials/deploy-penpot-with-docker-instantapp/assets/scaleway-penpot-dashboard.webp and b/tutorials/deploy-penpot-with-docker-instantapp/assets/scaleway-penpot-dashboard.webp differ diff --git a/tutorials/deploy-penpot-with-docker-instantapp/assets/scaleway-penpot-login.webp b/tutorials/deploy-penpot-with-docker-instantapp/assets/scaleway-penpot-login.webp deleted file mode 100644 index 0250e9c9d0..0000000000 Binary files a/tutorials/deploy-penpot-with-docker-instantapp/assets/scaleway-penpot-login.webp and /dev/null differ diff --git a/tutorials/deploy-penpot-with-docker-instantapp/index.mdx b/tutorials/deploy-penpot-with-docker-instantapp/index.mdx index 5ebd4812cf..0a2d26782e 100644 --- a/tutorials/deploy-penpot-with-docker-instantapp/index.mdx +++ b/tutorials/deploy-penpot-with-docker-instantapp/index.mdx @@ -22,59 +22,58 @@ In this tutorial, you learn how to deploy your own Penpot Instance using the Doc - 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 - -## Installing Penpot using Docker Compose +- [Created a Scaleway Instance](/instances/how-to/create-an-instance/) with a [Docker InstantApp](https://console.scaleway.com/instance/servers/create?area=fr-par-1&imageKey=c1b530d8-0ca0-45c4-80db-ba06608287b2&offerName=PLAY2-MICRO) +- A domain -1. Click **Instances** in the **Compute** section of the [Scaleway console](https://console.scaleway.com/organization) side menu. Then [deploy](/instances/how-to/create-an-instance/) a new Instance using the [Docker InstantApp](https://console.scaleway.com/instance/servers/create?area=fr-par-1&imageKey=c1b530d8-0ca0-45c4-80db-ba06608287b2&offerName=PLAY2-MICRO). +## Installing Penpot using Docker Compose -2. Connect to the Instance using [SSH](/instances/how-to/connect-to-instance/): +1. Connect to your Instance using [SSH](/instances/how-to/connect-to-instance/): ``` ssh root@ ``` -3. Download the Docker configuration from the Penpot repository: +2. Download the Docker configuration from the Penpot repository: ``` wget https://raw.githubusercontent.com/penpot/penpot/main/docker/images/docker-compose.yaml - wget https://raw.githubusercontent.com/penpot/penpot/main/docker/images/config.env ``` -4. Open the file containing the environment variables (`config.env`) in a text editor: +3. Open `docker-compose.yaml` in a text editor: ``` - nano config.env + nano docker-compose.yaml ``` -5. Set the `PENPOT_PUBLIC_URI` to your Penpot domain. Then save the file and exit the editor. +4. Set the `PENPOT_PUBLIC_URI` to your Penpot domain. Then save the file and exit the editor. ``` - PENPOT_PUBLIC_URI=https://penpot.mydomain.eu + PENPOT_PUBLIC_URI=https://penpot.your-domain.com ``` -6. Update the APT package cache on your system to make sure you have the latest releases available. +5. Update the APT package cache on your system to make sure you have the latest releases available. ``` apt update ``` -7. Install the Nginx web server and `certbot` using APT. These serve as a frontend for the Penpot application and provide a secured TLS connection by using Let's Encrypt certificates. +6. Install the Nginx web server and `certbot` using APT. These serve as a frontend for the Penpot application and provide a secured TLS connection by using Let's Encrypt certificates. ``` apt install nginx python3-certbot-nginx ``` -8. Disable the default virtual host, that is pre-configured when Nginx is installed via Ubuntu’s package manager. +7. Disable the default virtual host, that is pre-configured when Nginx is installed via Ubuntu’s package manager. ``` unlink /etc/nginx/sites-enabled/default ``` -9. Create a Nginx configuration file for the reverse proxy: +8. Create an Nginx configuration file for the reverse proxy: ``` nano /etc/nginx/sites-available/penpot.conf ``` - Copy the following content into the file, save it, and exit the editor. +9. Paste the following content into the file. Make sure that you replace `your-domain.com` with your domain. Save the file and exit. ``` server { listen 80; listen [::]:80; - server_name penpot.mydomain.eu; + server_name penpot.your-domain.com; access_log /var/log/nginx/reverse-access.log; error_log /var/log/nginx/reverse-error.log; @@ -104,11 +103,16 @@ In this tutorial, you learn how to deploy your own Penpot Instance using the Doc ## Securing the connection using TLS -1. Run `certbot`, a tool that automatizes most of the configuration work related to requesting, installing, and managing the TLS certificate: +1. Log into your domain registrar, access your DNS zone, and add an A record with the following information. + - Name: `penpot` + - IP address or Hostname or Value: `` + - TTL: default + +2. Run `certbot`, a tool that automatizes most of the configuration work related to requesting, installing, and managing the TLS certificate: ``` certbot --nginx ``` -2. Answer the prompts that display on the screen to request a valid Let’s Encrypt TLS certificate: +3. Answer the prompts that display on the screen to request a valid Let’s Encrypt TLS certificate: ``` Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator nginx, Installer nginx @@ -121,7 +125,7 @@ In this tutorial, you learn how to deploy your own Penpot Instance using the Doc blank to select all options shown (Enter 'c' to cancel): 1 Obtaining a new certificate Performing the following challenges: - http-01 challenge for your.domain.com + http-01 challenge for your-domain.com Waiting for verification... Cleaning up challenges Deploying Certificate to VirtualHost /etc/nginx/sites-enabled/reverse-proxy.conf @@ -137,26 +141,24 @@ In this tutorial, you learn how to deploy your own Penpot Instance using the Doc Redirecting all traffic on port 80 to ssl in /etc/nginx/sites-enabled/reverse-proxy.conf - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Congratulations! You have successfully enabled https://your.domain.com - - You should test your configuration at: - https://www.ssllabs.com/ssltest/analyze.html?d=your.domain.com + Congratulations! You have successfully enabled HTTPS on https://your-domain.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ``` -## Running Penpot +## Running Penpot 1. Run `docker-compose` to start Penpot: ``` docker-compose -p penpot -f docker-compose.yaml up -d ``` -2. Run the following command to add a Penpot user: +2. Open your Penpot Instance in a browser: ``` - docker exec -ti penpot-penpot-backend-1 ./manage.sh create-profile + http://penpot.your-domain.com ``` -3. Open a web browser on your local computer and point it to your Penpot domain. The login screen displays. - -4. Log in using the credentials of the previously created user. The Penpot dashboard displays. You can now start designing your assets. +3. Click **Create an account**. +4. Enter an email address and a password, then click **Create an account**. + +5. Enter a name and click **Create an account** again to confirm. The Penpot dashboard displays. You can now start designing your assets. -Your Penpot Instance is now ready. For a more advanced configuration of additional features, refer to the [official documentation](https://help.penpot.app/technical-guide/configuration/). \ No newline at end of file +For a more advanced configuration of additional features, refer to the [official documentation](https://help.penpot.app/technical-guide/configuration/). \ No newline at end of file diff --git a/tutorials/terraform-quickstart/assets/scaleway-terraform-instances-list.webp b/tutorials/terraform-quickstart/assets/scaleway-terraform-instances-list.webp deleted file mode 100644 index b4c5eea67f..0000000000 Binary files a/tutorials/terraform-quickstart/assets/scaleway-terraform-instances-list.webp and /dev/null differ diff --git a/tutorials/terraform-quickstart/assets/scaleway-terraform-scw-instances-list.webp b/tutorials/terraform-quickstart/assets/scaleway-terraform-scw-instances-list.webp index ed65ecf206..19594a95be 100644 Binary files a/tutorials/terraform-quickstart/assets/scaleway-terraform-scw-instances-list.webp and b/tutorials/terraform-quickstart/assets/scaleway-terraform-scw-instances-list.webp differ diff --git a/tutorials/terraform-quickstart/assets/scaleway-terraform-scw-security-group.webp b/tutorials/terraform-quickstart/assets/scaleway-terraform-scw-security-group.webp index 0b1ab79f93..050303c719 100644 Binary files a/tutorials/terraform-quickstart/assets/scaleway-terraform-scw-security-group.webp and b/tutorials/terraform-quickstart/assets/scaleway-terraform-scw-security-group.webp differ diff --git a/tutorials/terraform-quickstart/index.mdx b/tutorials/terraform-quickstart/index.mdx index f9ea19a4bc..19d3aed070 100644 --- a/tutorials/terraform-quickstart/index.mdx +++ b/tutorials/terraform-quickstart/index.mdx @@ -13,14 +13,13 @@ tags: Terraform/OpenTofu Elastic-Metal Instances HashiCorp hero: assets/scaleway_terraform.webp dates: validation: 2025-05-19 - posted: 2018-04-06 --- HashiCorp [Terraform](http://terraform.io) or [OpenTofu](https://opentofu.org/) (open source fork of Terraform) are open-source software tools 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). -- A Scaleway account logged into the [console](https://console.scaleway.com) +- A Scaleway account logged into the Scaleway [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 - An [SSH key](/organizations-and-projects/how-to/create-ssh-key/) - A valid [API key](/iam/how-to/create-api-keys/) @@ -36,7 +35,7 @@ The first step is to install Terraform/OpenTofu on a server or on your computer 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 + brew tap hashicorp/tap && brew install hashicorp/tap/terraform ``` ### Installation on Windows @@ -78,34 +77,28 @@ The installation of Terraform/OpenTofu on Linux can be done in a few simple step ``` 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 + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(grep -oP '(?<=UBUNTU_CODENAME=).*' /etc/os-release || lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list ``` 5. Update the apt packet cache and install Terraform/OpenTofu using `apt`. ``` - apt update && apt install terraform + apt update && apt-get install terraform ``` 6. Test the installation by running the `terraform version` command. - ``` - terraform version - Terraform/OpenTofu v1.9.8 - on linux_amd64 - ``` + ## Creating a first Instance using Terraform/OpenTofu -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). +To create a first Instance using Terraform/OpenTofu, you need a declarative configuration file. This file contains all the 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: ``` mkdir scaleway-terraform && cd scaleway-terraform ``` -2. Create a new text file called `scaleway.tf` in your favorite text editor, for example `nano`: +2. Create a new text file called `scaleway.tf` in a text editor of your choice. In the example below, we use `nano`. ``` nano scaleway.tf ``` -3. Add the following content to the file to deploy a Development DEV1-L Instance running the Ubuntu Focal Fossa (20.04 LTS) base image in the `fr-par-1` zone. Replace `` and `` with your own [API key information](/iam/how-to/create-api-keys/) and `` with your own Project ID: +3. Add the following content to the file to deploy a Development DEV1-L Instance running the Ubuntu Jammy Jellyfish (22.04 LTS) base image in the `fr-par-1` zone. Replace `` and `` with your own [API key information](/iam/how-to/create-api-keys/) and `` with your own Project ID: ```json terraform { required_providers { @@ -123,22 +116,22 @@ To create a first Instance using Terraform/OpenTofu, a declarative configuration region = "fr-par" } resource "scaleway_instance_ip" "public_ip" {} - resource "scaleway_instance_volume" "data" { + resource "scaleway_block_volume" "data" { size_in_gb = 30 - type = "l_ssd" + iops = 5000 } resource "scaleway_instance_server" "my-instance" { type = "DEV1-L" - image = "ubuntu_focal" + image = "ubuntu_jammy" - tags = [ "terraform instance", "my-instance" ] + tags = ["terraform instance", "my-instance"] ip_id = scaleway_instance_ip.public_ip.id - additional_volume_ids = [ scaleway_instance_volume.data.id ] + additional_volume_ids = [scaleway_block_volume.data.id] root_volume { - # The local storage of a DEV1-L Instance is 80 GB, subtract 30 GB from the additional l_ssd volume, then the root volume needs to be 50 GB. + # The local storage of a DEV1-L Instance is 80 GB, subtract 30 GB from the additional block volume, then the root volume needs to be 50 GB. size_in_gb = 50 } } @@ -152,48 +145,37 @@ To create a first Instance using Terraform/OpenTofu, a declarative configuration 4. Run `terraform init` to load the newly created configuration file into Terraform/OpenTofu: ``` terraform init - - Initializing the backend... - Initializing provider plugins... - - Finding latest version of scaleway/scaleway... - - Installing scaleway/scaleway v2.0.0... - - Installed scaleway/scaleway v2.0.0 (signed by a HashiCorp partner, key ID F5BF26CADF6F9614) - - Partner and community providers are signed by their developers. - 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/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/OpenTofu can guarantee to make the same selections by default when - you run "terraform init" in the future. - - Terraform/OpenTofu has been successfully initialized! - - 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/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/OpenTofu used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + Terraform used the selected providers to generate the following execution plan. + Resource actions are indicated with the following symbols: + create - Terraform/OpenTofu will perform the following actions: + Terraform will perform the following actions: + + # scaleway_block_volume.data will be created + + resource "scaleway_block_volume" "data" { + + id = (known after apply) + + instance_volume_id = (known after apply) + + iops = 5000 + + name = (known after apply) + + project_id = (known after apply) + + size_in_gb = 30 + + zone = (known after apply) + } # scaleway_instance_ip.public_ip will be created + resource "scaleway_instance_ip" "public_ip" { + address = (known after apply) + id = (known after apply) + organization_id = (known after apply) + + prefix = (known after apply) + project_id = (known after apply) + reverse = (known after apply) + server_id = (known after apply) + + type = (known after apply) + zone = (known after apply) } @@ -202,10 +184,11 @@ To create a first Instance using Terraform/OpenTofu, a declarative configuration + additional_volume_ids = (known after apply) + boot_type = "local" + bootscript_id = (known after apply) + + cloud_init = (known after apply) + enable_dynamic_ip = false + enable_ipv6 = false + id = (known after apply) - + image = "ubuntu_focal" + + image = "ubuntu_jammy" + ip_id = (known after apply) + ipv6_address = (known after apply) + ipv6_gateway = (known after apply) @@ -214,8 +197,11 @@ To create a first Instance using Terraform/OpenTofu, a declarative configuration + organization_id = (known after apply) + placement_group_policy_respected = (known after apply) + private_ip = (known after apply) + + private_ips = (known after apply) + project_id = (known after apply) + + protected = false + public_ip = (known after apply) + + replace_on_type_change = false + security_group_id = (known after apply) + state = "started" + tags = [ @@ -223,48 +209,60 @@ To create a first Instance using Terraform/OpenTofu, a declarative configuration + "my-instance", ] + type = "DEV1-L" + + user_data = (known after apply) + zone = (known after apply) + + public_ips (known after apply) + + root_volume { + + boot = false + delete_on_termination = true + + name = (known after apply) + + sbs_iops = (known after apply) + size_in_gb = 50 + volume_id = (known after apply) + + volume_type = (known after apply) } } - # scaleway_instance_volume.data will be created - + resource "scaleway_instance_volume" "data" { - + id = (known after apply) - + name = (known after apply) - + organization_id = (known after apply) - + project_id = (known after apply) - + server_id = (known after apply) - + size_in_gb = 30 - + type = "l_ssd" - + zone = (known after apply) - } + Plan: 3 to add, 0 to change, 0 to destroy. - 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. + ─────────────────────────────────────────────────────────────────────────────── + + Note: You didn't use the -out option to save this plan, so Terraform can't + guarantee to take exactly these actions if you run "terraform apply" now. ``` 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/OpenTofu used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + Terraform used the selected providers to generate the following execution plan. Resource actions are + indicated with the following symbols: + create - Terraform/OpenTofu will perform the following actions: + Terraform will perform the following actions: + + # scaleway_block_volume.data will be created + + resource "scaleway_block_volume" "data" { + + id = (known after apply) + + instance_volume_id = (known after apply) + + iops = 5000 + + name = (known after apply) + + project_id = (known after apply) + + size_in_gb = 30 + + zone = (known after apply) + } # scaleway_instance_ip.public_ip will be created + resource "scaleway_instance_ip" "public_ip" { + address = (known after apply) + id = (known after apply) + organization_id = (known after apply) + + prefix = (known after apply) + project_id = (known after apply) + reverse = (known after apply) + server_id = (known after apply) + + type = (known after apply) + zone = (known after apply) } @@ -273,10 +271,11 @@ To create a first Instance using Terraform/OpenTofu, a declarative configuration + additional_volume_ids = (known after apply) + boot_type = "local" + bootscript_id = (known after apply) + + cloud_init = (known after apply) + enable_dynamic_ip = false + enable_ipv6 = false + id = (known after apply) - + image = "ubuntu_focal" + + image = "ubuntu_jammy" + ip_id = (known after apply) + ipv6_address = (known after apply) + ipv6_gateway = (known after apply) @@ -285,8 +284,11 @@ To create a first Instance using Terraform/OpenTofu, a declarative configuration + organization_id = (known after apply) + placement_group_policy_respected = (known after apply) + private_ip = (known after apply) + + private_ips = (known after apply) + project_id = (known after apply) + + protected = false + public_ip = (known after apply) + + replace_on_type_change = false + security_group_id = (known after apply) + state = "started" + tags = [ @@ -294,53 +296,44 @@ To create a first Instance using Terraform/OpenTofu, a declarative configuration + "my-instance", ] + type = "DEV1-L" + + user_data = (known after apply) + zone = (known after apply) + + public_ips (known after apply) + + root_volume { + + boot = false + delete_on_termination = true + + name = (known after apply) + + sbs_iops = (known after apply) + size_in_gb = 50 + volume_id = (known after apply) + + volume_type = (known after apply) } } - # scaleway_instance_volume.data will be created - + resource "scaleway_instance_volume" "data" { - + id = (known after apply) - + name = (known after apply) - + organization_id = (known after apply) - + project_id = (known after apply) - + server_id = (known after apply) - + size_in_gb = 30 - + type = "l_ssd" - + zone = (known after apply) - } - Plan: 3 to add, 0 to change, 0 to destroy. Do you want to perform these actions? - Terraform/OpenTofu will perform the actions described above. + Terraform will perform the actions described above. Only 'yes' will be accepted to approve. - Enter a value: yes - - scaleway_instance_ip.public_ip: Creating... - scaleway_instance_volume.data: Creating... - scaleway_instance_volume.data: Creation complete after 0s [id=fr-par-1/02522ca3-0ece-454a-9240-087a1248f08a] - scaleway_instance_ip.public_ip: Creation complete after 0s [id=fr-par-1/377ba8cc-e2c0-46cf-a651-df2e1ec71a8f] - scaleway_instance_server.my-instance: Creating... - scaleway_instance_server.my-instance: Still creating... [10s elapsed] - scaleway_instance_server.my-instance: Still creating... [20s elapsed] - scaleway_instance_server.my-instance: Still creating... [30s elapsed] - scaleway_instance_server.my-instance: Still creating... [40s elapsed] - scaleway_instance_server.my-instance: Still creating... [50s elapsed] - scaleway_instance_server.my-instance: Still creating... [1m0s elapsed] - scaleway_instance_server.my-instance: Still creating... [1m10s elapsed] - scaleway_instance_server.my-instance: Creation complete after 1m12s [id=fr-par-1/eb731c89-0cb7-4148-9b5f-18470143aa7e] - - Apply complete! Resources: 3 added, 0 changed, 0 destroyed. + Enter a value: ``` -7. Go to the Instances section in your [Scaleway console](https://console.scaleway.com). You can see that the Instance has been created: - +7. Enter `yes` to confirm. + + ``` + scaleway_block_volume.data: Creating... + scaleway_instance_ip.public_ip: Creating... + scaleway_instance_ip.public_ip: Creation complete after 2s [id=fr-par-1/fc850359-f13a-44af-9ae0-2fa15289cc5d] + scaleway_block_volume.data: Creation complete after 7s [id=fr-par-1/119a0c58-8714-4511-8f30-e5cbbdaefc12] + scaleway_instance_server.my-instance: Creating... + scaleway_instance_server.my-instance: Creation complete after 8s [id=fr-par-1/97f50ae5-0221-4373-8bd8-4c20ad0dc44d] + + Apply complete! Resources: 3 added, 0 changed, 0 destroyed. + ``` +8. 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/OpenTofu @@ -367,15 +360,12 @@ We now have a first Instance up and running. Next, we will modify it by restrict project_id = "" zone = "fr-par-1" region = "fr-par" - } - - resource "scaleway_instance_ip" "public_ip" {} - - resource "scaleway_instance_volume" "data" { - size_in_gb = 30 - type = "l_ssd" - } - + } + resource "scaleway_instance_ip" "public_ip" {} + resource "scaleway_block_volume" "data" { + size_in_gb = 30 + iops = 5000 + } resource "scaleway_instance_security_group" "my-security-group" { inbound_default_policy = "drop" outbound_default_policy = "accept" @@ -395,38 +385,38 @@ We now have a first Instance up and running. Next, we will modify it by restrict port = "443" } } + resource "scaleway_instance_server" "my-instance" { + type = "DEV1-L" + image = "ubuntu_jammy" - resource "scaleway_instance_server" "my-instance" { - type = "DEV1-L" - image = "ubuntu_focal" - - tags = [ "terraform instance", "my-instance" ] - - ip_id = scaleway_instance_ip.public_ip.id + tags = ["terraform instance", "my-instance"] - additional_volume_ids = [ scaleway_instance_volume.data.id ] + ip_id = scaleway_instance_ip.public_ip.id - root_volume { - # The local storage of a DEV1-L Instance is 80 GB, subtract 30 GB from the additional l_ssd volume, then the root volume needs to be 50 GB. - size_in_gb = 50 - } + additional_volume_ids = [scaleway_block_volume.data.id] - security_group_id = scaleway_instance_security_group.my-security-group.id + root_volume { + # The local storage of a DEV1-L Instance is 80 GB, subtract 30 GB from the additional block volume, then the root volume needs to be 50 GB. + size_in_gb = 50 + } + security_group_id = scaleway_instance_security_group.my-security-group.id } ``` - Save the file and exit the text editor. -2. Run `terraform apply` again to see how Terraform/OpenTofu applies the new configuration to the existing instance: +2. Save the file, exit the text editor, and 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] + ``` + The following output should display: + ``` + scaleway_instance_ip.public_ip: Refreshing state... [id=fr-par-1/fc850359-f13a-44af-9ae0-2fa15289cc5d] + scaleway_block_volume.data: Refreshing state... [id=fr-par-1/119a0c58-8714-4511-8f30-e5cbbdaefc12] + scaleway_instance_server.my-instance: Refreshing state... [id=fr-par-1/97f50ae5-0221-4373-8bd8-4c20ad0dc44d] - Terraform/OpenTofu used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create ~ update in-place - Terraform/OpenTofu will perform the following actions: + Terraform will perform the following actions: # scaleway_instance_security_group.my-security-group will be created + resource "scaleway_instance_security_group" "my-security-group" { @@ -460,151 +450,115 @@ We now have a first Instance up and running. Next, we will modify it by restrict # scaleway_instance_server.my-instance will be updated in-place ~ resource "scaleway_instance_server" "my-instance" { - id = "fr-par-1/eb731c89-0cb7-4148-9b5f-18470143aa7e" - name = "tf-srv-amazing-heisenberg" - ~ security_group_id = "fr-par-1/17ae2620-b190-4126-bb7f-ad2edec693d7" -> (known after apply) - tags = [ + id = "fr-par-1/97f50ae5-0221-4373-8bd8-4c20ad0dc44d" + name = "tf-srv-nice-austin" + ~ security_group_id = "fr-par-1/2bc88e59-1b3a-4c54-bb10-53771abd621d" -> (known after apply) + tags = [ "terraform instance", "my-instance", ] - # (15 unchanged attributes hidden) + # (20 unchanged attributes hidden) - # (1 unchanged block hidden) + # (2 unchanged blocks hidden) } Plan: 1 to add, 1 to change, 0 to destroy. Do you want to perform these actions? - Terraform/OpenTofu will perform the actions described above. + Terraform will perform the actions described above. Only 'yes' will be accepted to approve. - - Enter a value: yes - - scaleway_instance_security_group.my-security-group: Creating... - scaleway_instance_security_group.my-security-group: Creation complete after 4s [id=fr-par-1/50368bc5-cbd0-4956-975c-8fd45a055171] - scaleway_instance_server.my-instance: Modifying... [id=fr-par-1/eb731c89-0cb7-4148-9b5f-18470143aa7e] - scaleway_instance_server.my-instance: Modifications complete after 2s [id=fr-par-1/eb731c89-0cb7-4148-9b5f-18470143aa7e] - - Apply complete! Resources: 1 added, 1 changed, 0 destroyed. ``` -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: +3. Enter `yes` to confirm. 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/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: +1. 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: - - Remember to replace the SSH key ID field with the ID for your own SSH key, available in [the credentials tab of your Project Dashboard](https://console.scaleway.com/project/credentials) - + + Remember to replace the SSH key ID field with the ID for your own SSH key, available in [the SSH keys tab of your Project Dashboard](https://console.scaleway.com/project/ssh-keys) + -```json -terraform { - required_providers { - scaleway = { - source = "scaleway/scaleway" + ```json + terraform { + required_providers { + scaleway = { + source = "scaleway/scaleway" + } + } + required_version = ">= 0.13" } - } - required_version = ">= 0.13" -} -provider "scaleway" { - access_key = "" - secret_key = "" - project_id = "" - zone = "fr-par-1" - region = "fr-par" -} -resource "scaleway_instance_ip" "public_ip" {} -resource "scaleway_instance_volume" "data" { - size_in_gb = 30 - type = "l_ssd" -} -resource "scaleway_instance_security_group" "my-security-group" { - inbound_default_policy = "drop" - outbound_default_policy = "accept" - inbound_rule { - action = "accept" - port = "22" - } - - inbound_rule { - action = "accept" - port = "80" - } + provider "scaleway" { + access_key = "" + secret_key = "" + project_id = "" + zone = "fr-par-1" + region = "fr-par" + } + resource "scaleway_instance_ip" "public_ip" {} + resource "scaleway_block_volume" "data" { + size_in_gb = 30 + iops = 5000 + } + resource "scaleway_instance_security_group" "my-security-group" { + inbound_default_policy = "drop" + outbound_default_policy = "accept" - inbound_rule { - action = "accept" - port = "443" - } -} -resource "scaleway_instance_server" "my-instance" { - type = "DEV1-L" - image = "ubuntu_focal" + inbound_rule { + action = "accept" + port = "22" + } - tags = [ "terraform instance", "my-instance" ] + inbound_rule { + action = "accept" + port = "80" + } - ip_id = scaleway_instance_ip.public_ip.id + inbound_rule { + action = "accept" + port = "443" + } + } + resource "scaleway_instance_server" "my-instance" { + type = "DEV1-L" + image = "ubuntu_jammy" - additional_volume_ids = [ scaleway_instance_volume.data.id ] + tags = ["terraform instance", "my-instance"] - root_volume { - # The local storage of a DEV1-L Instance is 80 GB, subtract 30 GB from the additional l_ssd volume, then the root volume needs to be 50 GB. - size_in_gb = 50 - } -} -data "scaleway_account_ssh_key" "main" { - ssh_key_id = "" -} -resource "scaleway_baremetal_server" "base" { - zone = "fr-par-2" - offer = "GP-BM1-S" - os = "d17d6872-0412-45d9-a198-af82c34d3c5c" - ssh_key_ids = [data.scaleway_account_ssh_key.main.ssh_key_id] -} -``` + ip_id = scaleway_instance_ip.public_ip.id -Apply the new configuration using `terraform apply`. Terraform/OpenTofu will add an Elastic Metal server to the existing infrastructure + additional_volume_ids = [scaleway_block_volume.data.id] - ``` - # scaleway_baremetal_server.base will be created - + resource "scaleway_baremetal_server" "base" { - + domain = (known after apply) - + id = (known after apply) - + ips = (known after apply) - + name = (known after apply) - + offer = "GP-BM1-S" - + offer_id = (known after apply) - + organization_id = (known after apply) - + os = "d17d6872-0412-45d9-a198-af82c34d3c5c" - + os_id = (known after apply) - + ssh_key_ids = [ - + "", - ] - + zone = "fr-par-2" - } + root_volume { + # The local storage of a DEV1-L Instance is 80 GB, subtract 30 GB from the additional block volume, then the root volume needs to be 50 GB. + size_in_gb = 50 + } + security_group_id = scaleway_instance_security_group.my-security-group.id + } + data "scaleway_account_ssh_key" "my_ssh_key" { + ssh_key_id = "" + } + data "scaleway_baremetal_offer" "my_offer" { + zone = "fr-par-2" + name = "EM-B112X-SSD" + } + data "scaleway_baremetal_os" "my_os" { + zone = "fr-par-2" + name = "Ubuntu" + version = "22.04 LTS (Jammy Jellyfish)" + } + resource "scaleway_baremetal_server" "my_server" { + zone = "fr-par-2" + offer = data.scaleway_baremetal_offer.my_offer.offer_id + os = data.scaleway_baremetal_os.my_os.os_id + ssh_key_ids = [data.scaleway_account_ssh_key.my_ssh_key.id] + } + ``` - Plan: 1 to add, 0 to change, 0 to destroy. - Do you want to perform these actions? - Terraform/OpenTofu will perform the actions described above. - Only 'yes' will be accepted to approve. - Enter a value: yes - scaleway_baremetal_server.base: Creating... - scaleway_baremetal_server.base: Still creating... [10s elapsed] - scaleway_baremetal_server.base: Still creating... [20s elapsed] - scaleway_baremetal_server.base: Still creating... [30s elapsed] - scaleway_baremetal_server.base: Still creating... [40s elapsed] - scaleway_baremetal_server.base: Still creating... [50s elapsed] - scaleway_baremetal_server.base: Still creating... [1m0s elapsed] - scaleway_baremetal_server.base: Still creating... [1m10s elapsed] - scaleway_baremetal_server.base: Still creating... [1m20s elapsed] - scaleway_baremetal_server.base: Still creating... [1m30s elapsed] - [...] - scaleway_baremetal_server.base: Creation complete after 12m42s [id=fr-par-2/f761ff74-de50-44c3-afab-3c1ef00b16b7] - Apply complete! Resources: 1 added, 0 changed, 1 destroyed. - ``` +2. Apply the new configuration using `terraform apply`. Terraform/OpenTofu will add an Elastic Metal server to the existing infrastructure The creation of an Elastic Metal server may take up to several minutes. @@ -635,176 +589,11 @@ terraform { ## Deleting infrastructures using Terraform/OpenTofu -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. +Now you have deployed a Terraform/OpenTofu infrastructure, modified its settings, and added additional resources. If you want to destroy the resources you have created, you can use the `terraform destroy` command. -Run `terraform destroy` in your terminal. The infrastructure created previously will be destroyed: - -``` -terraform destroy -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_security_group.my-security-group: Refreshing state... [id=fr-par-1/50368bc5-cbd0-4956-975c-8fd45a055171] -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/OpenTofu used the selected providers to generate the following execution plan. Resource actions are -indicated with the following symbols: - - destroy - -Terraform/OpenTofu will perform the following actions: - - # scaleway_baremetal_server.base will be destroyed - - resource "scaleway_baremetal_server" "base" { - - domain = "f761ff74-de50-44c3-afab-3c1ef00b16b7.fr-par-2.baremetal.scw.cloud" -> null - - id = "fr-par-2/f761ff74-de50-44c3-afab-3c1ef00b16b7" -> null - - ips = [ - - { - - address = "2001:bc8:1200:1:dac4:97ff:fe5b:7551" - - id = "3cc6979a-3776-42dd-8fdd-9ed552ed57e1" - - reverse = "f761ff74-de50-44c3-afab-3c1ef00b16b7.fr-par-2.baremetal.scw.cloud" - - version = "IPv6" - }, - - { - - address = "51.159.57.46" - - id = "cc18b9aa-b748-4185-af46-c4bec865c75b" - - reverse = "f761ff74-de50-44c3-afab-3c1ef00b16b7.fr-par-2.baremetal.scw.cloud" - - version = "IPv4" - }, - ] -> null - - name = "tf-bm-cranky-kowalevski" -> null - - offer = "GP-BM1-M" -> null - - offer_id = "fr-par-2/964f9b38-577e-470f-a220-7d762f9e8672" -> null - - organization_id = "" -> null - - os = "d17d6872-0412-45d9-a198-af82c34d3c5c" -> null - - os_id = "fr-par-2/d17d6872-0412-45d9-a198-af82c34d3c5c" -> null - - ssh_key_ids = [ - - "", - ] -> null - - tags = [] -> null - - zone = "fr-par-2" -> null - } - - # scaleway_instance_ip.public_ip will be destroyed - - resource "scaleway_instance_ip" "public_ip" { - - address = "163.172.129.226" -> null - - id = "fr-par-1/377ba8cc-e2c0-46cf-a651-df2e1ec71a8f" -> null - - organization_id = "" -> null - - project_id = "" -> null - - server_id = "fr-par-1/eb731c89-0cb7-4148-9b5f-18470143aa7e" -> null - - zone = "fr-par-1" -> null - } - - # scaleway_instance_security_group.my-security-group will be destroyed - - resource "scaleway_instance_security_group" "my-security-group" { - - enable_default_security = true -> null - - external_rules = false -> null - - id = "fr-par-1/50368bc5-cbd0-4956-975c-8fd45a055171" -> null - - inbound_default_policy = "drop" -> null - - name = "tf-sg-fervent-joliot" -> null - - organization_id = "" -> null - - outbound_default_policy = "accept" -> null - - project_id = "" -> null - - stateful = true -> null - - zone = "fr-par-1" -> null - - - inbound_rule { - - action = "accept" -> null - - port = 22 -> null - - protocol = "TCP" -> null - } - - inbound_rule { - - action = "accept" -> null - - port = 80 -> null - - protocol = "TCP" -> null - } - - inbound_rule { - - action = "accept" -> null - - port = 443 -> null - - protocol = "TCP" -> null - } - } - - # scaleway_instance_server.my-instance will be destroyed - - resource "scaleway_instance_server" "my-instance" { - - additional_volume_ids = [ - - "fr-par-1/02522ca3-0ece-454a-9240-087a1248f08a", - ] -> null - - boot_type = "local" -> null - - bootscript_id = "fdfe150f-a870-4ce4-b432-9f56b5b995c1" -> null - - enable_dynamic_ip = false -> null - - enable_ipv6 = false -> null - - id = "fr-par-1/eb731c89-0cb7-4148-9b5f-18470143aa7e" -> null - - image = "ubuntu_focal" -> null - - ip_id = "fr-par-1/377ba8cc-e2c0-46cf-a651-df2e1ec71a8f" -> null - - ipv6_prefix_length = 0 -> null - - name = "tf-srv-amazing-heisenberg" -> null - - organization_id = "" -> null - - private_ip = "10.73.136.53" -> null - - project_id = "" -> null - - public_ip = "163.172.129.226" -> null - - security_group_id = "fr-par-1/50368bc5-cbd0-4956-975c-8fd45a055171" -> null - - state = "started" -> null - - tags = [ - - "terraform instance", - - "my-instance", - ] -> null - - type = "DEV1-L" -> null - - zone = "fr-par-1" -> null - - - root_volume { - - delete_on_termination = true -> null - - size_in_gb = 50 -> null - - volume_id = "fr-par-1/fea0bd14-de92-4ea3-aa84-3df0df4651a3" -> null - } - } - - # scaleway_instance_volume.data will be destroyed - - resource "scaleway_instance_volume" "data" { - - id = "fr-par-1/02522ca3-0ece-454a-9240-087a1248f08a" -> null - - name = "tf-vol-strange-benz" -> null - - organization_id = "" -> null - - project_id = "" -> null - - server_id = "eb731c89-0cb7-4148-9b5f-18470143aa7e" -> null - - size_in_gb = 30 -> null - - type = "l_ssd" -> null - - zone = "fr-par-1" -> null - } - -Plan: 0 to add, 0 to change, 5 to destroy. - -Do you really want to destroy all resources? - 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 - -scaleway_instance_server.my-instance: Destroying... [id=fr-par-1/eb731c89-0cb7-4148-9b5f-18470143aa7e] -scaleway_baremetal_server.base: Destroying... [id=fr-par-2/f761ff74-de50-44c3-afab-3c1ef00b16b7] -scaleway_baremetal_server.base: Still destroying... [id=fr-par-2/f761ff74-de50-44c3-afab-3c1ef00b16b7, 10s elapsed] -scaleway_instance_server.my-ubuntu-instance: Still destroying... [id=fr-par-1/df778c76-36dc-43eb-b028-f000d131a75d, 10s elapsed] -scaleway_baremetal_server.base: Still destroying... [id=fr-par-2/f761ff74-de50-44c3-afab-3c1ef00b16b7, 20s elapsed] -scaleway_instance_server.my-ubuntu-instance: Still destroying... [id=fr-par-1/df778c76-36dc-43eb-b028-f000d131a75d, 20s elapsed] -scaleway_baremetal_server.base: Still destroying... [id=fr-par-2/f761ff74-de50-44c3-afab-3c1ef00b16b7, 30s elapsed] -scaleway_instance_server.my-ubuntu-instance: Still destroying... [id=fr-par-1/df778c76-36dc-43eb-b028-f000d131a75d, 30s elapsed] -scaleway_baremetal_server.base: Destruction complete after 31s -scaleway_instance_server.my-instance: Still destroying... [id=fr-par-1/eb731c89-0cb7-4148-9b5f-18470143aa7e, 10s elapsed] -scaleway_instance_server.my-instance: Still destroying... [id=fr-par-1/eb731c89-0cb7-4148-9b5f-18470143aa7e, 20s elapsed] -scaleway_instance_server.my-instance: Still destroying... [id=fr-par-1/eb731c89-0cb7-4148-9b5f-18470143aa7e, 30s elapsed] -scaleway_instance_server.my-instance: Still destroying... [id=fr-par-1/eb731c89-0cb7-4148-9b5f-18470143aa7e, 40s elapsed] -scaleway_instance_server.my-instance: Still destroying... [id=fr-par-1/eb731c89-0cb7-4148-9b5f-18470143aa7e, 50s elapsed] -scaleway_instance_server.my-instance: Still destroying... [id=fr-par-1/eb731c89-0cb7-4148-9b5f-18470143aa7e, 1m0s elapsed] -scaleway_instance_server.my-instance: Still destroying... [id=fr-par-1/eb731c89-0cb7-4148-9b5f-18470143aa7e, 1m10s elapsed] -scaleway_instance_server.my-instance: Still destroying... [id=fr-par-1/eb731c89-0cb7-4148-9b5f-18470143aa7e, 1m20s elapsed] -scaleway_instance_server.my-instance: Destruction complete after 1m25s -scaleway_instance_ip.public_ip: Destroying... [id=fr-par-1/377ba8cc-e2c0-46cf-a651-df2e1ec71a8f] -scaleway_instance_volume.data: Destroying... [id=fr-par-1/02522ca3-0ece-454a-9240-087a1248f08a] -scaleway_instance_security_group.my-security-group: Destroying... [id=fr-par-1/50368bc5-cbd0-4956-975c-8fd45a055171] -scaleway_instance_ip.public_ip: Destruction complete after 0s -scaleway_instance_security_group.my-security-group: Destruction complete after 0s -scaleway_instance_volume.data: Destruction complete after 0s - -Destroy complete! Resources: 5 destroyed. -``` +1. Run `terraform destroy` in your terminal. The output shows you what will be destroyed. +2. Enter `yes` when prompted to enter a value. +3. Hit `Enter` to confirm. The output shows you the resources being deleted. 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: