Skip to content

Commit 4843019

Browse files
authored
Merge branch 'master' into iot-setdevcrt
2 parents 543be81 + 5ab4929 commit 4843019

17 files changed

+4737
-13
lines changed

.github/workflows/acceptance-tests.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
- Account
1313
- AppleSilicon
1414
- Baremetal
15+
- DomainRecord
1516
- Instance
1617
- Iot
1718
- K8S
@@ -35,6 +36,7 @@ jobs:
3536
TF_LOG: DEBUG
3637
TF_ACC: 1
3738
TF_UPDATE_CASSETTES: false
39+
TF_TEST_DOMAIN: scaleway-terraform.com
3840
SCW_DEBUG: 0
3941
SCW_ACCESS_KEY: "SCWXXXXXXXXXXXXXFAKE"
4042
SCW_SECRET_KEY: "11111111-1111-1111-1111-111111111111"

.github/workflows/nightly.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Nightly Acceptance Tests
33
on:
44
schedule:
55
# Will run at 00:00 every day
6-
- cron: '0 0 * * *'
6+
- cron: "0 0 * * *"
77

88
jobs:
99
nightly:
@@ -14,6 +14,7 @@ jobs:
1414
- Account
1515
- AppleSilicon
1616
- Baremetal
17+
- DomainRecord
1718
- Instance
1819
- Iot
1920
- K8S
@@ -39,6 +40,7 @@ jobs:
3940
TF_ACC: 1
4041
# Enable recording with the cassette system. By doing so, we ensure that real HTTPS requests are made.
4142
TF_UPDATE_CASSETTES: true
43+
TF_TEST_DOMAIN: scaleway-terraform.com
4244
SCW_DEBUG: 1
4345
SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY }}
4446
SCW_SECRET_KEY: ${{ secrets.SCW_SECRET_KEY }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ website/node_modules
1515
*.backup
1616
./*.tfstate
1717
.terraform/
18+
test.tf
1819
*.log
1920
*.bak
2021
*~

SECURITY.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Security Policy
2+
3+
## Reporting a Vulnerability
4+
5+
At Scaleway we take security seriously. If you have any issue regarding security,
6+
please notify us by sending an email to [email protected].
7+
8+
Please, DO NOT create a GitHub issue.
9+
10+
We will follow up with you promptly with more information and a plan for remediation.
11+
We currently do not offer a paid security bounty program, but we would love to send some
12+
Scaleway swag your way along with our deepest gratitude for your assistance in making
13+
Scaleway a more secure Cloud ecosystem.

TESTING.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,22 @@ export TF_UPDATE_CASSETTES=true
3030
make testacc
3131
```
3232

33-
It's also required to have Scaleway environment vars available :
33+
It's also required to have Scaleway environment vars available:
3434

3535
```sh
3636
export SCW_ACCESS_KEY=SCWXXXXXXXXXXXXXXXXX
3737
export SCW_SECRET_KEY=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
3838
export SCW_DEFAULT_PROJECT_ID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
3939
```
4040

41+
For testing the domain API, it will use the first available domain in your domains list. You need to have a valid domain.
42+
43+
You can force the test domain with an environment var:
44+
45+
```sh
46+
export TF_TEST_DOMAIN=your-domain.tld
47+
```
48+
4149
To ease debugging you can also set:
4250
```sh
4351
export TF_LOG=DEBUG
@@ -46,5 +54,5 @@ export SCW_DEBUG=1
4654

4755
Running a single test:
4856
```sh
49-
TF_UPDATE_CASSETTES=true;TF_LOG=DEBUG;SCW_DEBUG=1;TF_ACC=1 go test ./scaleway -v -run=TestAccScalewayDataSourceRDBInstance_Basic -timeout=120m -parallel=10
57+
TF_UPDATE_CASSETTES=true TF_LOG=DEBUG SCW_DEBUG=1 TF_ACC=1 go test ./scaleway -v -run=TestAccScalewayDataSourceRDBInstance_Basic -timeout=120m -parallel=10
5058
```

docs/index.md

+27-8
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ You can test this config by creating a `test.tf` and run terraform commands from
4040
- Build the infrastructure: `terraform apply`
4141

4242
```hcl
43+
variable "project_id" {
44+
type = string
45+
description = "Your project ID."
46+
}
47+
4348
terraform {
4449
required_providers {
4550
scaleway = {
@@ -50,18 +55,31 @@ terraform {
5055
}
5156
5257
provider "scaleway" {
53-
zone = "fr-par-1"
54-
region = "fr-par"
58+
zone = "fr-par-1"
59+
region = "fr-par"
5560
}
5661
57-
resource "scaleway_instance_ip" "public_ip" {}
62+
resource "scaleway_instance_ip" "public_ip" {
63+
project_id = var.project_id
64+
}
65+
resource "scaleway_instance_ip" "public_ip_backup" {
66+
project_id = var.project_id
67+
}
5868
5969
resource "scaleway_instance_volume" "data" {
70+
project_id = var.project_id
6071
size_in_gb = 30
61-
type = "l_ssd"
72+
type = "l_ssd"
73+
}
74+
75+
resource "scaleway_instance_volume" "data_backup" {
76+
project_id = var.project_id
77+
size_in_gb = 10
78+
type = "l_ssd"
6279
}
6380
6481
resource "scaleway_instance_security_group" "www" {
82+
project_id = var.project_id
6583
inbound_default_policy = "drop"
6684
outbound_default_policy = "accept"
6785
@@ -83,14 +101,15 @@ resource "scaleway_instance_security_group" "www" {
83101
}
84102
85103
resource "scaleway_instance_server" "web" {
86-
type = "DEV1-L"
87-
image = "ubuntu_focal"
104+
project_id = var.project_id
105+
type = "DEV1-L"
106+
image = "ubuntu_focal"
88107
89-
tags = [ "front", "web" ]
108+
tags = ["front", "web"]
90109
91110
ip_id = scaleway_instance_ip.public_ip.id
92111
93-
additional_volume_ids = [ scaleway_instance_volume.data.id ]
112+
additional_volume_ids = [scaleway_instance_volume.data.id]
94113
95114
root_volume {
96115
# 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.

0 commit comments

Comments
 (0)