From 5f650588a02a64d54b0514b9c659169784c4e33f Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 16 May 2023 07:32:09 -0700 Subject: [PATCH 1/2] r/aws_lightsail_instance: Remove 'ipv6_address' attribute. Acceptance test output: % make testacc TESTARGS='-run=TestAccLightsailInstance_basic$$' PKG=lightsail ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/lightsail/... -v -count 1 -parallel 20 -run=TestAccLightsailInstance_basic$ -timeout 180m === RUN TestAccLightsailInstance_basic === PAUSE TestAccLightsailInstance_basic === CONT TestAccLightsailInstance_basic --- PASS: TestAccLightsailInstance_basic (98.76s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/lightsail 103.976s --- .changelog/#####.txt | 3 +++ internal/service/lightsail/instance.go | 10 ---------- internal/service/lightsail/instance_test.go | 2 +- website/docs/guides/version-5-upgrade.html.md | 5 +++++ website/docs/r/lightsail_instance.html.markdown | 1 - 5 files changed, 9 insertions(+), 12 deletions(-) create mode 100644 .changelog/#####.txt diff --git a/.changelog/#####.txt b/.changelog/#####.txt new file mode 100644 index 00000000000..c529440f63e --- /dev/null +++ b/.changelog/#####.txt @@ -0,0 +1,3 @@ +```release-note:breaking-change +resource/aws_lightsail_instance: The `ipv6_address` attribute has been removed +``` \ No newline at end of file diff --git a/internal/service/lightsail/instance.go b/internal/service/lightsail/instance.go index f53d788b576..3eb9141bf2c 100644 --- a/internal/service/lightsail/instance.go +++ b/internal/service/lightsail/instance.go @@ -129,11 +129,6 @@ func ResourceInstance() *schema.Resource { Optional: true, Default: "dualstack", }, - "ipv6_address": { - Type: schema.TypeString, - Computed: true, - Deprecated: "use `ipv6_addresses` attribute instead", - }, "ipv6_addresses": { Type: schema.TypeList, Computed: true, @@ -261,11 +256,6 @@ func resourceInstanceRead(ctx context.Context, d *schema.ResourceData, meta inte d.Set("cpu_count", out.Hardware.CpuCount) d.Set("ram_size", out.Hardware.RamSizeInGb) - // Deprecated: AWS Go SDK v1.36.25 removed Ipv6Address field - if len(out.Ipv6Addresses) > 0 { - d.Set("ipv6_address", out.Ipv6Addresses[0]) - } - d.Set("ipv6_addresses", aws.StringValueSlice(out.Ipv6Addresses)) d.Set("ip_address_type", out.IpAddressType) d.Set("is_static_ip", out.IsStaticIp) diff --git a/internal/service/lightsail/instance_test.go b/internal/service/lightsail/instance_test.go index 1297ac4cb75..4caf213e04a 100644 --- a/internal/service/lightsail/instance_test.go +++ b/internal/service/lightsail/instance_test.go @@ -50,8 +50,8 @@ func TestAccLightsailInstance_basic(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "availability_zone"), resource.TestCheckResourceAttrSet(resourceName, "blueprint_id"), resource.TestCheckResourceAttrSet(resourceName, "bundle_id"), - resource.TestMatchResourceAttr(resourceName, "ipv6_address", regexp.MustCompile(`([a-f0-9]{1,4}:){7}[a-f0-9]{1,4}`)), resource.TestCheckResourceAttr(resourceName, "ipv6_addresses.#", "1"), + resource.TestMatchResourceAttr(resourceName, "ipv6_addresses.0", regexp.MustCompile(`([a-f0-9]{1,4}:){7}[a-f0-9]{1,4}`)), resource.TestCheckResourceAttrSet(resourceName, "key_pair_name"), resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), resource.TestMatchResourceAttr(resourceName, "ram_size", regexp.MustCompile(`\d+(.\d+)?`)), diff --git a/website/docs/guides/version-5-upgrade.html.md b/website/docs/guides/version-5-upgrade.html.md index b1bdb6ac6b2..9c53079b447 100644 --- a/website/docs/guides/version-5-upgrade.html.md +++ b/website/docs/guides/version-5-upgrade.html.md @@ -36,6 +36,7 @@ Upgrade topics: - [Resource: aws_ec2_client_vpn_endpoint](#resource-aws_ec2_client_vpn_endpoint) - [Resource: aws_ec2_client_vpn_network_association](#resource-aws_ec2_client_vpn_network_association) - [Resource: aws_ecs_cluster](#resource-aws_ecs_cluster) +- [Resource: aws_lightsail_instance](#resource-aws_lightsail_instance) - [Resource: aws_msk_cluster](#resource-aws_msk_cluster) - [Resource: aws_neptune_cluster](#resource-aws_neptune_cluster) - [Resource: aws_rds_cluster](#resource-aws_rds_cluster) @@ -152,6 +153,10 @@ The `status` attribute has been removed. The `capacity_providers` and `default_capacity_provider_strategy` attributes have been removed. +## Resource: aws_lightsail_instance + +The `ipv6_address` attribute has been removed. + ## Resource: aws_msk_cluster The `broker_node_group_info.ebs_volume_size` attribute has been removed. diff --git a/website/docs/r/lightsail_instance.html.markdown b/website/docs/r/lightsail_instance.html.markdown index 146b9029c9a..c9b1ae4bdbc 100644 --- a/website/docs/r/lightsail_instance.html.markdown +++ b/website/docs/r/lightsail_instance.html.markdown @@ -150,7 +150,6 @@ In addition to all arguments above, the following attributes are exported: * `created_at` - The timestamp when the instance was created. * `cpu_count` - The number of vCPUs the instance has. * `ram_size` - The amount of RAM in GB on the instance (e.g., 1.0). -* `ipv6_address` - (**Deprecated**) The first IPv6 address of the Lightsail instance. Use `ipv6_addresses` attribute instead. * `ipv6_addresses` - List of IPv6 addresses for the Lightsail instance. * `private_ip_address` - The private IP address of the instance. * `public_ip_address` - The public IP address of the instance. From 820b13c9eaa40840fbd85b087f46cf480532afcc Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 19 May 2023 08:51:00 -0400 Subject: [PATCH 2/2] Correct CHANGELOG entry file name. --- .changelog/{#####.txt => 31489.txt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .changelog/{#####.txt => 31489.txt} (100%) diff --git a/.changelog/#####.txt b/.changelog/31489.txt similarity index 100% rename from .changelog/#####.txt rename to .changelog/31489.txt