diff --git a/.changelog/34134.txt b/.changelog/34134.txt new file mode 100644 index 00000000000..805d6b092af --- /dev/null +++ b/.changelog/34134.txt @@ -0,0 +1,3 @@ +```release-note:bug +data-source/aws_lambda_function: Add `vpc_config.ipv6_allowed_for_dual_stack` attribute, fixing `Invalid address to set: []string{"vpc_config", "0", "ipv6_allowed_for_dual_stack"}` errors +``` \ No newline at end of file diff --git a/internal/service/lambda/function_data_source.go b/internal/service/lambda/function_data_source.go index d4c8b2e1ca3..bd7e1377e1c 100644 --- a/internal/service/lambda/function_data_source.go +++ b/internal/service/lambda/function_data_source.go @@ -194,6 +194,10 @@ func DataSourceFunction() *schema.Resource { Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ + "ipv6_allowed_for_dual_stack": { + Type: schema.TypeBool, + Computed: true, + }, "security_group_ids": { Type: schema.TypeSet, Computed: true, diff --git a/internal/service/lambda/function_data_source_test.go b/internal/service/lambda/function_data_source_test.go index 849aa6dce96..8ca95dfc1f3 100644 --- a/internal/service/lambda/function_data_source_test.go +++ b/internal/service/lambda/function_data_source_test.go @@ -202,8 +202,10 @@ func TestAccLambdaFunctionDataSource_vpc(t *testing.T) { Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttrPair(dataSourceName, "arn", resourceName, "arn"), resource.TestCheckResourceAttrPair(dataSourceName, "vpc_config.#", resourceName, "vpc_config.#"), + resource.TestCheckResourceAttrPair(dataSourceName, "vpc_config.0.ipv6_allowed_for_dual_stack", resourceName, "vpc_config.0.ipv6_allowed_for_dual_stack"), resource.TestCheckResourceAttrPair(dataSourceName, "vpc_config.0.security_group_ids.#", resourceName, "vpc_config.0.security_group_ids.#"), resource.TestCheckResourceAttrPair(dataSourceName, "vpc_config.0.subnet_ids.#", resourceName, "vpc_config.0.subnet_ids.#"), + resource.TestCheckResourceAttrPair(dataSourceName, "vpc_config.0.vpc_id", resourceName, "vpc_config.0.vpc_id"), ), }, },