diff --git a/.licenses.cache.json b/.licenses.cache.json
index e75ed282..cd898458 100644
--- a/.licenses.cache.json
+++ b/.licenses.cache.json
@@ -1,5 +1,6 @@
{
"SchemaVersion": 2,
+ "CreatedAt": "2023-12-17T15:51:33.281367-08:00",
"ArtifactName": ".",
"ArtifactType": "filesystem",
"Metadata": {
@@ -34,9 +35,6 @@
"ID": "github.com/Masterminds/semver/v3@v3.2.0",
"Name": "github.com/Masterminds/semver/v3",
"Version": "3.2.0",
- "Licenses": [
- "MIT"
- ],
"Indirect": true,
"Layer": {}
},
@@ -49,15 +47,15 @@
],
"Indirect": true,
"DependsOn": [
- "github.com/Masterminds/goutils@v1.1.1",
"github.com/mitchellh/copystructure@v1.0.0",
+ "github.com/shopspring/decimal@v1.2.0",
+ "github.com/spf13/cast@v1.3.1",
"golang.org/x/crypto@v0.3.0",
+ "github.com/Masterminds/goutils@v1.1.1",
"github.com/Masterminds/semver/v3@v3.2.0",
"github.com/google/uuid@v1.1.1",
"github.com/huandu/xstrings@v1.3.3",
- "github.com/imdario/mergo@v0.3.11",
- "github.com/shopspring/decimal@v1.2.0",
- "github.com/spf13/cast@v1.3.1"
+ "github.com/imdario/mergo@v0.3.11"
],
"Layer": {}
},
@@ -74,9 +72,6 @@
"ID": "github.com/google/uuid@v1.1.1",
"Name": "github.com/google/uuid",
"Version": "1.1.1",
- "Licenses": [
- "BSD-3-Clause"
- ],
"Indirect": true,
"Layer": {}
},
@@ -84,9 +79,6 @@
"ID": "github.com/huandu/xstrings@v1.3.3",
"Name": "github.com/huandu/xstrings",
"Version": "1.3.3",
- "Licenses": [
- "MIT"
- ],
"Indirect": true,
"Layer": {}
},
@@ -94,9 +86,6 @@
"ID": "github.com/imdario/mergo@v0.3.11",
"Name": "github.com/imdario/mergo",
"Version": "0.3.11",
- "Licenses": [
- "BSD-3-Clause"
- ],
"Indirect": true,
"Layer": {}
},
@@ -114,22 +103,13 @@
"ID": "github.com/mitchellh/copystructure@v1.0.0",
"Name": "github.com/mitchellh/copystructure",
"Version": "1.0.0",
- "Licenses": [
- "MIT"
- ],
"Indirect": true,
- "DependsOn": [
- "github.com/mitchellh/reflectwalk@v1.0.0"
- ],
"Layer": {}
},
{
"ID": "github.com/mitchellh/reflectwalk@v1.0.0",
"Name": "github.com/mitchellh/reflectwalk",
"Version": "1.0.0",
- "Licenses": [
- "MIT"
- ],
"Indirect": true,
"Layer": {}
},
@@ -160,9 +140,6 @@
"ID": "github.com/shopspring/decimal@v1.2.0",
"Name": "github.com/shopspring/decimal",
"Version": "1.2.0",
- "Licenses": [
- "MIT"
- ],
"Indirect": true,
"Layer": {}
},
@@ -170,9 +147,6 @@
"ID": "github.com/spf13/cast@v1.3.1",
"Name": "github.com/spf13/cast",
"Version": "1.3.1",
- "Licenses": [
- "MIT"
- ],
"Indirect": true,
"Layer": {}
},
@@ -204,9 +178,6 @@
"ID": "golang.org/x/crypto@v0.3.0",
"Name": "golang.org/x/crypto",
"Version": "0.3.0",
- "Licenses": [
- "BSD-3-Clause"
- ],
"Indirect": true,
"Layer": {}
}
@@ -228,9 +199,9 @@
"Layer": {}
},
{
- "ID": "github.com/Masterminds/semver/v3@v3.1.1",
+ "ID": "github.com/Masterminds/semver/v3@v3.2.1",
"Name": "github.com/Masterminds/semver/v3",
- "Version": "3.1.1",
+ "Version": "3.2.1",
"Licenses": [
"MIT"
],
@@ -238,25 +209,13 @@
"Layer": {}
},
{
- "ID": "github.com/Masterminds/sprig/v3@v3.2.2",
+ "ID": "github.com/Masterminds/sprig/v3@v3.2.3",
"Name": "github.com/Masterminds/sprig/v3",
- "Version": "3.2.2",
+ "Version": "3.2.3",
"Licenses": [
"MIT"
],
"Indirect": true,
- "DependsOn": [
- "github.com/spf13/cast@v1.5.0",
- "github.com/Masterminds/goutils@v1.1.1",
- "github.com/Masterminds/semver/v3@v3.1.1",
- "github.com/imdario/mergo@v0.3.15",
- "github.com/mitchellh/copystructure@v1.2.0",
- "github.com/shopspring/decimal@v1.3.1",
- "github.com/stretchr/testify@v1.8.4",
- "golang.org/x/crypto@v0.15.0",
- "github.com/google/uuid@v1.3.1",
- "github.com/huandu/xstrings@v1.3.2"
- ],
"Layer": {}
},
{
@@ -269,7 +228,7 @@
"Indirect": true,
"DependsOn": [
"github.com/cloudflare/circl@v1.3.6",
- "golang.org/x/crypto@v0.15.0"
+ "golang.org/x/crypto@v0.16.0"
],
"Layer": {}
},
@@ -333,8 +292,8 @@
],
"Indirect": true,
"DependsOn": [
- "golang.org/x/crypto@v0.15.0",
- "golang.org/x/sys@v0.14.0"
+ "golang.org/x/crypto@v0.16.0",
+ "golang.org/x/sys@v0.15.0"
],
"Layer": {}
},
@@ -359,7 +318,7 @@
"DependsOn": [
"github.com/mattn/go-colorable@v0.1.13",
"github.com/mattn/go-isatty@v0.0.20",
- "golang.org/x/sys@v0.14.0"
+ "golang.org/x/sys@v0.15.0"
],
"Layer": {}
},
@@ -372,8 +331,8 @@
],
"Indirect": true,
"DependsOn": [
- "github.com/google/go-cmp@v0.6.0",
- "google.golang.org/protobuf@v1.31.0"
+ "google.golang.org/protobuf@v1.31.0",
+ "github.com/google/go-cmp@v0.6.0"
],
"Layer": {}
},
@@ -387,9 +346,9 @@
"Layer": {}
},
{
- "ID": "github.com/google/uuid@v1.3.1",
+ "ID": "github.com/google/uuid@v1.4.0",
"Name": "github.com/google/uuid",
- "Version": "1.3.1",
+ "Version": "1.4.0",
"Licenses": [
"BSD-3-Clause"
],
@@ -406,7 +365,7 @@
"DependsOn": [
"github.com/stretchr/testify@v1.8.4",
"github.com/xo/terminfo@v0.0.0-20220910002029-abceb7e1c41e",
- "golang.org/x/sys@v0.14.0"
+ "golang.org/x/sys@v0.15.0"
],
"Layer": {}
},
@@ -418,8 +377,8 @@
"MIT"
],
"DependsOn": [
- "github.com/hexops/gotextdiff@v1.0.3",
"github.com/fatih/color@v1.16.0",
+ "github.com/hexops/gotextdiff@v1.0.3",
"github.com/stretchr/testify@v1.8.4"
],
"Layer": {}
@@ -467,9 +426,9 @@
],
"Indirect": true,
"DependsOn": [
+ "github.com/google/go-cmp@v0.6.0",
"github.com/vmihailenco/msgpack@v4.0.4+incompatible",
- "golang.org/x/text@v0.14.0",
- "github.com/google/go-cmp@v0.6.0"
+ "golang.org/x/text@v0.14.0"
],
"Layer": {}
},
@@ -482,10 +441,10 @@
],
"Indirect": true,
"DependsOn": [
- "github.com/fatih/color@v1.16.0",
- "github.com/mattn/go-colorable@v0.1.13",
"github.com/mattn/go-isatty@v0.0.20",
- "github.com/stretchr/testify@v1.8.4"
+ "github.com/stretchr/testify@v1.8.4",
+ "github.com/fatih/color@v1.16.0",
+ "github.com/mattn/go-colorable@v0.1.13"
],
"Layer": {}
},
@@ -511,13 +470,13 @@
],
"Indirect": true,
"DependsOn": [
- "github.com/mitchellh/go-testing-interface@v1.14.1",
- "google.golang.org/grpc@v1.59.0",
"google.golang.org/protobuf@v1.31.0",
- "github.com/hashicorp/go-hclog@v1.5.0",
- "github.com/oklog/run@v1.1.0",
"github.com/golang/protobuf@v1.5.3",
- "github.com/hashicorp/yamux@v0.1.1"
+ "github.com/hashicorp/yamux@v0.1.1",
+ "github.com/mitchellh/go-testing-interface@v1.14.1",
+ "google.golang.org/grpc@v1.60.0",
+ "github.com/hashicorp/go-hclog@v1.5.0",
+ "github.com/oklog/run@v1.1.0"
],
"Layer": {}
},
@@ -542,23 +501,23 @@
"Layer": {}
},
{
- "ID": "github.com/hashicorp/hc-install@v0.6.1",
+ "ID": "github.com/hashicorp/hc-install@v0.6.2",
"Name": "github.com/hashicorp/hc-install",
- "Version": "0.6.1",
+ "Version": "0.6.2",
"Licenses": [
"MPL-2.0"
],
"Indirect": true,
"DependsOn": [
"github.com/hashicorp/go-cleanhttp@v0.5.2",
- "github.com/hashicorp/go-multierror@v1.1.1",
- "github.com/google/go-cmp@v0.6.0",
+ "github.com/hashicorp/logutils@v1.0.0",
+ "golang.org/x/mod@v0.14.0",
"github.com/mitchellh/cli@v1.1.5",
+ "github.com/hashicorp/go-version@v1.6.0",
"github.com/ProtonMail/go-crypto@v0.0.0-20230923063757-afb1ddc0824c",
- "github.com/hashicorp/logutils@v1.0.0",
+ "github.com/google/go-cmp@v0.6.0",
"github.com/hashicorp/go-checkpoint@v0.5.0",
- "github.com/hashicorp/go-version@v1.6.0",
- "golang.org/x/mod@v0.14.0"
+ "github.com/hashicorp/go-multierror@v1.1.1"
],
"Layer": {}
},
@@ -571,14 +530,14 @@
],
"Indirect": true,
"DependsOn": [
+ "github.com/apparentlymart/go-textseg/v15@v15.0.0",
+ "github.com/google/go-cmp@v0.6.0",
+ "github.com/spf13/pflag@v1.0.5",
+ "github.com/agext/levenshtein@v1.2.3",
+ "golang.org/x/crypto@v0.16.0",
"github.com/davecgh/go-spew@v1.1.1",
"github.com/mitchellh/go-wordwrap@v1.0.1",
- "github.com/agext/levenshtein@v1.2.3",
- "github.com/spf13/pflag@v1.0.5",
- "github.com/google/go-cmp@v0.6.0",
- "github.com/zclconf/go-cty@v1.14.1",
- "golang.org/x/crypto@v0.15.0",
- "github.com/apparentlymart/go-textseg/v15@v15.0.0"
+ "github.com/zclconf/go-cty@v1.14.1"
],
"Layer": {}
},
@@ -601,11 +560,11 @@
],
"Indirect": true,
"DependsOn": [
- "github.com/hashicorp/hc-install@v0.6.1",
"github.com/google/go-cmp@v0.6.0",
"github.com/hashicorp/go-version@v1.6.0",
- "github.com/hashicorp/terraform-json@v0.18.0",
- "github.com/zclconf/go-cty@v1.14.1"
+ "github.com/hashicorp/hc-install@v0.6.2",
+ "github.com/zclconf/go-cty@v1.14.1",
+ "github.com/hashicorp/terraform-json@v0.18.0"
],
"Layer": {}
},
@@ -619,8 +578,8 @@
"Indirect": true,
"DependsOn": [
"github.com/davecgh/go-spew@v1.1.1",
- "github.com/google/go-cmp@v0.6.0",
"github.com/hashicorp/go-version@v1.6.0",
+ "github.com/google/go-cmp@v0.6.0",
"github.com/mitchellh/copystructure@v1.2.0",
"github.com/zclconf/go-cty@v1.14.1"
],
@@ -634,17 +593,17 @@
"MPL-2.0"
],
"DependsOn": [
- "github.com/hashicorp/go-version@v1.6.0",
- "github.com/hashicorp/hc-install@v0.6.1",
- "github.com/google/go-cmp@v0.6.0",
- "github.com/russross/blackfriday@v1.6.0",
- "golang.org/x/exp@v0.0.0-20230626212559-97b1e661b5df",
+ "github.com/zclconf/go-cty@v1.14.1",
"github.com/mattn/go-colorable@v0.1.13",
+ "golang.org/x/text@v0.14.0",
+ "github.com/hashicorp/hc-install@v0.6.2",
"github.com/hashicorp/terraform-exec@v0.19.0",
"github.com/mitchellh/cli@v1.1.5",
+ "golang.org/x/exp@v0.0.0-20231206192017-f3f8817b8deb",
+ "github.com/google/go-cmp@v0.6.0",
"github.com/hashicorp/terraform-json@v0.18.0",
- "golang.org/x/text@v0.14.0",
- "github.com/zclconf/go-cty@v1.14.1"
+ "github.com/hashicorp/go-version@v1.6.0",
+ "github.com/russross/blackfriday@v1.6.0"
],
"Layer": {}
},
@@ -656,8 +615,8 @@
"MPL-2.0"
],
"DependsOn": [
- "github.com/hashicorp/terraform-plugin-go@v0.19.1",
"github.com/google/go-cmp@v0.6.0",
+ "github.com/hashicorp/terraform-plugin-go@v0.20.0",
"github.com/hashicorp/terraform-plugin-log@v0.9.0"
],
"Layer": {}
@@ -670,30 +629,30 @@
"MPL-2.0"
],
"DependsOn": [
- "github.com/google/go-cmp@v0.6.0",
"github.com/hashicorp/terraform-plugin-framework@v1.4.2",
- "github.com/hashicorp/terraform-plugin-go@v0.19.1"
+ "github.com/google/go-cmp@v0.6.0",
+ "github.com/hashicorp/terraform-plugin-go@v0.20.0"
],
"Layer": {}
},
{
- "ID": "github.com/hashicorp/terraform-plugin-go@v0.19.1",
+ "ID": "github.com/hashicorp/terraform-plugin-go@v0.20.0",
"Name": "github.com/hashicorp/terraform-plugin-go",
- "Version": "0.19.1",
+ "Version": "0.20.0",
"Licenses": [
"MPL-2.0"
],
"DependsOn": [
- "github.com/hashicorp/go-uuid@v1.0.3",
- "google.golang.org/protobuf@v1.31.0",
- "github.com/google/go-cmp@v0.6.0",
- "github.com/hashicorp/go-hclog@v1.5.0",
"github.com/hashicorp/go-plugin@v1.6.0",
"github.com/hashicorp/terraform-registry-address@v0.2.3",
+ "github.com/mitchellh/go-testing-interface@v1.14.1",
"github.com/vmihailenco/msgpack/v5@v5.4.1",
- "google.golang.org/grpc@v1.59.0",
- "github.com/hashicorp/terraform-plugin-log@v0.9.0",
- "github.com/mitchellh/go-testing-interface@v1.14.1"
+ "google.golang.org/protobuf@v1.31.0",
+ "github.com/google/go-cmp@v0.6.0",
+ "github.com/hashicorp/go-hclog@v1.5.0",
+ "google.golang.org/grpc@v1.60.0",
+ "github.com/hashicorp/go-uuid@v1.0.3",
+ "github.com/hashicorp/terraform-plugin-log@v0.9.0"
],
"Layer": {}
},
@@ -705,39 +664,39 @@
"MPL-2.0"
],
"DependsOn": [
- "github.com/mitchellh/go-testing-interface@v1.14.1",
"github.com/google/go-cmp@v0.6.0",
- "github.com/hashicorp/go-hclog@v1.5.0"
+ "github.com/hashicorp/go-hclog@v1.5.0",
+ "github.com/mitchellh/go-testing-interface@v1.14.1"
],
"Layer": {}
},
{
- "ID": "github.com/hashicorp/terraform-plugin-sdk/v2@v2.30.0",
+ "ID": "github.com/hashicorp/terraform-plugin-sdk/v2@v2.31.0",
"Name": "github.com/hashicorp/terraform-plugin-sdk/v2",
- "Version": "2.30.0",
+ "Version": "2.31.0",
"Licenses": [
"MPL-2.0"
],
"DependsOn": [
"github.com/hashicorp/go-hclog@v1.5.0",
- "github.com/hashicorp/hcl/v2@v2.19.1",
- "github.com/hashicorp/logutils@v1.0.0",
- "github.com/hashicorp/go-uuid@v1.0.3",
- "github.com/mitchellh/go-testing-interface@v1.14.1",
- "github.com/hashicorp/terraform-plugin-go@v0.19.1",
+ "github.com/hashicorp/go-version@v1.6.0",
+ "github.com/hashicorp/terraform-json@v0.18.0",
"github.com/hashicorp/terraform-plugin-log@v0.9.0",
- "github.com/zclconf/go-cty@v1.14.1",
- "github.com/google/go-cmp@v0.6.0",
- "github.com/hashicorp/go-plugin@v1.6.0",
- "github.com/mitchellh/mapstructure@v1.5.0",
- "github.com/hashicorp/hc-install@v0.6.1",
"github.com/hashicorp/terraform-exec@v0.19.0",
"github.com/mitchellh/copystructure@v1.2.0",
"github.com/mitchellh/reflectwalk@v1.0.2",
- "golang.org/x/crypto@v0.15.0",
+ "github.com/mitchellh/go-testing-interface@v1.14.1",
+ "github.com/hashicorp/hcl/v2@v2.19.1",
+ "github.com/zclconf/go-cty@v1.14.1",
+ "github.com/hashicorp/go-plugin@v1.6.0",
+ "github.com/hashicorp/hc-install@v0.6.2",
+ "github.com/hashicorp/terraform-plugin-go@v0.20.0",
+ "github.com/mitchellh/mapstructure@v1.5.0",
+ "golang.org/x/crypto@v0.16.0",
+ "github.com/hashicorp/logutils@v1.0.0",
+ "github.com/google/go-cmp@v0.6.0",
"github.com/hashicorp/go-cty@v1.4.1-0.20200414143053-d3edf31b6320",
- "github.com/hashicorp/go-version@v1.6.0",
- "github.com/hashicorp/terraform-json@v0.18.0"
+ "github.com/hashicorp/go-uuid@v1.0.3"
],
"Layer": {}
},
@@ -750,9 +709,9 @@
],
"Indirect": true,
"DependsOn": [
- "golang.org/x/net@v0.18.0",
"github.com/google/go-cmp@v0.6.0",
- "github.com/hashicorp/terraform-svchost@v0.1.1"
+ "github.com/hashicorp/terraform-svchost@v0.1.1",
+ "golang.org/x/net@v0.18.0"
],
"Layer": {}
},
@@ -765,10 +724,10 @@
],
"Indirect": true,
"DependsOn": [
- "github.com/hashicorp/go-cleanhttp@v0.5.2",
"github.com/google/go-cmp@v0.6.0",
"github.com/hashicorp/go-version@v1.6.0",
"github.com/zclconf/go-cty@v1.14.1",
+ "github.com/hashicorp/go-cleanhttp@v0.5.2",
"golang.org/x/net@v0.18.0"
],
"Layer": {}
@@ -794,9 +753,9 @@
"Layer": {}
},
{
- "ID": "github.com/huandu/xstrings@v1.3.2",
+ "ID": "github.com/huandu/xstrings@v1.4.0",
"Name": "github.com/huandu/xstrings",
- "Version": "1.3.2",
+ "Version": "1.4.0",
"Licenses": [
"MIT"
],
@@ -804,9 +763,9 @@
"Layer": {}
},
{
- "ID": "github.com/imdario/mergo@v0.3.15",
+ "ID": "github.com/imdario/mergo@v0.3.16",
"Name": "github.com/imdario/mergo",
- "Version": "0.3.15",
+ "Version": "0.3.16",
"Licenses": [
"BSD-3-Clause"
],
@@ -857,7 +816,7 @@
],
"Indirect": true,
"DependsOn": [
- "golang.org/x/sys@v0.14.0"
+ "golang.org/x/sys@v0.15.0"
],
"Layer": {}
},
@@ -870,12 +829,12 @@
],
"Indirect": true,
"DependsOn": [
- "github.com/fatih/color@v1.16.0",
"github.com/mattn/go-isatty@v0.0.20",
"github.com/posener/complete@v1.2.3",
- "github.com/Masterminds/sprig/v3@v3.2.2",
+ "github.com/Masterminds/sprig/v3@v3.2.3",
"github.com/armon/go-radix@v1.0.0",
- "github.com/bgentry/speakeasy@v0.1.0"
+ "github.com/bgentry/speakeasy@v0.1.0",
+ "github.com/fatih/color@v1.16.0"
],
"Layer": {}
},
@@ -1024,9 +983,9 @@
"Layer": {}
},
{
- "ID": "github.com/spf13/cast@v1.5.0",
+ "ID": "github.com/spf13/cast@v1.6.0",
"Name": "github.com/spf13/cast",
- "Version": "1.5.0",
+ "Version": "1.6.0",
"Licenses": [
"MIT"
],
@@ -1041,9 +1000,9 @@
"Apache-2.0"
],
"DependsOn": [
+ "gopkg.in/yaml.v3@v3.0.1",
"github.com/inconshreveable/mousetrap@v1.1.0",
- "github.com/spf13/pflag@v1.0.5",
- "gopkg.in/yaml.v3@v3.0.1"
+ "github.com/spf13/pflag@v1.0.5"
],
"Layer": {}
},
@@ -1065,9 +1024,9 @@
"MIT"
],
"DependsOn": [
- "github.com/davecgh/go-spew@v1.1.1",
"github.com/pmezard/go-difflib@v1.0.0",
- "gopkg.in/yaml.v3@v3.0.1"
+ "gopkg.in/yaml.v3@v3.0.1",
+ "github.com/davecgh/go-spew@v1.1.1"
],
"Layer": {}
},
@@ -1114,7 +1073,7 @@
],
"Indirect": true,
"DependsOn": [
- "golang.org/x/exp@v0.0.0-20230626212559-97b1e661b5df"
+ "golang.org/x/exp@v0.0.0-20231206192017-f3f8817b8deb"
],
"Layer": {}
},
@@ -1127,31 +1086,31 @@
],
"Indirect": true,
"DependsOn": [
+ "golang.org/x/text@v0.14.0",
"github.com/apparentlymart/go-textseg/v15@v15.0.0",
"github.com/google/go-cmp@v0.6.0",
- "github.com/vmihailenco/msgpack/v5@v5.4.1",
- "golang.org/x/text@v0.14.0"
+ "github.com/vmihailenco/msgpack/v5@v5.4.1"
],
"Layer": {}
},
{
- "ID": "golang.org/x/crypto@v0.15.0",
+ "ID": "golang.org/x/crypto@v0.16.0",
"Name": "golang.org/x/crypto",
- "Version": "0.15.0",
+ "Version": "0.16.0",
"Licenses": [
"BSD-3-Clause"
],
"Indirect": true,
"DependsOn": [
- "golang.org/x/sys@v0.14.0",
- "golang.org/x/net@v0.18.0"
+ "golang.org/x/net@v0.18.0",
+ "golang.org/x/sys@v0.15.0"
],
"Layer": {}
},
{
- "ID": "golang.org/x/exp@v0.0.0-20230626212559-97b1e661b5df",
+ "ID": "golang.org/x/exp@v0.0.0-20231206192017-f3f8817b8deb",
"Name": "golang.org/x/exp",
- "Version": "0.0.0-20230626212559-97b1e661b5df",
+ "Version": "0.0.0-20231206192017-f3f8817b8deb",
"Licenses": [
"BSD-3-Clause"
],
@@ -1181,16 +1140,16 @@
],
"Indirect": true,
"DependsOn": [
- "golang.org/x/text@v0.14.0",
- "golang.org/x/crypto@v0.15.0",
- "golang.org/x/sys@v0.14.0"
+ "golang.org/x/crypto@v0.16.0",
+ "golang.org/x/sys@v0.15.0",
+ "golang.org/x/text@v0.14.0"
],
"Layer": {}
},
{
- "ID": "golang.org/x/sys@v0.14.0",
+ "ID": "golang.org/x/sys@v0.15.0",
"Name": "golang.org/x/sys",
- "Version": "0.14.0",
+ "Version": "0.15.0",
"Licenses": [
"BSD-3-Clause"
],
@@ -1216,9 +1175,9 @@
],
"Indirect": true,
"DependsOn": [
- "github.com/golang/protobuf@v1.5.3",
"golang.org/x/text@v0.14.0",
- "google.golang.org/protobuf@v1.31.0"
+ "google.golang.org/protobuf@v1.31.0",
+ "github.com/golang/protobuf@v1.5.3"
],
"Layer": {}
},
@@ -1236,21 +1195,21 @@
"Layer": {}
},
{
- "ID": "google.golang.org/grpc@v1.59.0",
+ "ID": "google.golang.org/grpc@v1.60.0",
"Name": "google.golang.org/grpc",
- "Version": "1.59.0",
+ "Version": "1.60.0",
"Licenses": [
"Apache-2.0"
],
"Indirect": true,
"DependsOn": [
- "google.golang.org/protobuf@v1.31.0",
- "golang.org/x/sys@v0.14.0",
- "github.com/google/uuid@v1.3.1",
"github.com/google/go-cmp@v0.6.0",
+ "golang.org/x/sys@v0.15.0",
+ "google.golang.org/genproto/googleapis/rpc@v0.0.0-20231120223509-83a465c0220f",
+ "google.golang.org/protobuf@v1.31.0",
"github.com/golang/protobuf@v1.5.3",
- "golang.org/x/net@v0.18.0",
- "google.golang.org/genproto/googleapis/rpc@v0.0.0-20231120223509-83a465c0220f"
+ "github.com/google/uuid@v1.4.0",
+ "golang.org/x/net@v0.18.0"
],
"Layer": {}
},
diff --git a/acc-coverage.png b/acc-coverage.png
index 9283b904..36070b86 100644
Binary files a/acc-coverage.png and b/acc-coverage.png differ
diff --git a/acc-coverage.svg b/acc-coverage.svg
index b0cc6cdc..5f92363b 100644
--- a/acc-coverage.svg
+++ b/acc-coverage.svg
@@ -1,190 +1,203 @@
-
\ No newline at end of file
+
diff --git a/bats/homedir_expand.bats.sh b/bats/homedir_expand.bats.sh
new file mode 100644
index 00000000..1c491762
--- /dev/null
+++ b/bats/homedir_expand.bats.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/env bats
+# https://bats-core.readthedocs.io/en/stable/writing-tests.html
+
+@test "corefunc_homedir_expand: attrs" {
+ run bash -c "tfschema data show -format=json corefunc_homedir_expand | jq -Mrc '.attributes[]'"
+
+ [ "$status" -eq 0 ]
+ [[ ${lines[0]} == '{"name":"id","type":"number","required":false,"optional":false,"computed":true,"sensitive":false}' ]]
+ [[ ${lines[1]} == '{"name":"path","type":"string","required":true,"optional":false,"computed":false,"sensitive":false}' ]]
+ [[ ${lines[2]} == '{"name":"value","type":"string","required":false,"optional":false,"computed":true,"sensitive":false}' ]]
+}
diff --git a/bats/tfschema_listing.bats.sh b/bats/tfschema_listing.bats.sh
index 5cfe43c1..8d5e1e20 100644
--- a/bats/tfschema_listing.bats.sh
+++ b/bats/tfschema_listing.bats.sh
@@ -6,14 +6,15 @@
[ "$status" -eq 0 ]
[[ ${lines[0]} == "corefunc_env_ensure" ]]
- [[ ${lines[1]} == "corefunc_homedir_get" ]]
- [[ ${lines[2]} == "corefunc_int_leftpad" ]]
- [[ ${lines[3]} == "corefunc_str_camel" ]]
- [[ ${lines[4]} == "corefunc_str_constant" ]]
- [[ ${lines[5]} == "corefunc_str_iterative_replace" ]]
- [[ ${lines[6]} == "corefunc_str_kebab" ]]
- [[ ${lines[7]} == "corefunc_str_leftpad" ]]
- [[ ${lines[8]} == "corefunc_str_pascal" ]]
- [[ ${lines[9]} == "corefunc_str_snake" ]]
- [[ ${lines[10]} == "corefunc_str_truncate_label" ]]
+ [[ ${lines[1]} == "corefunc_homedir_expand" ]]
+ [[ ${lines[2]} == "corefunc_homedir_get" ]]
+ [[ ${lines[3]} == "corefunc_int_leftpad" ]]
+ [[ ${lines[4]} == "corefunc_str_camel" ]]
+ [[ ${lines[5]} == "corefunc_str_constant" ]]
+ [[ ${lines[6]} == "corefunc_str_iterative_replace" ]]
+ [[ ${lines[7]} == "corefunc_str_kebab" ]]
+ [[ ${lines[8]} == "corefunc_str_leftpad" ]]
+ [[ ${lines[9]} == "corefunc_str_pascal" ]]
+ [[ ${lines[10]} == "corefunc_str_snake" ]]
+ [[ ${lines[11]} == "corefunc_str_truncate_label" ]]
}
diff --git a/corefuncprovider/homedir_expand_data_source.go b/corefuncprovider/homedir_expand_data_source.go
new file mode 100644
index 00000000..3fc68d61
--- /dev/null
+++ b/corefuncprovider/homedir_expand_data_source.go
@@ -0,0 +1,172 @@
+// Copyright 2023, Ryan Parman
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package corefuncprovider // lint:no_dupe
+
+import (
+ "context"
+ "fmt"
+ "strings"
+
+ "github.com/hashicorp/terraform-plugin-framework/datasource"
+ "github.com/hashicorp/terraform-plugin-framework/datasource/schema"
+ "github.com/hashicorp/terraform-plugin-framework/resource"
+ "github.com/hashicorp/terraform-plugin-framework/types"
+ "github.com/hashicorp/terraform-plugin-log/tflog"
+ "github.com/lithammer/dedent"
+ "github.com/northwood-labs/terraform-provider-corefunc/corefunc"
+)
+
+// Ensure the implementation satisfies the expected interfaces.
+var (
+ _ datasource.DataSource = &homedirExpandDataSource{}
+ _ datasource.DataSourceWithConfigure = &homedirExpandDataSource{}
+)
+
+// homedirExpandDataSource is the data source implementation.
+type (
+ homedirExpandDataSource struct{}
+
+ // homedirExpandDataSourceModel maps the data source schema data.
+ homedirExpandDataSourceModel struct {
+ Path types.String `tfsdk:"path"`
+ Value types.String `tfsdk:"value"`
+ ID types.Int64 `tfsdk:"id"`
+ }
+)
+
+// HomedirExpandDataSource is a method that exposes its paired Go function as a
+// Terraform Data Source.
+func HomedirExpandDataSource() datasource.DataSource { // lint:allow_return_interface
+ return &homedirExpandDataSource{}
+}
+
+// Metadata returns the data source type name.
+func (d *homedirExpandDataSource) Metadata(
+ ctx context.Context,
+ req datasource.MetadataRequest,
+ resp *datasource.MetadataResponse,
+) {
+ tflog.Info(ctx, "Starting HomedirExpand DataSource Metadata method.")
+
+ resp.TypeName = req.ProviderTypeName + "_homedir_expand"
+
+ tflog.Debug(ctx, fmt.Sprintf("req.ProviderTypeName = %s", req.ProviderTypeName))
+ tflog.Debug(ctx, fmt.Sprintf("resp.TypeName = %s", resp.TypeName))
+
+ tflog.Info(ctx, "Ending HomedirExpand DataSource Metadata method.")
+}
+
+// Schema defines the schema for the data source.
+func (d *homedirExpandDataSource) Schema(
+ ctx context.Context,
+ _ datasource.SchemaRequest,
+ resp *datasource.SchemaResponse,
+) {
+ tflog.Info(ctx, "Starting HomedirExpand DataSource Schema method.")
+
+ resp.Schema = schema.Schema{
+ MarkdownDescription: strings.TrimSpace(dedent.Dedent(`
+ Replaces the ~ character in a path with the current user's home directory.
+
+ Maps to the ` + linkPackage("Homedir") + ` Go method, which can be used in ` + Terratest + `.
+ `)),
+ Attributes: map[string]schema.Attribute{
+ "id": schema.Int64Attribute{
+ Description: "Not used. Required by the " + TPF + ".",
+ Computed: true,
+ },
+ "path": schema.StringAttribute{
+ Description: "The path to expand.",
+ Required: true,
+ },
+ "value": schema.StringAttribute{
+ Description: "The path with the home directory expanded.",
+ Computed: true,
+ },
+ },
+ }
+
+ tflog.Info(ctx, "Ending HomedirExpand DataSource Schema method.")
+}
+
+// Configure adds the provider configured client to the data source.
+func (d *homedirExpandDataSource) Configure(
+ ctx context.Context,
+ req datasource.ConfigureRequest,
+ _ *datasource.ConfigureResponse,
+) {
+ tflog.Info(ctx, "Starting HomedirExpand DataSource Configure method.")
+
+ if req.ProviderData == nil {
+ return
+ }
+
+ tflog.Info(ctx, "Ending HomedirExpand DataSource Configure method.")
+}
+
+func (d *homedirExpandDataSource) Create(
+ ctx context.Context,
+ req resource.CreateRequest, // lint:allow_large_memory
+ resp *resource.CreateResponse,
+) {
+ tflog.Info(ctx, "Starting HomedirExpand DataSource Create method.")
+
+ var plan homedirExpandDataSourceModel
+
+ diags := req.Plan.Get(ctx, &plan)
+ resp.Diagnostics.Append(diags...)
+
+ if resp.Diagnostics.HasError() {
+ return
+ }
+
+ tflog.Info(ctx, "Ending HomedirExpand DataSource Create method.")
+}
+
+// Read refreshes the Terraform state with the latest data.
+func (d *homedirExpandDataSource) Read( // lint:no_dupe
+ ctx context.Context,
+ _ datasource.ReadRequest, // lint:allow_large_memory
+ resp *datasource.ReadResponse,
+) {
+ tflog.Info(ctx, "Starting HomedirExpand DataSource Read method.")
+
+ var state homedirExpandDataSourceModel
+ diags := resp.State.Get(ctx, &state)
+ resp.Diagnostics.Append(diags...)
+
+ state.ID = types.Int64Value(1)
+
+ homedir, err := corefunc.HomedirExpand(state.Path.ValueString())
+ if err != nil {
+ resp.Diagnostics.AddError(
+ "Unable to resolve the path",
+ err.Error(),
+ )
+
+ return
+ }
+
+ state.Value = types.StringValue(homedir)
+
+ diags = resp.State.Set(ctx, &state)
+ resp.Diagnostics.Append(diags...)
+
+ if resp.Diagnostics.HasError() {
+ return
+ }
+
+ tflog.Info(ctx, "Ending HomedirExpand DataSource Read method.")
+}
diff --git a/corefuncprovider/homedir_expand_data_source_fixture.tftpl b/corefuncprovider/homedir_expand_data_source_fixture.tftpl
new file mode 100644
index 00000000..7d10a741
--- /dev/null
+++ b/corefuncprovider/homedir_expand_data_source_fixture.tftpl
@@ -0,0 +1,4 @@
+data "corefunc_homedir_expand" "path" {
+ path = "{{ .Input }}"
+}
+#=> {{ .Expected }}
diff --git a/corefuncprovider/homedir_expand_data_source_test.go b/corefuncprovider/homedir_expand_data_source_test.go
new file mode 100644
index 00000000..c94aa234
--- /dev/null
+++ b/corefuncprovider/homedir_expand_data_source_test.go
@@ -0,0 +1,80 @@
+// Copyright 2023, Ryan Parman
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package corefuncprovider // lint:no_dupe
+
+import (
+ "bytes"
+ "fmt"
+ "log"
+ "os"
+ "regexp"
+ "strings"
+ "testing"
+ "text/template"
+
+ "github.com/northwood-labs/terraform-provider-corefunc/testfixtures"
+
+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
+)
+
+func TestAccHomedirExpandDataSource(t *testing.T) {
+ funcName := traceFuncName()
+
+ for name, tc := range testfixtures.HomedirExpandTestTable { // lint:no_dupe
+ fmt.Printf(
+ "=== RUN %s/%s\n",
+ strings.TrimSpace(funcName),
+ strings.TrimSpace(name),
+ )
+
+ buf := &bytes.Buffer{}
+ tmpl := template.Must(
+ template.ParseFiles("homedir_expand_data_source_fixture.tftpl"),
+ )
+
+ err := tmpl.Execute(buf, tc)
+ if err != nil {
+ log.Fatalln(err)
+ }
+
+ if os.Getenv("PROVIDER_DEBUG") != "" {
+ fmt.Fprintln(os.Stderr, buf.String())
+ }
+
+ if tc.Err {
+ resource.Test(t, resource.TestCase{
+ ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
+ Steps: []resource.TestStep{
+ {
+ Config: providerConfig + buf.String(),
+ ExpectError: regexp.MustCompile(`.*`),
+ },
+ },
+ })
+ } else {
+ resource.Test(t, resource.TestCase{
+ ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
+ Steps: []resource.TestStep{
+ {
+ Config: providerConfig + buf.String(),
+ Check: resource.ComposeAggregateTestCheckFunc(
+ resource.TestCheckResourceAttr("data.corefunc_homedir_expand.path", "value", tc.Expected),
+ ),
+ },
+ },
+ })
+ }
+ }
+}
diff --git a/corefuncprovider/homedir_get_data_source.go b/corefuncprovider/homedir_get_data_source.go
index 6cc8b1f5..7e2d6df6 100644
--- a/corefuncprovider/homedir_get_data_source.go
+++ b/corefuncprovider/homedir_get_data_source.go
@@ -79,14 +79,15 @@ func (d *homedirGetDataSource) Schema(
MarkdownDescription: strings.TrimSpace(dedent.Dedent(`
Returns the path to the home directory of the current user.
- Maps to the ` + linkPackage("Homedir") + ` Go method, which can be used in ` + Terratest + `.`)),
+ Maps to the ` + linkPackage("Homedir") + ` Go method, which can be used in ` + Terratest + `.
+ `)),
Attributes: map[string]schema.Attribute{
"id": schema.Int64Attribute{
Description: "Not used. Required by the " + TPF + ".",
Computed: true,
},
"value": schema.StringAttribute{
- Description: "The value of the string.",
+ Description: "The value of the home directory.",
Computed: true,
},
},
diff --git a/corefuncprovider/homedir_get_data_source_test.go b/corefuncprovider/homedir_get_data_source_test.go
index 2088809a..4f713d4a 100644
--- a/corefuncprovider/homedir_get_data_source_test.go
+++ b/corefuncprovider/homedir_get_data_source_test.go
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package corefuncprovider
+package corefuncprovider // lint:no_dupe
import (
"bytes"
diff --git a/corefuncprovider/int_leftpad_data_source.go b/corefuncprovider/int_leftpad_data_source.go
index dcd6fa33..6c89bfcb 100644
--- a/corefuncprovider/int_leftpad_data_source.go
+++ b/corefuncprovider/int_leftpad_data_source.go
@@ -83,7 +83,8 @@ func (d *intLeftpadDataSource) Schema( // lint:no_dupe
-> If the integer is NOT in base10 (decimal), it will be converted to base10 (decimal) _before_ being padded.
- Maps to the ` + linkPackage("IntLeftPad") + ` Go method, which can be used in ` + Terratest + `.`)),
+ Maps to the ` + linkPackage("IntLeftPad") + ` Go method, which can be used in ` + Terratest + `.
+ `)),
Attributes: map[string]schema.Attribute{
"id": schema.Int64Attribute{
Description: "Not used. Required by the " + TPF + ".",
diff --git a/corefuncprovider/provider.go b/corefuncprovider/provider.go
index 68138925..8547fa31 100644
--- a/corefuncprovider/provider.go
+++ b/corefuncprovider/provider.go
@@ -103,6 +103,7 @@ func (p *coreFuncProvider) DataSources(ctx context.Context) []func() datasource.
return []func() datasource.DataSource{
EnvEnsureDataSource,
HomedirGetDataSource,
+ HomedirExpandDataSource,
IntLeftpadDataSource,
StrCamelDataSource,
StrConstantDataSource,
diff --git a/corefuncprovider/str_camel_data_source.go b/corefuncprovider/str_camel_data_source.go
index 88c29ae6..6161317d 100644
--- a/corefuncprovider/str_camel_data_source.go
+++ b/corefuncprovider/str_camel_data_source.go
@@ -84,7 +84,8 @@ func (d *strCamelDataSource) Schema(
-> Some acronyms are maintained as uppercase. See
[caps: pkg-variables](https://pkg.go.dev/github.com/chanced/caps#pkg-variables) for a complete list.
- Maps to the ` + linkPackage("StrCamel") + ` Go method, which can be used in ` + Terratest + `.`)),
+ Maps to the ` + linkPackage("StrCamel") + ` Go method, which can be used in ` + Terratest + `.
+ `)),
Attributes: map[string]schema.Attribute{
"id": schema.Int64Attribute{
Description: "Not used. Required by the " + TPF + ".",
diff --git a/corefuncprovider/str_leftpad_data_source.go b/corefuncprovider/str_leftpad_data_source.go
index 974a26a7..e08ff149 100644
--- a/corefuncprovider/str_leftpad_data_source.go
+++ b/corefuncprovider/str_leftpad_data_source.go
@@ -82,7 +82,8 @@ func (d *strLeftpadDataSource) Schema( // lint:no_dupe
MarkdownDescription: strings.TrimSpace(dedent.Dedent(`
Pads a string with additional characters on the left.
- Maps to the ` + linkPackage("StrLeftPad") + ` Go method, which can be used in ` + Terratest + `.`)),
+ Maps to the ` + linkPackage("StrLeftPad") + ` Go method, which can be used in ` + Terratest + `.
+ `)),
Attributes: map[string]schema.Attribute{
"id": schema.Int64Attribute{
Description: "Not used. Required by the " + TPF + ".",
diff --git a/docs/data-sources/homedir_expand.md b/docs/data-sources/homedir_expand.md
new file mode 100644
index 00000000..3036e8ca
--- /dev/null
+++ b/docs/data-sources/homedir_expand.md
@@ -0,0 +1,39 @@
+
+
+# corefunc_homedir_expand (Data Source)
+
+Replaces the ~ character in a path with the current user's home directory.
+
+Maps to the [`corefunc.Homedir()`](https://pkg.go.dev/github.com/northwood-labs/terraform-provider-corefunc/corefunc#Homedir) Go method, which can be used in [Terratest](https://terratest.gruntwork.io).
+
+## Example Usage
+
+```terraform
+data "corefunc_homedir_expand" "home" {
+ path = "~/.aws/"
+}
+#=> /home/username/.aws/
+#=> /Users/username/.aws/
+```
+
+
+## Schema
+
+### Required
+
+* `path` (String) The path to expand.
+
+### Read-Only
+
+* `id` (Number) Not used. Required by the [Terraform Plugin Framework](https://developer.hashicorp.com/terraform/plugin/framework).
+* `value` (String) The path with the home directory expanded.
+
+
diff --git a/docs/data-sources/homedir_get.md b/docs/data-sources/homedir_get.md
index f9dc5644..a05392b3 100644
--- a/docs/data-sources/homedir_get.md
+++ b/docs/data-sources/homedir_get.md
@@ -4,7 +4,7 @@ page_title: "corefunc_homedir_get Data Source - corefunc"
subcategory: ""
description: |-
Returns the path to the home directory of the current user.
- Maps to the [`corefunc.Homedir()`](https://pkg.go.dev/github.com/northwood-labs/terraform-provider-corefunc/corefunc#Homedir) Go method, which can be used in [Terratest](https://terratest.gruntwork.io).
+ Maps to the [`corefunc.Homedir()`](https://pkg.go.dev/github.com/northwood-labs/terraform-provider-corefunc/corefunc#Homedir) Go method, which can be used in [Terratest](https://terratest.gruntwork.io).
---
-->
@@ -27,6 +27,6 @@ data "corefunc_homedir_get" "home" {}
### Read-Only
* `id` (Number) Not used. Required by the [Terraform Plugin Framework](https://developer.hashicorp.com/terraform/plugin/framework).
-* `value` (String) The value of the string.
+* `value` (String) The value of the home directory.
diff --git a/docs/data-sources/str_camel.md b/docs/data-sources/str_camel.md
index ad25f6bb..c51a7739 100644
--- a/docs/data-sources/str_camel.md
+++ b/docs/data-sources/str_camel.md
@@ -4,10 +4,10 @@ page_title: "corefunc_str_camel Data Source - corefunc"
subcategory: ""
description: |-
Converts a string to camelCase, removing any non-alphanumeric characters.
- -> Some acronyms are maintained as uppercase. See
- caps: pkg-variables https://pkg.go.dev/github.com/chanced/caps#pkg-variables for a complete list.
- Maps to the caps.ToLowerCamel() https://pkg.go.dev/github.com/chanced/caps#ToLowerCamel
- Go method, which can be used in Terratest https://terratest.gruntwork.io.
+ -> Some acronyms are maintained as uppercase. See
+ [caps: pkg-variables](https://pkg.go.dev/github.com/chanced/caps#pkg-variables) for a complete list.
+
+ Maps to the [`corefunc.StrCamel()`](https://pkg.go.dev/github.com/northwood-labs/terraform-provider-corefunc/corefunc#StrCamel) Go method, which can be used in [Terratest](https://terratest.gruntwork.io).
---
-->
@@ -15,11 +15,9 @@ description: |-
Converts a string to `camelCase`, removing any non-alphanumeric characters.
--> Some acronyms are maintained as uppercase. See
-[caps: pkg-variables](https://pkg.go.dev/github.com/chanced/caps#pkg-variables) for a complete list.
+-> Some acronyms are maintained as uppercase. See [caps: pkg-variables](https://pkg.go.dev/github.com/chanced/caps#pkg-variables) for a complete list.
-Maps to the [`caps.ToLowerCamel()`](https://pkg.go.dev/github.com/chanced/caps#ToLowerCamel)
-Go method, which can be used in [Terratest](https://terratest.gruntwork.io).
+Maps to the [`corefunc.StrCamel()`](https://pkg.go.dev/github.com/northwood-labs/terraform-provider-corefunc/corefunc#StrCamel) Go method, which can be used in [Terratest](https://terratest.gruntwork.io).
## Example Usage
diff --git a/examples/data-sources/corefunc_homedir_expand/data-source.tf b/examples/data-sources/corefunc_homedir_expand/data-source.tf
new file mode 100644
index 00000000..c1d86f35
--- /dev/null
+++ b/examples/data-sources/corefunc_homedir_expand/data-source.tf
@@ -0,0 +1,5 @@
+data "corefunc_homedir_expand" "home" {
+ path = "~/.aws/"
+}
+#=> /home/username/.aws/
+#=> /Users/username/.aws/
diff --git a/examples/data-sources/corefunc_homedir_expand/versions.tftpl b/examples/data-sources/corefunc_homedir_expand/versions.tftpl
new file mode 100644
index 00000000..90ced86e
--- /dev/null
+++ b/examples/data-sources/corefunc_homedir_expand/versions.tftpl
@@ -0,0 +1,13 @@
+terraform {
+ required_version = "~> 1.1, < 1.6"
+
+ required_providers {
+ corefunc = {
+ source = "northwood-labs/corefunc"
+ version = "~> 1.0"
+ }
+ }
+}
+
+# There are no configuration options
+provider "corefunc" {}
diff --git a/testfixtures/homedir_expand.go b/testfixtures/homedir_expand.go
new file mode 100644
index 00000000..fc68e8ca
--- /dev/null
+++ b/testfixtures/homedir_expand.go
@@ -0,0 +1,67 @@
+// Copyright 2023, Ryan Parman
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package testfixtures // lint:no_dupe
+
+import (
+ "log"
+ "os/user"
+ "path/filepath"
+)
+
+var (
+ u = func() *user.User {
+ us, err := user.Current()
+ if err != nil {
+ log.Fatalf("err: %s", err)
+ }
+
+ return us
+ }()
+
+ // HomedirExpandTestTable is used by both the standard Go tests and also the
+ // Terraform acceptance tests.
+ //
+ HomedirExpandTestTable = map[string]struct { // lint:no_dupe
+ Input string
+ Expected string
+ Err bool
+ }{
+ "root-foo": {
+ Input: "/foo",
+ Expected: "/foo",
+ Err: false,
+ },
+ "home-foo": {
+ "~/foo",
+ filepath.Join(u.HomeDir, "foo"),
+ false,
+ },
+ "empty": {
+ "",
+ "",
+ false,
+ },
+ "home": {
+ "~",
+ u.HomeDir,
+ false,
+ },
+ "invalid": {
+ "~foo/foo",
+ "",
+ true,
+ },
+ }
+)
diff --git a/unit-coverage.svg b/unit-coverage.svg
index 3d799b2d..3b89d7b8 100644
--- a/unit-coverage.svg
+++ b/unit-coverage.svg
@@ -1,112 +1,112 @@
-
\ No newline at end of file
+