Use registry.opentofu.org as the default registry (#379)

Signed-off-by: RLRabinowitz <rlrabinowitz2@gmail.com>
This commit is contained in:
RLRabinowitz 2023-10-03 10:49:38 +03:00 committed by GitHub
parent ffaec585ef
commit e0ecd2ebb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
344 changed files with 1750 additions and 1812 deletions

12
go.mod
View File

@ -46,7 +46,6 @@ require (
github.com/hashicorp/hcl v1.0.0
github.com/hashicorp/hcl/v2 v2.17.0
github.com/hashicorp/jsonapi v0.0.0-20210826224640-ee7dae0fb22d
github.com/hashicorp/terraform-registry-address v0.2.0
github.com/hashicorp/terraform-svchost v0.1.1
github.com/jmespath/go-jmespath v0.4.0
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
@ -65,6 +64,7 @@ require (
github.com/mitchellh/mapstructure v1.5.0
github.com/mitchellh/reflectwalk v1.0.2
github.com/nishanths/exhaustive v0.7.11
github.com/opentofu/registry-address v0.0.0-20230920144404-f1e51167f633
github.com/packer-community/winrmcp v0.0.0-20180921211025-c76d91c1e7db
github.com/pkg/browser v0.0.0-20201207095918-0426ae3fba23
github.com/pkg/errors v0.9.1
@ -84,14 +84,14 @@ require (
go.opentelemetry.io/otel v1.16.0
go.opentelemetry.io/otel/sdk v1.16.0
go.opentelemetry.io/otel/trace v1.16.0
golang.org/x/crypto v0.10.0
golang.org/x/crypto v0.13.0
golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17
golang.org/x/mod v0.10.0
golang.org/x/net v0.11.0
golang.org/x/net v0.15.0
golang.org/x/oauth2 v0.8.0
golang.org/x/sys v0.9.0
golang.org/x/term v0.9.0
golang.org/x/text v0.10.0
golang.org/x/sys v0.12.0
golang.org/x/term v0.12.0
golang.org/x/text v0.13.0
golang.org/x/tools v0.6.0
google.golang.org/api v0.114.0
google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc

24
go.sum
View File

@ -656,8 +656,6 @@ github.com/hashicorp/memberlist v0.3.0 h1:8+567mCcFDnS5ADl7lrpxPMWiFCElyUEeW0gtj
github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=
github.com/hashicorp/serf v0.9.6 h1:uuEX1kLR6aoda1TBttmJQKDLZE1Ob7KN0NPdE7EtCDc=
github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4=
github.com/hashicorp/terraform-registry-address v0.2.0 h1:92LUg03NhfgZv44zpNTLBGIbiyTokQCDcdH5BhVHT3s=
github.com/hashicorp/terraform-registry-address v0.2.0/go.mod h1:478wuzJPzdmqT6OGbB/iH82EDcI8VFM4yujknh/1nIs=
github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ=
github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc=
github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoIospckxBxk6Q=
@ -853,6 +851,8 @@ github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGV
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/opentofu/registry-address v0.0.0-20230920144404-f1e51167f633 h1:81TBkM/XGIFlVvyabp0CJl00UHeVUiQjz0fddLMi848=
github.com/opentofu/registry-address v0.0.0-20230920144404-f1e51167f633/go.mod h1:HzQhpVo/NJnGmN+7FPECCVCA5ijU7AUcvf39enBKYOc=
github.com/packer-community/winrmcp v0.0.0-20180921211025-c76d91c1e7db h1:9uViuKtx1jrlXLBW/pMnhOfzn3iSEdLase/But/IZRU=
github.com/packer-community/winrmcp v0.0.0-20180921211025-c76d91c1e7db/go.mod h1:f6Izs6JvFTdnRbziASagjZ2vmf55NSIkC/weStxCHqk=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
@ -1051,8 +1051,8 @@ golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM=
golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I=
golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck=
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@ -1161,8 +1161,8 @@ golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU=
golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ=
golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8=
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@ -1307,8 +1307,8 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s=
golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY=
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
@ -1317,8 +1317,8 @@ golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
golang.org/x/term v0.9.0 h1:GRRCnKYhdQrD8kfRAdQ6Zcw1P0OcELxGLKJvtjVMZ28=
golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo=
golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU=
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@ -1332,8 +1332,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58=
golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=

View File

@ -4,7 +4,7 @@
package addrs
import (
tfaddr "github.com/hashicorp/terraform-registry-address"
tfaddr "github.com/opentofu/registry-address"
)
// A ModulePackage represents a physical location where OpenTofu can retrieve

View File

@ -8,8 +8,8 @@ import (
"path"
"strings"
tfaddr "github.com/hashicorp/terraform-registry-address"
"github.com/opentofu/opentofu/internal/getmodules"
tfaddr "github.com/opentofu/registry-address"
)
// ModuleSource is the general type for all three of the possible module source

View File

@ -63,7 +63,7 @@ func TestParseModuleSource(t *testing.T) {
input: "hashicorp/subnets/cidr",
want: ModuleSourceRegistry{
Package: ModuleRegistryPackage{
Host: svchost.Hostname("registry.terraform.io"),
Host: svchost.Hostname("registry.opentofu.org"),
Namespace: "hashicorp",
Name: "subnets",
TargetSystem: "cidr",
@ -75,7 +75,7 @@ func TestParseModuleSource(t *testing.T) {
input: "hashicorp/subnets/cidr//examples/foo",
want: ModuleSourceRegistry{
Package: ModuleRegistryPackage{
Host: svchost.Hostname("registry.terraform.io"),
Host: svchost.Hostname("registry.opentofu.org"),
Namespace: "hashicorp",
Name: "subnets",
TargetSystem: "cidr",
@ -481,7 +481,7 @@ func TestParseModuleSourceRegistry(t *testing.T) {
// the user provided in the input, and so for backward compatibility
// we're continuing to do that here, at the expense of now making the
// "ForDisplay" output case-preserving where its predecessor in the
// old package wasn't. The main OpenTofu Registry at registry.terraform.io
// old package wasn't. The main OpenTofu Registry at registry.opentofu.org
// is itself case-insensitive anyway, so our case-preserving here is
// entirely for the benefit of existing third-party registry
// implementations that might be case-sensitive, which we must remain
@ -496,25 +496,25 @@ func TestParseModuleSourceRegistry(t *testing.T) {
}{
"public registry": {
input: `hashicorp/consul/aws`,
wantString: `registry.terraform.io/hashicorp/consul/aws`,
wantString: `registry.opentofu.org/hashicorp/consul/aws`,
wantForDisplay: `hashicorp/consul/aws`,
wantForProtocol: `hashicorp/consul/aws`,
},
"public registry with subdir": {
input: `hashicorp/consul/aws//foo`,
wantString: `registry.terraform.io/hashicorp/consul/aws//foo`,
wantString: `registry.opentofu.org/hashicorp/consul/aws//foo`,
wantForDisplay: `hashicorp/consul/aws//foo`,
wantForProtocol: `hashicorp/consul/aws`,
},
"public registry using explicit hostname": {
input: `registry.terraform.io/hashicorp/consul/aws`,
wantString: `registry.terraform.io/hashicorp/consul/aws`,
input: `registry.opentofu.org/hashicorp/consul/aws`,
wantString: `registry.opentofu.org/hashicorp/consul/aws`,
wantForDisplay: `hashicorp/consul/aws`,
wantForProtocol: `hashicorp/consul/aws`,
},
"public registry with mixed case names": {
input: `HashiCorp/Consul/aws`,
wantString: `registry.terraform.io/HashiCorp/Consul/aws`,
wantString: `registry.opentofu.org/HashiCorp/Consul/aws`,
wantForDisplay: `HashiCorp/Consul/aws`,
wantForProtocol: `HashiCorp/Consul/aws`,
},

View File

@ -5,9 +5,9 @@ package addrs
import (
"github.com/hashicorp/hcl/v2"
tfaddr "github.com/hashicorp/terraform-registry-address"
svchost "github.com/hashicorp/terraform-svchost"
"github.com/opentofu/opentofu/internal/tfdiags"
tfaddr "github.com/opentofu/registry-address"
)
// Provider encapsulates a single provider type. In the future this will be

View File

@ -101,10 +101,10 @@ var _ ProviderConfig = AbsProviderConfig{}
// configuration address. The following are examples of traversals that can be
// successfully parsed as absolute provider configuration addresses:
//
// - provider["registry.terraform.io/hashicorp/aws"]
// - provider["registry.terraform.io/hashicorp/aws"].foo
// - module.bar.provider["registry.terraform.io/hashicorp/aws"]
// - module.bar.module.baz.provider["registry.terraform.io/hashicorp/aws"].foo
// - provider["registry.opentofu.org/hashicorp/aws"]
// - provider["registry.opentofu.org/hashicorp/aws"].foo
// - module.bar.provider["registry.opentofu.org/hashicorp/aws"]
// - module.bar.module.baz.provider["registry.opentofu.org/hashicorp/aws"].foo
//
// This type of address is used, for example, to record the relationships
// between resources and provider configurations in the state structure.

View File

@ -20,67 +20,67 @@ func TestParseAbsProviderConfig(t *testing.T) {
WantDiag string
}{
{
`provider["registry.terraform.io/hashicorp/aws"]`,
`provider["registry.opentofu.org/hashicorp/aws"]`,
AbsProviderConfig{
Module: RootModule,
Provider: Provider{
Type: "aws",
Namespace: "hashicorp",
Hostname: "registry.terraform.io",
Hostname: "registry.opentofu.org",
},
},
``,
},
{
`provider["registry.terraform.io/hashicorp/aws"].foo`,
`provider["registry.opentofu.org/hashicorp/aws"].foo`,
AbsProviderConfig{
Module: RootModule,
Provider: Provider{
Type: "aws",
Namespace: "hashicorp",
Hostname: "registry.terraform.io",
Hostname: "registry.opentofu.org",
},
Alias: "foo",
},
``,
},
{
`module.baz.provider["registry.terraform.io/hashicorp/aws"]`,
`module.baz.provider["registry.opentofu.org/hashicorp/aws"]`,
AbsProviderConfig{
Module: Module{"baz"},
Provider: Provider{
Type: "aws",
Namespace: "hashicorp",
Hostname: "registry.terraform.io",
Hostname: "registry.opentofu.org",
},
},
``,
},
{
`module.baz.provider["registry.terraform.io/hashicorp/aws"].foo`,
`module.baz.provider["registry.opentofu.org/hashicorp/aws"].foo`,
AbsProviderConfig{
Module: Module{"baz"},
Provider: Provider{
Type: "aws",
Namespace: "hashicorp",
Hostname: "registry.terraform.io",
Hostname: "registry.opentofu.org",
},
Alias: "foo",
},
``,
},
{
`module.baz["foo"].provider["registry.terraform.io/hashicorp/aws"]`,
`module.baz["foo"].provider["registry.opentofu.org/hashicorp/aws"]`,
AbsProviderConfig{},
`Provider address cannot contain module indexes`,
},
{
`module.baz[1].provider["registry.terraform.io/hashicorp/aws"]`,
`module.baz[1].provider["registry.opentofu.org/hashicorp/aws"]`,
AbsProviderConfig{},
`Provider address cannot contain module indexes`,
},
{
`module.baz[1].module.bar.provider["registry.terraform.io/hashicorp/aws"]`,
`module.baz[1].module.bar.provider["registry.opentofu.org/hashicorp/aws"]`,
AbsProviderConfig{},
`Provider address cannot contain module indexes`,
},
@ -166,14 +166,14 @@ func TestAbsProviderConfigString(t *testing.T) {
Module: RootModule,
Provider: NewLegacyProvider("foo"),
},
`provider["registry.terraform.io/-/foo"]`,
`provider["registry.opentofu.org/-/foo"]`,
},
{
AbsProviderConfig{
Module: RootModule.Child("child_module"),
Provider: NewDefaultProvider("foo"),
},
`module.child_module.provider["registry.terraform.io/hashicorp/foo"]`,
`module.child_module.provider["registry.opentofu.org/hashicorp/foo"]`,
},
{
AbsProviderConfig{
@ -181,7 +181,7 @@ func TestAbsProviderConfigString(t *testing.T) {
Alias: "bar",
Provider: NewDefaultProvider("foo"),
},
`provider["registry.terraform.io/hashicorp/foo"].bar`,
`provider["registry.opentofu.org/hashicorp/foo"].bar`,
},
{
AbsProviderConfig{
@ -189,7 +189,7 @@ func TestAbsProviderConfigString(t *testing.T) {
Alias: "bar",
Provider: NewDefaultProvider("foo"),
},
`module.child_module.provider["registry.terraform.io/hashicorp/foo"].bar`,
`module.child_module.provider["registry.opentofu.org/hashicorp/foo"].bar`,
},
}

View File

@ -281,7 +281,7 @@ func TestParseProviderSourceStr(t *testing.T) {
Want Provider
Err bool
}{
"registry.terraform.io/hashicorp/aws": {
"registry.opentofu.org/hashicorp/aws": {
Provider{
Type: "aws",
Namespace: "hashicorp",
@ -289,7 +289,7 @@ func TestParseProviderSourceStr(t *testing.T) {
},
false,
},
"registry.Terraform.io/HashiCorp/AWS": {
"registry.opentofu.org/HashiCorp/AWS": {
Provider{
Type: "aws",
Namespace: "hashicorp",

View File

@ -66,7 +66,7 @@ func TestLocal_applyBasic(t *testing.T) {
checkState(t, b.StateOutPath, `
test_instance.foo:
ID = yes
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
ami = bar
`)
@ -241,7 +241,7 @@ func TestLocal_applyError(t *testing.T) {
checkState(t, b.StateOutPath, `
test_instance.foo:
ID = foo
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
ami = bar
`)
@ -308,7 +308,7 @@ func TestLocal_applyBackendFail(t *testing.T) {
checkState(t, "errored.tfstate", `
test_instance.foo: (tainted)
ID = yes
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
ami = bar
`)
@ -372,7 +372,7 @@ func testOperationApply(t *testing.T, configDir string) (*backend.Operation, fun
// Many of our tests use an overridden "test" provider that's just in-memory
// inside the test process, not a separate plugin on disk.
depLocks := depsfile.NewLocks()
depLocks.SetProviderOverridden(addrs.MustParseProviderSourceString("registry.terraform.io/hashicorp/test"))
depLocks.SetProviderOverridden(addrs.MustParseProviderSourceString("registry.opentofu.org/hashicorp/test"))
return &backend.Operation{
Type: backend.OperationTypeApply,

View File

@ -725,7 +725,7 @@ func testOperationPlan(t *testing.T, configDir string) (*backend.Operation, func
// Many of our tests use an overridden "test" provider that's just in-memory
// inside the test process, not a separate plugin on disk.
depLocks := depsfile.NewLocks()
depLocks.SetProviderOverridden(addrs.MustParseProviderSourceString("registry.terraform.io/hashicorp/test"))
depLocks.SetProviderOverridden(addrs.MustParseProviderSourceString("registry.opentofu.org/hashicorp/test"))
return &backend.Operation{
Type: backend.OperationTypePlan,

View File

@ -53,7 +53,7 @@ func TestLocal_refresh(t *testing.T) {
checkState(t, b.StateOutPath, `
test_instance.foo:
ID = yes
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
`)
// the backend should be unlocked after a run
@ -122,7 +122,7 @@ func TestLocal_refreshInput(t *testing.T) {
checkState(t, b.StateOutPath, `
test_instance.foo:
ID = yes
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
`)
}
@ -151,7 +151,7 @@ func TestLocal_refreshValidate(t *testing.T) {
checkState(t, b.StateOutPath, `
test_instance.foo:
ID = yes
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
`)
}
@ -205,7 +205,7 @@ func TestLocal_refreshValidateProviderConfigured(t *testing.T) {
checkState(t, b.StateOutPath, `
test_instance.foo:
ID = yes
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
`)
}
@ -275,7 +275,7 @@ func testOperationRefresh(t *testing.T, configDir string) (*backend.Operation, f
// Many of our tests use an overridden "test" provider that's just in-memory
// inside the test process, not a separate plugin on disk.
depLocks := depsfile.NewLocks()
depLocks.SetProviderOverridden(addrs.MustParseProviderSourceString("registry.terraform.io/hashicorp/test"))
depLocks.SetProviderOverridden(addrs.MustParseProviderSourceString("registry.opentofu.org/hashicorp/test"))
return &backend.Operation{
Type: backend.OperationTypeRefresh,
@ -297,7 +297,7 @@ func testRefreshState() *states.State {
Status: states.ObjectReady,
AttrsJSON: []byte(`{"id":"bar"}`),
},
mustProviderConfig(`provider["registry.terraform.io/hashicorp/test"]`),
mustProviderConfig(`provider["registry.opentofu.org/hashicorp/test"]`),
)
return state
}

View File

@ -71,7 +71,7 @@ func buildArmClient(ctx context.Context, config BackendConfig) (*ArmClient, erro
CustomResourceManagerEndpoint: config.CustomResourceManagerEndpoint,
MetadataHost: config.MetadataHost,
Environment: config.Environment,
ClientSecretDocsLink: "https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/service_principal_client_secret",
ClientSecretDocsLink: "https://registry.opentofu.org/providers/hashicorp/azurerm/latest/docs/guides/service_principal_client_secret",
// Service Principal (Client Certificate)
ClientCertPassword: config.ClientCertificatePassword,

View File

@ -52,7 +52,7 @@ func testOperationApplyWithTimeout(t *testing.T, configDir string, timeout time.
// Many of our tests use an overridden "null" provider that's just in-memory
// inside the test process, not a separate plugin on disk.
depLocks := depsfile.NewLocks()
depLocks.SetProviderOverridden(addrs.MustParseProviderSourceString("registry.terraform.io/hashicorp/null"))
depLocks.SetProviderOverridden(addrs.MustParseProviderSourceString("registry.opentofu.org/hashicorp/null"))
return &backend.Operation{
ConfigDir: configDir,

View File

@ -50,7 +50,7 @@ func testOperationPlanWithTimeout(t *testing.T, configDir string, timeout time.D
// Many of our tests use an overridden "null" provider that's just in-memory
// inside the test process, not a separate plugin on disk.
depLocks := depsfile.NewLocks()
depLocks.SetProviderOverridden(addrs.MustParseProviderSourceString("registry.terraform.io/hashicorp/null"))
depLocks.SetProviderOverridden(addrs.MustParseProviderSourceString("registry.opentofu.org/hashicorp/null"))
return &backend.Operation{
ConfigDir: configDir,

View File

@ -54,7 +54,7 @@
"type": "test_resource",
"name": "main",
"each": "list",
"provider": "provider[\"registry.terraform.io/hashicorp/test\"]",
"provider": "provider[\"registry.opentofu.org/hashicorp/test\"]",
"instances": [
{
"index_key": 0,

View File

@ -56,7 +56,7 @@ func testOperationApplyWithTimeout(t *testing.T, configDir string, timeout time.
// Many of our tests use an overridden "null" provider that's just in-memory
// inside the test process, not a separate plugin on disk.
depLocks := depsfile.NewLocks()
depLocks.SetProviderOverridden(addrs.MustParseProviderSourceString("registry.terraform.io/hashicorp/null"))
depLocks.SetProviderOverridden(addrs.MustParseProviderSourceString("registry.opentofu.org/hashicorp/null"))
return &backend.Operation{
ConfigDir: configDir,

View File

@ -53,7 +53,7 @@ func testOperationPlanWithTimeout(t *testing.T, configDir string, timeout time.D
// Many of our tests use an overridden "null" provider that's just in-memory
// inside the test process, not a separate plugin on disk.
depLocks := depsfile.NewLocks()
depLocks.SetProviderOverridden(addrs.MustParseProviderSourceString("registry.terraform.io/hashicorp/null"))
depLocks.SetProviderOverridden(addrs.MustParseProviderSourceString("registry.opentofu.org/hashicorp/null"))
return &backend.Operation{
ConfigDir: configDir,

View File

@ -9,7 +9,7 @@
"mode": "managed",
"type": "null_resource",
"name": "foo",
"provider": "provider[\"registry.terraform.io/hashicorp/null\"]",
"provider": "provider[\"registry.opentofu.org/hashicorp/null\"]",
"instances": [
{
"schema_version": 0,

View File

@ -1 +1 @@
{"plan_format_version":"1.1","resource_drift":[],"resource_changes":[{"address":"null_resource.foo","mode":"managed","type":"null_resource","name":"foo","provider_name":"registry.terraform.io/hashicorp/null","change":{"actions":["create"],"before":null,"after":{"triggers":null},"after_unknown":{"id":true},"before_sensitive":false,"after_sensitive":{}}}],"relevant_attributes":[],"output_changes":{"complex":{"actions":["create"],"before":null,"after":{"keyA":{"someList":[1,2,3]},"keyB":{"someBool":true,"someStr":"hello"}},"after_unknown":false,"before_sensitive":false,"after_sensitive":false},"secret":{"actions":["create"],"before":null,"after":"8517896e47af3c9ca19a694ea0d6cc30b0dccf08598f33d93e583721fd5f3032","after_unknown":false,"before_sensitive":true,"after_sensitive":true},"simple":{"actions":["create"],"before":null,"after":["some","list"],"after_unknown":false,"before_sensitive":false,"after_sensitive":false}},"provider_schemas":{"registry.terraform.io/hashicorp/null":{"provider":{"version":0,"block":{"description_kind":"plain"}},"resource_schemas":{"null_resource":{"version":0,"block":{"attributes":{"id":{"type":"string","description":"This is set to a random value at create time.","description_kind":"plain","computed":true},"triggers":{"type":["map","string"],"description":"A map of arbitrary strings that, when changed, will force the null resource to be replaced, re-running any associated provisioners.","description_kind":"plain","optional":true}},"description":"The `null_resource` resource implements the standard resource lifecycle but takes no further action.\n\nThe `triggers` argument allows specifying an arbitrary set of values that, when changed, will cause the resource to be replaced.","description_kind":"plain"}}},"data_source_schemas":{"null_data_source":{"version":0,"block":{"attributes":{"has_computed_default":{"type":"string","description":"If set, its literal value will be stored and returned. If not, its value defaults to `\"default\"`. This argument exists primarily for testing and has little practical use.","description_kind":"plain","optional":true,"computed":true},"id":{"type":"string","description":"This attribute is only present for some legacy compatibility issues and should not be used. It will be removed in a future version.","description_kind":"plain","deprecated":true,"computed":true},"inputs":{"type":["map","string"],"description":"A map of arbitrary strings that is copied into the `outputs` attribute, and accessible directly for interpolation.","description_kind":"plain","optional":true},"outputs":{"type":["map","string"],"description":"After the data source is \"read\", a copy of the `inputs` map.","description_kind":"plain","computed":true},"random":{"type":"string","description":"A random value. This is primarily for testing and has little practical use; prefer the [hashicorp/random provider](https://registry.terraform.io/providers/hashicorp/random) for more practical random number use-cases.","description_kind":"plain","computed":true}},"description":"The `null_data_source` data source implements the standard data source lifecycle but does not\ninteract with any external APIs.\n\nHistorically, the `null_data_source` was typically used to construct intermediate values to re-use elsewhere in configuration. The\nsame can now be achieved using [locals](https://www.terraform.io/docs/language/values/locals.html).\n","description_kind":"plain","deprecated":true}}}}},"provider_format_version":"1.0"}
{"plan_format_version":"1.1","resource_drift":[],"resource_changes":[{"address":"null_resource.foo","mode":"managed","type":"null_resource","name":"foo","provider_name":"registry.opentofu.org/hashicorp/null","change":{"actions":["create"],"before":null,"after":{"triggers":null},"after_unknown":{"id":true},"before_sensitive":false,"after_sensitive":{}}}],"relevant_attributes":[],"output_changes":{"complex":{"actions":["create"],"before":null,"after":{"keyA":{"someList":[1,2,3]},"keyB":{"someBool":true,"someStr":"hello"}},"after_unknown":false,"before_sensitive":false,"after_sensitive":false},"secret":{"actions":["create"],"before":null,"after":"8517896e47af3c9ca19a694ea0d6cc30b0dccf08598f33d93e583721fd5f3032","after_unknown":false,"before_sensitive":true,"after_sensitive":true},"simple":{"actions":["create"],"before":null,"after":["some","list"],"after_unknown":false,"before_sensitive":false,"after_sensitive":false}},"provider_schemas":{"registry.opentofu.org/hashicorp/null":{"provider":{"version":0,"block":{"description_kind":"plain"}},"resource_schemas":{"null_resource":{"version":0,"block":{"attributes":{"id":{"type":"string","description":"This is set to a random value at create time.","description_kind":"plain","computed":true},"triggers":{"type":["map","string"],"description":"A map of arbitrary strings that, when changed, will force the null resource to be replaced, re-running any associated provisioners.","description_kind":"plain","optional":true}},"description":"The `null_resource` resource implements the standard resource lifecycle but takes no further action.\n\nThe `triggers` argument allows specifying an arbitrary set of values that, when changed, will cause the resource to be replaced.","description_kind":"plain"}}},"data_source_schemas":{"null_data_source":{"version":0,"block":{"attributes":{"has_computed_default":{"type":"string","description":"If set, its literal value will be stored and returned. If not, its value defaults to `\"default\"`. This argument exists primarily for testing and has little practical use.","description_kind":"plain","optional":true,"computed":true},"id":{"type":"string","description":"This attribute is only present for some legacy compatibility issues and should not be used. It will be removed in a future version.","description_kind":"plain","deprecated":true,"computed":true},"inputs":{"type":["map","string"],"description":"A map of arbitrary strings that is copied into the `outputs` attribute, and accessible directly for interpolation.","description_kind":"plain","optional":true},"outputs":{"type":["map","string"],"description":"After the data source is \"read\", a copy of the `inputs` map.","description_kind":"plain","computed":true},"random":{"type":"string","description":"A random value. This is primarily for testing and has little practical use; prefer the [hashicorp/random provider](https://registry.opentofu.org/providers/hashicorp/random) for more practical random number use-cases.","description_kind":"plain","computed":true}},"description":"The `null_data_source` data source implements the standard data source lifecycle but does not\ninteract with any external APIs.\n\nHistorically, the `null_data_source` was typically used to construct intermediate values to re-use elsewhere in configuration. The\nsame can now be achieved using [locals](https://www.terraform.io/docs/language/values/locals.html).\n","description_kind":"plain","deprecated":true}}}}},"provider_format_version":"1.0"}

View File

@ -7,7 +7,7 @@
"mode": "managed",
"type": "null_resource",
"name": "foo",
"provider_name": "registry.terraform.io/hashicorp/null",
"provider_name": "registry.opentofu.org/hashicorp/null",
"change": {
"actions": [
"create"
@ -27,7 +27,7 @@
"relevant_attributes": [],
"output_changes": {},
"provider_schemas": {
"registry.terraform.io/hashicorp/null": {
"registry.opentofu.org/hashicorp/null": {
"provider": {
"version": 0,
"block": {

View File

@ -7,7 +7,7 @@
"mode": "managed",
"type": "null_resource",
"name": "foo",
"provider_name": "registry.terraform.io/hashicorp/null",
"provider_name": "registry.opentofu.org/hashicorp/null",
"change": {
"actions": [
"create"
@ -27,7 +27,7 @@
"relevant_attributes": [],
"output_changes": {},
"provider_schemas": {
"registry.terraform.io/hashicorp/null": {
"registry.opentofu.org/hashicorp/null": {
"provider": {
"version": 0,
"block": {

View File

@ -7,7 +7,7 @@
"mode": "managed",
"type": "null_resource",
"name": "foo",
"provider_name": "registry.terraform.io/hashicorp/null",
"provider_name": "registry.opentofu.org/hashicorp/null",
"change": {
"actions": [
"create"
@ -27,7 +27,7 @@
"relevant_attributes": [],
"output_changes": {},
"provider_schemas": {
"registry.terraform.io/hashicorp/null": {
"registry.opentofu.org/hashicorp/null": {
"provider": {
"version": 0,
"block": {

View File

@ -7,7 +7,7 @@
"mode": "managed",
"type": "null_resource",
"name": "foo",
"provider_name": "registry.terraform.io/hashicorp/null",
"provider_name": "registry.opentofu.org/hashicorp/null",
"change": {
"actions": [
"create"
@ -27,7 +27,7 @@
"relevant_attributes": [],
"output_changes": {},
"provider_schemas": {
"registry.terraform.io/hashicorp/null": {
"registry.opentofu.org/hashicorp/null": {
"provider": {
"version": 0,
"block": {

View File

@ -7,7 +7,7 @@
"mode": "managed",
"type": "null_resource",
"name": "foo",
"provider_name": "registry.terraform.io/hashicorp/null",
"provider_name": "registry.opentofu.org/hashicorp/null",
"change": {
"actions": [
"create"
@ -27,7 +27,7 @@
"relevant_attributes": [],
"output_changes": {},
"provider_schemas": {
"registry.terraform.io/hashicorp/null": {
"registry.opentofu.org/hashicorp/null": {
"provider": {
"version": 0,
"block": {

View File

@ -1 +1 @@
{"format_version":"1.1","terraform_version":"1.4.4","planned_values":{"root_module":{"resources":[{"address":"null_resource.foo","mode":"managed","type":"null_resource","name":"foo","provider_name":"registry.terraform.io/hashicorp/null","schema_version":0,"values":{"triggers":null},"sensitive_values":{}}]}},"resource_changes":[{"address":"null_resource.foo","mode":"managed","type":"null_resource","name":"foo","provider_name":"registry.terraform.io/hashicorp/null","change":{"actions":["create"],"before":null,"after":{"triggers":null},"after_unknown":{"id":true},"before_sensitive":false,"after_sensitive":{}}}],"configuration":{"provider_config":{"null":{"name":"null","full_name":"registry.terraform.io/hashicorp/null"}},"root_module":{"resources":[{"address":"null_resource.foo","mode":"managed","type":"null_resource","name":"foo","provider_config_key":"null","schema_version":0}]}}}
{"format_version":"1.1","terraform_version":"1.4.4","planned_values":{"root_module":{"resources":[{"address":"null_resource.foo","mode":"managed","type":"null_resource","name":"foo","provider_name":"registry.opentofu.org/hashicorp/null","schema_version":0,"values":{"triggers":null},"sensitive_values":{}}]}},"resource_changes":[{"address":"null_resource.foo","mode":"managed","type":"null_resource","name":"foo","provider_name":"registry.opentofu.org/hashicorp/null","change":{"actions":["create"],"before":null,"after":{"triggers":null},"after_unknown":{"id":true},"before_sensitive":false,"after_sensitive":{}}}],"configuration":{"provider_config":{"null":{"name":"null","full_name":"registry.opentofu.org/hashicorp/null"}},"root_module":{"resources":[{"address":"null_resource.foo","mode":"managed","type":"null_resource","name":"foo","provider_config_key":"null","schema_version":0}]}}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,7 @@
"mode": "managed",
"type": "null_resource",
"name": "foo",
"provider_name": "registry.terraform.io/hashicorp/null",
"provider_name": "registry.opentofu.org/hashicorp/null",
"change": {
"actions": [
"no-op"
@ -29,7 +29,7 @@
"relevant_attributes": [],
"output_changes": {},
"provider_schemas": {
"registry.terraform.io/hashicorp/null": {
"registry.opentofu.org/hashicorp/null": {
"provider": {
"version": 0,
"block": {

View File

@ -1 +1 @@
{"format_version":"1.1","terraform_version":"1.4.4","planned_values":{"root_module":{"resources":[{"address":"null_resource.foo","mode":"managed","type":"null_resource","name":"foo","provider_name":"registry.terraform.io/hashicorp/null","schema_version":0,"values":{"id":"3549869958859575216","triggers":null},"sensitive_values":{}}]}},"resource_changes":[{"address":"null_resource.foo","mode":"managed","type":"null_resource","name":"foo","provider_name":"registry.terraform.io/hashicorp/null","change":{"actions":["no-op"],"before":{"id":"3549869958859575216","triggers":null},"after":{"id":"3549869958859575216","triggers":null},"after_unknown":{},"before_sensitive":{},"after_sensitive":{}}}],"prior_state":{"format_version":"1.0","terraform_version":"1.4.4","values":{"root_module":{"resources":[{"address":"null_resource.foo","mode":"managed","type":"null_resource","name":"foo","provider_name":"registry.terraform.io/hashicorp/null","schema_version":0,"values":{"id":"3549869958859575216","triggers":null},"sensitive_values":{}}]}}},"configuration":{"provider_config":{"null":{"name":"null","full_name":"registry.terraform.io/hashicorp/null"}},"root_module":{"resources":[{"address":"null_resource.foo","mode":"managed","type":"null_resource","name":"foo","provider_config_key":"null","schema_version":0}]}}}
{"format_version":"1.1","terraform_version":"1.4.4","planned_values":{"root_module":{"resources":[{"address":"null_resource.foo","mode":"managed","type":"null_resource","name":"foo","provider_name":"registry.opentofu.org/hashicorp/null","schema_version":0,"values":{"id":"3549869958859575216","triggers":null},"sensitive_values":{}}]}},"resource_changes":[{"address":"null_resource.foo","mode":"managed","type":"null_resource","name":"foo","provider_name":"registry.opentofu.org/hashicorp/null","change":{"actions":["no-op"],"before":{"id":"3549869958859575216","triggers":null},"after":{"id":"3549869958859575216","triggers":null},"after_unknown":{},"before_sensitive":{},"after_sensitive":{}}}],"prior_state":{"format_version":"1.0","terraform_version":"1.4.4","values":{"root_module":{"resources":[{"address":"null_resource.foo","mode":"managed","type":"null_resource","name":"foo","provider_name":"registry.opentofu.org/hashicorp/null","schema_version":0,"values":{"id":"3549869958859575216","triggers":null},"sensitive_values":{}}]}}},"configuration":{"provider_config":{"null":{"name":"null","full_name":"registry.opentofu.org/hashicorp/null"}},"root_module":{"resources":[{"address":"null_resource.foo","mode":"managed","type":"null_resource","name":"foo","provider_config_key":"null","schema_version":0}]}}}

View File

@ -30,8 +30,8 @@ func TestLoadConfig_providerInstallation(t *testing.T) {
},
{
Location: ProviderInstallationNetworkMirror("https://tf-Mirror.example.com/"),
Include: []string{"registry.terraform.io/*/*"},
Exclude: []string{"registry.Terraform.io/foobar/*"},
Include: []string{"registry.opentofu.org/*/*"},
Exclude: []string{"registry.OpenTofu.org/foobar/*"},
},
{
Location: ProviderInstallationFilesystemMirror("/tmp/example2"),

View File

@ -9,8 +9,8 @@ provider_installation {
}
network_mirror {
url = "https://tf-Mirror.example.com/"
include = ["registry.terraform.io/*/*"]
exclude = ["registry.Terraform.io/foobar/*"]
include = ["registry.opentofu.org/*/*"]
exclude = ["registry.OpenTofu.org/foobar/*"]
}
filesystem_mirror {
path = "/tmp/example2"

View File

@ -10,8 +10,8 @@
}],
"network_mirror": [{
"url": "https://tf-Mirror.example.com/",
"include": ["registry.terraform.io/*/*"],
"exclude": ["registry.Terraform.io/foobar/*"]
"include": ["registry.opentofu.org/*/*"],
"exclude": ["registry.OpenTofu.org/foobar/*"]
}],
"filesystem_mirror": [{
"path": "/tmp/example2"

View File

@ -1000,7 +1000,7 @@ func testServices(t *testing.T) (services *disco.Disco, cleanup func()) {
server := httptest.NewServer(http.HandlerFunc(fakeRegistryHandler))
services = disco.New()
services.ForceHostServices(svchost.Hostname("registry.terraform.io"), map[string]interface{}{
services.ForceHostServices(svchost.Hostname("registry.opentofu.org"), map[string]interface{}{
"providers.v1": server.URL + "/providers/v1/",
})

View File

@ -92,7 +92,7 @@ func TestInitProvidersInternal(t *testing.T) {
func TestInitProvidersVendored(t *testing.T) {
t.Parallel()
// This test will try to reach out to registry.terraform.io as one of the
// This test will try to reach out to registry.opentofu.org as one of the
// possible installation locations for
// hashicorp/null, where it will find that
// versions do exist but will ultimately select the version that is
@ -105,8 +105,8 @@ func TestInitProvidersVendored(t *testing.T) {
// Our fixture dir has a generic os_arch dir, which we need to customize
// to the actual OS/arch where this test is running in order to get the
// desired result.
fixtMachineDir := tf.Path("terraform.d/plugins/registry.terraform.io/hashicorp/null/1.0.0+local/os_arch")
wantMachineDir := tf.Path("terraform.d/plugins/registry.terraform.io/hashicorp/null/1.0.0+local/", fmt.Sprintf("%s_%s", runtime.GOOS, runtime.GOARCH))
fixtMachineDir := tf.Path("terraform.d/plugins/registry.opentofu.org/hashicorp/null/1.0.0+local/os_arch")
wantMachineDir := tf.Path("terraform.d/plugins/registry.opentofu.org/hashicorp/null/1.0.0+local/", fmt.Sprintf("%s_%s", runtime.GOOS, runtime.GOARCH))
err := os.Rename(fixtMachineDir, wantMachineDir)
if err != nil {
t.Fatalf("unexpected error: %s", err)
@ -243,8 +243,8 @@ func TestInitProviders_pluginCache(t *testing.T) {
// Our fixture dir has a generic os_arch dir, which we need to customize
// to the actual OS/arch where this test is running in order to get the
// desired result.
fixtMachineDir := tf.Path("cache/registry.terraform.io/hashicorp/template/2.1.0/os_arch")
wantMachineDir := tf.Path("cache/registry.terraform.io/hashicorp/template/2.1.0/", fmt.Sprintf("%s_%s", runtime.GOOS, runtime.GOARCH))
fixtMachineDir := tf.Path("cache/registry.opentofu.org/hashicorp/template/2.1.0/os_arch")
wantMachineDir := tf.Path("cache/registry.opentofu.org/hashicorp/template/2.1.0/", fmt.Sprintf("%s_%s", runtime.GOOS, runtime.GOARCH))
err := os.Rename(fixtMachineDir, wantMachineDir)
if err != nil {
t.Fatalf("unexpected error: %s", err)
@ -260,7 +260,7 @@ func TestInitProviders_pluginCache(t *testing.T) {
t.Errorf("unexpected error: %s", err)
}
path := filepath.FromSlash(fmt.Sprintf(".terraform/providers/registry.terraform.io/hashicorp/template/2.1.0/%s_%s/terraform-provider-template_v2.1.0_x4", runtime.GOOS, runtime.GOARCH))
path := filepath.FromSlash(fmt.Sprintf(".terraform/providers/registry.opentofu.org/hashicorp/template/2.1.0/%s_%s/terraform-provider-template_v2.1.0_x4", runtime.GOOS, runtime.GOARCH))
content, err := tf.ReadFile(path)
if err != nil {
t.Fatalf("failed to read installed plugin from %s: %s", path, err)
@ -269,7 +269,7 @@ func TestInitProviders_pluginCache(t *testing.T) {
t.Errorf("template plugin was not installed from local cache")
}
nullLinkPath := filepath.FromSlash(fmt.Sprintf(".terraform/providers/registry.terraform.io/hashicorp/null/2.1.0/%s_%s/terraform-provider-null_v2.1.0_x4", runtime.GOOS, runtime.GOARCH))
nullLinkPath := filepath.FromSlash(fmt.Sprintf(".terraform/providers/registry.opentofu.org/hashicorp/null/2.1.0/%s_%s/terraform-provider-null", runtime.GOOS, runtime.GOARCH))
if runtime.GOOS == "windows" {
nullLinkPath = nullLinkPath + ".exe"
}
@ -277,7 +277,7 @@ func TestInitProviders_pluginCache(t *testing.T) {
t.Errorf("null plugin was not installed into %s", nullLinkPath)
}
nullCachePath := filepath.FromSlash(fmt.Sprintf("cache/registry.terraform.io/hashicorp/null/2.1.0/%s_%s/terraform-provider-null_v2.1.0_x4", runtime.GOOS, runtime.GOARCH))
nullCachePath := filepath.FromSlash(fmt.Sprintf("cache/registry.opentofu.org/hashicorp/null/2.1.0/%s_%s/terraform-provider-null", runtime.GOOS, runtime.GOARCH))
if runtime.GOOS == "windows" {
nullCachePath = nullCachePath + ".exe"
}
@ -289,7 +289,7 @@ func TestInitProviders_pluginCache(t *testing.T) {
func TestInit_fromModule(t *testing.T) {
t.Parallel()
// This test reaches out to registry.terraform.io and github.com to lookup
// This test reaches out to registry.opentofu.org and github.com to lookup
// and fetch a module.
skipIfCannotAccessNetwork(t)
@ -322,7 +322,7 @@ func TestInit_fromModule(t *testing.T) {
func TestInitProviderNotFound(t *testing.T) {
t.Parallel()
// This test will reach out to registry.terraform.io as one of the possible
// This test will reach out to registry.opentofu.org as one of the possible
// installation locations for hashicorp/nonexist, which should not exist.
skipIfCannotAccessNetwork(t)
@ -336,7 +336,7 @@ func TestInitProviderNotFound(t *testing.T) {
}
oneLineStderr := strings.ReplaceAll(stderr, "\n", " ")
if !strings.Contains(oneLineStderr, "provider registry registry.terraform.io does not have a provider named registry.terraform.io/hashicorp/nonexist") {
if !strings.Contains(oneLineStderr, "provider registry registry.opentofu.org does not have a provider named registry.opentofu.org/hashicorp/nonexist") {
t.Errorf("expected error message is missing from output:\n%s", stderr)
}
@ -357,7 +357,7 @@ func TestInitProviderNotFound(t *testing.T) {
t.Fatal("expected error, got success")
}
if !strings.Contains(stderr, "provider registry.terraform.io/hashicorp/nonexist was not\nfound in any of the search locations\n\n - "+pluginDir) {
if !strings.Contains(stderr, "provider registry.opentofu.org/hashicorp/nonexist was not\nfound in any of the search locations\n\n - "+pluginDir) {
t.Errorf("expected error message is missing from output:\n%s", stderr)
}
})
@ -372,8 +372,8 @@ func TestInitProviderNotFound(t *testing.T) {
Error: Failed to query available provider packages
` + ` ` + `
Could not retrieve the list of available versions for provider
hashicorp/nonexist: provider registry registry.terraform.io does not have a
provider named registry.terraform.io/hashicorp/nonexist
hashicorp/nonexist: provider registry registry.opentofu.org does not have a
provider named registry.opentofu.org/hashicorp/nonexist
All modules should specify their required_providers so that external
consumers will get the correct providers when using a module. To see which
@ -389,23 +389,25 @@ func TestInitProviderNotFound(t *testing.T) {
})
}
func TestInitProviderWarnings(t *testing.T) {
t.Parallel()
// This test will reach out to registry.terraform.io as one of the possible
// installation locations for hashicorp/terraform, which is an archived package that is no longer needed.
skipIfCannotAccessNetwork(t)
fixturePath := filepath.Join("testdata", "provider-warnings")
tf := e2e.NewBinary(t, terraformBin, fixturePath)
stdout, _, err := tf.Run("init")
if err == nil {
t.Fatal("expected error, got success")
}
if !strings.Contains(stdout, "This provider is archived and no longer needed.") {
t.Errorf("expected warning message is missing from output:\n%s", stdout)
}
}
// The following test is temporarily removed until the OpenTofu registry returns a deprecation warning
// https://github.com/opentofu/registry/issues/108
//func TestInitProviderWarnings(t *testing.T) {
// t.Parallel()
//
// // This test will reach out to registry.terraform.io as one of the possible
// // installation locations for hashicorp/terraform, which is an archived package that is no longer needed.
// skipIfCannotAccessNetwork(t)
//
// fixturePath := filepath.Join("testdata", "provider-warnings")
// tf := e2e.NewBinary(t, terraformBin, fixturePath)
//
// stdout, _, err := tf.Run("init")
// if err == nil {
// t.Fatal("expected error, got success")
// }
//
// if !strings.Contains(stdout, "This provider is archived and no longer needed.") {
// t.Errorf("expected warning message is missing from output:\n%s", stdout)
// }
//
//}

View File

@ -41,7 +41,7 @@ func TestProviderProtocols(t *testing.T) {
// Move the provider binaries into a directory that we will point tofu
// to using the -plugin-dir cli flag.
platform := getproviders.CurrentPlatform.String()
hashiDir := "cache/registry.terraform.io/hashicorp/"
hashiDir := "cache/registry.opentofu.org/hashicorp/"
if err := os.MkdirAll(tf.Path(hashiDir, "simple6/0.0.1/", platform), os.ModePerm); err != nil {
t.Fatal(err)
}

View File

@ -49,14 +49,14 @@ func testTerraformProvidersMirror(t *testing.T, fixture string) {
// In the (unlikely) event that these particular versions of these
// providers are removed from the registry, this test will start to fail.
want := []string{
"registry.terraform.io/hashicorp/null/2.1.0.json",
"registry.terraform.io/hashicorp/null/index.json",
"registry.terraform.io/hashicorp/null/terraform-provider-null_2.1.0_linux_amd64.zip",
"registry.terraform.io/hashicorp/null/terraform-provider-null_2.1.0_windows_386.zip",
"registry.terraform.io/hashicorp/template/2.1.1.json",
"registry.terraform.io/hashicorp/template/index.json",
"registry.terraform.io/hashicorp/template/terraform-provider-template_2.1.1_linux_amd64.zip",
"registry.terraform.io/hashicorp/template/terraform-provider-template_2.1.1_windows_386.zip",
"registry.opentofu.org/hashicorp/null/2.1.0.json",
"registry.opentofu.org/hashicorp/null/index.json",
"registry.opentofu.org/hashicorp/null/terraform-provider-null_2.1.0_linux_amd64.zip",
"registry.opentofu.org/hashicorp/null/terraform-provider-null_2.1.0_windows_386.zip",
"registry.opentofu.org/hashicorp/template/2.1.1.json",
"registry.opentofu.org/hashicorp/template/index.json",
"registry.opentofu.org/hashicorp/template/terraform-provider-template_2.1.1_linux_amd64.zip",
"registry.opentofu.org/hashicorp/template/terraform-provider-template_2.1.1_windows_386.zip",
}
var got []string
walkErr := filepath.Walk(outputDir, func(path string, info os.FileInfo, err error) error {

View File

@ -42,7 +42,7 @@ func TestProviderTampering(t *testing.T) {
seedDir := tf.WorkDir()
const providerVersion = "3.1.0" // must match the version in the fixture config
pluginDir := filepath.Join(".terraform", "providers", "registry.terraform.io", "hashicorp", "null", providerVersion, getproviders.CurrentPlatform.String())
pluginDir := filepath.Join(".terraform", "providers", "registry.opentofu.org", "hashicorp", "null", providerVersion, getproviders.CurrentPlatform.String())
pluginExe := filepath.Join(pluginDir, "terraform-provider-null_v"+providerVersion+"_x5")
if getproviders.CurrentPlatform.OS == "windows" {
pluginExe += ".exe" // ugh
@ -65,7 +65,7 @@ func TestProviderTampering(t *testing.T) {
if err == nil {
t.Fatalf("unexpected plan success\nstdout:\n%s", stdout)
}
if want := `registry.terraform.io/hashicorp/null: there is no package for registry.terraform.io/hashicorp/null 3.1.0 cached in ` + providerCacheDir; !strings.Contains(stderr, want) {
if want := `registry.opentofu.org/hashicorp/null: there is no package for registry.opentofu.org/hashicorp/null 3.1.0 cached in ` + providerCacheDir; !strings.Contains(stderr, want) {
t.Errorf("missing expected error message\nwant substring: %s\ngot:\n%s", want, stderr)
}
if want := `tofu init`; !strings.Contains(stderr, want) {
@ -130,7 +130,7 @@ func TestProviderTampering(t *testing.T) {
if err == nil {
t.Fatalf("unexpected plan success\nstdout:\n%s", stdout)
}
if want := `registry.terraform.io/hashicorp/null: the cached package for registry.terraform.io/hashicorp/null 3.1.0 (in ` + providerCacheDir + `) does not match any of the checksums recorded in the dependency lock file`; !strings.Contains(stderr, want) {
if want := `registry.opentofu.org/hashicorp/null: the cached package for registry.opentofu.org/hashicorp/null 3.1.0 (in ` + providerCacheDir + `) does not match any of the checksums recorded in the dependency lock file`; !strings.Contains(stderr, want) {
t.Errorf("missing expected error message\nwant substring: %s\ngot:\n%s", want, stderr)
}
if want := `tofu init`; !strings.Contains(stderr, want) {
@ -159,7 +159,7 @@ func TestProviderTampering(t *testing.T) {
if err == nil {
t.Fatalf("unexpected plan success\nstdout:\n%s", stdout)
}
if want := `provider registry.terraform.io/hashicorp/null: locked version selection 3.1.0 doesn't match the updated version constraints "1.0.0"`; !strings.Contains(stderr, want) {
if want := `provider registry.opentofu.org/hashicorp/null: locked version selection 3.1.0 doesn't match the updated version constraints "1.0.0"`; !strings.Contains(stderr, want) {
t.Errorf("missing expected error message\nwant substring: %s\ngot:\n%s", want, stderr)
}
if want := `tofu init -upgrade`; !strings.Contains(stderr, want) {
@ -185,7 +185,7 @@ func TestProviderTampering(t *testing.T) {
if err == nil {
t.Fatalf("unexpected plan success\nstdout:\n%s", stdout)
}
if want := `provider registry.terraform.io/hashicorp/null: required by this configuration but no version is selected`; !strings.Contains(stderr, want) {
if want := `provider registry.opentofu.org/hashicorp/null: required by this configuration but no version is selected`; !strings.Contains(stderr, want) {
t.Errorf("missing expected error message\nwant substring: %s\ngot:\n%s", want, stderr)
}
if want := `tofu init`; !strings.Contains(stderr, want) {
@ -210,7 +210,7 @@ func TestProviderTampering(t *testing.T) {
if err == nil {
t.Fatalf("unexpected apply success\nstdout:\n%s", stdout)
}
if want := `provider registry.terraform.io/hashicorp/null: required by this configuration but no version is selected`; !strings.Contains(stderr, want) {
if want := `provider registry.opentofu.org/hashicorp/null: required by this configuration but no version is selected`; !strings.Contains(stderr, want) {
t.Errorf("missing expected error message\nwant substring: %s\ngot:\n%s", want, stderr)
}
if want := `Create a new plan from the updated configuration.`; !strings.Contains(stderr, want) {
@ -235,7 +235,7 @@ func TestProviderTampering(t *testing.T) {
if err == nil {
t.Fatalf("unexpected apply success\nstdout:\n%s", stdout)
}
if want := `registry.terraform.io/hashicorp/null: there is no package for registry.terraform.io/hashicorp/null 3.1.0 cached in ` + providerCacheDir; !strings.Contains(stderr, want) {
if want := `registry.opentofu.org/hashicorp/null: there is no package for registry.opentofu.org/hashicorp/null 3.1.0 cached in ` + providerCacheDir; !strings.Contains(stderr, want) {
t.Errorf("missing expected error message\nwant substring: %s\ngot:\n%s", want, stderr)
}
})
@ -257,7 +257,7 @@ func TestProviderTampering(t *testing.T) {
if err == nil {
t.Fatalf("unexpected apply success\nstdout:\n%s", stdout)
}
if want := `registry.terraform.io/hashicorp/null: the cached package for registry.terraform.io/hashicorp/null 3.1.0 (in ` + providerCacheDir + `) does not match any of the checksums recorded in the dependency lock file`; !strings.Contains(stderr, want) {
if want := `registry.opentofu.org/hashicorp/null: the cached package for registry.opentofu.org/hashicorp/null 3.1.0 (in ` + providerCacheDir + `) does not match any of the checksums recorded in the dependency lock file`; !strings.Contains(stderr, want) {
t.Errorf("missing expected error message\nwant substring: %s\ngot:\n%s", want, stderr)
}
})

View File

@ -6,7 +6,7 @@
# under the "cache" directory, rather than the real provider from upstream,
# so that Terraform CLI will consider the cache entry as valid.
provider "registry.terraform.io/hashicorp/template" {
provider "registry.opentofu.org/hashicorp/template" {
version = "2.1.0"
hashes = [
"h1:e7YvVlRZlaZJ8ED5KnH0dAg0kPL0nAU7eEoCAZ/sOos=",

View File

@ -1,7 +1,7 @@
terraform {
required_providers {
nonexist = {
source = "registry.terraform.io/hashicorp/nonexist"
source = "registry.opentofu.org/hashicorp/nonexist"
}
}
}

View File

@ -3,10 +3,10 @@
terraform {
required_providers {
simple5 = {
source = "registry.terraform.io/hashicorp/simple"
source = "registry.opentofu.org/hashicorp/simple"
}
simple6 = {
source = "registry.terraform.io/hashicorp/simple6"
source = "registry.opentofu.org/hashicorp/simple6"
}
}
}

View File

@ -1,7 +1,7 @@
# This file is maintained automatically by "terraform init".
# Manual edits may be lost in future updates.
provider "registry.terraform.io/hashicorp/null" {
provider "registry.opentofu.org/hashicorp/null" {
version = "2.1.0"
constraints = "2.1.0"
hashes = [
@ -22,7 +22,7 @@ provider "registry.terraform.io/hashicorp/null" {
]
}
provider "registry.terraform.io/hashicorp/template" {
provider "registry.opentofu.org/hashicorp/template" {
version = "2.1.1"
constraints = "2.1.1"
hashes = [

View File

@ -212,7 +212,7 @@ func TestUnmanagedSeparatePlan(t *testing.T) {
if strings.Contains(stdout, "Installing hashicorp/test v") {
t.Errorf("test provider download message is present in init output:\n%s", stdout)
}
if tf.FileExists(filepath.Join(".terraform", "plugins", "registry.terraform.io", "hashicorp", "test")) {
if tf.FileExists(filepath.Join(".terraform", "plugins", "registry.opentofu.org", "hashicorp", "test")) {
t.Errorf("test provider binary found in .terraform dir")
}
@ -317,7 +317,7 @@ func TestUnmanagedSeparatePlan_proto5(t *testing.T) {
if strings.Contains(stdout, "Installing hashicorp/test v") {
t.Errorf("test provider download message is present in init output:\n%s", stdout)
}
if tf.FileExists(filepath.Join(".terraform", "plugins", "registry.terraform.io", "hashicorp", "test")) {
if tf.FileExists(filepath.Join(".terraform", "plugins", "registry.opentofu.org", "hashicorp", "test")) {
t.Errorf("test provider binary found in .terraform dir")
}

View File

@ -89,7 +89,7 @@ func TestVersionWithProvider(t *testing.T) {
t.Errorf("unexpected stderr output:\n%s", stderr)
}
wantMsg := "+ provider registry.terraform.io/hashicorp/template v" // we don't know which version we'll get here
wantMsg := "+ provider registry.opentofu.org/hashicorp/template v" // we don't know which version we'll get here
if !strings.Contains(stdout, wantMsg) {
t.Errorf("output does not contain provider information %q:\n%s", wantMsg, stdout)
}

View File

@ -35,7 +35,7 @@ func TestGraph(t *testing.T) {
}
output := ui.OutputWriter.String()
if !strings.Contains(output, `provider[\"registry.terraform.io/hashicorp/test\"]`) {
if !strings.Contains(output, `provider[\"registry.opentofu.org/hashicorp/test\"]`) {
t.Fatalf("doesn't look like digraph: %s", output)
}
}
@ -77,7 +77,7 @@ func TestGraph_noArgs(t *testing.T) {
}
output := ui.OutputWriter.String()
if !strings.Contains(output, `provider[\"registry.terraform.io/hashicorp/test\"]`) {
if !strings.Contains(output, `provider[\"registry.opentofu.org/hashicorp/test\"]`) {
t.Fatalf("doesn't look like digraph: %s", output)
}
}
@ -156,7 +156,7 @@ func TestGraph_plan(t *testing.T) {
}
output := ui.OutputWriter.String()
if !strings.Contains(output, `provider[\"registry.terraform.io/hashicorp/test\"]`) {
if !strings.Contains(output, `provider[\"registry.opentofu.org/hashicorp/test\"]`) {
t.Fatalf("doesn't look like digraph: %s", output)
}
}

View File

@ -333,7 +333,7 @@ func TestImport_initializationErrorShouldUnlock(t *testing.T) {
// specifically, it should fail due to a missing provider
msg := strings.ReplaceAll(ui.ErrorWriter.String(), "\n", " ")
if want := `provider registry.terraform.io/hashicorp/unknown: required by this configuration but no version is selected`; !strings.Contains(msg, want) {
if want := `provider registry.opentofu.org/hashicorp/unknown: required by this configuration but no version is selected`; !strings.Contains(msg, want) {
t.Errorf("incorrect message\nwant substring: %s\ngot:\n%s", want, msg)
}
@ -978,5 +978,5 @@ func TestImport_targetIsModule(t *testing.T) {
const testImportStr = `
test_instance.foo:
ID = yay
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
`

View File

@ -1343,15 +1343,15 @@ func TestInit_getProvider(t *testing.T) {
}
// check that we got the providers for our config
exactPath := fmt.Sprintf(".terraform/providers/registry.terraform.io/hashicorp/exact/1.2.3/%s", getproviders.CurrentPlatform)
exactPath := fmt.Sprintf(".terraform/providers/registry.opentofu.org/hashicorp/exact/1.2.3/%s", getproviders.CurrentPlatform)
if _, err := os.Stat(exactPath); os.IsNotExist(err) {
t.Fatal("provider 'exact' not downloaded")
}
greaterThanPath := fmt.Sprintf(".terraform/providers/registry.terraform.io/hashicorp/greater-than/2.3.4/%s", getproviders.CurrentPlatform)
greaterThanPath := fmt.Sprintf(".terraform/providers/registry.opentofu.org/hashicorp/greater-than/2.3.4/%s", getproviders.CurrentPlatform)
if _, err := os.Stat(greaterThanPath); os.IsNotExist(err) {
t.Fatal("provider 'greater-than' not downloaded")
}
betweenPath := fmt.Sprintf(".terraform/providers/registry.terraform.io/hashicorp/between/2.3.4/%s", getproviders.CurrentPlatform)
betweenPath := fmt.Sprintf(".terraform/providers/registry.opentofu.org/hashicorp/between/2.3.4/%s", getproviders.CurrentPlatform)
if _, err := os.Stat(betweenPath); os.IsNotExist(err) {
t.Fatal("provider 'between' not downloaded")
}
@ -1447,7 +1447,7 @@ func TestInit_getProviderSource(t *testing.T) {
}
// check that we got the providers for our config
exactPath := fmt.Sprintf(".terraform/providers/registry.terraform.io/acme/alpha/1.2.3/%s", getproviders.CurrentPlatform)
exactPath := fmt.Sprintf(".terraform/providers/registry.opentofu.org/acme/alpha/1.2.3/%s", getproviders.CurrentPlatform)
if _, err := os.Stat(exactPath); os.IsNotExist(err) {
t.Error("provider 'alpha' not downloaded")
}
@ -1455,7 +1455,7 @@ func TestInit_getProviderSource(t *testing.T) {
if _, err := os.Stat(greaterThanPath); os.IsNotExist(err) {
t.Error("provider 'beta' not downloaded")
}
betweenPath := fmt.Sprintf(".terraform/providers/registry.terraform.io/hashicorp/gamma/2.0.0/%s", getproviders.CurrentPlatform)
betweenPath := fmt.Sprintf(".terraform/providers/registry.opentofu.org/hashicorp/gamma/2.0.0/%s", getproviders.CurrentPlatform)
if _, err := os.Stat(betweenPath); os.IsNotExist(err) {
t.Error("provider 'gamma' not downloaded")
}
@ -1547,7 +1547,7 @@ func TestInit_getProviderInvalidPackage(t *testing.T) {
}
// invalid provider should be installed
packagePath := fmt.Sprintf(".terraform/providers/registry.terraform.io/invalid/package/1.0.0/%s/terraform-package", getproviders.CurrentPlatform)
packagePath := fmt.Sprintf(".terraform/providers/registry.opentofu.org/invalid/package/1.0.0/%s/terraform-package", getproviders.CurrentPlatform)
if _, err := os.Stat(packagePath); os.IsNotExist(err) {
t.Fatal("provider 'invalid/package' not downloaded")
}
@ -1606,12 +1606,12 @@ func TestInit_getProviderDetectedLegacy(t *testing.T) {
}
// foo should be installed
fooPath := fmt.Sprintf(".terraform/providers/registry.terraform.io/hashicorp/foo/1.2.3/%s", getproviders.CurrentPlatform)
fooPath := fmt.Sprintf(".terraform/providers/registry.opentofu.org/hashicorp/foo/1.2.3/%s", getproviders.CurrentPlatform)
if _, err := os.Stat(fooPath); os.IsNotExist(err) {
t.Error("provider 'foo' not installed")
}
// baz should not be installed
bazPath := fmt.Sprintf(".terraform/providers/registry.terraform.io/terraform-providers/baz/2.3.4/%s", getproviders.CurrentPlatform)
bazPath := fmt.Sprintf(".terraform/providers/registry.opentofu.org/terraform-providers/baz/2.3.4/%s", getproviders.CurrentPlatform)
if _, err := os.Stat(bazPath); !os.IsNotExist(err) {
t.Error("provider 'baz' installed, but should not be")
}
@ -1621,8 +1621,8 @@ func TestInit_getProviderDetectedLegacy(t *testing.T) {
errors := []string{
"Failed to query available provider packages",
"Could not retrieve the list of available versions",
"registry.terraform.io/hashicorp/baz",
"registry.terraform.io/hashicorp/frob",
"registry.opentofu.org/hashicorp/baz",
"registry.opentofu.org/hashicorp/frob",
}
for _, want := range errors {
if !strings.Contains(errOutput, want) {
@ -1706,7 +1706,7 @@ func TestInit_providerSource(t *testing.T) {
getproviders.MustParseVersion("1.2.4"),
getproviders.MustParseVersionConstraints("= 1.2.4"),
[]getproviders.Hash{
getproviders.HashScheme1.New("see6W06w09Ea+AobFJ+mbvPTie6ASqZAAdlFZbs8BSM="),
getproviders.HashScheme1.New("vEthLkqAecdQimaW6JHZ0SBRNtHibLnOb31tX9ZXlcI="),
},
),
addrs.NewDefaultProvider("test"): depsfile.NewProviderLock(
@ -1714,7 +1714,7 @@ func TestInit_providerSource(t *testing.T) {
getproviders.MustParseVersion("1.2.3"),
getproviders.MustParseVersionConstraints("= 1.2.3"),
[]getproviders.Hash{
getproviders.HashScheme1.New("wlbEC2mChQZ2hhgUhl6SeVLPP7fMqOFUZAQhQ9GIIno="),
getproviders.HashScheme1.New("8CjxaUBuegKZSFnRos39Fs+CS78ax0Dyb7aIA5XBiNI="),
},
),
addrs.NewDefaultProvider("source"): depsfile.NewProviderLock(
@ -1722,7 +1722,7 @@ func TestInit_providerSource(t *testing.T) {
getproviders.MustParseVersion("1.2.3"),
getproviders.MustParseVersionConstraints("= 1.2.3"),
[]getproviders.Hash{
getproviders.HashScheme1.New("myS3qb3px3tRBq1ZWRYJeUH+kySWpBc0Yy8rw6W7/p4="),
getproviders.HashScheme1.New("ACYytVQ2Q6JfoEs7xxCqa1yGFf9HwF3SEHzJKBoJfo0="),
},
),
}
@ -1922,7 +1922,7 @@ func TestInit_getUpgradePlugins(t *testing.T) {
getproviders.MustParseVersion("2.3.4"),
getproviders.MustParseVersionConstraints("> 1.0.0, < 3.0.0"),
[]getproviders.Hash{
getproviders.HashScheme1.New("JVqAvZz88A+hS2wHVtTWQkHaxoA/LrUAz0H3jPBWPIA="),
getproviders.HashScheme1.New("ntfa04OlRqIfGL/Gkd+nGMJSHGWyAgMQplFWk7WEsOk="),
},
),
addrs.NewDefaultProvider("exact"): depsfile.NewProviderLock(
@ -1930,7 +1930,7 @@ func TestInit_getUpgradePlugins(t *testing.T) {
getproviders.MustParseVersion("1.2.3"),
getproviders.MustParseVersionConstraints("= 1.2.3"),
[]getproviders.Hash{
getproviders.HashScheme1.New("H1TxWF8LyhBb6B4iUdKhLc/S9sC/jdcrCykpkbGcfbg="),
getproviders.HashScheme1.New("Xgk+LFrzi9Mop6+d01TCTaD3kgSrUASCAUU1aDsEsJU="),
},
),
addrs.NewDefaultProvider("greater-than"): depsfile.NewProviderLock(
@ -1938,7 +1938,7 @@ func TestInit_getUpgradePlugins(t *testing.T) {
getproviders.MustParseVersion("2.3.4"),
getproviders.MustParseVersionConstraints(">= 2.3.3"),
[]getproviders.Hash{
getproviders.HashScheme1.New("SJPpXx/yoFE/W+7eCipjJ+G21xbdnTBD7lWodZ8hWkU="),
getproviders.HashScheme1.New("8M5DXICmUiVjbkxNNO0zXNsV6duCVNWzq3/Kf0mNIo4="),
},
),
}
@ -2111,11 +2111,11 @@ func TestInit_providerLockFile(t *testing.T) {
# This file is maintained automatically by "tofu init".
# Manual edits may be lost in future updates.
provider "registry.terraform.io/hashicorp/test" {
provider "registry.opentofu.org/hashicorp/test" {
version = "1.2.3"
constraints = "1.2.3"
hashes = [
"h1:wlbEC2mChQZ2hhgUhl6SeVLPP7fMqOFUZAQhQ9GIIno=",
"h1:8CjxaUBuegKZSFnRos39Fs+CS78ax0Dyb7aIA5XBiNI=",
]
}
`)
@ -2138,11 +2138,11 @@ func TestInit_providerLockFileReadonly(t *testing.T) {
# This file is maintained automatically by "tofu init".
# Manual edits may be lost in future updates.
provider "registry.terraform.io/hashicorp/test" {
provider "registry.opentofu.org/hashicorp/test" {
version = "1.2.3"
constraints = "1.2.3"
hashes = [
"zh:e919b507a91e23a00da5c2c4d0b64bcc7900b68d43b3951ac0f6e5d80387fbdc",
"zh:6f85a1f747dd09455cd77683c0e06da647d8240461b8b36b304b9056814d91f2",
]
}
`)
@ -2151,7 +2151,7 @@ provider "registry.terraform.io/hashicorp/test" {
# This file is maintained automatically by "tofu init".
# Manual edits may be lost in future updates.
provider "registry.terraform.io/hashicorp/test" {
provider "registry.opentofu.org/hashicorp/test" {
version = "1.2.3"
constraints = "1.2.3"
hashes = [
@ -2164,12 +2164,12 @@ provider "registry.terraform.io/hashicorp/test" {
# This file is maintained automatically by "tofu init".
# Manual edits may be lost in future updates.
provider "registry.terraform.io/hashicorp/test" {
provider "registry.opentofu.org/hashicorp/test" {
version = "1.2.3"
constraints = "1.2.3"
hashes = [
"h1:wlbEC2mChQZ2hhgUhl6SeVLPP7fMqOFUZAQhQ9GIIno=",
"zh:e919b507a91e23a00da5c2c4d0b64bcc7900b68d43b3951ac0f6e5d80387fbdc",
"h1:8CjxaUBuegKZSFnRos39Fs+CS78ax0Dyb7aIA5XBiNI=",
"zh:6f85a1f747dd09455cd77683c0e06da647d8240461b8b36b304b9056814d91f2",
]
}
`)
@ -2277,7 +2277,7 @@ provider "registry.terraform.io/hashicorp/test" {
Meta: m,
}
// write input lockfile
//write input lockfile
lockFile := ".terraform.lock.hcl"
if err := os.WriteFile(lockFile, []byte(tc.input), 0644); err != nil {
t.Fatalf("failed to write input lockfile: %s", err)
@ -2438,7 +2438,7 @@ func TestInit_pluginDirProviders(t *testing.T) {
getproviders.MustParseVersion("2.3.4"),
getproviders.MustParseVersionConstraints("> 1.0.0, < 3.0.0"),
[]getproviders.Hash{
getproviders.HashScheme1.New("JVqAvZz88A+hS2wHVtTWQkHaxoA/LrUAz0H3jPBWPIA="),
getproviders.HashScheme1.New("ntfa04OlRqIfGL/Gkd+nGMJSHGWyAgMQplFWk7WEsOk="),
},
),
addrs.NewDefaultProvider("exact"): depsfile.NewProviderLock(
@ -2446,7 +2446,7 @@ func TestInit_pluginDirProviders(t *testing.T) {
getproviders.MustParseVersion("1.2.3"),
getproviders.MustParseVersionConstraints("= 1.2.3"),
[]getproviders.Hash{
getproviders.HashScheme1.New("H1TxWF8LyhBb6B4iUdKhLc/S9sC/jdcrCykpkbGcfbg="),
getproviders.HashScheme1.New("Xgk+LFrzi9Mop6+d01TCTaD3kgSrUASCAUU1aDsEsJU="),
},
),
addrs.NewDefaultProvider("greater-than"): depsfile.NewProviderLock(
@ -2454,7 +2454,7 @@ func TestInit_pluginDirProviders(t *testing.T) {
getproviders.MustParseVersion("2.3.4"),
getproviders.MustParseVersionConstraints(">= 2.3.3"),
[]getproviders.Hash{
getproviders.HashScheme1.New("SJPpXx/yoFE/W+7eCipjJ+G21xbdnTBD7lWodZ8hWkU="),
getproviders.HashScheme1.New("8M5DXICmUiVjbkxNNO0zXNsV6duCVNWzq3/Kf0mNIo4="),
},
),
}
@ -2861,7 +2861,7 @@ func TestInit_testsWithModule(t *testing.T) {
//
// Provider addresses must be valid source strings, and passing only the
// provider name will be interpreted as a "default" provider under
// registry.terraform.io/hashicorp. If you need more control over the
// registry.opentofu.org/hashicorp. If you need more control over the
// provider addresses, pass a full provider source string.
//
// This function also registers providers as belonging to the current platform,
@ -2980,13 +2980,13 @@ func expectedPackageInstallPath(name, version string, exe bool) string {
platform := getproviders.CurrentPlatform
baseDir := ".terraform/providers"
if exe {
p := fmt.Sprintf("registry.terraform.io/hashicorp/%s/%s/%s/terraform-provider-%s_%s", name, version, platform, name, version)
p := fmt.Sprintf("registry.opentofu.org/hashicorp/%s/%s/%s/terraform-provider-%s_%s", name, version, platform, name, version)
if platform.OS == "windows" {
p += ".exe"
}
return filepath.ToSlash(filepath.Join(baseDir, p))
}
return filepath.ToSlash(filepath.Join(
baseDir, fmt.Sprintf("registry.terraform.io/hashicorp/%s/%s/%s", name, version, platform),
baseDir, fmt.Sprintf("registry.opentofu.org/hashicorp/%s/%s/%s", name, version, platform),
))
}

View File

@ -204,7 +204,7 @@ func TestMarshalPlanResources(t *testing.T) {
Type: "test_thing",
Name: "example",
Index: addrs.InstanceKey(nil),
ProviderName: "registry.terraform.io/hashicorp/test",
ProviderName: "registry.opentofu.org/hashicorp/test",
SchemaVersion: 1,
AttributeValues: AttributeValues{},
SensitiveValues: json.RawMessage("{}"),
@ -247,7 +247,7 @@ func TestMarshalPlanResources(t *testing.T) {
Type: "test_thing",
Name: "example",
Index: addrs.InstanceKey(nil),
ProviderName: "registry.terraform.io/hashicorp/test",
ProviderName: "registry.opentofu.org/hashicorp/test",
SchemaVersion: 1,
AttributeValues: AttributeValues{
"woozles": json.RawMessage(`"baz"`),

View File

@ -225,7 +225,7 @@ func TestMarshalResources(t *testing.T) {
Type: "test_thing",
Name: "bar",
Index: nil,
ProviderName: "registry.terraform.io/hashicorp/test",
ProviderName: "registry.opentofu.org/hashicorp/test",
AttributeValues: AttributeValues{
"foozles": json.RawMessage(`null`),
"woozles": json.RawMessage(`"confuzles"`),
@ -267,7 +267,7 @@ func TestMarshalResources(t *testing.T) {
Type: "test_thing",
Name: "bar",
Index: nil,
ProviderName: "registry.terraform.io/hashicorp/test",
ProviderName: "registry.opentofu.org/hashicorp/test",
AttributeValues: AttributeValues{
"foozles": json.RawMessage(`"sensuzles"`),
"woozles": json.RawMessage(`"confuzles"`),
@ -313,7 +313,7 @@ func TestMarshalResources(t *testing.T) {
Type: "test_thing",
Name: "bar",
Index: nil,
ProviderName: "registry.terraform.io/hashicorp/test",
ProviderName: "registry.opentofu.org/hashicorp/test",
AttributeValues: AttributeValues{
"foozles": json.RawMessage(`"confuzles"`),
"woozles": json.RawMessage(`null`),
@ -384,7 +384,7 @@ func TestMarshalResources(t *testing.T) {
Type: "test_thing",
Name: "bar",
Index: json.RawMessage(`0`),
ProviderName: "registry.terraform.io/hashicorp/test",
ProviderName: "registry.opentofu.org/hashicorp/test",
AttributeValues: AttributeValues{
"foozles": json.RawMessage(`null`),
"woozles": json.RawMessage(`"confuzles"`),
@ -426,7 +426,7 @@ func TestMarshalResources(t *testing.T) {
Type: "test_thing",
Name: "bar",
Index: json.RawMessage(`"rockhopper"`),
ProviderName: "registry.terraform.io/hashicorp/test",
ProviderName: "registry.opentofu.org/hashicorp/test",
AttributeValues: AttributeValues{
"foozles": json.RawMessage(`null`),
"woozles": json.RawMessage(`"confuzles"`),
@ -470,7 +470,7 @@ func TestMarshalResources(t *testing.T) {
Type: "test_thing",
Name: "bar",
Index: nil,
ProviderName: "registry.terraform.io/hashicorp/test",
ProviderName: "registry.opentofu.org/hashicorp/test",
DeposedKey: deposedKey.String(),
AttributeValues: AttributeValues{
"foozles": json.RawMessage(`null`),
@ -519,7 +519,7 @@ func TestMarshalResources(t *testing.T) {
Type: "test_thing",
Name: "bar",
Index: nil,
ProviderName: "registry.terraform.io/hashicorp/test",
ProviderName: "registry.opentofu.org/hashicorp/test",
AttributeValues: AttributeValues{
"foozles": json.RawMessage(`null`),
"woozles": json.RawMessage(`"confuzles"`),
@ -532,7 +532,7 @@ func TestMarshalResources(t *testing.T) {
Type: "test_thing",
Name: "bar",
Index: nil,
ProviderName: "registry.terraform.io/hashicorp/test",
ProviderName: "registry.opentofu.org/hashicorp/test",
DeposedKey: deposedKey.String(),
AttributeValues: AttributeValues{
"foozles": json.RawMessage(`null`),
@ -579,7 +579,7 @@ func TestMarshalResources(t *testing.T) {
Type: "test_map_attr",
Name: "bar",
Index: nil,
ProviderName: "registry.terraform.io/hashicorp/test",
ProviderName: "registry.opentofu.org/hashicorp/test",
AttributeValues: AttributeValues{
"data": json.RawMessage(`{"woozles":"confuzles"}`),
},

View File

@ -1246,7 +1246,7 @@ func TestPlan_init_required(t *testing.T) {
t.Fatalf("expected error, got success")
}
got := output.Stderr()
if !(strings.Contains(got, "tofu init") && strings.Contains(got, "provider registry.terraform.io/hashicorp/test: required by this configuration but no version is selected")) {
if !(strings.Contains(got, "tofu init") && strings.Contains(got, "provider registry.opentofu.org/hashicorp/test: required by this configuration but no version is selected")) {
t.Fatal("wrong error message in output:", got)
}
}

View File

@ -44,7 +44,7 @@ func TestProvidersLock(t *testing.T) {
expected := `# This file is maintained automatically by "tofu init".
# Manual edits may be lost in future updates.
provider "registry.terraform.io/hashicorp/test" {
provider "registry.opentofu.org/hashicorp/test" {
version = "1.0.0"
hashes = [
"h1:7MjN4eFisdTv4tlhXH5hL4QQd39Jy4baPhFxwAd/EFE=",
@ -60,7 +60,7 @@ provider "registry.terraform.io/hashicorp/test" {
expected := `# This file is maintained automatically by "tofu init".
# Manual edits may be lost in future updates.
provider "registry.terraform.io/hashicorp/test" {
provider "registry.opentofu.org/hashicorp/test" {
version = "1.0.0"
hashes = [
"h1:7MjN4eFisdTv4tlhXH5hL4QQd39Jy4baPhFxwAd/EFE=",
@ -80,8 +80,8 @@ func runProviderLockGenericTest(t *testing.T, testDirectory, expected string) {
// Our fixture dir has a generic os_arch dir, which we need to customize
// to the actual OS/arch where this test is running in order to get the
// desired result.
fixtMachineDir := filepath.Join(td, "fs-mirror/registry.terraform.io/hashicorp/test/1.0.0/os_arch")
wantMachineDir := filepath.Join(td, "fs-mirror/registry.terraform.io/hashicorp/test/1.0.0/", fmt.Sprintf("%s_%s", runtime.GOOS, runtime.GOARCH))
fixtMachineDir := filepath.Join(td, "fs-mirror/registry.opentofu.org/hashicorp/test/1.0.0/os_arch")
wantMachineDir := filepath.Join(td, "fs-mirror/registry.opentofu.org/hashicorp/test/1.0.0/", fmt.Sprintf("%s_%s", runtime.GOOS, runtime.GOARCH))
err := os.Rename(fixtMachineDir, wantMachineDir)
if err != nil {
t.Fatalf("unexpected error: %s", err)
@ -175,7 +175,7 @@ func TestProvidersLock_args(t *testing.T) {
t.Fatalf("wrong exit code; expected 1, got %d", code)
}
output := ui.ErrorWriter.String()
if !strings.Contains(output, "The provider registry.terraform.io/hashicorp/random is not required by the\ncurrent configuration.") {
if !strings.Contains(output, "The provider registry.opentofu.org/hashicorp/random is not required by the\ncurrent configuration.") {
t.Fatalf("missing expected error message: %s", output)
}
})

View File

@ -34,9 +34,9 @@ func TestProviders(t *testing.T) {
}
wantOutput := []string{
"provider[registry.terraform.io/hashicorp/foo]",
"provider[registry.terraform.io/hashicorp/bar]",
"provider[registry.terraform.io/hashicorp/baz]",
"provider[registry.opentofu.org/hashicorp/foo]",
"provider[registry.opentofu.org/hashicorp/bar]",
"provider[registry.opentofu.org/hashicorp/baz]",
}
output := ui.OutputWriter.String()
@ -116,10 +116,10 @@ func TestProviders_modules(t *testing.T) {
}
wantOutput := []string{
"provider[registry.terraform.io/hashicorp/foo] 1.0.0", // from required_providers
"provider[registry.terraform.io/hashicorp/bar] 2.0.0", // from provider config
"provider[registry.opentofu.org/hashicorp/foo] 1.0.0", // from required_providers
"provider[registry.opentofu.org/hashicorp/bar] 2.0.0", // from provider config
"── module.kiddo", // tree node for child module
"provider[registry.terraform.io/hashicorp/baz]", // implied by a resource in the child module
"provider[registry.opentofu.org/hashicorp/baz]", // implied by a resource in the child module
}
output := ui.OutputWriter.String()
@ -153,10 +153,10 @@ func TestProviders_state(t *testing.T) {
}
wantOutput := []string{
"provider[registry.terraform.io/hashicorp/foo] 1.0.0", // from required_providers
"provider[registry.terraform.io/hashicorp/bar] 2.0.0", // from a provider config block
"provider[registry.opentofu.org/hashicorp/foo] 1.0.0", // from required_providers
"provider[registry.opentofu.org/hashicorp/bar] 2.0.0", // from a provider config block
"Providers required by state", // header for state providers
"provider[registry.terraform.io/hashicorp/baz]", // from a resouce in state (only)
"provider[registry.opentofu.org/hashicorp/baz]", // from a resouce in state (only)
}
output := ui.OutputWriter.String()
@ -190,9 +190,9 @@ func TestProviders_tests(t *testing.T) {
}
wantOutput := []string{
"provider[registry.terraform.io/hashicorp/foo]",
"provider[registry.opentofu.org/hashicorp/foo]",
"test.main",
"provider[registry.terraform.io/hashicorp/bar]",
"provider[registry.opentofu.org/hashicorp/bar]",
}
output := ui.OutputWriter.String()

View File

@ -968,10 +968,10 @@ foo = "bar"
const testRefreshStr = `
test_instance.foo:
ID = yes
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
`
const testRefreshCwdStr = `
test_instance.foo:
ID = yes
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
`

View File

@ -473,12 +473,12 @@ func TestStateMv_resourceToInstance(t *testing.T) {
testStateOutput(t, statePath, `
test_instance.bar.0:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.baz:
ID = foo
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`)
@ -691,12 +691,12 @@ func TestStateMv_instanceToResource(t *testing.T) {
testStateOutput(t, statePath, `
test_instance.bar:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.baz:
ID = foo
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`)
@ -709,12 +709,12 @@ test_instance.baz:
testStateOutput(t, backups[0], `
test_instance.baz:
ID = foo
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.foo.0:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`)
@ -766,7 +766,7 @@ func TestStateMv_instanceToNewResource(t *testing.T) {
testStateOutput(t, statePath, `
test_instance.bar["new"]:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`)
@ -787,7 +787,7 @@ test_instance.bar["new"]:
module.test:
test_instance.baz["new"]:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`)
@ -1787,7 +1787,7 @@ func TestStateMv_checkRequiredVersion(t *testing.T) {
const testStateMvOutputOriginal = `
test_instance.baz:
ID = foo
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
@ -1795,7 +1795,7 @@ test_instance.baz:
test_instance.foo
test_instance.foo:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`
@ -1803,12 +1803,12 @@ test_instance.foo:
const testStateMvOutput = `
test_instance.bar:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.baz:
ID = foo
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`
@ -1816,7 +1816,7 @@ test_instance.baz:
const testStateMvBackupAndBackupOutOptionsWithNonLocalBackendOutput = `
test_instance.bar:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`
@ -1824,12 +1824,12 @@ test_instance.bar:
const testStateMvCount_stateOut = `
test_instance.bar.0:
ID = foo
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.bar.1:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`
@ -1837,7 +1837,7 @@ test_instance.bar.1:
const testStateMvCount_stateOutSrc = `
test_instance.bar:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`
@ -1845,17 +1845,17 @@ test_instance.bar:
const testStateMvCount_stateOutOriginal = `
test_instance.bar:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.foo.0:
ID = foo
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.foo.1:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`
@ -1863,57 +1863,57 @@ test_instance.foo.1:
const testStateMvLargeCount_stateOut = `
test_instance.bar.0:
ID = foo0
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.bar.1:
ID = foo1
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.bar.2:
ID = foo2
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.bar.3:
ID = foo3
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.bar.4:
ID = foo4
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.bar.5:
ID = foo5
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.bar.6:
ID = foo6
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.bar.7:
ID = foo7
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.bar.8:
ID = foo8
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.bar.9:
ID = foo9
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.bar.10:
ID = foo10
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`
@ -1921,7 +1921,7 @@ test_instance.bar.10:
const testStateMvLargeCount_stateOutSrc = `
test_instance.bar:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`
@ -1929,62 +1929,62 @@ test_instance.bar:
const testStateMvLargeCount_stateOutOriginal = `
test_instance.bar:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.foo.0:
ID = foo0
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.foo.1:
ID = foo1
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.foo.2:
ID = foo2
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.foo.3:
ID = foo3
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.foo.4:
ID = foo4
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.foo.5:
ID = foo5
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.foo.6:
ID = foo6
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.foo.7:
ID = foo7
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.foo.8:
ID = foo8
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.foo.9:
ID = foo9
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.foo.10:
ID = foo10
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`
@ -1994,13 +1994,13 @@ const testStateMvNestedModule_stateOut = `
module.bar.child1:
test_instance.foo:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
module.bar.child2:
test_instance.foo:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`
@ -2010,7 +2010,7 @@ const testStateMvNewModule_stateOut = `
module.bar:
test_instance.bar:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`
@ -2020,7 +2020,7 @@ const testStateMvModuleNewModule_stateOut = `
module.foo:
test_instance.bar:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`
@ -2028,7 +2028,7 @@ module.foo:
const testStateMvNewModule_stateOutOriginal = `
test_instance.bar:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`
@ -2042,13 +2042,13 @@ const testStateMvNestedModule_stateOutOriginal = `
module.foo.child1:
test_instance.foo:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
module.foo.child2:
test_instance.foo:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`
@ -2056,7 +2056,7 @@ module.foo.child2:
const testStateMvOutput_stateOut = `
test_instance.bar:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`
@ -2068,7 +2068,7 @@ const testStateMvOutput_stateOutSrc = `
const testStateMvOutput_stateOutOriginal = `
test_instance.foo:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`
@ -2080,18 +2080,18 @@ const testStateMvExisting_stateSrc = `
const testStateMvExisting_stateDst = `
test_instance.bar:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.qux:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
`
const testStateMvExisting_stateSrcOriginal = `
test_instance.foo:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`
@ -2099,13 +2099,13 @@ test_instance.foo:
const testStateMvExisting_stateDstOriginal = `
test_instance.qux:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
`
const testStateMvOriginal_backend = `
test_instance.baz:
ID = foo
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`
@ -2115,7 +2115,7 @@ const testStateMvOnlyResourceInModule_original = `
module.foo:
test_instance.foo.0:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`
@ -2125,7 +2125,7 @@ const testStateMvOnlyResourceInModule_output = `
module.foo:
test_instance.bar.0:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`

View File

@ -393,33 +393,33 @@ func TestStateReplaceProvider_checkRequiredVersion(t *testing.T) {
const testStateReplaceProviderOutputOriginal = `
aws_instance.alpha:
ID = alpha
provider = provider["registry.terraform.io/hashicorp/aws"]
provider = provider["registry.opentofu.org/hashicorp/aws"]
bar = value
foo = value
aws_instance.beta:
ID = beta
provider = provider["registry.terraform.io/hashicorp/aws"]
provider = provider["registry.opentofu.org/hashicorp/aws"]
bar = value
foo = value
azurerm_virtual_machine.gamma:
ID = gamma
provider = provider["registry.terraform.io/-/azurerm"]
provider = provider["registry.opentofu.org/-/azurerm"]
baz = value
`
const testStateReplaceProviderOutput = `
aws_instance.alpha:
ID = alpha
provider = provider["registry.terraform.io/acmecorp/aws"]
provider = provider["registry.opentofu.org/acmecorp/aws"]
bar = value
foo = value
aws_instance.beta:
ID = beta
provider = provider["registry.terraform.io/acmecorp/aws"]
provider = provider["registry.opentofu.org/acmecorp/aws"]
bar = value
foo = value
azurerm_virtual_machine.gamma:
ID = gamma
provider = provider["registry.terraform.io/-/azurerm"]
provider = provider["registry.opentofu.org/-/azurerm"]
baz = value
`

View File

@ -147,7 +147,7 @@ func TestStateRmNotChildModule(t *testing.T) {
module.child:
test_instance.foo:
ID = foo
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`)
@ -160,14 +160,14 @@ module.child:
testStateOutput(t, backups[0], `
test_instance.foo:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
module.child:
test_instance.foo:
ID = foo
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`)
@ -563,12 +563,12 @@ func TestStateRm_checkRequiredVersion(t *testing.T) {
const testStateRmOutputOriginal = `
test_instance.bar:
ID = foo
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
test_instance.foo:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`
@ -576,7 +576,7 @@ test_instance.foo:
const testStateRmOutput = `
test_instance.bar:
ID = foo
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
bar = value
foo = value
`

View File

@ -546,22 +546,22 @@ func TestTaint_checkRequiredVersion(t *testing.T) {
const testTaintStr = `
test_instance.foo: (tainted)
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
`
const testTaintDefaultStr = `
test_instance.foo:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
`
const testTaintModuleStr = `
test_instance.foo:
ID = bar
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
module.child:
test_instance.blah: (tainted)
ID = blah
provider = provider["registry.terraform.io/hashicorp/test"]
provider = provider["registry.opentofu.org/hashicorp/test"]
`

View File

@ -673,7 +673,7 @@ Failure! 0 passed, 1 failed.
Error: Provider configuration not present
To work with test_resource.secondary its original provider configuration at
provider["registry.terraform.io/hashicorp/test"].secondary is required, but
provider["registry.opentofu.org/hashicorp/test"].secondary is required, but
it has been removed. This occurs when a provider configuration is removed
while objects created by that provider still exist in the state. Re-add the
provider configuration to destroy test_resource.secondary, after which you
@ -690,7 +690,7 @@ Failure! 0 passed, 1 failed.
Error: Provider configuration not present
To work with test_resource.secondary its original provider configuration at
provider["registry.terraform.io/hashicorp/test"].secondary is required, but
provider["registry.opentofu.org/hashicorp/test"].secondary is required, but
it has been removed. This occurs when a provider configuration is removed
while objects created by that provider still exist in the state. Re-add the
provider configuration to destroy test_resource.secondary, after which you
@ -708,7 +708,7 @@ Failure! 1 passed, 1 failed.
Error: Provider configuration not present
To work with test_resource.secondary its original provider configuration at
provider["registry.terraform.io/hashicorp/test"].secondary is required, but
provider["registry.opentofu.org/hashicorp/test"].secondary is required, but
it has been removed. This occurs when a provider configuration is removed
while objects created by that provider still exist in the state. Re-add the
provider configuration to destroy test_resource.secondary, after which you

View File

@ -1,2 +0,0 @@
# This is not a real provider executable. It's just here to be discovered
# during installation and produce a warning about it being in the wrong place.

View File

@ -1,2 +0,0 @@
# This is not a real provider executable. It's just here to be discovered
# during installation and produce a warning about it being in the wrong place.

View File

@ -1,21 +0,0 @@
terraform {
required_providers {
a = {
# This one is just not available at all
source = "example.com/test/a"
}
b = {
# This one is unavailable but happens to be cached in the legacy
# cache directory, under .terraform/plugins
source = "example.com/test/b"
}
c = {
# This one is also cached in the legacy cache directory, but it's
# an official provider so init will assume it got there via normal
# automatic installation and not generate a warning about it.
# This one is also not available at all, but it's an official
# provider so we don't expect to see a warning about it.
source = "hashicorp/c"
}
}
}

View File

@ -10,7 +10,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider": "provider[\"registry.terraform.io/hashicorp/test\"]",
"provider": "provider[\"registry.opentofu.org/hashicorp/test\"]",
"instances": [
{
"schema_version": 0,

View File

@ -10,7 +10,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider": "provider[\"registry.terraform.io/hashicorp/test\"]",
"provider": "provider[\"registry.opentofu.org/hashicorp/test\"]",
"instances": [
{
"schema_version": 0,

View File

@ -1,7 +1,7 @@
# This file is maintained automatically by "terraform init".
# Manual edits may be lost in future updates.
provider "registry.terraform.io/hashicorp/test" {
provider "registry.opentofu.org/hashicorp/test" {
version = "1.0.0"
hashes = [
"h1:invalid",

View File

@ -1,7 +1,7 @@
{
"format_version": "1.0",
"provider_schemas": {
"registry.terraform.io/hashicorp/test": {
"registry.opentofu.org/hashicorp/test": {
"provider": {
"version": 0,
"block": {

View File

@ -1,7 +1,7 @@
{
"format_version": "1.0",
"provider_schemas": {
"registry.terraform.io/hashicorp/test": {
"registry.opentofu.org/hashicorp/test": {
"provider": {
"version": 0,
"block": {

View File

@ -9,7 +9,7 @@
"mode": "managed",
"type": "baz_instance",
"name": "example",
"provider": "provider[\"registry.terraform.io/hashicorp/baz\"]",
"provider": "provider[\"registry.opentofu.org/hashicorp/baz\"]",
"instances": [
{
"schema_version": 0,

View File

@ -21,7 +21,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "bar",
@ -37,7 +37,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "bar",
@ -53,7 +53,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "bar",
@ -85,7 +85,7 @@
"index": 0,
"mode": "managed",
"type": "test_instance",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"name": "test",
"change": {
"actions": [
@ -108,7 +108,7 @@
"index": 1,
"mode": "managed",
"type": "test_instance",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"name": "test",
"change": {
"actions": [
@ -131,7 +131,7 @@
"index": 2,
"mode": "managed",
"type": "test_instance",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"name": "test",
"change": {
"actions": [
@ -166,7 +166,7 @@
"provider_config": {
"test": {
"name": "test",
"full_name": "registry.terraform.io/hashicorp/test",
"full_name": "registry.opentofu.org/hashicorp/test",
"expressions": {
"region": {
"constant_value": "somewhere"

View File

@ -10,7 +10,7 @@
"type": "test_instance",
"name": "example",
"index": 0,
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": null,
@ -24,7 +24,7 @@
"type": "test_instance",
"name": "example",
"index": 1,
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": null,

View File

@ -10,7 +10,7 @@
"type": "test_instance",
"name": "example",
"each": "list",
"provider": "provider[\"registry.terraform.io/hashicorp/test\"]",
"provider": "provider[\"registry.opentofu.org/hashicorp/test\"]",
"instances": [
{
"index_key": 0,

View File

@ -18,7 +18,7 @@
"mode": "managed",
"type": "test_instance",
"name": "example",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "bar-var",
@ -37,7 +37,7 @@
"type": "test_instance",
"name": "example",
"index": 0,
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "foo-var",

View File

@ -16,7 +16,7 @@
"type": "test_instance",
"name": "example",
"each": "list",
"provider": "provider[\"registry.terraform.io/hashicorp/test\"]",
"provider": "provider[\"registry.opentofu.org/hashicorp/test\"]",
"instances": [
{
"index_key": 0,
@ -33,7 +33,7 @@
"mode": "managed",
"type": "test_instance",
"name": "example",
"provider": "provider[\"registry.terraform.io/hashicorp/test\"]",
"provider": "provider[\"registry.opentofu.org/hashicorp/test\"]",
"instances": [
{
"schema_version": 0,

View File

@ -9,7 +9,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"id": "621124146446964903",

View File

@ -9,7 +9,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider": "provider[\"registry.terraform.io/hashicorp/test\"]",
"provider": "provider[\"registry.opentofu.org/hashicorp/test\"]",
"instances": [
{
"schema_version": 0,

View File

@ -21,7 +21,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "bar"
@ -34,7 +34,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "bar"
@ -47,7 +47,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "bar"
@ -76,7 +76,7 @@
"index": 0,
"mode": "managed",
"type": "test_instance",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"name": "test",
"change": {
"actions": [
@ -98,7 +98,7 @@
"index": 1,
"mode": "managed",
"type": "test_instance",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"name": "test",
"change": {
"actions": [
@ -120,7 +120,7 @@
"index": 2,
"mode": "managed",
"type": "test_instance",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"name": "test",
"change": {
"actions": [
@ -154,7 +154,7 @@
"provider_config": {
"test": {
"name": "test",
"full_name": "registry.terraform.io/hashicorp/test",
"full_name": "registry.opentofu.org/hashicorp/test",
"expressions": {
"region": {
"constant_value": "somewhere"

View File

@ -20,7 +20,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "bar",
@ -36,7 +36,7 @@
"address": "test_instance.test",
"mode": "managed",
"type": "test_instance",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"name": "test",
"change": {
"actions": [
@ -59,7 +59,7 @@
"address": "test_instance.test-delete",
"mode": "managed",
"type": "test_instance",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"name": "test-delete",
"action_reason": "delete_because_no_resource_config",
"change": {
@ -107,7 +107,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"values": {
"ami": "foo",
"id": "placeholder"
@ -120,7 +120,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test-delete",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"values": {
"ami": "foo",
"id": "placeholder"
@ -135,7 +135,7 @@
"provider_config": {
"test": {
"name": "test",
"full_name": "registry.terraform.io/hashicorp/test"
"full_name": "registry.opentofu.org/hashicorp/test"
}
},
"root_module": {

View File

@ -9,7 +9,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider": "provider[\"registry.terraform.io/hashicorp/test\"]",
"provider": "provider[\"registry.opentofu.org/hashicorp/test\"]",
"instances": [
{
"schema_version": 0,
@ -24,7 +24,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test-delete",
"provider": "provider[\"registry.terraform.io/hashicorp/test\"]",
"provider": "provider[\"registry.opentofu.org/hashicorp/test\"]",
"instances": [
{
"schema_version": 0,

View File

@ -20,7 +20,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "bar",
@ -36,7 +36,7 @@
"address": "test_instance.test",
"mode": "managed",
"type": "test_instance",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"name": "test",
"change": {
"actions": [
@ -86,7 +86,7 @@
"type": "test_instance",
"name": "test",
"schema_version": 0,
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"values": {
"ami": "bar",
"id": "placeholder"
@ -101,7 +101,7 @@
"provider_config": {
"test": {
"name": "test",
"full_name": "registry.terraform.io/hashicorp/test"
"full_name": "registry.opentofu.org/hashicorp/test"
}
},
"root_module": {

View File

@ -14,7 +14,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider": "provider[\"registry.terraform.io/hashicorp/test\"]",
"provider": "provider[\"registry.opentofu.org/hashicorp/test\"]",
"instances": [
{
"schema_version": 0,

View File

@ -9,7 +9,7 @@
"mode": "managed",
"type": "test_instance",
"name": "foo",
"provider": "provider[\"registry.terraform.io/hashicorp/test\"]",
"provider": "provider[\"registry.opentofu.org/hashicorp/test\"]",
"instances": [
{
"schema_version": 0,
@ -24,7 +24,7 @@
"mode": "managed",
"type": "test_instance",
"name": "bar",
"provider": "provider[\"registry.terraform.io/hashicorp/test\"]",
"provider": "provider[\"registry.opentofu.org/hashicorp/test\"]",
"instances": [
{
"schema_version": 0,

View File

@ -49,7 +49,7 @@
"mode": "managed",
"type": "test_instance",
"name": "bar",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "ami-test",
@ -65,7 +65,7 @@
"mode": "managed",
"type": "test_instance",
"name": "foo",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "ami-test",
@ -84,7 +84,7 @@
"provider_config": {
"test": {
"name": "test",
"full_name": "registry.terraform.io/hashicorp/test"
"full_name": "registry.opentofu.org/hashicorp/test"
}
},
"root_module": {

View File

@ -22,7 +22,7 @@
"mode": "managed",
"type": "test_instance",
"name": "bar",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "ami-boop"
@ -34,7 +34,7 @@
"mode": "managed",
"type": "test_instance",
"name": "foo",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "ami-test"
@ -50,7 +50,7 @@
"mode": "managed",
"type": "test_instance",
"name": "bar",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"change": {
"actions": [
"create"
@ -71,7 +71,7 @@
"mode": "managed",
"type": "test_instance",
"name": "foo",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"change": {
"actions": [
"create"
@ -103,7 +103,7 @@
"provider_config": {
"test": {
"name": "test",
"full_name": "registry.terraform.io/hashicorp/test"
"full_name": "registry.opentofu.org/hashicorp/test"
}
},
"root_module": {

View File

@ -8,7 +8,7 @@
"mode": "managed",
"type": "test_instance",
"name": "no_refresh",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "bar",
@ -21,7 +21,7 @@
"mode": "managed",
"type": "test_instance",
"name": "should_refresh",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "baz",
@ -37,7 +37,7 @@
"address": "test_instance.should_refresh",
"mode": "managed",
"type": "test_instance",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"name": "should_refresh",
"change": {
"actions": [
@ -62,7 +62,7 @@
"address": "test_instance.no_refresh",
"mode": "managed",
"type": "test_instance",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"name": "no_refresh",
"change": {
"actions": [
@ -85,7 +85,7 @@
"address": "test_instance.should_refresh",
"mode": "managed",
"type": "test_instance",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"name": "should_refresh",
"change": {
"actions": [
@ -116,7 +116,7 @@
"type": "test_instance",
"name": "no_refresh",
"schema_version": 0,
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"values": {
"ami": "foo",
"id": "placeholder"
@ -129,7 +129,7 @@
"type": "test_instance",
"name": "should_refresh",
"schema_version": 0,
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"values": {
"ami": "refreshed",
"id": "placeholder"
@ -144,7 +144,7 @@
"provider_config": {
"test": {
"name": "test",
"full_name": "registry.terraform.io/hashicorp/test"
"full_name": "registry.opentofu.org/hashicorp/test"
}
},
"root_module": {

View File

@ -8,7 +8,7 @@
"mode": "managed",
"type": "test_instance",
"name": "no_refresh",
"provider": "provider[\"registry.terraform.io/hashicorp/test\"]",
"provider": "provider[\"registry.opentofu.org/hashicorp/test\"]",
"instances": [
{
"schema_version": 0,
@ -23,7 +23,7 @@
"mode": "managed",
"type": "test_instance",
"name": "should_refresh",
"provider": "provider[\"registry.terraform.io/hashicorp/test\"]",
"provider": "provider[\"registry.opentofu.org/hashicorp/test\"]",
"instances": [
{
"schema_version": 0,

View File

@ -9,7 +9,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "foo-bar"
@ -25,7 +25,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"change": {
"actions": [
"create"
@ -46,7 +46,7 @@
"provider_config": {
"test": {
"name": "test",
"full_name": "registry.terraform.io/hashicorp/test"
"full_name": "registry.opentofu.org/hashicorp/test"
}
},
"root_module": {

View File

@ -17,7 +17,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "bar-var"
@ -35,7 +35,7 @@
"type": "test_instance",
"name": "test",
"index": 0,
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "baz"
@ -48,7 +48,7 @@
"type": "test_instance",
"name": "test",
"index": 1,
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "baz"
@ -61,7 +61,7 @@
"type": "test_instance",
"name": "test",
"index": 2,
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "baz"
@ -94,7 +94,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"change": {
"actions": [
"create"
@ -115,7 +115,7 @@
"module_address": "module.module_test_foo",
"mode": "managed",
"type": "test_instance",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"name": "test",
"index": 0,
"change": {
@ -138,7 +138,7 @@
"module_address": "module.module_test_foo",
"mode": "managed",
"type": "test_instance",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"name": "test",
"index": 1,
"change": {
@ -161,7 +161,7 @@
"module_address": "module.module_test_foo",
"mode": "managed",
"type": "test_instance",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"name": "test",
"index": 2,
"change": {
@ -294,12 +294,12 @@
"module.module_test_foo:test": {
"module_address": "module.module_test_foo",
"name": "test",
"full_name": "registry.terraform.io/hashicorp/test"
"full_name": "registry.opentofu.org/hashicorp/test"
},
"module.module_test_bar:test": {
"module_address": "module.module_test_bar",
"name": "test",
"full_name": "registry.terraform.io/hashicorp/test"
"full_name": "registry.opentofu.org/hashicorp/test"
}
}
}

View File

@ -8,7 +8,7 @@
"mode": "managed",
"type": "test_instance",
"name": "no_refresh",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "bar",
@ -21,7 +21,7 @@
"mode": "managed",
"type": "test_instance",
"name": "should_refresh_with_move",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "baz",
@ -38,7 +38,7 @@
"mode": "managed",
"type": "test_instance",
"previous_address": "test_instance.should_refresh",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"name": "should_refresh_with_move",
"change": {
"actions": [
@ -63,7 +63,7 @@
"address": "test_instance.no_refresh",
"mode": "managed",
"type": "test_instance",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"name": "no_refresh",
"change": {
"actions": [
@ -87,7 +87,7 @@
"mode": "managed",
"type": "test_instance",
"previous_address": "test_instance.should_refresh",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"name": "should_refresh_with_move",
"change": {
"actions": [
@ -118,7 +118,7 @@
"type": "test_instance",
"name": "no_refresh",
"schema_version": 0,
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"values": {
"ami": "foo",
"id": "placeholder"
@ -131,7 +131,7 @@
"type": "test_instance",
"name": "should_refresh_with_move",
"schema_version": 0,
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"values": {
"ami": "refreshed",
"id": "placeholder"
@ -146,7 +146,7 @@
"provider_config": {
"test": {
"name": "test",
"full_name": "registry.terraform.io/hashicorp/test"
"full_name": "registry.opentofu.org/hashicorp/test"
}
},
"root_module": {

View File

@ -8,7 +8,7 @@
"mode": "managed",
"type": "test_instance",
"name": "no_refresh",
"provider": "provider[\"registry.terraform.io/hashicorp/test\"]",
"provider": "provider[\"registry.opentofu.org/hashicorp/test\"]",
"instances": [
{
"schema_version": 0,
@ -23,7 +23,7 @@
"mode": "managed",
"type": "test_instance",
"name": "should_refresh",
"provider": "provider[\"registry.terraform.io/hashicorp/test\"]",
"provider": "provider[\"registry.opentofu.org/hashicorp/test\"]",
"instances": [
{
"schema_version": 0,

View File

@ -8,7 +8,7 @@
"mode": "managed",
"type": "test_instance",
"name": "baz",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "baz",
@ -25,7 +25,7 @@
"mode": "managed",
"type": "test_instance",
"previous_address": "test_instance.foo",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"name": "baz",
"change": {
"actions": [
@ -56,7 +56,7 @@
"type": "test_instance",
"name": "baz",
"schema_version": 0,
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"values": {
"ami": "foo",
"id": "placeholder"
@ -71,7 +71,7 @@
"provider_config": {
"test": {
"name": "test",
"full_name": "registry.terraform.io/hashicorp/test"
"full_name": "registry.opentofu.org/hashicorp/test"
}
},
"root_module": {

View File

@ -8,7 +8,7 @@
"mode": "managed",
"type": "test_instance",
"name": "foo",
"provider": "provider[\"registry.terraform.io/hashicorp/test\"]",
"provider": "provider[\"registry.opentofu.org/hashicorp/test\"]",
"instances": [
{
"schema_version": 0,

View File

@ -22,7 +22,7 @@
"type": "test_instance",
"name": "test",
"index": 0,
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "bar",
@ -36,7 +36,7 @@
"type": "test_instance",
"name": "test",
"index": 1,
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "bar"
@ -54,7 +54,7 @@
"name": "test",
"index": 0,
"previous_address": "test_instance.test",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"change": {
"actions": [
"no-op"
@ -78,7 +78,7 @@
"type": "test_instance",
"name": "test",
"index": 1,
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"change": {
"actions": [
"create"
@ -126,7 +126,7 @@
"type": "test_instance",
"name": "test",
"index": 0,
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "bar",
@ -142,7 +142,7 @@
"provider_config": {
"test": {
"name": "test",
"full_name": "registry.terraform.io/hashicorp/test"
"full_name": "registry.opentofu.org/hashicorp/test"
}
},
"root_module": {

View File

@ -14,7 +14,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider": "provider[\"registry.terraform.io/hashicorp/test\"]",
"provider": "provider[\"registry.opentofu.org/hashicorp/test\"]",
"instances": [
{
"schema_version": 0,

View File

@ -13,7 +13,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "bar-var"
@ -35,7 +35,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"change": {
"actions": ["create"],
"before": null,
@ -55,7 +55,7 @@
"module.my_module.module.more:test": {
"module_address": "module.my_module.module.more",
"name": "test",
"full_name": "registry.terraform.io/hashicorp/test"
"full_name": "registry.opentofu.org/hashicorp/test"
}
},
"root_module": {

View File

@ -7,7 +7,7 @@
"configuration": {
"provider_config": {
"test": {
"full_name": "registry.terraform.io/hashicorp/test",
"full_name": "registry.opentofu.org/hashicorp/test",
"name": "test"
}
},

View File

@ -9,7 +9,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "foo"
@ -25,7 +25,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp2/test",
"provider_name": "registry.opentofu.org/hashicorp2/test",
"schema_version": 0,
"values": {
"ami": "bar"
@ -44,7 +44,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"change": {
"actions": [
"create"
@ -66,7 +66,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp2/test",
"provider_name": "registry.opentofu.org/hashicorp2/test",
"change": {
"actions": [
"create"
@ -87,7 +87,7 @@
"provider_config": {
"test": {
"name": "test",
"full_name": "registry.terraform.io/hashicorp/test",
"full_name": "registry.opentofu.org/hashicorp/test",
"expressions": {
"region": {
"constant_value": "somewhere"
@ -97,7 +97,7 @@
"module.child:test": {
"module_address": "module.child",
"name": "test",
"full_name": "registry.terraform.io/hashicorp2/test"
"full_name": "registry.opentofu.org/hashicorp2/test"
}
},
"root_module": {

View File

@ -9,7 +9,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "foo"
@ -25,7 +25,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "bar"
@ -42,7 +42,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "qux"
@ -59,7 +59,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"schema_version": 0,
"values": {
"ami": "baz"
@ -80,7 +80,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"change": {
"actions": [
"create"
@ -102,7 +102,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"change": {
"actions": [
"create"
@ -124,7 +124,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"change": {
"actions": [
"create"
@ -146,7 +146,7 @@
"mode": "managed",
"type": "test_instance",
"name": "test",
"provider_name": "registry.terraform.io/hashicorp/test",
"provider_name": "registry.opentofu.org/hashicorp/test",
"change": {
"actions": [
"create"
@ -167,7 +167,7 @@
"provider_config": {
"test": {
"name": "test",
"full_name": "registry.terraform.io/hashicorp/test",
"full_name": "registry.opentofu.org/hashicorp/test",
"expressions": {
"region": {
"constant_value": "somewhere"
@ -176,7 +176,7 @@
},
"test.backup": {
"name": "test",
"full_name": "registry.terraform.io/hashicorp/test",
"full_name": "registry.opentofu.org/hashicorp/test",
"alias": "backup",
"expressions": {
"region": {

Some files were not shown because too many files have changed in this diff Show More