Skip to content
Snippets Groups Projects
Commit 7a04b535 authored by Nathan Rodet's avatar Nathan Rodet
Browse files

Change to hash creation with argon

parent 58b8e5df
Branches
Tags
No related merge requests found
...@@ -57,7 +57,7 @@ Template are available to the link below. ...@@ -57,7 +57,7 @@ Template are available to the link below.
In this example, you will find how to create a file to a defined path with cloud-init. In this example, you will find how to create a file to a defined path with cloud-init.
Content inside `%` are meant to be replaced with sed command to be able to use environment variables or user-data. Content inside `%` are meant to be replaced with sed command to be able to use environment variables or user-data.
**example:** **Example:**
```yaml ```yaml
write_files: write_files:
- content: | - content: |
...@@ -94,7 +94,7 @@ sed -i "s/%atrium_count_index%/$(scw-userdata atrium_count_index)/g" /root/atriu ...@@ -94,7 +94,7 @@ sed -i "s/%atrium_count_index%/$(scw-userdata atrium_count_index)/g" /root/atriu
The example show how to curl a configuration file from repository to a defined path with cloud-init. The example show how to curl a configuration file from repository to a defined path with cloud-init.
**example :** **Example :**
```yaml ```yaml
runcmd: runcmd:
# #
...@@ -111,11 +111,10 @@ runcmd: ...@@ -111,11 +111,10 @@ runcmd:
## Use Gitlab variables in instances ## Use Gitlab variables in instances
### Example
From my instances, I should be able to access the variables as user-data using the command `scw-userdata <my-variable>` after declaring them in Terraform. From my instances, I should be able to access the variables as user-data using the command `scw-userdata <my-variable>` after declaring them in Terraform.
**Some documentation : https://blog.scaleway.com/introducing-scaleway-cloud-init-support/** **Some documentation : https://blog.scaleway.com/introducing-scaleway-cloud-init-support/**
**Example : Declare in Terraform**
```HCL ```HCL
user_data = { user_data = {
atrium_count_index = count.index atrium_count_index = count.index
...@@ -126,6 +125,11 @@ user_data = { ...@@ -126,6 +125,11 @@ user_data = {
} }
``` ```
** Example : Retrieve in instance
```bash
scw-userdata atrium_count_index
```
## Setup Terraform Locally ## Setup Terraform Locally
First, you must setup 2 local files for your variables : First, you must setup 2 local files for your variables :
...@@ -164,7 +168,7 @@ Now, you can create a file for your variables information called **variables-loc ...@@ -164,7 +168,7 @@ Now, you can create a file for your variables information called **variables-loc
SCW_PROJECT_ID = "" SCW_PROJECT_ID = ""
SCW_ACCESS_KEY = "" SCW_ACCESS_KEY = ""
SCW_SECRET_KEY = "" SCW_SECRET_KEY = ""
INSTANCES_COUNT = "2" INSTANCES_COUNT = ""
ENVIRONMENT = "" ENVIRONMENT = ""
``` ```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment