@@ -38,6 +38,7 @@ func TestAccScalewayInstanceSecurityGroup_Basic(t *testing.T) {
38
38
resource "scaleway_instance_security_group" "base" {
39
39
name = "sg-name"
40
40
inbound_default_policy = "drop"
41
+ tags = [ "test-terraform" ]
41
42
42
43
inbound_rule {
43
44
action = "accept"
@@ -88,6 +89,7 @@ func TestAccScalewayInstanceSecurityGroup_Basic(t *testing.T) {
88
89
resource "scaleway_instance_security_group" "base" {
89
90
name = "sg-name"
90
91
inbound_default_policy = "accept"
92
+ tags = [ "test-terraform" ]
91
93
92
94
inbound_rule {
93
95
action = "drop"
@@ -157,6 +159,7 @@ func TestAccScalewayInstanceSecurityGroup_Basic(t *testing.T) {
157
159
resource "scaleway_instance_security_group" "base" {
158
160
name = "sg-name"
159
161
inbound_default_policy = "accept"
162
+ tags = [ "test-terraform" ]
160
163
}
161
164
` ,
162
165
Check : resource .ComposeTestCheckFunc (
@@ -188,6 +191,7 @@ func TestAccScalewayInstanceSecurityGroup_ICMP(t *testing.T) {
188
191
port = 80
189
192
ip_range = "0.0.0.0/0"
190
193
}
194
+ tags = [ "test-terraform" ]
191
195
}
192
196
` ,
193
197
Check : resource .ComposeTestCheckFunc (
@@ -213,6 +217,7 @@ func TestAccScalewayInstanceSecurityGroup_ICMP(t *testing.T) {
213
217
protocol = "ICMP"
214
218
ip = "8.8.8.8"
215
219
}
220
+ tags = [ "test-terraform" ]
216
221
}
217
222
` ,
218
223
Check : resource .ComposeTestCheckFunc (
@@ -245,11 +250,12 @@ func TestAccScalewayInstanceSecurityGroup_ANY(t *testing.T) {
245
250
{
246
251
Config : `
247
252
locals {
248
- ips_to_ban = ["1.1.1.1", "2.2.2.2", "3.3.3.3"]
253
+ ips_to_ban = ["1.1.1.1", "2.2.2.2", "3.3.3.3"]
249
254
}
250
255
251
256
resource "scaleway_instance_security_group" "ban_ips" {
252
- inbound_default_policy = "accept"
257
+ tags = [ "test-terraform" ]
258
+ inbound_default_policy = "accept"
253
259
254
260
dynamic "inbound_rule" {
255
261
for_each = local.ips_to_ban
@@ -295,6 +301,7 @@ func TestAccScalewayInstanceSecurityGroup_WithNoPort(t *testing.T) {
295
301
action = "accept"
296
302
ip_range = "0.0.0.0/0"
297
303
}
304
+ tags = [ "test-terraform" ]
298
305
}
299
306
` ,
300
307
Check : resource .ComposeTestCheckFunc (
@@ -325,6 +332,7 @@ func TestAccScalewayInstanceSecurityGroup_RemovePort(t *testing.T) {
325
332
{
326
333
Config : `
327
334
resource "scaleway_instance_security_group" "base" {
335
+ tags = [ "test-terraform" ]
328
336
inbound_rule {
329
337
action = "accept"
330
338
ip_range = "0.0.0.0/0"
@@ -346,6 +354,7 @@ func TestAccScalewayInstanceSecurityGroup_RemovePort(t *testing.T) {
346
354
{
347
355
Config : `
348
356
resource "scaleway_instance_security_group" "base" {
357
+ tags = [ "test-terraform" ]
349
358
inbound_rule {
350
359
action = "accept"
351
360
ip_range = "0.0.0.0/0"
@@ -378,6 +387,7 @@ func TestAccScalewayInstanceSecurityGroup_WithPortRange(t *testing.T) {
378
387
{
379
388
Config : `
380
389
resource "scaleway_instance_security_group" "base" {
390
+ tags = [ "test-terraform" ]
381
391
inbound_rule {
382
392
action = "accept"
383
393
port_range = "1-1024"
@@ -392,6 +402,7 @@ func TestAccScalewayInstanceSecurityGroup_WithPortRange(t *testing.T) {
392
402
{
393
403
Config : `
394
404
resource "scaleway_instance_security_group" "base" {
405
+ tags = [ "test-terraform" ]
395
406
inbound_rule {
396
407
action = "accept"
397
408
port = "22"
@@ -406,6 +417,7 @@ func TestAccScalewayInstanceSecurityGroup_WithPortRange(t *testing.T) {
406
417
{
407
418
Config : `
408
419
resource "scaleway_instance_security_group" "base" {
420
+ tags = [ "test-terraform" ]
409
421
inbound_rule {
410
422
action = "accept"
411
423
port_range = "1-1024"
@@ -451,15 +463,6 @@ func TestAccScalewayInstanceSecurityGroup_Tags(t *testing.T) {
451
463
resource .TestCheckResourceAttr ("scaleway_instance_security_group.main" , "tags.1" , "buzz" ),
452
464
),
453
465
},
454
- {
455
- Config : `
456
- resource "scaleway_instance_security_group" "main" {
457
- }
458
- ` ,
459
- Check : resource .ComposeTestCheckFunc (
460
- resource .TestCheckNoResourceAttr ("scaleway_instance_security_group.main" , "tags" ),
461
- ),
462
- },
463
466
},
464
467
})
465
468
}
@@ -613,6 +616,7 @@ func TestAccScalewayInstanceSecurityGroup_EnableDefaultSecurity(t *testing.T) {
613
616
{
614
617
Config : `
615
618
resource "scaleway_instance_security_group" "base" {
619
+ tags = [ "test-terraform" ]
616
620
enable_default_security = false
617
621
}
618
622
` ,
@@ -623,6 +627,7 @@ func TestAccScalewayInstanceSecurityGroup_EnableDefaultSecurity(t *testing.T) {
623
627
{
624
628
Config : `
625
629
resource "scaleway_instance_security_group" "base" {
630
+ tags = [ "test-terraform" ]
626
631
enable_default_security = true
627
632
}
628
633
` ,
0 commit comments