Skip to content

Commit

Permalink
Merge pull request #75 from yanndegat/012_fixelement
Browse files Browse the repository at this point in the history
0.12: fix element issue
  • Loading branch information
yanndegat authored Mar 18, 2019
2 parents 15d1037 + d6e8ced commit db88c8c
Showing 3 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion ovh/data_source_ovh_publiccloud_region_test.go
Original file line number Diff line number Diff line change
@@ -50,6 +50,6 @@ data "ovh_publiccloud_regions" "regions" {
data "ovh_publiccloud_region" "region_attr" {
count = 3
project_id = "${data.ovh_publiccloud_regions.regions.project_id}"
name = "${element(data.ovh_publiccloud_regions.regions.names, count.index)}"
name = "${element(sort(data.ovh_publiccloud_regions.regions.names), count.index)}"
}
`, os.Getenv("OVH_PUBLIC_CLOUD"))
10 changes: 3 additions & 7 deletions ovh/resource_ovh_publiccloud_private_network_subnet_test.go
Original file line number Diff line number Diff line change
@@ -19,12 +19,6 @@ data "ovh_publiccloud_regions" "regions" {
project_id = "${ovh_vrack_publiccloud_attachment.attach.project_id}"
}
data "ovh_publiccloud_region" "region_attr" {
count = 2
project_id = "${data.ovh_publiccloud_regions.regions.project_id}"
name = "${element(data.ovh_publiccloud_regions.regions.names, count.index)}"
}
resource "ovh_publiccloud_private_network" "network" {
project_id = "${ovh_vrack_publiccloud_attachment.attach.project_id}"
vlan_id = 0
@@ -35,7 +29,9 @@ resource "ovh_publiccloud_private_network" "network" {
resource "ovh_publiccloud_private_network_subnet" "subnet" {
project_id = "${ovh_publiccloud_private_network.network.project_id}"
network_id = "${ovh_publiccloud_private_network.network.id}"
region = "${element(data.ovh_publiccloud_regions.regions.names, 0)}"
# whatever region, for test purpose
region = "${element(sort(data.ovh_publiccloud_regions.regions.names), 0)}"
start = "192.168.168.100"
end = "192.168.168.200"
network = "192.168.168.0/24"
6 changes: 0 additions & 6 deletions ovh/resource_ovh_publiccloud_private_network_test.go
Original file line number Diff line number Diff line change
@@ -22,12 +22,6 @@ data "ovh_publiccloud_regions" "regions" {
project_id = "${ovh_vrack_publiccloud_attachment.attach.project_id}"
}
data "ovh_publiccloud_region" "region_attr" {
count = 2
project_id = "${data.ovh_publiccloud_regions.regions.project_id}"
name = "${element(data.ovh_publiccloud_regions.regions.names, count.index)}"
}
resource "ovh_publiccloud_private_network" "network" {
project_id = "${ovh_vrack_publiccloud_attachment.attach.project_id}"
vlan_id = 0

0 comments on commit db88c8c

Please sign in to comment.