diff --git a/aws/resource_aws_lightsail_instance_test.go b/aws/resource_aws_lightsail_instance_test.go index c3caf10a3a4..b3aed97fdb1 100644 --- a/aws/resource_aws_lightsail_instance_test.go +++ b/aws/resource_aws_lightsail_instance_test.go @@ -161,7 +161,7 @@ func TestAccAWSLightsailInstance_Tags(t *testing.T) { resource.TestCheckResourceAttrSet("aws_lightsail_instance.lightsail_instance_test", "blueprint_id"), resource.TestCheckResourceAttrSet("aws_lightsail_instance.lightsail_instance_test", "bundle_id"), resource.TestCheckResourceAttrSet("aws_lightsail_instance.lightsail_instance_test", "key_pair_name"), - resource.TestCheckResourceAttr("aws_lightsail_instance.lightsail_instance_test", "tags.%", "1"), + resource.TestCheckResourceAttr("aws_lightsail_instance.lightsail_instance_test", "tags.%", "2"), ), }, { @@ -172,7 +172,7 @@ func TestAccAWSLightsailInstance_Tags(t *testing.T) { resource.TestCheckResourceAttrSet("aws_lightsail_instance.lightsail_instance_test", "blueprint_id"), resource.TestCheckResourceAttrSet("aws_lightsail_instance.lightsail_instance_test", "bundle_id"), resource.TestCheckResourceAttrSet("aws_lightsail_instance.lightsail_instance_test", "key_pair_name"), - resource.TestCheckResourceAttr("aws_lightsail_instance.lightsail_instance_test", "tags.%", "2"), + resource.TestCheckResourceAttr("aws_lightsail_instance.lightsail_instance_test", "tags.%", "3"), ), }, }, @@ -331,6 +331,7 @@ resource "aws_lightsail_instance" "lightsail_instance_test" { tags = { Name = "tf-test" + KeyOnlyTag = "" } } `, lightsailName) @@ -354,8 +355,9 @@ resource "aws_lightsail_instance" "lightsail_instance_test" { bundle_id = "nano_1_0" tags = { - Name = "tf-test", - ExtraName = "tf-test" + Name = "tf-test", + KeyOnlyTag = "" + ExtraName = "tf-test" } } `, lightsailName) diff --git a/website/docs/r/lightsail_instance.html.markdown b/website/docs/r/lightsail_instance.html.markdown index 16b3cc88964..62cb4341831 100644 --- a/website/docs/r/lightsail_instance.html.markdown +++ b/website/docs/r/lightsail_instance.html.markdown @@ -43,7 +43,7 @@ instance (see list below) * `key_pair_name` - (Optional) The name of your key pair. Created in the Lightsail console (cannot use `aws_key_pair` at this time) * `user_data` - (Optional) launch script to configure server with additional user data -* `tags` - (Optional) A map of tags to assign to the resource. +* `tags` - (Optional) A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. ## Availability Zones Lightsail currently supports the following Availability Zones (e.g. `us-east-1a`):