@@ -36,6 +36,7 @@ func TestAccScalewayDataSourceLbs_Basic(t *testing.T) {
36
36
name = "tf-lb-datasource0"
37
37
description = "a description"
38
38
type = "LB-S"
39
+ tags = [ "terraform-test", "data_scaleway_lbs", "basic" ]
39
40
}
40
41
` ,
41
42
},
@@ -52,13 +53,15 @@ func TestAccScalewayDataSourceLbs_Basic(t *testing.T) {
52
53
name = "tf-lb-datasource0"
53
54
description = "a description"
54
55
type = "LB-S"
56
+ tags = [ "terraform-test", "data_scaleway_lbs", "basic" ]
55
57
}
56
58
57
59
resource scaleway_lb lb2 {
58
60
ip_id = scaleway_lb_ip.ip2.id
59
61
name = "tf-lb-datasource1"
60
62
description = "a description"
61
63
type = "LB-S"
64
+ tags = [ "terraform-test", "data_scaleway_lbs", "basic" ]
62
65
}
63
66
` ,
64
67
},
@@ -75,20 +78,27 @@ func TestAccScalewayDataSourceLbs_Basic(t *testing.T) {
75
78
name = "tf-lb-datasource0"
76
79
description = "a description"
77
80
type = "LB-S"
81
+ tags = [ "terraform-test", "data_scaleway_lbs", "basic" ]
78
82
}
79
83
80
84
resource scaleway_lb lb2 {
81
85
ip_id = scaleway_lb_ip.ip2.id
82
86
name = "tf-lb-datasource1"
83
87
description = "a description"
84
88
type = "LB-S"
89
+ tags = [ "terraform-test", "data_scaleway_lbs", "basic" ]
85
90
}
86
91
87
92
data "scaleway_lbs" "lbs_by_name" {
88
93
name = "tf-lb-datasource"
89
94
depends_on = [scaleway_lb.lb1, scaleway_lb.lb2]
90
95
}
91
96
97
+ data "scaleway_lbs" "lbs_by_tags" {
98
+ tags = [ "terraform-test", "data_scaleway_lbs" ]
99
+ depends_on = [scaleway_lb.lb1, scaleway_lb.lb2]
100
+ }
101
+
92
102
data "scaleway_lbs" "lbs_by_name_other_zone" {
93
103
name = "tf-lb-datasource"
94
104
zone = "fr-par-2"
@@ -101,6 +111,9 @@ func TestAccScalewayDataSourceLbs_Basic(t *testing.T) {
101
111
resource .TestCheckResourceAttrSet ("data.scaleway_lbs.lbs_by_name" , "lbs.0.name" ),
102
112
resource .TestCheckResourceAttrSet ("data.scaleway_lbs.lbs_by_name" , "lbs.1.name" ),
103
113
114
+ resource .TestCheckResourceAttrSet ("data.scaleway_lbs.lbs_by_tags" , "lbs.0.id" ),
115
+ resource .TestCheckResourceAttrSet ("data.scaleway_lbs.lbs_by_tags" , "lbs.1.id" ),
116
+
104
117
resource .TestCheckNoResourceAttr ("data.scaleway_lbs.lbs_by_name_other_zone" , "lbs.0.id" ),
105
118
),
106
119
},
0 commit comments