From 53788a8981606c56f9b3a3feb41a0619ac95256b Mon Sep 17 00:00:00 2001 From: Andrew Starr-Bochicchio Date: Fri, 5 Aug 2022 14:43:22 -0400 Subject: [PATCH] testing: Use supported OS for Droplet image slug. (#855) --- ...asource_digitalocean_droplet_snapshot_test.go | 4 ++-- .../datasource_digitalocean_droplet_test.go | 14 +++++++------- .../datasource_digitalocean_droplets_test.go | 4 ++-- ...source_digitalocean_database_firewall_test.go | 2 +- ...esource_digitalocean_droplet_snapshot_test.go | 2 +- ...e_digitalocean_floating_ip_assignment_test.go | 8 ++++---- .../resource_digitalocean_floating_ip_test.go | 6 +++--- .../resource_digitalocean_loadbalancer_test.go | 16 ++++++++-------- ...source_digitalocean_project_resources_test.go | 2 +- .../resource_digitalocean_project_test.go | 2 +- ...e_digitalocean_reserved_ip_assignment_test.go | 8 ++++---- .../resource_digitalocean_reserved_ip_test.go | 6 +++--- ...source_digitalocean_volume_attachment_test.go | 6 +++--- .../resource_digitalocean_volume_test.go | 4 ++-- docs/resources/database_firewall.md | 2 +- docs/resources/droplet_snapshot.md | 2 +- docs/resources/project.md | 2 +- docs/resources/project_resources.md | 2 +- 18 files changed, 46 insertions(+), 46 deletions(-) diff --git a/digitalocean/datasource_digitalocean_droplet_snapshot_test.go b/digitalocean/datasource_digitalocean_droplet_snapshot_test.go index 9b64d1838..134e7ec1c 100644 --- a/digitalocean/datasource_digitalocean_droplet_snapshot_test.go +++ b/digitalocean/datasource_digitalocean_droplet_snapshot_test.go @@ -81,7 +81,7 @@ resource "digitalocean_droplet" "bar" { region = "lon1" name = "%s" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" } resource "digitalocean_droplet_snapshot" "bar" { @@ -148,7 +148,7 @@ const testAccCheckDataSourceDigitalOceanDropletSnapshot_basic = ` resource "digitalocean_droplet" "foo" { name = "%s" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" } diff --git a/digitalocean/datasource_digitalocean_droplet_test.go b/digitalocean/datasource_digitalocean_droplet_test.go index b587f0b21..b566303de 100644 --- a/digitalocean/datasource_digitalocean_droplet_test.go +++ b/digitalocean/datasource_digitalocean_droplet_test.go @@ -35,7 +35,7 @@ data "digitalocean_droplet" "foobar" { resource.TestCheckResourceAttr( "data.digitalocean_droplet.foobar", "name", name), resource.TestCheckResourceAttr( - "data.digitalocean_droplet.foobar", "image", "centos-7-x64"), + "data.digitalocean_droplet.foobar", "image", "ubuntu-22-04-x64"), resource.TestCheckResourceAttr( "data.digitalocean_droplet.foobar", "region", "nyc3"), resource.TestCheckResourceAttr( @@ -66,7 +66,7 @@ func TestAccDataSourceDigitalOceanDroplet_BasicById(t *testing.T) { resource.TestCheckResourceAttr( "data.digitalocean_droplet.foobar", "name", name), resource.TestCheckResourceAttr( - "data.digitalocean_droplet.foobar", "image", "centos-7-x64"), + "data.digitalocean_droplet.foobar", "image", "ubuntu-22-04-x64"), resource.TestCheckResourceAttr( "data.digitalocean_droplet.foobar", "region", "nyc3"), resource.TestCheckResourceAttr( @@ -103,7 +103,7 @@ func TestAccDataSourceDigitalOceanDroplet_BasicByTag(t *testing.T) { resource.TestCheckResourceAttr( "data.digitalocean_droplet.foobar", "name", name), resource.TestCheckResourceAttr( - "data.digitalocean_droplet.foobar", "image", "centos-7-x64"), + "data.digitalocean_droplet.foobar", "image", "ubuntu-22-04-x64"), resource.TestCheckResourceAttr( "data.digitalocean_droplet.foobar", "region", "nyc3"), resource.TestCheckResourceAttr( @@ -165,7 +165,7 @@ resource "digitalocean_vpc" "foobar" { resource "digitalocean_droplet" "foo" { name = "%s" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" ipv6 = true vpc_uuid = digitalocean_vpc.foobar.id @@ -177,7 +177,7 @@ func testAccCheckDataSourceDigitalOceanDropletConfig_basicById(name string) stri resource "digitalocean_droplet" "foo" { name = "%s" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" ipv6 = true } @@ -197,7 +197,7 @@ resource "digitalocean_tag" "foo" { resource "digitalocean_droplet" "foo" { name = "%s" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" ipv6 = true tags = [digitalocean_tag.foo.id] @@ -214,7 +214,7 @@ resource "digitalocean_tag" "foo" { resource "digitalocean_droplet" "foo" { name = "%s" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" ipv6 = true tags = [digitalocean_tag.foo.id] diff --git a/digitalocean/datasource_digitalocean_droplets_test.go b/digitalocean/datasource_digitalocean_droplets_test.go index e88d35f8f..513e881b0 100644 --- a/digitalocean/datasource_digitalocean_droplets_test.go +++ b/digitalocean/datasource_digitalocean_droplets_test.go @@ -16,14 +16,14 @@ func TestAccDataSourceDigitalOceanDroplets_Basic(t *testing.T) { resource "digitalocean_droplet" "foo" { name = "%s" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" } resource "digitalocean_droplet" "bar" { name = "%s" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" } `, name1, name2) diff --git a/digitalocean/resource_digitalocean_database_firewall_test.go b/digitalocean/resource_digitalocean_database_firewall_test.go index 3da83e0c4..8db18ade1 100644 --- a/digitalocean/resource_digitalocean_database_firewall_test.go +++ b/digitalocean/resource_digitalocean_database_firewall_test.go @@ -144,7 +144,7 @@ resource "digitalocean_database_cluster" "foobar" { resource "digitalocean_droplet" "foobar" { name = "%s" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" } diff --git a/digitalocean/resource_digitalocean_droplet_snapshot_test.go b/digitalocean/resource_digitalocean_droplet_snapshot_test.go index f7387039b..e02e2aec4 100644 --- a/digitalocean/resource_digitalocean_droplet_snapshot_test.go +++ b/digitalocean/resource_digitalocean_droplet_snapshot_test.go @@ -122,7 +122,7 @@ const testAccCheckDigitalOceanDropletSnapshotConfig_basic = ` resource "digitalocean_droplet" "foo" { name = "foo-%d" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" user_data = "foobar" } diff --git a/digitalocean/resource_digitalocean_floating_ip_assignment_test.go b/digitalocean/resource_digitalocean_floating_ip_assignment_test.go index a94227564..30e891f70 100644 --- a/digitalocean/resource_digitalocean_floating_ip_assignment_test.go +++ b/digitalocean/resource_digitalocean_floating_ip_assignment_test.go @@ -123,7 +123,7 @@ resource "digitalocean_droplet" "foobar" { count = 2 name = "tf-acc-test-${count.index}" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" ipv6 = true private_networking = true @@ -144,7 +144,7 @@ resource "digitalocean_droplet" "foobar" { count = 2 name = "tf-acc-test-${count.index}" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" ipv6 = true private_networking = true @@ -165,7 +165,7 @@ resource "digitalocean_droplet" "foobar" { count = 2 name = "tf-acc-test-${count.index}" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" ipv6 = true private_networking = true @@ -174,7 +174,7 @@ resource "digitalocean_droplet" "foobar" { var testAccCheckDigitalOceanFloatingIPAssignmentConfig_createBeforeDestroy = ` resource "digitalocean_droplet" "foobar" { - image = "centos-7-x64" + image = "ubuntu-22-04-x64" name = "tf-acc-test" region = "nyc3" size = "s-1vcpu-1gb" diff --git a/digitalocean/resource_digitalocean_floating_ip_test.go b/digitalocean/resource_digitalocean_floating_ip_test.go index 497a3724a..27ebd77f5 100644 --- a/digitalocean/resource_digitalocean_floating_ip_test.go +++ b/digitalocean/resource_digitalocean_floating_ip_test.go @@ -162,7 +162,7 @@ func testAccCheckDigitalOceanFloatingIPConfig_droplet(rInt int) string { resource "digitalocean_droplet" "foobar" { name = "tf-acc-test-%d" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" ipv6 = true private_networking = true @@ -179,7 +179,7 @@ func testAccCheckDigitalOceanFloatingIPConfig_Reassign(rInt int) string { resource "digitalocean_droplet" "baz" { name = "tf-acc-test-%d" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" ipv6 = true private_networking = true @@ -196,7 +196,7 @@ func testAccCheckDigitalOceanFloatingIPConfig_Unassign(rInt int) string { resource "digitalocean_droplet" "baz" { name = "tf-acc-test-%d" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" ipv6 = true private_networking = true diff --git a/digitalocean/resource_digitalocean_loadbalancer_test.go b/digitalocean/resource_digitalocean_loadbalancer_test.go index f3385a4e5..accfdef28 100644 --- a/digitalocean/resource_digitalocean_loadbalancer_test.go +++ b/digitalocean/resource_digitalocean_loadbalancer_test.go @@ -705,7 +705,7 @@ func testAccCheckDigitalOceanLoadbalancerConfig_basic(rInt int) string { resource "digitalocean_droplet" "foobar" { name = "foo-%d" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" } @@ -738,14 +738,14 @@ func testAccCheckDigitalOceanLoadbalancerConfig_updated(rInt int) string { resource "digitalocean_droplet" "foobar" { name = "foo-%d" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" } resource "digitalocean_droplet" "foo" { name = "foo-%d" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" } @@ -783,7 +783,7 @@ resource "digitalocean_tag" "barbaz" { resource "digitalocean_droplet" "foobar" { name = "foo-%d" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" tags = ["${digitalocean_tag.barbaz.id}"] } @@ -816,7 +816,7 @@ func testAccCheckDigitalOceanLoadbalancerConfig_minimal(rInt int) string { resource "digitalocean_droplet" "foobar" { name = "foo-%d" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" } @@ -842,7 +842,7 @@ func testAccCheckDigitalOceanLoadbalancerConfig_minimalUDP(rInt int) string { resource "digitalocean_droplet" "foobar" { name = "foo-%d" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" } @@ -868,7 +868,7 @@ func testAccCheckDigitalOceanLoadbalancerConfig_stickySessions(rInt int) string resource "digitalocean_droplet" "foobar" { name = "foo-%d" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" } @@ -990,7 +990,7 @@ resource "digitalocean_vpc" "foobar" { resource "digitalocean_droplet" "foobar" { name = "%s" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" vpc_uuid = digitalocean_vpc.foobar.id } diff --git a/digitalocean/resource_digitalocean_project_resources_test.go b/digitalocean/resource_digitalocean_project_resources_test.go index fe1891871..0a0aedcfa 100644 --- a/digitalocean/resource_digitalocean_project_resources_test.go +++ b/digitalocean/resource_digitalocean_project_resources_test.go @@ -22,7 +22,7 @@ resource "digitalocean_project" "foo" { resource "digitalocean_droplet" "foobar" { name = "%s" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" user_data = "foobar" } diff --git a/digitalocean/resource_digitalocean_project_test.go b/digitalocean/resource_digitalocean_project_test.go index 4d0ba54f3..4b74552d5 100644 --- a/digitalocean/resource_digitalocean_project_test.go +++ b/digitalocean/resource_digitalocean_project_test.go @@ -394,7 +394,7 @@ func fixtureCreateWithDropletResource(dropletName, name string) string { resource "digitalocean_droplet" "foobar" { name = "%s" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" user_data = "foobar" } diff --git a/digitalocean/resource_digitalocean_reserved_ip_assignment_test.go b/digitalocean/resource_digitalocean_reserved_ip_assignment_test.go index 08ab9fb75..54c7d2db4 100644 --- a/digitalocean/resource_digitalocean_reserved_ip_assignment_test.go +++ b/digitalocean/resource_digitalocean_reserved_ip_assignment_test.go @@ -123,7 +123,7 @@ resource "digitalocean_droplet" "foobar" { count = 2 name = "tf-acc-test-${count.index}" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" ipv6 = true private_networking = true @@ -144,7 +144,7 @@ resource "digitalocean_droplet" "foobar" { count = 2 name = "tf-acc-test-${count.index}" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" ipv6 = true private_networking = true @@ -165,7 +165,7 @@ resource "digitalocean_droplet" "foobar" { count = 2 name = "tf-acc-test-${count.index}" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" ipv6 = true private_networking = true @@ -174,7 +174,7 @@ resource "digitalocean_droplet" "foobar" { var testAccCheckDigitalOceanReservedIPAssignmentConfig_createBeforeDestroy = ` resource "digitalocean_droplet" "foobar" { - image = "centos-7-x64" + image = "ubuntu-22-04-x64" name = "tf-acc-test" region = "nyc3" size = "s-1vcpu-1gb" diff --git a/digitalocean/resource_digitalocean_reserved_ip_test.go b/digitalocean/resource_digitalocean_reserved_ip_test.go index 09f79ad32..30dcf7727 100644 --- a/digitalocean/resource_digitalocean_reserved_ip_test.go +++ b/digitalocean/resource_digitalocean_reserved_ip_test.go @@ -162,7 +162,7 @@ func testAccCheckDigitalOceanReservedIPConfig_droplet(rInt int) string { resource "digitalocean_droplet" "foobar" { name = "tf-acc-test-%d" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" ipv6 = true private_networking = true @@ -179,7 +179,7 @@ func testAccCheckDigitalOceanReservedIPConfig_Reassign(rInt int) string { resource "digitalocean_droplet" "baz" { name = "tf-acc-test-%d" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" ipv6 = true private_networking = true @@ -196,7 +196,7 @@ func testAccCheckDigitalOceanReservedIPConfig_Unassign(rInt int) string { resource "digitalocean_droplet" "baz" { name = "tf-acc-test-%d" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" ipv6 = true private_networking = true diff --git a/digitalocean/resource_digitalocean_volume_attachment_test.go b/digitalocean/resource_digitalocean_volume_attachment_test.go index 86c7732ce..5ab8d8677 100644 --- a/digitalocean/resource_digitalocean_volume_attachment_test.go +++ b/digitalocean/resource_digitalocean_volume_attachment_test.go @@ -226,7 +226,7 @@ resource "digitalocean_volume" "foobar" { resource "digitalocean_droplet" "foobar" { name = "baz-%d" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc1" } @@ -255,7 +255,7 @@ resource "digitalocean_volume" "barfoo" { resource "digitalocean_droplet" "foobar" { name = "baz-%d" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc1" } @@ -289,7 +289,7 @@ resource "digitalocean_volume" "foobar_second" { resource "digitalocean_droplet" "foobar" { name = "baz-%d" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc1" } diff --git a/digitalocean/resource_digitalocean_volume_test.go b/digitalocean/resource_digitalocean_volume_test.go index 5756e84ea..a43199fd3 100644 --- a/digitalocean/resource_digitalocean_volume_test.go +++ b/digitalocean/resource_digitalocean_volume_test.go @@ -192,7 +192,7 @@ resource "digitalocean_volume" "foobar" { resource "digitalocean_droplet" "foobar" { name = "baz-%d" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc1" ipv6 = true private_networking = true @@ -337,7 +337,7 @@ resource "digitalocean_volume" "foobar" { resource "digitalocean_droplet" "foobar" { name = "baz-%d" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc1" ipv6 = true private_networking = true diff --git a/docs/resources/database_firewall.md b/docs/resources/database_firewall.md index bde6c3e0a..db3b903c8 100644 --- a/docs/resources/database_firewall.md +++ b/docs/resources/database_firewall.md @@ -52,7 +52,7 @@ resource "digitalocean_database_firewall" "example-fw" { resource "digitalocean_droplet" "web" { name = "web-01" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" } diff --git a/docs/resources/droplet_snapshot.md b/docs/resources/droplet_snapshot.md index 1f78a5fdb..4a57222ed 100644 --- a/docs/resources/droplet_snapshot.md +++ b/docs/resources/droplet_snapshot.md @@ -12,7 +12,7 @@ Provides a resource which can be used to create a snapshot from an existing Digi resource "digitalocean_droplet" "web" { name = "web-01" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" } diff --git a/docs/resources/project.md b/docs/resources/project.md index 8cfd04795..150c184d0 100644 --- a/docs/resources/project.md +++ b/docs/resources/project.md @@ -42,7 +42,7 @@ The following example demonstrates the creation of a project with a Droplet reso resource "digitalocean_droplet" "foobar" { name = "example" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" } diff --git a/docs/resources/project_resources.md b/docs/resources/project_resources.md index 1d5a9703c..93d57550e 100644 --- a/docs/resources/project_resources.md +++ b/docs/resources/project_resources.md @@ -30,7 +30,7 @@ data "digitalocean_project" "playground" { resource "digitalocean_droplet" "foobar" { name = "example" size = "s-1vcpu-1gb" - image = "centos-7-x64" + image = "ubuntu-22-04-x64" region = "nyc3" }