Skip to content

Commit

Permalink
Merge pull request #31489 from hashicorp/remove-aws_lightsail_instanc…
Browse files Browse the repository at this point in the history
…e.ipv6_address

r/aws_lightsail_instance: Remove `ipv6_address`
  • Loading branch information
ewbankkit authored May 19, 2023
2 parents 74b1dfe + 820b13c commit 616a2cd
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .changelog/31489.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:breaking-change
resource/aws_lightsail_instance: The `ipv6_address` attribute has been removed
```
10 changes: 0 additions & 10 deletions internal/service/lightsail/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion internal/service/lightsail/instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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+)?`)),
Expand Down
5 changes: 5 additions & 0 deletions website/docs/guides/version-5-upgrade.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,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)
Expand Down Expand Up @@ -158,6 +159,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.
Expand Down
1 change: 0 additions & 1 deletion website/docs/r/lightsail_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 616a2cd

Please sign in to comment.