Skip to content

Commit 05550e0

Browse files
fix(functions): formatting code (#3450)
* fix(functions): formatting code * consistency
1 parent 527e411 commit 05550e0

File tree

1 file changed

+4
-5
lines changed
  • tutorials/manage-instances-with-terraform-and-functions

1 file changed

+4
-5
lines changed

tutorials/manage-instances-with-terraform-and-functions/index.mdx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ This tutorial will simulate a project with a production environment running all
3838
```
3939
2. Create five files to configure your infrastructure:
4040
- `main.tf`: will contain the main set of configurations for your project. Here, it will be our Instance
41-
- `provider.tf`: Terraform relies on plugins called [providers](https://www.terraform.io/language/providers) to interact with remote systems
41+
- `provider.tf`: Terraform relies on plugins called "[providers](https://www.terraform.io/language/providers)" to interact with remote systems
4242
- `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
4343
- `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
4444
- `terraform.tfvars`: allows you to set the actual value of the variables
@@ -141,7 +141,6 @@ import json
141141

142142
auth_token = os.environ["X-AUTH-TOKEN"]
143143

144-
145144
def handle(event, context):
146145
## get information from cron
147146
event_body = eval(event["body"])
@@ -151,10 +150,10 @@ def handle(event, context):
151150

152151
# create request
153152
url = "https://api.scaleway.com/instance/v1/zones/{zone}/servers/{server_id}/action"
154-
data = json.dumps({"action": action}).encode(` ascii `)
153+
data = json.dumps({"action": action}).encode("ascii")
155154
req = request.Request(url, data=data, method="POST")
156-
req.add_header(` Content - Type `, ` application / json `)
157-
req.add_header(` X - Auth - Token `, auth_token)
155+
req.add_header("Content-Type", "application/json")
156+
req.add_header("X-Auth-Token", auth_token)
158157

159158
# Sending request to Instance API
160159
try:

0 commit comments

Comments
 (0)