diff --git a/CHANGELOG.md b/CHANGELOG.md index da5c4fac49..f54d71fca1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ ENHANCEMENTS: * Added `-show-sensitive` flag to tofu plan, apply, state-show and output commands to display sensitive data in output. ([#1554](https://github.com/opentofu/opentofu/pull/1554)) * Improved performance for large graphs when debug logs are not enabled. ([#1810](https://github.com/opentofu/opentofu/pull/1810)) * Improved performance for large graphs with many submodules. ([#1809](https://github.com/opentofu/opentofu/pull/1809)) -* Added mutli-line support to the `tofu console` command. ([#1307](https://github.com/opentofu/opentofu/issues/1307)) +* Added multi-line support to the `tofu console` command. ([#1307](https://github.com/opentofu/opentofu/issues/1307)) * Added a help target to the Makefile. ([#1925](https://github.com/opentofu/opentofu/pull/1925)) * Added a simplified Build Process with a Makefile Target ([#1926](https://github.com/opentofu/opentofu/issues/1926)) diff --git a/TSC_SUMMARY.md b/TSC_SUMMARY.md index f62043c460..db3d733f57 100644 --- a/TSC_SUMMARY.md +++ b/TSC_SUMMARY.md @@ -666,7 +666,7 @@ TSC: #### IBM acquisition of Hashicorp -Shall we publish anything as OpenTofu regarding the acquision? +Shall we publish anything as OpenTofu regarding the acquisition? ##### Discussion/Decision diff --git a/WEEKLY_UPDATES.md b/WEEKLY_UPDATES.md index 56af817ec3..fbd5033aa8 100644 --- a/WEEKLY_UPDATES.md +++ b/WEEKLY_UPDATES.md @@ -66,7 +66,7 @@ Hello there! After the 1.7.1 release last week, the core team has been focusing - Current Status - [Init-time constant evaluation](https://github.com/opentofu/opentofu/issues/1042) - - Initial [discussion and planning](https://github.com/opentofu/opentofu/pull/1649) are happening as an extension of the RFC proces + - Initial [discussion and planning](https://github.com/opentofu/opentofu/pull/1649) are happening as an extension of the RFC process - [Registry UI](https://github.com/opentofu/registry/issues/450) - Designs and prototyping are in progress! - [Releases page with direct links to artifacts](https://github.com/opentofu/get.opentofu.org/pull/25) is now live https://get.opentofu.org/tofu/api.json diff --git a/docs/plugin-protocol/tfplugin5.2.proto b/docs/plugin-protocol/tfplugin5.2.proto index f60c687c5a..f7e921af03 100644 --- a/docs/plugin-protocol/tfplugin5.2.proto +++ b/docs/plugin-protocol/tfplugin5.2.proto @@ -10,7 +10,7 @@ // use protoc to generate stubs for your target language. // // This file will not be updated. Any minor versions of protocol 5 to follow -// should copy this file and modify the copy while maintaing backwards +// should copy this file and modify the copy while maintaining backwards // compatibility. Breaking changes, if any are required, will come // in a subsequent major version with its own separate proto definition. // diff --git a/docs/plugin-protocol/tfplugin5.3.proto b/docs/plugin-protocol/tfplugin5.3.proto index 0eb12afad4..eb9f68220c 100644 --- a/docs/plugin-protocol/tfplugin5.3.proto +++ b/docs/plugin-protocol/tfplugin5.3.proto @@ -10,7 +10,7 @@ // use protoc to generate stubs for your target language. // // This file will not be updated. Any minor versions of protocol 5 to follow -// should copy this file and modify the copy while maintaing backwards +// should copy this file and modify the copy while maintaining backwards // compatibility. Breaking changes, if any are required, will come // in a subsequent major version with its own separate proto definition. // diff --git a/docs/plugin-protocol/tfplugin5.4.proto b/docs/plugin-protocol/tfplugin5.4.proto index d78ae05054..fc91152af6 100644 --- a/docs/plugin-protocol/tfplugin5.4.proto +++ b/docs/plugin-protocol/tfplugin5.4.proto @@ -10,7 +10,7 @@ // use protoc to generate stubs for your target language. // // This file will not be updated. Any minor versions of protocol 5 to follow -// should copy this file and modify the copy while maintaing backwards +// should copy this file and modify the copy while maintaining backwards // compatibility. Breaking changes, if any are required, will come // in a subsequent major version with its own separate proto definition. // diff --git a/docs/plugin-protocol/tfplugin5.5.proto b/docs/plugin-protocol/tfplugin5.5.proto index 7b35a9a60a..2ee25347ce 100644 --- a/docs/plugin-protocol/tfplugin5.5.proto +++ b/docs/plugin-protocol/tfplugin5.5.proto @@ -10,7 +10,7 @@ // use protoc to generate stubs for your target language. // // This file will not be updated. Any minor versions of protocol 5 to follow -// should copy this file and modify the copy while maintaing backwards +// should copy this file and modify the copy while maintaining backwards // compatibility. Breaking changes, if any are required, will come // in a subsequent major version with its own separate proto definition. // diff --git a/docs/plugin-protocol/tfplugin6.0.proto b/docs/plugin-protocol/tfplugin6.0.proto index de4d589cc3..81eeb3e027 100644 --- a/docs/plugin-protocol/tfplugin6.0.proto +++ b/docs/plugin-protocol/tfplugin6.0.proto @@ -10,7 +10,7 @@ // use protoc to generate stubs for your target language. // // This file will not be updated. Any minor versions of protocol 6 to follow -// should copy this file and modify the copy while maintaing backwards +// should copy this file and modify the copy while maintaining backwards // compatibility. Breaking changes, if any are required, will come // in a subsequent major version with its own separate proto definition. // diff --git a/docs/plugin-protocol/tfplugin6.1.proto b/docs/plugin-protocol/tfplugin6.1.proto index ba610f200a..c5ff41c4ef 100644 --- a/docs/plugin-protocol/tfplugin6.1.proto +++ b/docs/plugin-protocol/tfplugin6.1.proto @@ -10,7 +10,7 @@ // use protoc to generate stubs for your target language. // // This file will not be updated. Any minor versions of protocol 6 to follow -// should copy this file and modify the copy while maintaing backwards +// should copy this file and modify the copy while maintaining backwards // compatibility. Breaking changes, if any are required, will come // in a subsequent major version with its own separate proto definition. // diff --git a/docs/plugin-protocol/tfplugin6.2.proto b/docs/plugin-protocol/tfplugin6.2.proto index 76b1a55026..1ce3b0ede0 100644 --- a/docs/plugin-protocol/tfplugin6.2.proto +++ b/docs/plugin-protocol/tfplugin6.2.proto @@ -10,7 +10,7 @@ // use protoc to generate stubs for your target language. // // This file will not be updated. Any minor versions of protocol 6 to follow -// should copy this file and modify the copy while maintaing backwards +// should copy this file and modify the copy while maintaining backwards // compatibility. Breaking changes, if any are required, will come // in a subsequent major version with its own separate proto definition. // diff --git a/docs/plugin-protocol/tfplugin6.3.proto b/docs/plugin-protocol/tfplugin6.3.proto index 34427bde06..182609c0d6 100644 --- a/docs/plugin-protocol/tfplugin6.3.proto +++ b/docs/plugin-protocol/tfplugin6.3.proto @@ -10,7 +10,7 @@ // use protoc to generate stubs for your target language. // // This file will not be updated. Any minor versions of protocol 6 to follow -// should copy this file and modify the copy while maintaing backwards +// should copy this file and modify the copy while maintaining backwards // compatibility. Breaking changes, if any are required, will come // in a subsequent major version with its own separate proto definition. // diff --git a/docs/plugin-protocol/tfplugin6.4.proto b/docs/plugin-protocol/tfplugin6.4.proto index 52d5088e42..609569cc46 100644 --- a/docs/plugin-protocol/tfplugin6.4.proto +++ b/docs/plugin-protocol/tfplugin6.4.proto @@ -10,7 +10,7 @@ // use protoc to generate stubs for your target language. // // This file will not be updated. Any minor versions of protocol 6 to follow -// should copy this file and modify the copy while maintaing backwards +// should copy this file and modify the copy while maintaining backwards // compatibility. Breaking changes, if any are required, will come // in a subsequent major version with its own separate proto definition. // diff --git a/docs/plugin-protocol/tfplugin6.5.proto b/docs/plugin-protocol/tfplugin6.5.proto index a5b7fe8ae4..93ad96797d 100644 --- a/docs/plugin-protocol/tfplugin6.5.proto +++ b/docs/plugin-protocol/tfplugin6.5.proto @@ -10,7 +10,7 @@ // use protoc to generate stubs for your target language. // // This file will not be updated. Any minor versions of protocol 6 to follow -// should copy this file and modify the copy while maintaing backwards +// should copy this file and modify the copy while maintaining backwards // compatibility. Breaking changes, if any are required, will come // in a subsequent major version with its own separate proto definition. // diff --git a/internal/addrs/instance_key.go b/internal/addrs/instance_key.go index 8bbb3fbee9..430327a1dd 100644 --- a/internal/addrs/instance_key.go +++ b/internal/addrs/instance_key.go @@ -51,7 +51,7 @@ func ParseInstanceKey(key cty.Value) (InstanceKey, error) { } } -// NoKey represents the absense of an InstanceKey, for the single instance +// NoKey represents the absence of an InstanceKey, for the single instance // of a configuration object that does not use "count" or "for_each" at all. var NoKey InstanceKey diff --git a/internal/addrs/module.go b/internal/addrs/module.go index ca051f21c2..9d87ecf2c9 100644 --- a/internal/addrs/module.go +++ b/internal/addrs/module.go @@ -144,7 +144,7 @@ func (m Module) Parent() Module { // In practice, this just turns the last element of the receiver into a // ModuleCall and then returns a slice of the receiever that excludes that // last part. This is just a convenience for situations where a call address -// is required, such as when dealing with *Reference and Referencable values. +// is required, such as when dealing with *Reference and Referenceable values. func (m Module) Call() (Module, ModuleCall) { if len(m) == 0 { panic("cannot produce ModuleCall for root module") diff --git a/internal/addrs/module_call.go b/internal/addrs/module_call.go index 8894f37d82..26f8180fc0 100644 --- a/internal/addrs/module_call.go +++ b/internal/addrs/module_call.go @@ -128,7 +128,7 @@ func (c ModuleCallInstance) Absolute(moduleAddr ModuleInstance) ModuleInstance { // ModuleInstance returns the address of the module instance that corresponds // to the receiving call instance when resolved in the given calling module. -// In other words, it returns the child module instance that the receving +// In other words, it returns the child module instance that the receiving // call instance creates. func (c ModuleCallInstance) ModuleInstance(caller ModuleInstance) ModuleInstance { return caller.Child(c.Call.Name, c.Key) @@ -189,7 +189,7 @@ func (co ModuleCallInstanceOutput) UniqueKey() UniqueKey { func (co ModuleCallInstanceOutput) uniqueKeySigil() {} // AbsOutputValue returns the absolute output value address that corresponds -// to the receving module call output address, once resolved in the given +// to the receiving module call output address, once resolved in the given // calling module. func (co ModuleCallInstanceOutput) AbsOutputValue(caller ModuleInstance) AbsOutputValue { moduleAddr := co.Call.ModuleInstance(caller) diff --git a/internal/addrs/module_instance.go b/internal/addrs/module_instance.go index 85d012ba33..0ba5fc11ae 100644 --- a/internal/addrs/module_instance.go +++ b/internal/addrs/module_instance.go @@ -346,7 +346,7 @@ func (m ModuleInstance) IsAncestor(o ModuleInstance) bool { // In practice, this just turns the last element of the receiver into a // ModuleCall and then returns a slice of the receiever that excludes that // last part. This is just a convenience for situations where a call address -// is required, such as when dealing with *Reference and Referencable values. +// is required, such as when dealing with *Reference and Referenceable values. func (m ModuleInstance) Call() (ModuleInstance, ModuleCall) { if len(m) == 0 { panic("cannot produce ModuleCall for root module") @@ -368,7 +368,7 @@ func (m ModuleInstance) Call() (ModuleInstance, ModuleCall) { // In practice, this just turns the last element of the receiver into a // ModuleCallInstance and then returns a slice of the receiever that excludes // that last part. This is just a convenience for situations where a call\ -// address is required, such as when dealing with *Reference and Referencable +// address is required, such as when dealing with *Reference and Referenceable // values. func (m ModuleInstance) CallInstance() (ModuleInstance, ModuleCallInstance) { if len(m) == 0 { @@ -387,7 +387,7 @@ func (m ModuleInstance) CallInstance() (ModuleInstance, ModuleCallInstance) { // TargetContains implements Targetable by returning true if the given other // address either matches the receiver, is a sub-module-instance of the // receiver, or is a targetable absolute address within a module that -// is contained within the reciever. +// is contained within the receiver. func (m ModuleInstance) TargetContains(other Targetable) bool { switch to := other.(type) { case Module: diff --git a/internal/addrs/module_source.go b/internal/addrs/module_source.go index 0a3a201d81..463d1203c8 100644 --- a/internal/addrs/module_source.go +++ b/internal/addrs/module_source.go @@ -123,7 +123,7 @@ func ParseModuleSource(raw string) (ModuleSource, error) { // and then create relative references within the same directory in order // to ensure all modules in the package are looking at a consistent filesystem // layout. We also assume that modules within a package are maintained together, -// which means that cross-cutting maintenence across all of them would be +// which means that cross-cutting maintenance across all of them would be // possible. // // The actual value of a ModuleSourceLocal is a normalized relative path using @@ -163,7 +163,7 @@ func parseModuleSourceLocal(raw string) (ModuleSourceLocal, error) { clean := path.Clean(raw) // However, we do need to keep a single "./" on the front if it isn't - // a "../" path, or else it would be ambigous with the registry address + // a "../" path, or else it would be ambiguous with the registry address // syntax. if !strings.HasPrefix(clean, "../") { clean = "./" + clean @@ -355,7 +355,7 @@ func (s ModuleSourceRemote) ForDisplay() string { // given path are both respected. // // This will return nonsense if given a registry address other than the one -// that generated the reciever via a registry lookup. +// that generated the receiver via a registry lookup. func (s ModuleSourceRemote) FromRegistry(given ModuleSourceRegistry) ModuleSourceRemote { ret := s // not a pointer, so this is a shallow copy diff --git a/internal/addrs/module_source_test.go b/internal/addrs/module_source_test.go index 86ad6697da..e1c6500ba2 100644 --- a/internal/addrs/module_source_test.go +++ b/internal/addrs/module_source_test.go @@ -368,7 +368,7 @@ func TestModuleSourceRemoteFromRegistry(t *testing.T) { } gotAddr := remote.FromRegistry(registry) if remote.Subdir != "foo" { - t.Errorf("FromRegistry modified the reciever; should be pure function") + t.Errorf("FromRegistry modified the receiver; should be pure function") } if registry.Subdir != "bar" { t.Errorf("FromRegistry modified the given address; should be pure function") @@ -387,7 +387,7 @@ func TestModuleSourceRemoteFromRegistry(t *testing.T) { } gotAddr := remote.FromRegistry(registry) if remote.Subdir != "foo" { - t.Errorf("FromRegistry modified the reciever; should be pure function") + t.Errorf("FromRegistry modified the receiver; should be pure function") } if registry.Subdir != "" { t.Errorf("FromRegistry modified the given address; should be pure function") @@ -406,7 +406,7 @@ func TestModuleSourceRemoteFromRegistry(t *testing.T) { } gotAddr := remote.FromRegistry(registry) if remote.Subdir != "" { - t.Errorf("FromRegistry modified the reciever; should be pure function") + t.Errorf("FromRegistry modified the receiver; should be pure function") } if registry.Subdir != "bar" { t.Errorf("FromRegistry modified the given address; should be pure function") diff --git a/internal/addrs/move_endpoint.go b/internal/addrs/move_endpoint.go index 347a340391..f7aad8819d 100644 --- a/internal/addrs/move_endpoint.go +++ b/internal/addrs/move_endpoint.go @@ -72,7 +72,7 @@ func (e *MoveEndpoint) Equal(other *MoveEndpoint) bool { } // MightUnifyWith returns true if it is possible that a later call to -// UnifyMoveEndpoints might succeed if given the reciever and the other +// UnifyMoveEndpoints might succeed if given the receiver and the other // given endpoint. // // This is intended for early static validation of obviously-wrong situations, @@ -86,7 +86,7 @@ func (e *MoveEndpoint) MightUnifyWith(other *MoveEndpoint) bool { return from != nil && to != nil } -// ConfigMovable transforms the reciever into a ConfigMovable by resolving it +// ConfigMovable transforms the receiver into a ConfigMovable by resolving it // relative to the given base module, which should be the module where // the MoveEndpoint expression was found. // diff --git a/internal/addrs/move_endpoint_module.go b/internal/addrs/move_endpoint_module.go index c06675d72f..c9edd4ada4 100644 --- a/internal/addrs/move_endpoint_module.go +++ b/internal/addrs/move_endpoint_module.go @@ -84,7 +84,7 @@ func (e *MoveEndpointInModule) ObjectKind() MoveEndpointKind { } // String produces a string representation of the object matching pattern -// represented by the reciever. +// represented by the receiver. // // Since there is no direct syntax for representing such an object matching // pattern, this function uses a splat-operator-like representation to stand @@ -113,7 +113,7 @@ func (e *MoveEndpointInModule) String() string { return buf.String() } -// Equal returns true if the reciever represents the same matching pattern +// Equal returns true if the receiver represents the same matching pattern // as the other given endpoint, ignoring the source location information. // // This is not an optimized function and is here primarily to help with @@ -245,7 +245,7 @@ func (e *MoveEndpointInModule) synthModuleInstance() ModuleInstance { return inst } -// SelectsModule returns true if the reciever directly selects either +// SelectsModule returns true if the receiver directly selects either // the given module or a resource nested directly inside that module. // // This is a good function to use to decide which modules in a state @@ -331,11 +331,11 @@ func moduleInstanceCanMatch(modA, modB ModuleInstance) bool { return true } -// CanChainFrom returns true if the reciever describes an address that could +// CanChainFrom returns true if the receiver describes an address that could // potentially select an object that the other given address could select. // // In other words, this decides whether the move chaining rule applies, if -// the reciever is the "to" from one statement and the other given address +// the receiver is the "to" from one statement and the other given address // is the "from" of another statement. func (e *MoveEndpointInModule) CanChainFrom(other *MoveEndpointInModule) bool { eMod := e.synthModuleInstance() @@ -490,7 +490,7 @@ func (m ModuleInstance) MoveDestination(fromMatch, toMatch *MoveEndpointInModule return nil, false } - // The rest of our work will be against the part of the reciever that's + // The rest of our work will be against the part of the receiver that's // relative to the declaration module. mRel is a weird abuse of // ModuleInstance that represents a relative module address, similar to // what we do for MoveEndpointInModule.relSubject. @@ -584,7 +584,7 @@ func (r AbsResource) MoveDestination(fromMatch, toMatch *MoveEndpointInModule) ( return AbsResource{}, false } - // fromMatch can only possibly match the reciever if the resource + // fromMatch can only possibly match the receiver if the resource // portions are identical, regardless of the module paths. if fromRelSubject.Resource != r.Resource { return AbsResource{}, false @@ -666,7 +666,7 @@ func (r AbsResourceInstance) MoveDestination(fromMatch, toMatch *MoveEndpointInM return AbsResourceInstance{}, false } - // fromMatch can only possibly match the reciever if the resource + // fromMatch can only possibly match the receiver if the resource // portions are identical, regardless of the module paths. if fromRelSubject.Resource != r.Resource { return AbsResourceInstance{}, false diff --git a/internal/addrs/move_endpoint_module_test.go b/internal/addrs/move_endpoint_module_test.go index 167f91d239..a5e6cdc8ee 100644 --- a/internal/addrs/move_endpoint_module_test.go +++ b/internal/addrs/move_endpoint_module_test.go @@ -286,7 +286,7 @@ func TestModuleInstanceMoveDestination(t *testing.T) { var diags tfdiags.Diagnostics receiverAddr, diags = ParseModuleInstanceStr(test.Receiver) if diags.HasErrors() { - t.Fatalf("invalid reciever address: %s", diags.Err().Error()) + t.Fatalf("invalid receiver address: %s", diags.Err().Error()) } } gotAddr, gotMatch := receiverAddr.MoveDestination(fromEP, toEP) @@ -394,7 +394,7 @@ func TestAbsResourceInstanceMoveDestination(t *testing.T) { `test_object.beep`, `test_object.boop`, `test_object.boop`, - false, // the reciever is already the "to" address + false, // the receiver is already the "to" address ``, }, { @@ -684,7 +684,7 @@ func TestAbsResourceInstanceMoveDestination(t *testing.T) { receiverAddr, diags := ParseAbsResourceInstanceStr(test.Receiver) if diags.HasErrors() { - t.Fatalf("invalid reciever address: %s", diags.Err().Error()) + t.Fatalf("invalid receiver address: %s", diags.Err().Error()) } gotAddr, gotMatch := receiverAddr.MoveDestination(fromEP, toEP) if !test.WantMatch { @@ -767,7 +767,7 @@ func TestAbsResourceMoveDestination(t *testing.T) { `test_object.beep`, `test_object.boop`, `test_object.boop`, - false, // the reciever is already the "to" address + false, // the receiver is already the "to" address ``, }, { @@ -1054,10 +1054,10 @@ func TestAbsResourceMoveDestination(t *testing.T) { // key. receiverInstanceAddr, diags := ParseAbsResourceInstanceStr(test.Receiver) if diags.HasErrors() { - t.Fatalf("invalid reciever address: %s", diags.Err().Error()) + t.Fatalf("invalid receiver address: %s", diags.Err().Error()) } if receiverInstanceAddr.Resource.Key != NoKey { - t.Fatalf("invalid reciever address: must be a resource, not a resource instance") + t.Fatalf("invalid receiver address: must be a resource, not a resource instance") } receiverAddr := receiverInstanceAddr.ContainingResource() gotAddr, gotMatch := receiverAddr.MoveDestination(fromEP, toEP) diff --git a/internal/addrs/output_value.go b/internal/addrs/output_value.go index 6daf65014b..d730ad7fe3 100644 --- a/internal/addrs/output_value.go +++ b/internal/addrs/output_value.go @@ -19,7 +19,7 @@ import ( // // This is related to but separate from ModuleCallOutput, which represents // a module output from the perspective of its parent module. Outputs are -// referencable from the testing scope, in general tofu operation users +// referenceable from the testing scope, in general tofu operation users // will be referencing ModuleCallOutput. type OutputValue struct { referenceable diff --git a/internal/addrs/parse_ref.go b/internal/addrs/parse_ref.go index abb00cc429..c2c31e42a5 100644 --- a/internal/addrs/parse_ref.go +++ b/internal/addrs/parse_ref.go @@ -25,7 +25,7 @@ type Reference struct { } // DisplayString returns a string that approximates the subject and remaining -// traversal of the reciever in a way that resembles the OpenTofu language +// traversal of the receiver in a way that resembles the OpenTofu language // syntax that could've produced it. // // It's not guaranteed to actually be a valid OpenTofu language expression, @@ -61,7 +61,7 @@ func (r *Reference) DisplayString() string { return ret.String() } -// ParseRef attempts to extract a referencable address from the prefix of the +// ParseRef attempts to extract a referenceable address from the prefix of the // given traversal, which must be an absolute traversal or this function // will panic. // diff --git a/internal/addrs/parse_target.go b/internal/addrs/parse_target.go index 3a4e6e307c..5c770632a9 100644 --- a/internal/addrs/parse_target.go +++ b/internal/addrs/parse_target.go @@ -405,7 +405,7 @@ func ParseAbsResourceInstanceStr(str string) (AbsResourceInstance, tfdiags.Diagn } // ModuleAddr returns the module address portion of the subject of -// the recieving target. +// the receiving target. // // Regardless of specific address type, all targets always include // a module address. They might also include something in that diff --git a/internal/addrs/provider_config.go b/internal/addrs/provider_config.go index 9599a9a168..4e76100246 100644 --- a/internal/addrs/provider_config.go +++ b/internal/addrs/provider_config.go @@ -35,7 +35,7 @@ import ( // // Recipients of a ProviderConfig value can assume it can contain only a // LocalProviderConfig value, an AbsProviderConfigValue, or nil to represent -// the absense of a provider config in situations where that is meaningful. +// the absence of a provider config in situations where that is meaningful. type ProviderConfig interface { providerConfig() } @@ -325,7 +325,7 @@ func ParseLegacyAbsProviderConfig(traversal hcl.Traversal) (AbsProviderConfig, t } // ProviderConfigDefault returns the address of the default provider config of -// the given type inside the recieving module instance. +// the given type inside the receiving module instance. func (m ModuleInstance) ProviderConfigDefault(provider Provider) AbsProviderConfig { return AbsProviderConfig{ Module: m.Module(), @@ -334,7 +334,7 @@ func (m ModuleInstance) ProviderConfigDefault(provider Provider) AbsProviderConf } // ProviderConfigAliased returns the address of an aliased provider config of -// the given type and alias inside the recieving module instance. +// the given type and alias inside the receiving module instance. func (m ModuleInstance) ProviderConfigAliased(provider Provider, alias string) AbsProviderConfig { return AbsProviderConfig{ Module: m.Module(), @@ -351,7 +351,7 @@ func (pc AbsProviderConfig) providerConfig() {} // such inheritance is possible, and thus whether the returned address is valid. // // Inheritance is possible only for default (un-aliased) providers in modules -// other than the root module. Even if a valid address is returned, inheritence +// other than the root module. Even if a valid address is returned, inheritance // may not be performed for other reasons, such as if the calling module // provided explicit provider configurations within the call for this module. // The ProviderTransformer graph transform in the main tofu module has the diff --git a/internal/addrs/resource.go b/internal/addrs/resource.go index e3d0f6b625..000ffab65c 100644 --- a/internal/addrs/resource.go +++ b/internal/addrs/resource.go @@ -63,7 +63,7 @@ func (r Resource) UniqueKey() UniqueKey { func (r Resource) uniqueKeySigil() {} // Instance produces the address for a specific instance of the receiver -// that is idenfied by the given key. +// that is identified by the given key. func (r Resource) Instance(key InstanceKey) ResourceInstance { return ResourceInstance{ Resource: r, @@ -171,7 +171,7 @@ func (m ModuleInstance) Resource(mode ResourceMode, typeName string, name string } // Instance produces the address for a specific instance of the receiver -// that is idenfied by the given key. +// that is identified by the given key. func (r AbsResource) Instance(key InstanceKey) AbsResourceInstance { return AbsResourceInstance{ Module: r.Module, @@ -279,7 +279,7 @@ func (m ModuleInstance) ResourceInstance(mode ResourceMode, typeName string, nam } // ContainingResource returns the address of the resource that contains the -// receving resource instance. In other words, it discards the key portion +// receiving resource instance. In other words, it discards the key portion // of the address to produce an AbsResource value. func (r AbsResourceInstance) ContainingResource() AbsResource { return AbsResource{ diff --git a/internal/addrs/resource_phase.go b/internal/addrs/resource_phase.go index d266ae0870..1ce57970d3 100644 --- a/internal/addrs/resource_phase.go +++ b/internal/addrs/resource_phase.go @@ -12,7 +12,7 @@ import "fmt" // non-primary state. // // Graph nodes can declare themselves referenceable via an instance phase -// or can declare that they reference an instance phase in order to accomodate +// or can declare that they reference an instance phase in order to accommodate // secondary graph nodes dealing with, for example, destroy actions. // // This special reference type cannot be accessed directly by end-users, and @@ -25,7 +25,7 @@ type ResourceInstancePhase struct { var _ Referenceable = ResourceInstancePhase{} -// Phase returns a special "phase address" for the receving instance. See the +// Phase returns a special "phase address" for the receiving instance. See the // documentation of ResourceInstancePhase for the limited situations where this // is intended to be used. func (r ResourceInstance) Phase(rpt ResourceInstancePhaseType) ResourceInstancePhase { @@ -78,7 +78,7 @@ func (rpt ResourceInstancePhaseType) String() string { // non-primary state. // // Graph nodes can declare themselves referenceable via a resource phase -// or can declare that they reference a resource phase in order to accomodate +// or can declare that they reference a resource phase in order to accommodate // secondary graph nodes dealing with, for example, destroy actions. // // Since resources (as opposed to instances) aren't actually phased, this @@ -97,7 +97,7 @@ type ResourcePhase struct { var _ Referenceable = ResourcePhase{} -// Phase returns a special "phase address" for the receving instance. See the +// Phase returns a special "phase address" for the receiving instance. See the // documentation of ResourceInstancePhase for the limited situations where this // is intended to be used. func (r Resource) Phase(rpt ResourceInstancePhaseType) ResourcePhase { diff --git a/internal/addrs/resource_test.go b/internal/addrs/resource_test.go index 9ecfb7bfd4..1267f26318 100644 --- a/internal/addrs/resource_test.go +++ b/internal/addrs/resource_test.go @@ -242,7 +242,7 @@ func TestAbsResourceUniqueKey(t *testing.T) { }.Absolute(RootModuleInstance.Child("boop", NoKey)) tests := []struct { - Reciever AbsResource + Receiver AbsResource Other UniqueKeyer WantEqual bool }{ @@ -279,15 +279,15 @@ func TestAbsResourceUniqueKey(t *testing.T) { } for _, test := range tests { - t.Run(fmt.Sprintf("%s matches %T %s?", test.Reciever, test.Other, test.Other), func(t *testing.T) { - rKey := test.Reciever.UniqueKey() + t.Run(fmt.Sprintf("%s matches %T %s?", test.Receiver, test.Other, test.Other), func(t *testing.T) { + rKey := test.Receiver.UniqueKey() oKey := test.Other.UniqueKey() gotEqual := rKey == oKey if gotEqual != test.WantEqual { t.Errorf( "wrong result\nreceiver: %s\nother: %s (%T)\ngot: %t\nwant: %t", - test.Reciever, test.Other, test.Other, + test.Receiver, test.Other, test.Other, gotEqual, test.WantEqual, ) } diff --git a/internal/addrs/set.go b/internal/addrs/set.go index 8ad995fd20..6ea43f2344 100644 --- a/internal/addrs/set.go +++ b/internal/addrs/set.go @@ -42,7 +42,7 @@ func (s Set[T]) Remove(addr T) { } // Union returns a new set which contains the union of all of the elements -// of both the reciever and the given other set. +// of both the receiver and the given other set. func (s Set[T]) Union(other Set[T]) Set[T] { ret := make(Set[T]) for k, addr := range s { @@ -55,7 +55,7 @@ func (s Set[T]) Union(other Set[T]) Set[T] { } // Intersection returns a new set which contains the intersection of all of the -// elements of both the reciever and the given other set. +// elements of both the receiver and the given other set. func (s Set[T]) Intersection(other Set[T]) Set[T] { ret := make(Set[T]) for k, addr := range s { diff --git a/internal/backend/init/init.go b/internal/backend/init/init.go index d90b0934a1..e632a64474 100644 --- a/internal/backend/init/init.go +++ b/internal/backend/init/init.go @@ -126,7 +126,7 @@ func (b deprecatedBackendShim) PrepareConfig(obj cty.Value) (cty.Value, tfdiags. return newObj, diags.Append(tfdiags.SimpleWarning(b.Message)) } -// DeprecateBackend can be used to wrap a backend to retrun a deprecation +// DeprecateBackend can be used to wrap a backend to return a deprecation // warning during validation. func deprecateBackend(b backend.Backend, message string) backend.Backend { // Since a Backend wrapped by deprecatedBackendShim can no longer be diff --git a/internal/backend/local/backend.go b/internal/backend/local/backend.go index 15de3a28ea..34a9929d02 100644 --- a/internal/backend/local/backend.go +++ b/internal/backend/local/backend.go @@ -309,7 +309,7 @@ func (b *Local) Operation(ctx context.Context, op *backend.Operation) (*backend. b.opLock.Lock() // Build our running operation - // the runninCtx is only used to block until the operation returns. + // the runningCtx is only used to block until the operation returns. runningCtx, done := context.WithCancel(context.Background()) runningOp := &backend.RunningOperation{ Context: runningCtx, diff --git a/internal/backend/local/backend_plan.go b/internal/backend/local/backend_plan.go index 340e8842c9..9d203f47a9 100644 --- a/internal/backend/local/backend_plan.go +++ b/internal/backend/local/backend_plan.go @@ -85,7 +85,7 @@ func (b *Local) opPlan( op.ReportResult(runningOp, diags) return } - // the state was locked during succesfull context creation; unlock the state + // the state was locked during successful context creation; unlock the state // when the operation completes defer func() { diags := op.StateLocker.Unlock() diff --git a/internal/backend/local/hook_state.go b/internal/backend/local/hook_state.go index ec5f8ca20c..8c210fa164 100644 --- a/internal/backend/local/hook_state.go +++ b/internal/backend/local/hook_state.go @@ -162,7 +162,7 @@ type IntermediateStateConditionalPersister interface { // emits an intermediate state event that is potentially eligible to be // persisted. // - // The implemention should return true to signal that the state snapshot + // The implementation should return true to signal that the state snapshot // most recently provided to the object's WriteState should be persisted, // or false if it should not be persisted. If this function returns true // then the receiver will see a subsequent call to diff --git a/internal/backend/remote-state/consul/client.go b/internal/backend/remote-state/consul/client.go index 759af4db2a..d1998b72a5 100644 --- a/internal/backend/remote-state/consul/client.go +++ b/internal/backend/remote-state/consul/client.go @@ -130,7 +130,7 @@ func (c *RemoteClient) Put(data []byte) error { // and whether the user enabled gzip: // - single entry mode with plain JSON: a single JSON is stored at // "tfstate/my_project" - // - single entry mode gzip: the JSON payload is first gziped and stored at + // - single entry mode gzip: the JSON payload is first gzipped and stored at // "tfstate/my_project" // - chunked mode with plain JSON: the JSON payload is split in pieces and // stored like so: @@ -147,10 +147,10 @@ func (c *RemoteClient) Put(data []byte) error { // - "tfstate/my_project/tfstate.abcdef1234/0" -> The first chunk // - "tfstate/my_project/tfstate.abcdef1234/1" -> The next one // - ... - // - chunked mode with gzip: the same system but we gziped the JSON payload + // - chunked mode with gzip: the same system but we gzipped the JSON payload // before splitting it in chunks // - // When overwritting the current state, we need to clean the old chunks if + // When overwriting the current state, we need to clean the old chunks if // we were in chunked mode (no matter whether we need to use chunks for the // new one). To do so based on the 4 possibilities above we look at the // value at "tfstate/my_project" and if it is: @@ -674,7 +674,7 @@ func (c *RemoteClient) chunkedMode() (bool, string, []string, *consulapi.KVPair, var d map[string]interface{} err = json.Unmarshal(pair.Value, &d) // If there is an error when unmarshaling the payload, the state has - // probably been gziped in single entry mode. + // probably been gzipped in single entry mode. if err == nil { // If we find the "current-hash" key we were in chunked mode hash, ok := d["current-hash"] diff --git a/internal/backend/remote-state/consul/client_test.go b/internal/backend/remote-state/consul/client_test.go index a26ce608e7..99eb45a5c2 100644 --- a/internal/backend/remote-state/consul/client_test.go +++ b/internal/backend/remote-state/consul/client_test.go @@ -207,9 +207,9 @@ func TestConsul_largeState(t *testing.T) { c.Path = path // We need a long random string so it results in multiple chunks even after - // being gziped + // being gzipped - // We use a fixed seed so the test can be reproductible + // We use a fixed seed so the test can be reproducible randomizer := rand.New(rand.NewSource(1234)) RandStringRunes := func(n int) string { var letterRunes = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") diff --git a/internal/backend/remote-state/kubernetes/backend.go b/internal/backend/remote-state/kubernetes/backend.go index 2e90dba481..8f7c0a7337 100644 --- a/internal/backend/remote-state/kubernetes/backend.go +++ b/internal/backend/remote-state/kubernetes/backend.go @@ -341,7 +341,7 @@ func tryLoadingConfigFile(d *schema.ResourceData) (*restclient.Config, error) { authInfo, authInfoOk := d.GetOk("config_context_auth_info") cluster, clusterOk := d.GetOk("config_context_cluster") if ctxOk || authInfoOk || clusterOk { - ctxSuffix = "; overriden context" + ctxSuffix = "; overridden context" if ctxOk { overrides.CurrentContext = ctx.(string) ctxSuffix += fmt.Sprintf("; config ctx: %s", overrides.CurrentContext) @@ -357,7 +357,7 @@ func tryLoadingConfigFile(d *schema.ResourceData) (*restclient.Config, error) { overrides.Context.Cluster = cluster.(string) ctxSuffix += fmt.Sprintf("; cluster: %s", overrides.Context.Cluster) } - log.Printf("[DEBUG] Using overidden context: %#v", overrides.Context) + log.Printf("[DEBUG] Using overridden context: %#v", overrides.Context) } if v, ok := d.GetOk("exec"); ok { diff --git a/internal/backend/remote-state/s3/backend.go b/internal/backend/remote-state/s3/backend.go index 62b97c0ab7..d3057fb3e5 100644 --- a/internal/backend/remote-state/s3/backend.go +++ b/internal/backend/remote-state/s3/backend.go @@ -1208,7 +1208,7 @@ func (e customEndpoint) String(obj cty.Value) string { return v } -func includeProtoIfNessesary(endpoint string) string { +func includeProtoIfNecessary(endpoint string) string { if matched, _ := regexp.MatchString("[a-z]*://.*", endpoint); !matched { log.Printf("[DEBUG] Adding https:// prefix to endpoint '%s'", endpoint) endpoint = fmt.Sprintf("https://%s", endpoint) @@ -1223,12 +1223,12 @@ func (e customEndpoint) StringOk(obj cty.Value) (string, bool) { continue } if s, ok := stringValueOk(val); ok { - return includeProtoIfNessesary(s), true + return includeProtoIfNecessary(s), true } } for _, envVar := range e.EnvVars { if v := os.Getenv(envVar); v != "" { - return includeProtoIfNessesary(v), true + return includeProtoIfNecessary(v), true } } return "", false diff --git a/internal/backend/remote-state/s3/backend_test.go b/internal/backend/remote-state/s3/backend_test.go index 23bda47bb8..e250f65049 100644 --- a/internal/backend/remote-state/s3/backend_test.go +++ b/internal/backend/remote-state/s3/backend_test.go @@ -693,7 +693,7 @@ func TestBackendConfig_PrepareConfigValidation(t *testing.T) { }), expectedErr: `The "workspace_key_prefix" attribute value must not start with "/".`, }, - "encyrption key conflict": { + "encryption key conflict": { config: cty.ObjectVal(map[string]cty.Value{ "bucket": cty.StringVal("test"), "key": cty.StringVal("test"), @@ -860,7 +860,7 @@ func TestBackendConfig_PrepareConfigWithEnvVars(t *testing.T) { "AWS_DEFAULT_REGION": "us-west-1", }, }, - "encyrption key conflict": { + "encryption key conflict": { config: cty.ObjectVal(map[string]cty.Value{ "bucket": cty.StringVal("test"), "key": cty.StringVal("test"), @@ -1530,7 +1530,7 @@ func Test_pathString(t *testing.T) { } } -func TestBackend_includeProtoIfNessesary(t *testing.T) { +func TestBackend_includeProtoIfNecessary(t *testing.T) { tests := []struct { name string provided string @@ -1565,7 +1565,7 @@ func TestBackend_includeProtoIfNessesary(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - result := includeProtoIfNessesary(test.provided) + result := includeProtoIfNecessary(test.provided) if result != test.expected { t.Errorf("Expected: %s, Got: %s", test.expected, result) } diff --git a/internal/backend/remote-state/s3/validate_test.go b/internal/backend/remote-state/s3/validate_test.go index b6ae6a817c..328abe425d 100644 --- a/internal/backend/remote-state/s3/validate_test.go +++ b/internal/backend/remote-state/s3/validate_test.go @@ -52,12 +52,12 @@ func TestValidateKMSKey(t *testing.T) { }, }, "non-kms arn": { - in: "arn:aws:lamda:foo:bar:key/xyz", + in: "arn:aws:lambda:foo:bar:key/xyz", expected: tfdiags.Diagnostics{ tfdiags.AttributeValue( tfdiags.Error, "Invalid KMS Key ARN", - `Value must be a valid KMS Key ARN, got "arn:aws:lamda:foo:bar:key/xyz"`, + `Value must be a valid KMS Key ARN, got "arn:aws:lambda:foo:bar:key/xyz"`, path, ), }, diff --git a/internal/backend/remote/backend.go b/internal/backend/remote/backend.go index 24c536fc42..07c84d3a90 100644 --- a/internal/backend/remote/backend.go +++ b/internal/backend/remote/backend.go @@ -808,7 +808,7 @@ func (b *Remote) Operation(ctx context.Context, op *backend.Operation) (*backend b.opLock.Lock() // Build our running operation - // the runninCtx is only used to block until the operation returns. + // the runningCtx is only used to block until the operation returns. runningCtx, done := context.WithCancel(context.Background()) runningOp := &backend.RunningOperation{ Context: runningCtx, @@ -901,7 +901,7 @@ func (b *Remote) cancel(cancelCtx context.Context, op *backend.Operation, r *tfe } } else { if b.CLI != nil { - // Insert a blank line to separate the ouputs. + // Insert a blank line to separate the outputs. b.CLI.Output("") } } diff --git a/internal/backend/remote/backend_apply.go b/internal/backend/remote/backend_apply.go index 1f0041705b..eafb424829 100644 --- a/internal/backend/remote/backend_apply.go +++ b/internal/backend/remote/backend_apply.go @@ -248,7 +248,7 @@ func (b *Remote) opApply(stopCtx, cancelCtx context.Context, op *backend.Operati } // If we don't need to ask for confirmation, insert a blank - // line to separate the ouputs. + // line to separate the outputs. if w.AutoApply || !mustConfirm { if b.CLI != nil { b.CLI.Output("") diff --git a/internal/backend/remote/backend_apply_test.go b/internal/backend/remote/backend_apply_test.go index a875881d13..85a847bb78 100644 --- a/internal/backend/remote/backend_apply_test.go +++ b/internal/backend/remote/backend_apply_test.go @@ -1140,7 +1140,7 @@ func TestRemote_applyLockTimeout(t *testing.T) { t.Fatalf("expected remote backend header in output: %s", output) } if !strings.Contains(output, "Lock timeout exceeded") { - t.Fatalf("expected lock timout error in output: %s", output) + t.Fatalf("expected lock timeout error in output: %s", output) } if strings.Contains(output, "1 to add, 0 to change, 0 to destroy") { t.Fatalf("unexpected plan summery in output: %s", output) @@ -1408,7 +1408,7 @@ func TestRemote_applyPolicySoftFailAutoApproveSuccess(t *testing.T) { } if run.PlanEmpty { - t.Fatalf("expected plan to not be empty, plan opertion completed without error") + t.Fatalf("expected plan to not be empty, plan operation completed without error") } if len(input.answers) != 0 { @@ -1422,7 +1422,7 @@ func TestRemote_applyPolicySoftFailAutoApproveSuccess(t *testing.T) { output := b.CLI.(*cli.MockUi).OutputWriter.String() if !strings.Contains(output, "Sentinel Result: false") { - t.Fatalf("expected policy check to be false, insead got: %s", output) + t.Fatalf("expected policy check to be false, instead got: %s", output) } if !strings.Contains(output, "Apply complete!") { t.Fatalf("expected apply to be complete, instead got: %s", output) diff --git a/internal/backend/remote/backend_common.go b/internal/backend/remote/backend_common.go index 1946e94bf1..70e3aa7d4e 100644 --- a/internal/backend/remote/backend_common.go +++ b/internal/backend/remote/backend_common.go @@ -73,7 +73,7 @@ func (b *Remote) waitForRun(stopCtx, cancelCtx context.Context, op *backend.Oper b.CLI.Output(b.Colorize().Color(fmt.Sprintf("Waiting for the %s to start...\n", opType))) } if i > 0 && b.CLI != nil { - // Insert a blank line to separate the ouputs. + // Insert a blank line to separate the outputs. b.CLI.Output("") } return r, nil @@ -232,7 +232,7 @@ func (b *Remote) hasExplicitVariableValues(op *backend.Operation) bool { } // We're intentionally ignoring the diagnostics here because validation - // of the variable values is the responsibilty of the remote system. Our + // of the variable values is the responsibility of the remote system. Our // goal here is just to make a best effort count of how many variable // values are coming from -var or -var-file CLI arguments so that we can // hint the user that those are not supported for remote operations. diff --git a/internal/backend/remote/backend_context.go b/internal/backend/remote/backend_context.go index 33751fd694..a2e6fb8de6 100644 --- a/internal/backend/remote/backend_context.go +++ b/internal/backend/remote/backend_context.go @@ -294,7 +294,7 @@ func (v *remoteStoredVariableValue) ParseVariableValue(mode configs.VariablePars // We mark these as "from input" with the rationale that entering // variable values into the Terraform Cloud or Enterprise UI is, // roughly speaking, a similar idea to entering variable values at - // the interactive CLI prompts. It's not a perfect correspondance, + // the interactive CLI prompts. It's not a perfect correspondence, // but it's closer than the other options. SourceType: tofu.ValueFromInput, }, diags diff --git a/internal/backend/remote/backend_plan.go b/internal/backend/remote/backend_plan.go index 54a04eb65d..e4ea0fb64f 100644 --- a/internal/backend/remote/backend_plan.go +++ b/internal/backend/remote/backend_plan.go @@ -355,7 +355,7 @@ in order to capture the filesystem context the remote workspace expects: b.CLI.Output(b.Colorize().Color(strings.TrimSpace(lockTimeoutErr))) } - // We abuse the auto aprove flag to indicate that we do not + // We abuse the auto approve flag to indicate that we do not // want to ask if the remote operation should be canceled. op.AutoApprove = true diff --git a/internal/backend/remote/backend_plan_test.go b/internal/backend/remote/backend_plan_test.go index 02a50519ff..06bec10c61 100644 --- a/internal/backend/remote/backend_plan_test.go +++ b/internal/backend/remote/backend_plan_test.go @@ -888,7 +888,7 @@ func TestRemote_planLockTimeout(t *testing.T) { t.Fatalf("expected remote backend header in output: %s", output) } if !strings.Contains(output, "Lock timeout exceeded") { - t.Fatalf("expected lock timout error in output: %s", output) + t.Fatalf("expected lock timeout error in output: %s", output) } if strings.Contains(output, "1 to add, 0 to change, 0 to destroy") { t.Fatalf("unexpected plan summary in output: %s", output) diff --git a/internal/backend/unparsed_value.go b/internal/backend/unparsed_value.go index b735d46e57..a9960dfa3e 100644 --- a/internal/backend/unparsed_value.go +++ b/internal/backend/unparsed_value.go @@ -134,7 +134,7 @@ func ParseDeclaredVariableValues(vv map[string]UnparsedVariableValue, decls map[ return ret, diags } -// Checks all given tofu.InputValues variable maps for the existance of +// Checks all given tofu.InputValues variable maps for the existence of // a named variable func isDefinedAny(name string, maps ...tofu.InputValues) bool { for _, m := range maps { diff --git a/internal/checks/state.go b/internal/checks/state.go index 2b63981263..caf4c6a123 100644 --- a/internal/checks/state.go +++ b/internal/checks/state.go @@ -89,7 +89,7 @@ func NewState(config *configs.Config) *State { } // ConfigHasChecks returns true if and only if the given address refers to -// a configuration object that this State object is expecting to recieve +// a configuration object that this State object is expecting to receive // statuses for. // // Other methods of Checks will typically panic if given a config address diff --git a/internal/checks/status.go b/internal/checks/status.go index c8aee18c47..ee5a008bfe 100644 --- a/internal/checks/status.go +++ b/internal/checks/status.go @@ -37,7 +37,7 @@ const ( // StatusError represents that OpenTofu Core tried to evaluate the check's // condition but encountered an error while evaluating the check expression. // - // This is different than StatusFail because StatusFail indiciates that + // This is different than StatusFail because StatusFail indicates that // the condition was valid and returned false, whereas StatusError // indicates that the condition was not valid at all. StatusError Status = 'E' diff --git a/internal/cloud/backend.go b/internal/cloud/backend.go index b00202e805..54d1daec4f 100644 --- a/internal/cloud/backend.go +++ b/internal/cloud/backend.go @@ -832,7 +832,7 @@ func (b *Cloud) Operation(ctx context.Context, op *backend.Operation) (*backend. b.opLock.Lock() // Build our running operation - // the runninCtx is only used to block until the operation returns. + // the runningCtx is only used to block until the operation returns. runningCtx, done := context.WithCancel(context.Background()) runningOp := &backend.RunningOperation{ Context: runningCtx, @@ -922,7 +922,7 @@ func (b *Cloud) cancel(cancelCtx context.Context, op *backend.Operation, r *tfe. } } else { if b.CLI != nil { - // Insert a blank line to separate the ouputs. + // Insert a blank line to separate the outputs. b.CLI.Output("") } } diff --git a/internal/cloud/backend_apply.go b/internal/cloud/backend_apply.go index 9b9b087ccf..e941ad2278 100644 --- a/internal/cloud/backend_apply.go +++ b/internal/cloud/backend_apply.go @@ -176,7 +176,7 @@ func (b *Cloud) opApply(stopCtx, cancelCtx context.Context, op *backend.Operatio return r, errApplyNeedsUIConfirmation } else { // If we don't need to ask for confirmation, insert a blank - // line to separate the ouputs. + // line to separate the outputs. if b.CLI != nil { b.CLI.Output("") } diff --git a/internal/cloud/backend_apply_test.go b/internal/cloud/backend_apply_test.go index ccfb33aa13..b67105eda0 100644 --- a/internal/cloud/backend_apply_test.go +++ b/internal/cloud/backend_apply_test.go @@ -1245,7 +1245,7 @@ func TestCloud_applyLockTimeout(t *testing.T) { t.Fatalf("expected TFC header in output: %s", output) } if !strings.Contains(output, "Lock timeout exceeded") { - t.Fatalf("expected lock timout error in output: %s", output) + t.Fatalf("expected lock timeout error in output: %s", output) } if strings.Contains(output, "1 to add, 0 to change, 0 to destroy") { t.Fatalf("unexpected plan summery in output: %s", output) @@ -1638,7 +1638,7 @@ func TestCloud_applyPolicySoftFailAutoApproveSuccess(t *testing.T) { } if run.PlanEmpty { - t.Fatalf("expected plan to not be empty, plan opertion completed without error") + t.Fatalf("expected plan to not be empty, plan operation completed without error") } if len(input.answers) != 0 { @@ -1652,7 +1652,7 @@ func TestCloud_applyPolicySoftFailAutoApproveSuccess(t *testing.T) { output := b.CLI.(*cli.MockUi).OutputWriter.String() if !strings.Contains(output, "Sentinel Result: false") { - t.Fatalf("expected policy check to be false, insead got: %s", output) + t.Fatalf("expected policy check to be false, instead got: %s", output) } if !strings.Contains(output, "Apply complete!") { t.Fatalf("expected apply to be complete, instead got: %s", output) diff --git a/internal/cloud/backend_common.go b/internal/cloud/backend_common.go index a99d7cc642..0f0dc94678 100644 --- a/internal/cloud/backend_common.go +++ b/internal/cloud/backend_common.go @@ -72,7 +72,7 @@ func (b *Cloud) waitForRun(stopCtx, cancelCtx context.Context, op *backend.Opera b.CLI.Output(b.Colorize().Color(fmt.Sprintf("Waiting for the %s to start...\n", opType))) } if i > 0 && b.CLI != nil { - // Insert a blank line to separate the ouputs. + // Insert a blank line to separate the outputs. b.CLI.Output("") } return r, nil diff --git a/internal/cloud/backend_context.go b/internal/cloud/backend_context.go index bf80373641..d5082433f7 100644 --- a/internal/cloud/backend_context.go +++ b/internal/cloud/backend_context.go @@ -291,7 +291,7 @@ func (v *remoteStoredVariableValue) ParseVariableValue(mode configs.VariablePars // We mark these as "from input" with the rationale that entering // variable values into the Terraform Cloud or Enterprise UI is, // roughly speaking, a similar idea to entering variable values at - // the interactive CLI prompts. It's not a perfect correspondance, + // the interactive CLI prompts. It's not a perfect correspondence, // but it's closer than the other options. SourceType: tofu.ValueFromInput, }, diags diff --git a/internal/cloud/backend_plan.go b/internal/cloud/backend_plan.go index de50d115d0..f6f33d95a3 100644 --- a/internal/cloud/backend_plan.go +++ b/internal/cloud/backend_plan.go @@ -103,7 +103,7 @@ func (b *Cloud) opPlan(stopCtx, cancelCtx context.Context, op *backend.Operation } } - // Everything succeded, so display next steps + // Everything succeeded, so display next steps op.View.PlanNextStep(op.PlanOutPath, op.GenerateConfigOut) return run, nil @@ -307,7 +307,7 @@ in order to capture the filesystem context the remote workspace expects: b.CLI.Output(b.Colorize().Color(strings.TrimSpace(lockTimeoutErr))) } - // We abuse the auto aprove flag to indicate that we do not + // We abuse the auto approve flag to indicate that we do not // want to ask if the remote operation should be canceled. op.AutoApprove = true diff --git a/internal/cloud/backend_plan_test.go b/internal/cloud/backend_plan_test.go index db99624473..5128b9f33a 100644 --- a/internal/cloud/backend_plan_test.go +++ b/internal/cloud/backend_plan_test.go @@ -884,7 +884,7 @@ func TestCloud_planLockTimeout(t *testing.T) { t.Fatalf("expected TFC header in output: %s", output) } if !strings.Contains(output, "Lock timeout exceeded") { - t.Fatalf("expected lock timout error in output: %s", output) + t.Fatalf("expected lock timeout error in output: %s", output) } if strings.Contains(output, "1 to add, 0 to change, 0 to destroy") { t.Fatalf("unexpected plan summary in output: %s", output) diff --git a/internal/cloud/backend_taskStages_test.go b/internal/cloud/backend_taskStages_test.go index e82ae37d58..f05a59b332 100644 --- a/internal/cloud/backend_taskStages_test.go +++ b/internal/cloud/backend_taskStages_test.go @@ -133,7 +133,7 @@ func TestTaskStagesWithAllStages(t *testing.T) { } { if stage, ok := taskStages[stageName]; ok { if stage.Stage != stageName { - t.Errorf("Expected task stage indexed by %s to find a Task Stage with the same index, but receieved %s", stageName, stage.Stage) + t.Errorf("Expected task stage indexed by %s to find a Task Stage with the same index, but received %s", stageName, stage.Stage) } } else { t.Errorf("Expected task stage indexed by %s to exist, but it did not", stageName) diff --git a/internal/command/apply_test.go b/internal/command/apply_test.go index fc1330071b..203df15672 100644 --- a/internal/command/apply_test.go +++ b/internal/command/apply_test.go @@ -1134,7 +1134,7 @@ func TestApply_shutdown(t *testing.T) { }) // Because of the internal lock in the MockProvider, we can't - // coordiante directly with the calling of Stop, and making the + // coordinate directly with the calling of Stop, and making the // MockProvider concurrent is disruptive to a lot of existing tests. // Wait here a moment to help make sure the main goroutine gets to the // Stop call before we exit, or the plan may finish before it can be diff --git a/internal/command/arguments/extended.go b/internal/command/arguments/extended.go index 58a41e2b7b..9ad4e305bf 100644 --- a/internal/command/arguments/extended.go +++ b/internal/command/arguments/extended.go @@ -34,7 +34,7 @@ type State struct { LockTimeout time.Duration // StatePath specifies a non-default location for the state file. The - // default value is blank, which is interpeted as "terraform.tfstate". + // default value is blank, which is interpreted as "terraform.tfstate". StatePath string // StateOutPath specifies a different path to write the final state file. @@ -183,7 +183,7 @@ func (o *Operation) Parse() tfdiags.Diagnostics { } // Vars describes arguments which specify non-default variable values. This -// interfce is unfortunately obscure, because the order of the CLI arguments +// interface is unfortunately obscure, because the order of the CLI arguments // determines the final value of the gathered variables. In future it might be // desirable for the arguments package to handle the gathering of variables // directly, returning a map of variable values. diff --git a/internal/command/cliconfig/config_unix.go b/internal/command/cliconfig/config_unix.go index d68d288209..8839a39b66 100644 --- a/internal/command/cliconfig/config_unix.go +++ b/internal/command/cliconfig/config_unix.go @@ -64,7 +64,7 @@ func homeDir() (string, error) { // First prefer the HOME environmental variable if home := os.Getenv("HOME"); home != "" { // FIXME: homeDir gets called from globalPluginDirs during init, before - // the logging is set up. We should move meta initializtion outside of + // the logging is set up. We should move meta initialization outside of // init, but in the meantime we just need to silence this output. // log.Printf("[DEBUG] Detected home directory from env var: %s", home) diff --git a/internal/command/cliconfig/credentials.go b/internal/command/cliconfig/credentials.go index 0fe77a075a..bd041024a1 100644 --- a/internal/command/cliconfig/credentials.go +++ b/internal/command/cliconfig/credentials.go @@ -360,7 +360,7 @@ func (s *CredentialsSource) updateLocalHostCredentials(host svchost.Hostname, ne return fmt.Errorf("credentials file %s has invalid value for \"credentials\" property: must be a JSON object", filename) } - // We use display-oriented hostnames in our file to mimick how a human user + // We use display-oriented hostnames in our file to mimic how a human user // would write it, so we need to search for and remove any key that // normalizes to our target hostname so we won't generate something invalid // when the existing entry is slightly different. diff --git a/internal/command/cliconfig/provider_installation.go b/internal/command/cliconfig/provider_installation.go index 35c52ee18b..35a541ad6d 100644 --- a/internal/command/cliconfig/provider_installation.go +++ b/internal/command/cliconfig/provider_installation.go @@ -62,7 +62,7 @@ func decodeProviderInstallationFromConfig(hclFile *hclast.File) ([]*ProviderInst // This is a rather odd hybrid: it's a HCL 2-like decode implemented using // the HCL 1 AST API. That makes it a bit awkward in places, but it allows - // us to mimick the strictness of HCL 2 (making a later migration easier) + // us to mimic the strictness of HCL 2 (making a later migration easier) // and to support a block structure that the HCL 1 decoder can't represent. for _, block := range root.Items { if block.Keys[0].Token.Value() != "provider_installation" { diff --git a/internal/command/e2etest/providers_tamper_test.go b/internal/command/e2etest/providers_tamper_test.go index 6558700076..4690e52eb7 100644 --- a/internal/command/e2etest/providers_tamper_test.go +++ b/internal/command/e2etest/providers_tamper_test.go @@ -175,7 +175,7 @@ func TestProviderTampering(t *testing.T) { // NOTE: We're just emptying out the lock file here because that's // good enough for what we're trying to assert. The leaf codepath // that generates this family of errors has some different variations - // of this error message for otehr sorts of inconsistency, but those + // of this error message for other sorts of inconsistency, but those // are tested more thoroughly over in the "configs" package, which is // ultimately responsible for that logic. err := os.WriteFile(filepath.Join(workDir, ".terraform.lock.hcl"), []byte(``), 0600) diff --git a/internal/command/fmt.go b/internal/command/fmt.go index 0474dde499..c54990e120 100644 --- a/internal/command/fmt.go +++ b/internal/command/fmt.go @@ -472,7 +472,7 @@ func (c *FmtCommand) formatTypeExpr(tokens hclwrite.Tokens) hclwrite.Tokens { // element type, we use string as the default element // type. That will avoid oddities if somehow the configuration // was relying on numeric values being auto-converted to - // string, as 0.11 would do. This mimicks what terraform + // string, as 0.11 would do. This mimics what terraform // 0.12upgrade used to do, because we'd found real-world // modules that were depending on the auto-stringing.) switch string(strTok.Bytes) { diff --git a/internal/command/format/diagnostic.go b/internal/command/format/diagnostic.go index 85e23ba19d..1f53950b69 100644 --- a/internal/command/format/diagnostic.go +++ b/internal/command/format/diagnostic.go @@ -208,7 +208,7 @@ func DiagnosticWarningsCompact(diags tfdiags.Diagnostics, color *colorstring.Col } } else if len(sources) > 1 { b.WriteString(fmt.Sprintf( - " (%d occurences of this warning)\n", + " (%d occurrences of this warning)\n", len(sources), )) } diff --git a/internal/command/init.go b/internal/command/init.go index 215281fc13..e7667cd6f6 100644 --- a/internal/command/init.go +++ b/internal/command/init.go @@ -437,7 +437,7 @@ func (c *InitCommand) getModules(ctx context.Context, path, testsDir string, ear func (c *InitCommand) initCloud(ctx context.Context, root *configs.Module, extraConfig rawFlags, enc encryption.Encryption) (be backend.Backend, output bool, diags tfdiags.Diagnostics) { ctx, span := tracer.Start(ctx, "initialize cloud backend") - _ = ctx // prevent staticcheck from complaining to avoid a maintenence hazard of having the wrong ctx in scope here + _ = ctx // prevent staticcheck from complaining to avoid a maintenance hazard of having the wrong ctx in scope here defer span.End() c.Ui.Output(c.Colorize().Color("\n[reset][bold]Initializing cloud backend...")) @@ -465,7 +465,7 @@ func (c *InitCommand) initCloud(ctx context.Context, root *configs.Module, extra func (c *InitCommand) initBackend(ctx context.Context, root *configs.Module, extraConfig rawFlags, enc encryption.Encryption) (be backend.Backend, output bool, diags tfdiags.Diagnostics) { ctx, span := tracer.Start(ctx, "initialize backend") - _ = ctx // prevent staticcheck from complaining to avoid a maintenence hazard of having the wrong ctx in scope here + _ = ctx // prevent staticcheck from complaining to avoid a maintenance hazard of having the wrong ctx in scope here defer span.End() c.Ui.Output(c.Colorize().Color("\n[reset][bold]Initializing the backend...")) @@ -1195,7 +1195,7 @@ Options: itself. -force-copy Suppress prompts about copying state data when - initializating a new state backend. This is + initializing a new state backend. This is equivalent to providing a "yes" to all confirmation prompts. diff --git a/internal/command/init_test.go b/internal/command/init_test.go index 31fd84d15b..27faaef2b5 100644 --- a/internal/command/init_test.go +++ b/internal/command/init_test.go @@ -471,7 +471,7 @@ func TestInit_backendConfigFilePowershellConfusion(t *testing.T) { // // Adding the "=" here forces this codepath to be checked, and it should // result in an early exit with a diagnostic that the provided - // configuration file is not a diretory. + // configuration file is not a directory. args := []string{"-backend-config=", "./input.config"} if code := c.Run(args); code != 1 { t.Fatalf("got exit status %d; want 1\nstderr:\n%s\n\nstdout:\n%s", code, ui.ErrorWriter.String(), ui.OutputWriter.String()) diff --git a/internal/command/jsonconfig/config.go b/internal/command/jsonconfig/config.go index dfb468be76..033f61b916 100644 --- a/internal/command/jsonconfig/config.go +++ b/internal/command/jsonconfig/config.go @@ -337,7 +337,7 @@ func marshalModule(c *configs.Config, schemas *tofu.Schemas, addr string) (modul ref, diags := addrs.ParseRef(d) // we should not get an error here, because `tofu validate` // would have complained well before this point, but if we do we'll - // silenty skip it. + // silently skip it. if !diags.HasErrors() { dependencies[i] = ref.Subject.String() } @@ -432,7 +432,7 @@ func marshalModuleCall(c *configs.Config, mc *configs.ModuleCall, schemas *tofu. ref, diags := addrs.ParseRef(d) // we should not get an error here, because `tofu validate` // would have complained well before this point, but if we do we'll - // silenty skip it. + // silently skip it. if !diags.HasErrors() { dependencies[i] = ref.Subject.String() } @@ -505,7 +505,7 @@ func marshalResources(resources map[string]*configs.Resource, schemas *tofu.Sche ref, diags := addrs.ParseRef(d) // we should not get an error here, because `tofu validate` // would have complained well before this point, but if we do we'll - // silenty skip it. + // silently skip it. if !diags.HasErrors() { dependencies[i] = ref.Subject.String() } @@ -523,7 +523,7 @@ func marshalResources(resources map[string]*configs.Resource, schemas *tofu.Sche // Flatten all resource provider keys in a module and its descendents, such // that any resources from providers using a configuration passed through the -// module call have a direct refernce to that provider configuration. +// module call have a direct reference to that provider configuration. func normalizeModuleProviderKeys(m *module, pcs map[string]providerConfig) { for i, r := range m.Resources { if pc, exists := pcs[r.ProviderConfigKey]; exists { diff --git a/internal/command/jsonconfig/expression.go b/internal/command/jsonconfig/expression.go index 0fed1a608b..a9ac66d9de 100644 --- a/internal/command/jsonconfig/expression.go +++ b/internal/command/jsonconfig/expression.go @@ -55,8 +55,8 @@ func marshalExpression(ex hcl.Expression) expression { var varString []string for _, ref := range refs { // We work backwards here, starting with the full reference + - // reamining traversal, and then unwrapping the remaining traversals - // into parts until we end up at the smallest referencable address. + // remaining traversal, and then unwrapping the remaining traversals + // into parts until we end up at the smallest referenceable address. remains := ref.Remaining for len(remains) > 0 { varString = append(varString, fmt.Sprintf("%s%s", ref.Subject, traversalStr(remains))) diff --git a/internal/command/jsonprovider/function_test.go b/internal/command/jsonprovider/function_test.go index 754c823087..b5894041e1 100644 --- a/internal/command/jsonprovider/function_test.go +++ b/internal/command/jsonprovider/function_test.go @@ -74,7 +74,7 @@ func TestMarshalReturnType(t *testing.T) { t.Run(tn, func(t *testing.T) { actual := marshalReturnType(tc.Arg) - // to avoid the nightmare of comparing cty primitve types we can marshal them to json and compare that + // to avoid the nightmare of comparing cty primitive types we can marshal them to json and compare that actualJSON, _ := json.Marshal(actual) expectedJSON, _ := json.Marshal(tc.Expected) if !cmp.Equal(actualJSON, expectedJSON) { @@ -122,7 +122,7 @@ func TestMarshalParameter(t *testing.T) { t.Run(tn, func(t *testing.T) { actual := marshalParameter(tc.Arg) - // to avoid the nightmare of comparing cty primitve types we can marshal them to json and compare that + // to avoid the nightmare of comparing cty primitive types we can marshal them to json and compare that actualJSON, _ := json.Marshal(actual) expectedJSON, _ := json.Marshal(tc.Expected) if !cmp.Equal(actualJSON, expectedJSON) { @@ -155,7 +155,7 @@ func TestMarshalParameters(t *testing.T) { t.Run(tn, func(t *testing.T) { actual := marshalParameters(tc.Arg) - // to avoid the nightmare of comparing cty primitve types we can marshal them to json and compare that + // to avoid the nightmare of comparing cty primitive types we can marshal them to json and compare that actualJSON, _ := json.Marshal(actual) expectedJSON, _ := json.Marshal(tc.Expected) if !cmp.Equal(actualJSON, expectedJSON) { @@ -206,7 +206,7 @@ func TestMarshalFunction(t *testing.T) { t.Run(tn, func(t *testing.T) { actual := marshalFunction(tc.Arg) - // to avoid the nightmare of comparing cty primitve types we can marshal them to json and compare that + // to avoid the nightmare of comparing cty primitive types we can marshal them to json and compare that actualJSON, _ := json.Marshal(actual) expectedJSON, _ := json.Marshal(tc.Expected) if !cmp.Equal(actualJSON, expectedJSON) { @@ -239,7 +239,7 @@ func TestMarshalFunctions(t *testing.T) { t.Run(tn, func(t *testing.T) { actual := marshalFunctions(tc.Arg) - // to avoid the nightmare of comparing cty primitve types we can marshal them to json and compare that + // to avoid the nightmare of comparing cty primitive types we can marshal them to json and compare that actualJSON, _ := json.Marshal(actual) expectedJSON, _ := json.Marshal(tc.Expected) if !cmp.Equal(actualJSON, expectedJSON) { diff --git a/internal/command/jsonprovider/provider.go b/internal/command/jsonprovider/provider.go index e3c2190005..f4b0de832c 100644 --- a/internal/command/jsonprovider/provider.go +++ b/internal/command/jsonprovider/provider.go @@ -38,7 +38,7 @@ func newProviders() *Providers { } } -// MarshalForRenderer converts the provided internation representation of the +// MarshalForRenderer converts the provided internal representation of the // schema into the public structured JSON versions. // // This is a format that can be read by the structured plan renderer. diff --git a/internal/command/login.go b/internal/command/login.go index b6bda12547..98709ab313 100644 --- a/internal/command/login.go +++ b/internal/command/login.go @@ -781,7 +781,7 @@ func (c *LoginCommand) listenerForCallback(minPort, maxPort uint16) (net.Listene } func (c *LoginCommand) proofKey() (key, challenge string, err error) { - // Wel use a UUID-like string as the "proof key for code exchange" (PKCE) + // We'll use a UUID-like string as the "proof key for code exchange" (PKCE) // that will eventually authenticate our request to the token endpoint. // Standard UUIDs are explicitly not suitable as secrets according to the // UUID spec, but our go-uuid just generates totally random number sequences diff --git a/internal/command/login_test.go b/internal/command/login_test.go index 8d6225db37..bcf9ec62c0 100644 --- a/internal/command/login_test.go +++ b/internal/command/login_test.go @@ -312,7 +312,7 @@ func TestLogin(t *testing.T) { // The following test does not use browser MockLauncher() and forces `tofu login` command print URL // and wait for the callback with code. // There is no timeout in `tofu login` OAuth2 callback server code, so the only way to interrupt it - // is to wirte to the shutdown channel (or complete the login process). + // is to write to the shutdown channel (or complete the login process). t.Run("example.com Ctrl+C interrupts login command", loginTestCase(func(t *testing.T, c *LoginCommand, ui *cli.MockUi) { // Enter "yes" at the consent prompt. defer testInputMap(t, map[string]string{ diff --git a/internal/command/meta_backend.go b/internal/command/meta_backend.go index c148264756..389c8d9903 100644 --- a/internal/command/meta_backend.go +++ b/internal/command/meta_backend.go @@ -436,7 +436,7 @@ func (m *Meta) Operation(b backend.Backend, vt arguments.ViewType, enc encryptio // should always have been called earlier to prepare the "ContextOpts" // for the backend anyway, so we should never actually get here in // a real situation. If we do get here then the backend will inevitably - // fail downstream somwhere if it tries to use the empty depLocks. + // fail downstream somewhere if it tries to use the empty depLocks. log.Printf("[WARN] Failed to load dependency locks while preparing backend operation (ignored): %s", diags.Err().Error()) } diff --git a/internal/command/meta_backend_migrate.go b/internal/command/meta_backend_migrate.go index 23b2e99c95..0171c3bd5a 100644 --- a/internal/command/meta_backend_migrate.go +++ b/internal/command/meta_backend_migrate.go @@ -253,7 +253,7 @@ func (m *Meta) backendMigrateState_S_s(opts *backendMigrateOpts) error { // Copy the default state opts.sourceWorkspace = currentWorkspace - // now switch back to the default env so we can acccess the new backend + // now switch back to the default env so we can access the new backend m.SetWorkspace(backend.DefaultStateName) return m.backendMigrateState_s_s(opts) @@ -452,7 +452,7 @@ func (m *Meta) backendMigrateState_s_s(opts *backendMigrateOpts) error { // The backend is currently handled before providers are installed during init, // so requiring schemas here could lead to a catch-22 where it requires some manual // intervention to proceed far enough for provider installation. To avoid this, - // when migrating to TFC backend, the initial JSON varient of state won't be generated and stored. + // when migrating to TFC backend, the initial JSON variant of state won't be generated and stored. if err := destinationState.PersistState(nil); err != nil { return fmt.Errorf(strings.TrimSpace(errBackendStateCopy), opts.SourceType, opts.DestinationType, err) @@ -559,7 +559,7 @@ func (m *Meta) backendMigrateTFC(opts *backendMigrateOpts) error { if err != nil { return err } - //to be used below, not yet implamented + // to be used below, not yet implemented // destinationWorkspaces, destinationSingleState _, _, err = retrieveWorkspaces(opts.Destination, opts.SourceType) if err != nil { @@ -655,7 +655,7 @@ func (m *Meta) backendMigrateTFC(opts *backendMigrateOpts) error { } // TODO(omar): after the check for sourceSingle is done, everything following - // it has to be multi. So rework the code to not need to check for multi, adn + // it has to be multi. So rework the code to not need to check for multi, and // return m.backendMigrateState_S_TFC here. return nil } diff --git a/internal/command/meta_config.go b/internal/command/meta_config.go index c3e70e20d6..08b80c9fcc 100644 --- a/internal/command/meta_config.go +++ b/internal/command/meta_config.go @@ -177,7 +177,7 @@ func (m *Meta) loadSingleModuleWithTests(dir string, testDir string) (*configs.M // least one OpenTofu configuration file (.tf or .tf.json), returning true // if so. // -// In the unlikely event that the underlying config loader cannot be initalized, +// In the unlikely event that the underlying config loader cannot be initialized, // this function optimistically returns true, assuming that the caller will // then do some other operation that requires the config loader and get an // error at that point. diff --git a/internal/command/meta_vars.go b/internal/command/meta_vars.go index 0b2a98a475..f34e9af4bd 100644 --- a/internal/command/meta_vars.go +++ b/internal/command/meta_vars.go @@ -69,7 +69,7 @@ func (m *Meta) collectVariableValues() (map[string]backend.UnparsedVariableValue } // Next up we load implicit files from the specified directory (first root then tests dir - // as tests dir files have higher precendence). These files are automatically loaded if present. + // as tests dir files have higher precedence). These files are automatically loaded if present. // There's the original terraform.tfvars (DefaultVarsFilename) along with the later-added // search for all files ending in .auto.tfvars. diags = diags.Append(m.addVarsFromDir(".", ret)) diff --git a/internal/command/providers_test.go b/internal/command/providers_test.go index 571d51cf34..8bb2e6f480 100644 --- a/internal/command/providers_test.go +++ b/internal/command/providers_test.go @@ -158,7 +158,7 @@ func TestProviders_state(t *testing.T) { "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.opentofu.org/hashicorp/baz]", // from a resouce in state (only) + "provider[registry.opentofu.org/hashicorp/baz]", // from a resource in state (only) } output := ui.OutputWriter.String() diff --git a/internal/command/testdata/show-json/conditions/for-refresh.tfstate b/internal/command/testdata/show-json/conditions/for-refresh.tfstate index b5146137e6..2d9d65f7d9 100644 --- a/internal/command/testdata/show-json/conditions/for-refresh.tfstate +++ b/internal/command/testdata/show-json/conditions/for-refresh.tfstate @@ -38,7 +38,7 @@ "schema_version": 0, "attributes": { "ami": "ami-test", - "id": "placeheld" + "id": "placeholder" }, "sensitive_attributes": [ [ diff --git a/internal/command/testdata/show-json/conditions/output-refresh-only.json b/internal/command/testdata/show-json/conditions/output-refresh-only.json index 9e13ab3cb1..a6b636e449 100644 --- a/internal/command/testdata/show-json/conditions/output-refresh-only.json +++ b/internal/command/testdata/show-json/conditions/output-refresh-only.json @@ -53,7 +53,7 @@ "schema_version": 0, "values": { "ami": "ami-test", - "id": "placeheld", + "id": "placeholder", "password": null }, "sensitive_values": { diff --git a/internal/command/testdata/validate-invalid/interpolation/main.tf b/internal/command/testdata/validate-invalid/interpolation/main.tf index bbb8e6978c..5c398bcf6a 100644 --- a/internal/command/testdata/validate-invalid/interpolation/main.tf +++ b/internal/command/testdata/validate-invalid/interpolation/main.tf @@ -2,7 +2,7 @@ variable "otherresourcename" { default = "aws_instance.web1" } -variable "vairable_with_interpolation" { +variable "variable_with_interpolation" { default = "${var.otherresourcename}" } diff --git a/internal/command/testdata/validate-invalid/interpolation/output.json b/internal/command/testdata/validate-invalid/interpolation/output.json index 2843b19121..cbba0626ec 100644 --- a/internal/command/testdata/validate-invalid/interpolation/output.json +++ b/internal/command/testdata/validate-invalid/interpolation/output.json @@ -22,7 +22,7 @@ } }, "snippet": { - "context": "variable \"vairable_with_interpolation\"", + "context": "variable \"variable_with_interpolation\"", "code": " default = \"${var.otherresourcename}\"", "start_line": 6, "highlight_start_offset": 15, diff --git a/internal/command/validate_test.go b/internal/command/validate_test.go index b6a25e17e4..8c5119b317 100644 --- a/internal/command/validate_test.go +++ b/internal/command/validate_test.go @@ -122,7 +122,7 @@ func TestValidateFailingCommandMissingVariable(t *testing.T) { } } -func TestSameProviderMutipleTimesShouldFail(t *testing.T) { +func TestSameProviderMultipleTimesShouldFail(t *testing.T) { output, code := setupTest(t, "validate-invalid/multiple_providers") if code != 1 { t.Fatalf("Should have failed: %d\n\n%s", code, output.Stderr()) @@ -221,7 +221,7 @@ func TestMissingDefinedVar(t *testing.T) { func TestValidateWithInvalidTestFile(t *testing.T) { // We're reusing some testing configs that were written for testing the - // test command here, so we have to initalise things slightly differently + // test command here, so we have to initialise things slightly differently // to the other tests. view, done := testView(t) @@ -253,7 +253,7 @@ func TestValidateWithInvalidTestFile(t *testing.T) { func TestValidateWithInvalidTestModule(t *testing.T) { // We're reusing some testing configs that were written for testing the - // test command here, so we have to initalise things slightly differently + // test command here, so we have to initialise things slightly differently // to the other tests. td := t.TempDir() diff --git a/internal/command/views/test.go b/internal/command/views/test.go index 3ba2e059bc..78ff3c82ca 100644 --- a/internal/command/views/test.go +++ b/internal/command/views/test.go @@ -571,7 +571,7 @@ func testStatus(status moduletest.Status) string { } } -// SaveErroredTestStateFile is a helper function to invoked in DestorySummary +// SaveErroredTestStateFile is a helper function to invoked in DestroySummary // to store the state to errored_test.tfstate and handle associated diagnostics and errors with this operation func SaveErroredTestStateFile(state *states.State, run *moduletest.Run, file *moduletest.File, view Test) { var diags tfdiags.Diagnostics diff --git a/internal/command/views/view.go b/internal/command/views/view.go index fe13cc07dd..084c1533e1 100644 --- a/internal/command/views/view.go +++ b/internal/command/views/view.go @@ -64,7 +64,7 @@ func NewView(streams *terminal.Streams) *View { // instead for situations where the user isn't running OpenTofu directly. // // For convenient use during initialization (in conjunction with NewView), -// SetRunningInAutomation returns the reciever after modifying it. +// SetRunningInAutomation returns the receiver after modifying it. func (v *View) SetRunningInAutomation(new bool) *View { v.runningInAutomation = new return v diff --git a/internal/command/webbrowser/mock.go b/internal/command/webbrowser/mock.go index d733311041..a6ecc85509 100644 --- a/internal/command/webbrowser/mock.go +++ b/internal/command/webbrowser/mock.go @@ -61,7 +61,7 @@ type MockLauncher struct { // would naturally complete. Context context.Context - // Responses is a log of all of the responses recieved from the launcher's + // Responses is a log of all of the responses received from the launcher's // requests, in the order requested. Responses []*http.Response diff --git a/internal/command/workdir/dir.go b/internal/command/workdir/dir.go index d57e4d13cc..f0b0b22879 100644 --- a/internal/command/workdir/dir.go +++ b/internal/command/workdir/dir.go @@ -16,7 +16,7 @@ import ( // "Working directory" is unfortunately a slight misnomer, because non-default // options can potentially stretch the definition such that multiple working // directories end up appearing to share a data directory, or other similar -// anomolies, but we continue to use this terminology both for historical +// anomalies, but we continue to use this terminology both for historical // reasons and because it reflects the common case without any special // overrides. // @@ -84,7 +84,7 @@ func NewDir(mainPath string) *Dir { } // OverrideOriginalWorkingDir records a different path as the -// "original working directory" for the reciever. +// "original working directory" for the receiver. // // Use this only to record the original working directory when OpenTofu is run // with the -chdir=... global option. In that case, the directory given in @@ -125,7 +125,7 @@ func (d *Dir) OriginalWorkingDir() string { return d.originalDir } -// DataDir returns the base path where the reciever keeps all of the settings +// DataDir returns the base path where the receiver keeps all of the settings // and artifacts that must persist between consecutive commands in a single // session. // diff --git a/internal/communicator/ssh/communicator.go b/internal/communicator/ssh/communicator.go index ffe666cfb2..ec0c12d024 100644 --- a/internal/communicator/ssh/communicator.go +++ b/internal/communicator/ssh/communicator.go @@ -604,7 +604,7 @@ func (c *Communicator) scpSession(scpCommand string, f func(io.Writer, *bufio.Re if err != nil { if exitErr, ok := err.(*ssh.ExitError); ok { - // Otherwise, we have an ExitErorr, meaning we can just read + // Otherwise, we have an ExitError, meaning we can just read // the exit status log.Printf("[ERROR] %s", exitErr) diff --git a/internal/communicator/ssh/password_test.go b/internal/communicator/ssh/password_test.go index 0ba61f7edd..0922a3f999 100644 --- a/internal/communicator/ssh/password_test.go +++ b/internal/communicator/ssh/password_test.go @@ -10,7 +10,7 @@ import ( "testing" ) -func TestPasswordKeybardInteractive_Challenge(t *testing.T) { +func TestPasswordKeyboardInteractive_Challenge(t *testing.T) { p := PasswordKeyboardInteractive("foo") result, err := p("foo", "bar", []string{"one", "two"}, nil) if err != nil { diff --git a/internal/configs/backend.go b/internal/configs/backend.go index 9cc5974ce8..4342d77ce3 100644 --- a/internal/configs/backend.go +++ b/internal/configs/backend.go @@ -36,7 +36,7 @@ func decodeBackendBlock(block *hcl.Block) (*Backend, hcl.Diagnostics) { }, nil } -// Hash produces a hash value for the reciever that covers the type and the +// Hash produces a hash value for the receiver that covers the type and the // portions of the config that conform to the given schema. // // If the config does not conform to the schema then the result is not diff --git a/internal/configs/config.go b/internal/configs/config.go index 23825523a0..6a73de50c3 100644 --- a/internal/configs/config.go +++ b/internal/configs/config.go @@ -212,7 +212,7 @@ func (c *Config) EntersNewPackage() bool { // VerifyDependencySelections checks whether the given locked dependencies // are acceptable for all of the version constraints reported in the -// configuration tree represented by the reciever. +// configuration tree represented by the receiver. // // This function will errors only if any of the locked dependencies are out of // range for corresponding constraints in the configuration. If there are diff --git a/internal/configs/config_build.go b/internal/configs/config_build.go index d95eba691d..f258989b7a 100644 --- a/internal/configs/config_build.go +++ b/internal/configs/config_build.go @@ -304,7 +304,7 @@ type ModuleRequest struct { CallRange hcl.Range // This is where variables and other information from the calling module - // are propogated to the child module for use in the static evaluator + // are propagated to the child module for use in the static evaluator Call StaticModuleCall } diff --git a/internal/configs/configschema/empty_value.go b/internal/configs/configschema/empty_value.go index eca4e078ba..a95c4d2790 100644 --- a/internal/configs/configschema/empty_value.go +++ b/internal/configs/configschema/empty_value.go @@ -9,12 +9,12 @@ import ( "github.com/zclconf/go-cty/cty" ) -// EmptyValue returns the "empty value" for the recieving block, which for +// EmptyValue returns the "empty value" for the receiving block, which for // a block type is a non-null object where all of the attribute values are // the empty values of the block's attributes and nested block types. // // In other words, it returns the value that would be returned if an empty -// block were decoded against the recieving schema, assuming that no required +// block were decoded against the receiving schema, assuming that no required // attribute or block constraints were honored. func (b *Block) EmptyValue() cty.Value { vals := make(map[string]cty.Value) diff --git a/internal/configs/configschema/schema.go b/internal/configs/configschema/schema.go index 9ef11e2a57..74011ab76d 100644 --- a/internal/configs/configschema/schema.go +++ b/internal/configs/configschema/schema.go @@ -133,7 +133,7 @@ const ( NestingSingle // NestingGroup is similar to NestingSingle in that it calls for only a - // single instance of a given block type with no labels, but it additonally + // single instance of a given block type with no labels, but it additionally // guarantees that its result will never be null, even if the block is // absent, and instead the nested attributes and blocks will be treated // as absent in that case. (Any required attributes or blocks within the diff --git a/internal/configs/import.go b/internal/configs/import.go index 61e8cfe4ce..dc664262f4 100644 --- a/internal/configs/import.go +++ b/internal/configs/import.go @@ -146,7 +146,7 @@ var importBlockSchema = &hcl.BodySchema{ // but we don't really care about the key part of it. We just want a traversal that could be converted to an address // of a resource, so we could determine the module + resource + provider // -// Currently, there are 4 types of HCL epressions that support AsTraversal: +// Currently, there are 4 types of HCL expressions that support AsTraversal: // - hclsyntax.ScopeTraversalExpr - Simply returns the Traversal. Same for our use-case here // - hclsyntax.RelativeTraversalExpr - Calculates hcl.AbsTraversalForExpr for the Source, and adds the Traversal to it. Same here, with absTraversalForImportToExpr instead // - hclsyntax.LiteralValueExpr - Mainly for null/false/true values. Not relevant in our use-case, as it's could not really be part of a reference (unless it is inside of an index, which is irrelevant here anyway) diff --git a/internal/configs/module_merge.go b/internal/configs/module_merge.go index 1e605a3f03..943c5c88c2 100644 --- a/internal/configs/module_merge.go +++ b/internal/configs/module_merge.go @@ -75,7 +75,7 @@ func (v *Variable) merge(ov *Variable) hcl.Diagnostics { // but in particular might be user-observable in the edge case where the // literal value in config could've been converted to the overridden type // constraint but the converted value cannot. In practice, this situation - // should be rare since most of our conversions are interchangable. + // should be rare since most of our conversions are interchangeable. if v.Default != cty.NilVal { val, err := convert.Convert(v.Default, v.ConstraintType) if err != nil { diff --git a/internal/configs/parser_config_dir.go b/internal/configs/parser_config_dir.go index 0b08276b2c..31222957f0 100644 --- a/internal/configs/parser_config_dir.go +++ b/internal/configs/parser_config_dir.go @@ -110,7 +110,7 @@ func (p Parser) ConfigDirFilesWithTests(dir string, testDirectory string) (prima // IsConfigDir determines whether the given path refers to a directory that // exists and contains at least one OpenTofu config file (with a .tf or -// .tf.json extension.). Note, we explicitely exclude checking for tests here +// .tf.json extension.). Note, we explicitly exclude checking for tests here // as tests must live alongside actual .tf config files. func (p *Parser) IsConfigDir(path string) bool { primaryPaths, overridePaths, _, _ := p.dirFiles(path, "") diff --git a/internal/configs/provisioner.go b/internal/configs/provisioner.go index 6d658b080b..787d7a0d59 100644 --- a/internal/configs/provisioner.go +++ b/internal/configs/provisioner.go @@ -100,7 +100,7 @@ func decodeProvisionerBlock(block *hcl.Block) (*Provisioner, hcl.Diagnostics) { Severity: hcl.DiagError, Summary: "Duplicate escaping block", Detail: fmt.Sprintf( - "The special block type \"_\" can be used to force particular arguments to be interpreted as provisioner-typpe-specific rather than as meta-arguments, but each provisioner block can have only one such block. The first escaping block was at %s.", + "The special block type \"_\" can be used to force particular arguments to be interpreted as provisioner-type-specific rather than as meta-arguments, but each provisioner block can have only one such block. The first escaping block was at %s.", seenEscapeBlock.DefRange, ), Subject: &block.DefRange, diff --git a/internal/configs/static_evaluator.go b/internal/configs/static_evaluator.go index 8a4044b5a8..2c5a298d20 100644 --- a/internal/configs/static_evaluator.go +++ b/internal/configs/static_evaluator.go @@ -14,7 +14,7 @@ import ( "github.com/zclconf/go-cty/cty" ) -// StaticIdentifier holds a Referencable item and where it was declared +// StaticIdentifier holds a Referenceable item and where it was declared type StaticIdentifier struct { Module addrs.Module Subject string diff --git a/internal/configs/static_scope.go b/internal/configs/static_scope.go index fe28c76ca0..b1d9fee349 100644 --- a/internal/configs/static_scope.go +++ b/internal/configs/static_scope.go @@ -157,7 +157,7 @@ func (s staticScopeData) GetModule(addrs.ModuleCall, tfdiags.SourceRange) (cty.V } func (s staticScopeData) GetPathAttr(addr addrs.PathAttr, rng tfdiags.SourceRange) (cty.Value, tfdiags.Diagnostics) { - // TODO this is copied and trimed down from tofu/evaluate.go GetPathAttr. Ideally this should be refactored to a common location. + // TODO this is copied and trimmed down from tofu/evaluate.go GetPathAttr. Ideally this should be refactored to a common location. var diags tfdiags.Diagnostics switch addr.Name { case "cwd": @@ -206,7 +206,7 @@ func (s staticScopeData) GetPathAttr(addr addrs.PathAttr, rng tfdiags.SourceRang } func (s staticScopeData) GetTerraformAttr(addr addrs.TerraformAttr, rng tfdiags.SourceRange) (cty.Value, tfdiags.Diagnostics) { - // TODO this is copied and trimed down from tofu/evaluate.go GetTerraformAttr. Ideally this should be refactored to a common location. + // TODO this is copied and trimmed down from tofu/evaluate.go GetTerraformAttr. Ideally this should be refactored to a common location. var diags tfdiags.Diagnostics switch addr.Name { case "workspace": diff --git a/internal/dag/graph.go b/internal/dag/graph.go index 845185d08d..8c18e4477b 100644 --- a/internal/dag/graph.go +++ b/internal/dag/graph.go @@ -237,13 +237,13 @@ func (g *Graph) Connect(edge Edge) { } // Subsume imports all of the nodes and edges from the given graph into the -// reciever, leaving the given graph unchanged. +// receiver, leaving the given graph unchanged. // -// If any of the nodes in the given graph are already present in the reciever +// If any of the nodes in the given graph are already present in the receiver // then the existing node will be retained and any new edges from the given // graph will be connected with it. // -// If the given graph has edges in common with the reciever then they will be +// If the given graph has edges in common with the receiver then they will be // ignored, because each pair of nodes can only be connected once. func (g *Graph) Subsume(other *Graph) { // We're using Set.Filter just as a "visit each element" here, so we're diff --git a/internal/depsfile/locks.go b/internal/depsfile/locks.go index 20ac82fbef..a819eb463c 100644 --- a/internal/depsfile/locks.go +++ b/internal/depsfile/locks.go @@ -127,7 +127,7 @@ func (l *Locks) RemoveProvider(addr addrs.Provider) { // // This is an in-memory-only annotation which lives only inside a particular // Locks object, and is never persisted as part of a saved lock file on disk. -// It's valid to still use other methods of the reciever to access +// It's valid to still use other methods of the receiver to access // already-stored lock information and to update lock information for an // overridden provider, but some callers may need to use ProviderIsOverridden // to selectively disregard stored lock information for overridden providers, @@ -151,7 +151,7 @@ func (l *Locks) ProviderIsOverridden(addr addrs.Provider) bool { // // This allows propagating override information between different lock objects, // as if calling SetProviderOverridden for each address already overridden -// in the other given locks. If the reciever already has overridden providers, +// in the other given locks. If the receiver already has overridden providers, // SetSameOverriddenProviders will preserve them. func (l *Locks) SetSameOverriddenProviders(other *Locks) { if other == nil { @@ -264,7 +264,7 @@ func (l *Locks) Equal(other *Locks) bool { // Although "hashes" is declared as a slice, it's logically an // unordered set. However, we normalize the slice of hashes when - // recieving it in NewProviderLock, so we can just do a simple + // receiving it in NewProviderLock, so we can just do a simple // item-by-item equality test here. if len(thisLock.hashes) != len(otherLock.hashes) { return false @@ -433,7 +433,7 @@ func (l *ProviderLock) ContainsAll(target *ProviderLock) bool { } // PreferredHashes returns a filtered version of the AllHashes return value -// which includes only the strongest of the availabile hash schemes, in +// which includes only the strongest of the available hash schemes, in // case legacy hash schemes are deprecated over time but still supported for // upgrade purposes. // diff --git a/internal/depsfile/locks_test.go b/internal/depsfile/locks_test.go index c984019067..66762d9fa0 100644 --- a/internal/depsfile/locks_test.go +++ b/internal/depsfile/locks_test.go @@ -244,10 +244,10 @@ func TestProviderLockContainsAll(t *testing.T) { }) if !original.ContainsAll(target) { - t.Errorf("orginal should contain all hashes in target") + t.Errorf("original should contain all hashes in target") } if target.ContainsAll(original) { - t.Errorf("target should not contain all hashes in orginal") + t.Errorf("target should not contain all hashes in original") } }) @@ -265,10 +265,10 @@ func TestProviderLockContainsAll(t *testing.T) { }) if !original.ContainsAll(target) { - t.Errorf("orginal should contain all hashes in target") + t.Errorf("original should contain all hashes in target") } if !target.ContainsAll(original) { - t.Errorf("target should not contain all hashes in orginal") + t.Errorf("target should not contain all hashes in original") } }) @@ -280,7 +280,7 @@ func TestProviderLockContainsAll(t *testing.T) { }) if !original.ContainsAll(nil) { - t.Fatalf("orginal should report true on nil") + t.Fatalf("original should report true on nil") } }) @@ -294,7 +294,7 @@ func TestProviderLockContainsAll(t *testing.T) { target := NewProviderLock(provider, v2, v2EqConstraints, []getproviders.Hash{}) if !original.ContainsAll(target) { - t.Fatalf("orginal should report true on empty") + t.Fatalf("original should report true on empty") } }) @@ -308,7 +308,7 @@ func TestProviderLockContainsAll(t *testing.T) { }) if original.ContainsAll(target) { - t.Fatalf("orginal should report false when empty") + t.Fatalf("original should report false when empty") } }) } diff --git a/internal/encryption/base.go b/internal/encryption/base.go index 69b5e80ad1..a76a443138 100644 --- a/internal/encryption/base.go +++ b/internal/encryption/base.go @@ -64,7 +64,7 @@ func newBaseEncryption(enc *encryption, target *config.TargetConfig, enforced bo // extremely large state file (100MB) it would take an apply of over 5 hours to come close to the 64GB limit of pbkdf2 with some malicious actor recording // every single change to the filesystem (or inspecting deleted blocks). // - // What other benfits does this provide? + // What other benefits does this provide? // // This performs a e2e validation run of the config -> methods flow. It serves as a validation step and allows us to return detailed // diagnostics here and simple errors in the decrypt function below. @@ -78,7 +78,7 @@ func newBaseEncryption(enc *encryption, target *config.TargetConfig, enforced bo type basedata struct { Meta map[keyprovider.Addr][]byte `json:"meta"` Data []byte `json:"encrypted_data"` - Version string `json:"encryption_version"` // This is both a sigil for a valid encrypted payload and a future compatability field + Version string `json:"encryption_version"` // This is both a sigil for a valid encrypted payload and a future compatibility field } func IsEncryptionPayload(data []byte) (bool, error) { diff --git a/internal/encryption/config/config.go b/internal/encryption/config/config.go index bc98ff6c56..50edd95438 100644 --- a/internal/encryption/config/config.go +++ b/internal/encryption/config/config.go @@ -17,9 +17,9 @@ type EncryptionConfig struct { KeyProviderConfigs []KeyProviderConfig `hcl:"key_provider,block"` MethodConfigs []MethodConfig `hcl:"method,block"` - State *EnforcableTargetConfig `hcl:"state,block"` - Plan *EnforcableTargetConfig `hcl:"plan,block"` - Remote *RemoteConfig `hcl:"remote_state_data_sources,block"` + State *EnforceableTargetConfig `hcl:"state,block"` + Plan *EnforceableTargetConfig `hcl:"plan,block"` + Remote *RemoteConfig `hcl:"remote_state_data_sources,block"` // Not preserved through merge operations DeclRange hcl.Range @@ -79,17 +79,17 @@ type TargetConfig struct { Fallback *TargetConfig `hcl:"fallback,block"` } -// EnforcableTargetConfig is an extension of the TargetConfig that supports the enforced form. +// EnforceableTargetConfig is an extension of the TargetConfig that supports the enforced form. // // Note: This struct is copied because gohcl does not support embedding. -type EnforcableTargetConfig struct { +type EnforceableTargetConfig struct { Enforced bool `hcl:"enforced,optional"` Method hcl.Expression `hcl:"method,optional"` Fallback *TargetConfig `hcl:"fallback,block"` } // AsTargetConfig converts the struct into its parent TargetConfig. -func (e EnforcableTargetConfig) AsTargetConfig() *TargetConfig { +func (e EnforceableTargetConfig) AsTargetConfig() *TargetConfig { return &TargetConfig{ Method: e.Method, Fallback: e.Fallback, diff --git a/internal/encryption/config/config_merge.go b/internal/encryption/config/config_merge.go index da6722ae7f..b4eecff26d 100644 --- a/internal/encryption/config/config_merge.go +++ b/internal/encryption/config/config_merge.go @@ -22,8 +22,8 @@ func MergeConfigs(cfg *EncryptionConfig, override *EncryptionConfig) *Encryption KeyProviderConfigs: mergeKeyProviderConfigs(cfg.KeyProviderConfigs, override.KeyProviderConfigs), MethodConfigs: mergeMethodConfigs(cfg.MethodConfigs, override.MethodConfigs), - State: mergeEnforcableTargetConfigs(cfg.State, override.State), - Plan: mergeEnforcableTargetConfigs(cfg.Plan, override.Plan), + State: mergeEnforceableTargetConfigs(cfg.State, override.State), + Plan: mergeEnforceableTargetConfigs(cfg.Plan, override.Plan), Remote: mergeRemoteConfigs(cfg.Remote, override.Remote), } } @@ -105,7 +105,7 @@ func mergeTargetConfigs(cfg *TargetConfig, override *TargetConfig) *TargetConfig return merged } -func mergeEnforcableTargetConfigs(cfg *EnforcableTargetConfig, override *EnforcableTargetConfig) *EnforcableTargetConfig { +func mergeEnforceableTargetConfigs(cfg *EnforceableTargetConfig, override *EnforceableTargetConfig) *EnforceableTargetConfig { if cfg == nil { return override } @@ -114,7 +114,7 @@ func mergeEnforcableTargetConfigs(cfg *EnforcableTargetConfig, override *Enforca } mergeTarget := mergeTargetConfigs(cfg.AsTargetConfig(), override.AsTargetConfig()) - return &EnforcableTargetConfig{ + return &EnforceableTargetConfig{ Enforced: cfg.Enforced || override.Enforced, Method: mergeTarget.Method, Fallback: mergeTarget.Fallback, diff --git a/internal/encryption/config/config_merge_test.go b/internal/encryption/config/config_merge_test.go index d07656b66b..18ae96489e 100644 --- a/internal/encryption/config/config_merge_test.go +++ b/internal/encryption/config/config_merge_test.go @@ -244,8 +244,8 @@ func TestMergeTargetConfigs(t *testing.T) { } } - makeEnforcableTargetConfig := func(enforced bool, method hcl.Expression, fallback *TargetConfig) *EnforcableTargetConfig { - return &EnforcableTargetConfig{ + makeEnforceableTargetConfig := func(enforced bool, method hcl.Expression, fallback *TargetConfig) *EnforceableTargetConfig { + return &EnforceableTargetConfig{ Enforced: enforced, Method: method, Fallback: fallback, @@ -257,9 +257,9 @@ func TestMergeTargetConfigs(t *testing.T) { tests := []struct { name string - input *EnforcableTargetConfig - override *EnforcableTargetConfig - expected *EnforcableTargetConfig + input *EnforceableTargetConfig + override *EnforceableTargetConfig + expected *EnforceableTargetConfig }{ { name: "both nil", @@ -270,62 +270,62 @@ func TestMergeTargetConfigs(t *testing.T) { { name: "input is nil", input: nil, - override: makeEnforcableTargetConfig(true, expressionOne, nil), - expected: makeEnforcableTargetConfig(true, expressionOne, nil), + override: makeEnforceableTargetConfig(true, expressionOne, nil), + expected: makeEnforceableTargetConfig(true, expressionOne, nil), }, { name: "override is nil", - input: makeEnforcableTargetConfig(true, expressionOne, nil), + input: makeEnforceableTargetConfig(true, expressionOne, nil), override: nil, - expected: makeEnforcableTargetConfig(true, expressionOne, nil), + expected: makeEnforceableTargetConfig(true, expressionOne, nil), }, { name: "override target config method", - input: makeEnforcableTargetConfig(true, expressionOne, nil), - override: makeEnforcableTargetConfig(true, expressionTwo, nil), - expected: makeEnforcableTargetConfig(true, expressionTwo, nil), + input: makeEnforceableTargetConfig(true, expressionOne, nil), + override: makeEnforceableTargetConfig(true, expressionTwo, nil), + expected: makeEnforceableTargetConfig(true, expressionTwo, nil), }, { name: "override target config fallback", - input: makeEnforcableTargetConfig(true, expressionOne, makeTargetConfig(true, expressionOne, nil)), - override: makeEnforcableTargetConfig(true, expressionOne, makeTargetConfig(true, expressionTwo, nil)), - expected: makeEnforcableTargetConfig(true, expressionOne, makeTargetConfig(true, expressionTwo, nil)), + input: makeEnforceableTargetConfig(true, expressionOne, makeTargetConfig(true, expressionOne, nil)), + override: makeEnforceableTargetConfig(true, expressionOne, makeTargetConfig(true, expressionTwo, nil)), + expected: makeEnforceableTargetConfig(true, expressionOne, makeTargetConfig(true, expressionTwo, nil)), }, { name: "override target config fallback", - input: makeEnforcableTargetConfig(true, expressionOne, nil), - override: makeEnforcableTargetConfig(true, expressionOne, makeTargetConfig(true, expressionTwo, nil)), - expected: makeEnforcableTargetConfig(true, expressionOne, makeTargetConfig(true, expressionTwo, nil)), + input: makeEnforceableTargetConfig(true, expressionOne, nil), + override: makeEnforceableTargetConfig(true, expressionOne, makeTargetConfig(true, expressionTwo, nil)), + expected: makeEnforceableTargetConfig(true, expressionOne, makeTargetConfig(true, expressionTwo, nil)), }, { name: "override target config enforced - should be true if any are true", - input: makeEnforcableTargetConfig(true, expressionOne, nil), - override: makeEnforcableTargetConfig(false, expressionOne, nil), - expected: makeEnforcableTargetConfig(true, expressionOne, nil), + input: makeEnforceableTargetConfig(true, expressionOne, nil), + override: makeEnforceableTargetConfig(false, expressionOne, nil), + expected: makeEnforceableTargetConfig(true, expressionOne, nil), }, { name: "override target config enforced - should be true if any are true", - input: makeEnforcableTargetConfig(false, expressionOne, nil), - override: makeEnforcableTargetConfig(true, expressionOne, nil), - expected: makeEnforcableTargetConfig(true, expressionOne, nil), + input: makeEnforceableTargetConfig(false, expressionOne, nil), + override: makeEnforceableTargetConfig(true, expressionOne, nil), + expected: makeEnforceableTargetConfig(true, expressionOne, nil), }, { name: "override target config enforced - should be false if both are false", - input: makeEnforcableTargetConfig(false, expressionOne, nil), - override: makeEnforcableTargetConfig(false, expressionOne, nil), - expected: makeEnforcableTargetConfig(false, expressionOne, nil), + input: makeEnforceableTargetConfig(false, expressionOne, nil), + override: makeEnforceableTargetConfig(false, expressionOne, nil), + expected: makeEnforceableTargetConfig(false, expressionOne, nil), }, { name: "override enforced, method and fallback", - input: makeEnforcableTargetConfig(false, expressionOne, makeTargetConfig(true, expressionOne, nil)), - override: makeEnforcableTargetConfig(true, expressionTwo, makeTargetConfig(true, expressionTwo, nil)), - expected: makeEnforcableTargetConfig(true, expressionTwo, makeTargetConfig(true, expressionTwo, nil)), + input: makeEnforceableTargetConfig(false, expressionOne, makeTargetConfig(true, expressionOne, nil)), + override: makeEnforceableTargetConfig(true, expressionTwo, makeTargetConfig(true, expressionTwo, nil)), + expected: makeEnforceableTargetConfig(true, expressionTwo, makeTargetConfig(true, expressionTwo, nil)), }, } for _, test := range tests { t.Run(test.name, func(t *testing.T) { - output := mergeEnforcableTargetConfigs(test.input, test.override) + output := mergeEnforceableTargetConfigs(test.input, test.override) if !reflect.DeepEqual(output, test.expected) { t.Errorf("expected %v, got %v", spew.Sdump(test.expected), spew.Sdump(output)) diff --git a/internal/encryption/keyprovider.go b/internal/encryption/keyprovider.go index c0977bea94..9362e81a4f 100644 --- a/internal/encryption/keyprovider.go +++ b/internal/encryption/keyprovider.go @@ -57,7 +57,7 @@ func (e *targetBuilder) setupKeyProvider(cfg config.KeyProviderConfig, stack []c } // Mark this key provider as partially handled. This value will be replaced below once it is actually known. - // The goal is to allow an early return via the above if statement to prevent duplicate errors if errors are encoutered in the key loading stack. + // The goal is to allow an early return via the above if statement to prevent duplicate errors if errors are encountered in the key loading stack. e.keyValues[cfg.Type][cfg.Name] = cty.UnknownVal(cty.DynamicPseudoType) // Check for circular references, this is done by inspecting the stack of key providers diff --git a/internal/encryption/keyprovider/aws_kms/config_endpoints.go b/internal/encryption/keyprovider/aws_kms/config_endpoints.go index 243852eb74..d3faf63844 100644 --- a/internal/encryption/keyprovider/aws_kms/config_endpoints.go +++ b/internal/encryption/keyprovider/aws_kms/config_endpoints.go @@ -17,7 +17,7 @@ type ConfigEndpoints struct { } // Mirrored from s3 backend config -func includeProtoIfNessesary(endpoint string) string { +func includeProtoIfNecessary(endpoint string) string { if matched, _ := regexp.MatchString("[a-z]*://.*", endpoint); !matched { log.Printf("[DEBUG] Adding https:// prefix to endpoint '%s'", endpoint) endpoint = fmt.Sprintf("https://%s", endpoint) @@ -38,10 +38,10 @@ func (c Config) getEndpoints() (ConfigEndpoints, error) { // Endpoint formatting if len(endpoints.IAM) != 0 { - endpoints.IAM = includeProtoIfNessesary(endpoints.IAM) + endpoints.IAM = includeProtoIfNecessary(endpoints.IAM) } if len(endpoints.STS) != 0 { - endpoints.STS = includeProtoIfNessesary(endpoints.STS) + endpoints.STS = includeProtoIfNecessary(endpoints.STS) } return endpoints, nil } diff --git a/internal/encryption/keyprovider/aws_kms/provider_test.go b/internal/encryption/keyprovider/aws_kms/provider_test.go index e3b42f7b6d..d3da11919e 100644 --- a/internal/encryption/keyprovider/aws_kms/provider_test.go +++ b/internal/encryption/keyprovider/aws_kms/provider_test.go @@ -62,7 +62,7 @@ func TestKMSProvider_Simple(t *testing.T) { t.Log("Continue to meta -> decryption key") - // Now that we have a encyption key and it's meta, let's get the decryption key + // Now that we have a encryption key and it's meta, let's get the decryption key output, meta, err = provider.Provide(meta) if err != nil { t.Fatalf("Error providing keys: %s", err) diff --git a/internal/encryption/keyprovider/gcp_kms/config.go b/internal/encryption/keyprovider/gcp_kms/config.go index e2eca34228..d7b6b2447f 100644 --- a/internal/encryption/keyprovider/gcp_kms/config.go +++ b/internal/encryption/keyprovider/gcp_kms/config.go @@ -46,7 +46,7 @@ func stringAttrEnvFallback(val string, env string) string { return os.Getenv(env) } -// TODO This is copied in from the backend packge to prevent a circular dependency loop +// TODO This is copied in from the backend package to prevent a circular dependency loop // If the argument is a path, ReadPathOrContents loads it and returns the contents, // otherwise the argument is assumed to be the desired contents and is simply // returned. @@ -78,7 +78,7 @@ func ReadPathOrContents(poc string) (string, error) { func (c Config) Build() (keyprovider.KeyProvider, keyprovider.KeyMeta, error) { // This mirrors the gcp remote state backend - // Apply env defaults if nessesary + // Apply env defaults if necessary c.Credentials = stringAttrEnvFallback(c.Credentials, "GOOGLE_CREDENTIALS") c.AccessToken = stringAttrEnvFallback(c.AccessToken, "GOOGLE_OAUTH_ACCESS_TOKEN") c.ImpersonateServiceAccount = stringAttrEnvFallback(c.ImpersonateServiceAccount, "GOOGLE_BACKEND_IMPERSONATE_SERVICE_ACCOUNT") diff --git a/internal/encryption/keyprovider/openbao/compliance_test.go b/internal/encryption/keyprovider/openbao/compliance_test.go index e81e7aef5f..66c280a0cf 100644 --- a/internal/encryption/keyprovider/openbao/compliance_test.go +++ b/internal/encryption/keyprovider/openbao/compliance_test.go @@ -204,7 +204,7 @@ func prepareClientMockForKeyProviderTest(t *testing.T, testKeyName string) mockC case generateDataKeyPath: bits, ok := data["bits"].(int) if !ok { - t.Fatalf("Invalid bits in data suplied to mock: not a number") + t.Fatalf("Invalid bits in data supplied to mock: not a number") } plaintext := make([]byte, int(bits)/8) @@ -224,7 +224,7 @@ func prepareClientMockForKeyProviderTest(t *testing.T, testKeyName string) mockC case decryptPath: ciphertext, ok := data["ciphertext"].(string) if !ok { - t.Fatalf("Invalid ciphertext in data suplied to mock: not an string") + t.Fatalf("Invalid ciphertext in data supplied to mock: not an string") } plaintext := []byte(ciphertext[len(testKeyName):]) @@ -238,7 +238,7 @@ func prepareClientMockForKeyProviderTest(t *testing.T, testKeyName string) mockC return s, nil default: - t.Fatalf("Invalid path suplied to mock: %s", path) + t.Fatalf("Invalid path supplied to mock: %s", path) } // unreachable code diff --git a/internal/getmodules/package.go b/internal/getmodules/package.go index 4ea8558a19..16f0745c41 100644 --- a/internal/getmodules/package.go +++ b/internal/getmodules/package.go @@ -20,7 +20,7 @@ import ( // one of those other functions instead. The addrs package can potentially // perform other processing in addition to just the go-getter detection. // -// Note that this function expects to recieve only a package address, not +// Note that this function expects to receive only a package address, not // a full source address that might also include a subdirectory portion. // The caller must trim off any subdirectory portion using // getmodules.SplitPackageSubdir before calling this function, passing in diff --git a/internal/getproviders/errors.go b/internal/getproviders/errors.go index ff46df7e2d..9d414c5cd6 100644 --- a/internal/getproviders/errors.go +++ b/internal/getproviders/errors.go @@ -158,7 +158,7 @@ func (err ErrPlatformNotSupported) Error() string { // ErrProtocolNotSupported is an error type used to indicate that a particular // version of a provider is not supported by the current version of OpenTofu. // -// Specfically, this is returned when the version's plugin protocol is not supported. +// Specifically, this is returned when the version's plugin protocol is not supported. // // When available, the error will include a suggested version that can be displayed to // the user. Otherwise it will return UnspecifiedVersion @@ -182,7 +182,7 @@ func (err ErrProtocolNotSupported) Error() string { // unexpected error. // // This is used for any error responses other than "Not Found", which would -// indicate the absense of a provider and is thus reported using +// indicate the absence of a provider and is thus reported using // ErrProviderNotKnown instead. type ErrQueryFailed struct { Provider addrs.Provider diff --git a/internal/getproviders/hash.go b/internal/getproviders/hash.go index b401774fbe..3624f3caf0 100644 --- a/internal/getproviders/hash.go +++ b/internal/getproviders/hash.go @@ -68,7 +68,7 @@ func MustParseHash(s string) Hash { return hash } -// Scheme returns the scheme of the recieving hash. If the receiver is not +// Scheme returns the scheme of the receiving hash. If the receiver is not // using valid syntax then this method will panic. func (h Hash) Scheme() HashScheme { colon := strings.Index(string(h), ":") @@ -86,7 +86,7 @@ func (h Hash) HasScheme(want HashScheme) bool { return h.Scheme() == want } -// Value returns the scheme-specific value from the recieving hash. The +// Value returns the scheme-specific value from the receiving hash. The // meaning of this value depends on the scheme. // // If the receiver is not using valid syntax then this method will panic. @@ -401,7 +401,7 @@ func PackageHashV1(loc PackageLocation) (Hash, error) { } // Hash computes a hash of the contents of the package at the location -// associated with the reciever, using whichever hash algorithm is the current +// associated with the receiver, using whichever hash algorithm is the current // default. // // This method will change to use new hash versions as they are introduced @@ -434,7 +434,7 @@ func (m PackageMeta) MatchesHash(want Hash) (bool, error) { // the receiver matches at least one of the given hashes, or false otherwise. // // If it cannot read from the given location, MatchesHash returns an error. -// Unlike the signular MatchesHash, MatchesAnyHash considers an unsupported +// Unlike the singular MatchesHash, MatchesAnyHash considers an unsupported // hash format to be a successful non-match. func (m PackageMeta) MatchesAnyHash(acceptable []Hash) (bool, error) { return PackageMatchesAnyHash(m.Location, acceptable) diff --git a/internal/getproviders/http_mirror_source.go b/internal/getproviders/http_mirror_source.go index ecc3f92d69..6e596163ce 100644 --- a/internal/getproviders/http_mirror_source.go +++ b/internal/getproviders/http_mirror_source.go @@ -415,7 +415,7 @@ func svchostFromURL(u *url.URL) (svchost.Hostname, error) { // a network mirror over HTTP would potentially transmit any configured // credentials in cleartext. Therefore we don't need to do any special // handling of default ports here, because svchost.Hostname already - // considers the absense of a port to represent the standard HTTPS port + // considers the absence of a port to represent the standard HTTPS port // 443, and will normalize away an explicit specification of port 443 // in svchost.ForComparison below. diff --git a/internal/getproviders/multi_source.go b/internal/getproviders/multi_source.go index 249987cb29..620b4f35f8 100644 --- a/internal/getproviders/multi_source.go +++ b/internal/getproviders/multi_source.go @@ -199,7 +199,7 @@ func ParseMultiSourceMatchingPatterns(strs []string) (MultiSourceMatchingPattern // is both included by the selector's include patterns and _not_ excluded // by its exclude patterns. // -// The absense of any include patterns is treated the same as a pattern +// The absence of any include patterns is treated the same as a pattern // that matches all addresses. Exclusions take priority over inclusions. func (s MultiSourceSelector) CanHandleProvider(addr addrs.Provider) bool { switch { diff --git a/internal/getproviders/types.go b/internal/getproviders/types.go index dffd83eb59..9afa0345b1 100644 --- a/internal/getproviders/types.go +++ b/internal/getproviders/types.go @@ -20,7 +20,7 @@ import ( // Version represents a particular single version of a provider. type Version = versions.Version -// UnspecifiedVersion is the zero value of Version, representing the absense +// UnspecifiedVersion is the zero value of Version, representing the absence // of a version number. var UnspecifiedVersion Version = versions.Unspecified @@ -174,7 +174,7 @@ var CurrentPlatform = Platform{ // provider package targeting a single platform. // // Package findproviders does no signature verification or protocol version -// compatibility checking of its own. A caller receving a PackageMeta must +// compatibility checking of its own. A caller receiving a PackageMeta must // verify that it has a correct signature and supports a protocol version // accepted by the current version of OpenTofu before trying to use the // described package. @@ -207,7 +207,7 @@ type PackageMeta struct { // PackageMeta in a sorted list of PackageMeta. // // Sorting preference is given first to the provider address, then to the -// taget platform, and the to the version number (using semver precedence). +// target platform, and the to the version number (using semver precedence). // Packages that differ only in semver build metadata have no defined // precedence and so will always return false. // diff --git a/internal/initwd/module_install.go b/internal/initwd/module_install.go index 0f6ee212cf..ed32bb78f8 100644 --- a/internal/initwd/module_install.go +++ b/internal/initwd/module_install.go @@ -534,7 +534,7 @@ func (i *ModuleInstaller) installRegistryModule(ctx context.Context, req *config // Finally, check if the prerelease is acceptable to version. As // highlighted previously, we go through all of this because the // apparentlymart/go-versions library handles prerelease constraints - // in the apporach we want to. + // in the approach we want to. if !acceptableVersions.Has(version) { log.Printf("[TRACE] ModuleInstaller: %s ignoring %s because it is a pre-release and was not requested exactly", key, v) continue diff --git a/internal/initwd/module_install_test.go b/internal/initwd/module_install_test.go index 303dc29df6..a76a9d65a1 100644 --- a/internal/initwd/module_install_test.go +++ b/internal/initwd/module_install_test.go @@ -546,7 +546,7 @@ func TestLoaderInstallModules_registry(t *testing.T) { t.Fatalf("wrong installer calls\n%s", diff) } - //check that the registry reponses were cached + // check that the registry responses were cached packageAddr := addrs.ModuleRegistryPackage{ Host: svchost.Hostname("registry.opentofu.org"), Namespace: "hashicorp", @@ -847,7 +847,7 @@ func TestLoadInstallModules_registryFromTest(t *testing.T) { t.Fatalf("wrong installer calls\n%s", diff) } - //check that the registry reponses were cached + // check that the registry responses were cached packageAddr := addrs.ModuleRegistryPackage{ Host: svchost.Hostname("registry.opentofu.org"), Namespace: "hashicorp", diff --git a/internal/lang/blocktoattr/fixup.go b/internal/lang/blocktoattr/fixup.go index 69678fbfaf..c5b39aebc9 100644 --- a/internal/lang/blocktoattr/fixup.go +++ b/internal/lang/blocktoattr/fixup.go @@ -145,7 +145,7 @@ func (b *fixupBody) MissingItemRange() hcl.Range { // effectiveSchema produces a derived *hcl.BodySchema by sniffing the body's // content to determine whether the author has used attribute or block syntax -// for each of the ambigious attributes where both are permitted. +// for each of the ambiguous attributes where both are permitted. // // The resulting schema will always contain all of the same names that are // in the given schema, but some attribute schemas may instead be replaced by diff --git a/internal/lang/eval.go b/internal/lang/eval.go index 0ba660dab5..3507bb3b52 100644 --- a/internal/lang/eval.go +++ b/internal/lang/eval.go @@ -214,7 +214,7 @@ func (s *Scope) enhanceFunctionDiags(diags hcl.Diagnostics) hcl.Diagnostics { fullNamespace := funcExtra.CalledFunctionNamespace() if len(fullNamespace) == 0 { - // Not a namespaced function, no enhancements nessesary + // Not a namespaced function, no enhancements necessary continue } diff --git a/internal/lang/eval_test.go b/internal/lang/eval_test.go index b22a6ee837..8a47809ac7 100644 --- a/internal/lang/eval_test.go +++ b/internal/lang/eval_test.go @@ -473,7 +473,7 @@ func TestScopeEvalContextWithParent(t *testing.T) { } if ln := len(child.Parent().Variables); ln != 1 { - t.Fatalf("EvalContextWithParent modified parent's variables: incorrent length: %d", ln) + t.Fatalf("EvalContextWithParent modified parent's variables: incorrect length: %d", ln) } if v := child.Parent().Variables["foo"]; !v.RawEquals(barStr) { @@ -481,7 +481,7 @@ func TestScopeEvalContextWithParent(t *testing.T) { } if ln := len(child.Parent().Functions); ln != 1 { - t.Fatalf("EvalContextWithParent modified parent's functions: incorrent length: %d", ln) + t.Fatalf("EvalContextWithParent modified parent's functions: incorrect length: %d", ln) } if v := child.Parent().Functions["foo"]; !reflect.DeepEqual(v, barFunc) { diff --git a/internal/lang/funcs/cidr.go b/internal/lang/funcs/cidr.go index 13d1552ef2..1a1dfddbce 100644 --- a/internal/lang/funcs/cidr.go +++ b/internal/lang/funcs/cidr.go @@ -16,7 +16,7 @@ import ( "github.com/zclconf/go-cty/cty/gocty" ) -// CidrHostFunc contructs a function that calculates a full host IP address +// CidrHostFunc constructs a function that calculates a full host IP address // within a given IP network address prefix. var CidrHostFunc = function.New(&function.Spec{ Params: []function.Parameter{ @@ -50,7 +50,7 @@ var CidrHostFunc = function.New(&function.Spec{ }, }) -// CidrNetmaskFunc contructs a function that converts an IPv4 address prefix given +// CidrNetmaskFunc constructs a function that converts an IPv4 address prefix given // in CIDR notation into a subnet mask address. var CidrNetmaskFunc = function.New(&function.Spec{ Params: []function.Parameter{ @@ -75,7 +75,7 @@ var CidrNetmaskFunc = function.New(&function.Spec{ }, }) -// CidrSubnetFunc contructs a function that calculates a subnet address within +// CidrSubnetFunc constructs a function that calculates a subnet address within // a given IP network address prefix. var CidrSubnetFunc = function.New(&function.Spec{ Params: []function.Parameter{ diff --git a/internal/lang/funcs/collection_test.go b/internal/lang/funcs/collection_test.go index 900afc6833..de70a83f6c 100644 --- a/internal/lang/funcs/collection_test.go +++ b/internal/lang/funcs/collection_test.go @@ -815,7 +815,7 @@ func TestLookup(t *testing.T) { cty.StringVal("beep").Mark("a"), false, }, - { // apply collection marks to unknown return vaue + { // apply collection marks to unknown return value []cty.Value{ cty.MapVal(map[string]cty.Value{ "boop": cty.StringVal("beep"), diff --git a/internal/lang/funcs/crypto.go b/internal/lang/funcs/crypto.go index 2c7ae37bb7..d70da6bff1 100644 --- a/internal/lang/funcs/crypto.go +++ b/internal/lang/funcs/crypto.go @@ -173,7 +173,7 @@ var RsaDecryptFunc = function.New(&function.Spec{ case asn1.SyntaxError: errStr = strings.ReplaceAll(e.Error(), "asn1: syntax error", "invalid ASN1 data in the given private key") case asn1.StructuralError: - errStr = strings.ReplaceAll(e.Error(), "asn1: struture error", "invalid ASN1 data in the given private key") + errStr = strings.ReplaceAll(e.Error(), "asn1: structure error", "invalid ASN1 data in the given private key") default: errStr = fmt.Sprintf("invalid private key: %s", e) } @@ -193,7 +193,7 @@ var RsaDecryptFunc = function.New(&function.Spec{ }, }) -// Sha1Func contructs a function that computes the SHA1 hash of a given string +// Sha1Func constructs a function that computes the SHA1 hash of a given string // and encodes it with hexadecimal digits. var Sha1Func = makeStringHashFunction(sha1.New, hex.EncodeToString) @@ -203,7 +203,7 @@ func MakeFileSha1Func(baseDir string) function.Function { return makeFileHashFunction(baseDir, sha1.New, hex.EncodeToString) } -// Sha256Func contructs a function that computes the SHA256 hash of a given string +// Sha256Func constructs a function that computes the SHA256 hash of a given string // and encodes it with hexadecimal digits. var Sha256Func = makeStringHashFunction(sha256.New, hex.EncodeToString) @@ -213,7 +213,7 @@ func MakeFileSha256Func(baseDir string) function.Function { return makeFileHashFunction(baseDir, sha256.New, hex.EncodeToString) } -// Sha512Func contructs a function that computes the SHA512 hash of a given string +// Sha512Func constructs a function that computes the SHA512 hash of a given string // and encodes it with hexadecimal digits. var Sha512Func = makeStringHashFunction(sha512.New, hex.EncodeToString) diff --git a/internal/lang/funcs/number.go b/internal/lang/funcs/number.go index 633ef21ebc..21634249bd 100644 --- a/internal/lang/funcs/number.go +++ b/internal/lang/funcs/number.go @@ -14,7 +14,7 @@ import ( "github.com/zclconf/go-cty/cty/gocty" ) -// LogFunc contructs a function that returns the logarithm of a given number in a given base. +// LogFunc constructs a function that returns the logarithm of a given number in a given base. var LogFunc = function.New(&function.Spec{ Params: []function.Parameter{ { @@ -43,7 +43,7 @@ var LogFunc = function.New(&function.Spec{ }, }) -// PowFunc contructs a function that returns the logarithm of a given number in a given base. +// PowFunc constructs a function that returns the logarithm of a given number in a given base. var PowFunc = function.New(&function.Spec{ Params: []function.Parameter{ { @@ -72,7 +72,7 @@ var PowFunc = function.New(&function.Spec{ }, }) -// SignumFunc contructs a function that returns the closest whole number greater +// SignumFunc constructs a function that returns the closest whole number greater // than or equal to the given value. var SignumFunc = function.New(&function.Spec{ Params: []function.Parameter{ @@ -99,7 +99,7 @@ var SignumFunc = function.New(&function.Spec{ }, }) -// ParseIntFunc contructs a function that parses a string argument and returns an integer of the specified base. +// ParseIntFunc constructs a function that parses a string argument and returns an integer of the specified base. var ParseIntFunc = function.New(&function.Spec{ Params: []function.Parameter{ { diff --git a/internal/lang/funcs/string.go b/internal/lang/funcs/string.go index e3aa4fb13d..d67cdb7a1a 100644 --- a/internal/lang/funcs/string.go +++ b/internal/lang/funcs/string.go @@ -93,7 +93,7 @@ var EndsWithFunc = function.New(&function.Spec{ }) // ReplaceFunc constructs a function that searches a given string for another -// given substring, and replaces each occurence with a given replacement string. +// given substring, and replaces each occurrence with a given replacement string. var ReplaceFunc = function.New(&function.Spec{ Params: []function.Parameter{ { @@ -158,7 +158,7 @@ var StrContainsFunc = function.New(&function.Spec{ }) // Replace searches a given string for another given substring, -// and replaces all occurences with a given replacement string. +// and replaces all occurrences with a given replacement string. func Replace(str, substr, replace cty.Value) (cty.Value, error) { return ReplaceFunc.Call([]cty.Value{str, substr, replace}) } diff --git a/internal/lang/functions.go b/internal/lang/functions.go index 73e05bf84a..80cfc8d6ae 100644 --- a/internal/lang/functions.go +++ b/internal/lang/functions.go @@ -213,7 +213,7 @@ func (s *Scope) Functions() map[string]function.Function { } // experimentalFunction checks whether the given experiment is enabled for -// the recieving scope. If so, it will return the given function verbatim. +// the receiving scope. If so, it will return the given function verbatim. // If not, it will return a placeholder function that just returns an // error explaining that the function requires the experiment to be enabled. // diff --git a/internal/lang/globalref/analyzer_meta_references.go b/internal/lang/globalref/analyzer_meta_references.go index 2b8473b725..c3911e434c 100644 --- a/internal/lang/globalref/analyzer_meta_references.go +++ b/internal/lang/globalref/analyzer_meta_references.go @@ -59,7 +59,7 @@ func (a *Analyzer) MetaReferences(ref Reference) []Reference { // instance with an unknown key, but we don't have any representation // of that. For the moment it's pretty immaterial since most of our // other analysis ignores instance keys anyway, but maybe we'll revisit - // this latter to distingish these two cases better. + // this latter to distinguish these two cases better. return a.metaReferencesModuleCall(moduleAddr, targetAddr.Instance(addrs.NoKey), remaining) case addrs.CountAttr, addrs.ForEachAttr: if resourceAddr, ok := ref.ResourceInstance(); ok { @@ -75,7 +75,7 @@ func (a *Analyzer) MetaReferences(ref Reference) []Reference { // with an unknown key, but we don't have any representation of that. // For the moment it's pretty immaterial since most of our other // analysis ignores instance keys anyway, but maybe we'll revisit this - // latter to distingish these two cases better. + // latter to distinguish these two cases better. return a.metaReferencesResourceInstance(moduleAddr, targetAddr.Instance(addrs.NoKey), remaining) default: // For anything we don't explicitly support we'll just return no diff --git a/internal/lang/globalref/reference.go b/internal/lang/globalref/reference.go index f52fdb4e61..1c318ffc21 100644 --- a/internal/lang/globalref/reference.go +++ b/internal/lang/globalref/reference.go @@ -115,7 +115,7 @@ func (r Reference) ResourceInstance() (addrs.AbsResourceInstance, bool) { } // DebugString returns an internal (but still somewhat OpenTofu-language-like) -// compact string representation of the reciever, which isn't an address that +// compact string representation of the receiver, which isn't an address that // any of our usual address parsers could accept but still captures the // essence of what the reference represents. // diff --git a/internal/lang/references.go b/internal/lang/references.go index d6a7dbf874..41c761cd38 100644 --- a/internal/lang/references.go +++ b/internal/lang/references.go @@ -21,7 +21,7 @@ import ( // This function does not do any de-duplication of references, since references // have source location information embedded in them and so any invalid // references that are duplicated should have errors reported for each -// occurence. +// occurrence. // // If the returned diagnostics contains errors then the result may be // incomplete or invalid. Otherwise, the returned slice has one reference per diff --git a/internal/legacy/helper/schema/field_reader_config.go b/internal/legacy/helper/schema/field_reader_config.go index bbd961cc48..09a7b6f064 100644 --- a/internal/legacy/helper/schema/field_reader_config.go +++ b/internal/legacy/helper/schema/field_reader_config.go @@ -296,7 +296,7 @@ func (r *ConfigFieldReader) readSet( return FieldReadResult{Value: set}, nil } - // If the list is computed, the set is necessarilly computed + // If the list is computed, the set is necessarily computed if raw.Computed { return FieldReadResult{ Value: set, diff --git a/internal/legacy/helper/schema/resource.go b/internal/legacy/helper/schema/resource.go index 969f21cbf3..f2f3a2a55c 100644 --- a/internal/legacy/helper/schema/resource.go +++ b/internal/legacy/helper/schema/resource.go @@ -231,7 +231,7 @@ type StateUpgrader struct { // Upgrade takes the JSON encoded state and the provider meta value, and // upgrades the state one single schema version. The provided state is - // deocded into the default json types using a map[string]interface{}. It + // decoded into the default json types using a map[string]interface{}. It // is up to the StateUpgradeFunc to ensure that the returned value can be // encoded using the new schema. Upgrade StateUpgradeFunc @@ -256,7 +256,7 @@ func (r *Resource) Apply( data.providerMeta = s.ProviderMeta } - // Instance Diff shoould have the timeout info, need to copy it over to the + // Instance Diff should have the timeout info, need to copy it over to the // ResourceData meta rt := ResourceTimeout{} if _, ok := d.Meta[TimeoutKey]; ok { diff --git a/internal/legacy/helper/schema/resource_data.go b/internal/legacy/helper/schema/resource_data.go index 542d564416..63a41ae70d 100644 --- a/internal/legacy/helper/schema/resource_data.go +++ b/internal/legacy/helper/schema/resource_data.go @@ -96,7 +96,7 @@ func (d *ResourceData) GetChange(key string) (interface{}, interface{}) { // GetOk returns the data for the given key and whether or not the key // has been set to a non-zero value at some point. // -// The first result will not necessarilly be nil if the value doesn't exist. +// The first result will not necessarily be nil if the value doesn't exist. // The second result should be checked to determine this information. func (d *ResourceData) GetOk(key string) (interface{}, bool) { r := d.getRaw(key, getSourceSet) diff --git a/internal/legacy/helper/schema/resource_timeout.go b/internal/legacy/helper/schema/resource_timeout.go index 13996c1a27..b5c5788c32 100644 --- a/internal/legacy/helper/schema/resource_timeout.go +++ b/internal/legacy/helper/schema/resource_timeout.go @@ -133,7 +133,7 @@ func (t *ResourceTimeout) ConfigDecode(s *Resource, c *tofu.ResourceConfig) erro timeout = t.Default } - // If the resource has not delcared this in the definition, then error + // If the resource has not declared this in the definition, then error // with an unsupported message if timeout == nil { return unsupportedTimeoutKeyError(timeKey) diff --git a/internal/legacy/helper/schema/schema.go b/internal/legacy/helper/schema/schema.go index 3ff6a5a580..3166264cbc 100644 --- a/internal/legacy/helper/schema/schema.go +++ b/internal/legacy/helper/schema/schema.go @@ -856,7 +856,7 @@ func isValidFieldName(name string) bool { } // resourceDiffer is an interface that is used by the private diff functions. -// This helps facilitate diff logic for both ResourceData and ResoureDiff with +// This helps facilitate diff logic for both ResourceData and ResourceDiff with // minimal divergence in code. type resourceDiffer interface { diffChange(string) (interface{}, interface{}, bool, bool, bool) @@ -874,24 +874,24 @@ func (m schemaMap) diff( d resourceDiffer, all bool) error { - unsupressedDiff := new(tofu.InstanceDiff) - unsupressedDiff.Attributes = make(map[string]*tofu.ResourceAttrDiff) + unsuppressedDiff := new(tofu.InstanceDiff) + unsuppressedDiff.Attributes = make(map[string]*tofu.ResourceAttrDiff) var err error switch schema.Type { case TypeBool, TypeInt, TypeFloat, TypeString: - err = m.diffString(k, schema, unsupressedDiff, d, all) + err = m.diffString(k, schema, unsuppressedDiff, d, all) case TypeList: - err = m.diffList(k, schema, unsupressedDiff, d, all) + err = m.diffList(k, schema, unsuppressedDiff, d, all) case TypeMap: - err = m.diffMap(k, schema, unsupressedDiff, d, all) + err = m.diffMap(k, schema, unsuppressedDiff, d, all) case TypeSet: - err = m.diffSet(k, schema, unsupressedDiff, d, all) + err = m.diffSet(k, schema, unsuppressedDiff, d, all) default: err = fmt.Errorf("%s: unknown type %#v", k, schema.Type) } - for attrK, attrV := range unsupressedDiff.Attributes { + for attrK, attrV := range unsuppressedDiff.Attributes { switch rd := d.(type) { case *ResourceData: if schema.DiffSuppressFunc != nil && attrV != nil && diff --git a/internal/legacy/helper/schema/shims_test.go b/internal/legacy/helper/schema/shims_test.go index aa62800a7e..f5a8e44c29 100644 --- a/internal/legacy/helper/schema/shims_test.go +++ b/internal/legacy/helper/schema/shims_test.go @@ -72,7 +72,7 @@ func testApplyDiff(t *testing.T, } } - // Resource.Meta will be hanlded separately, so it's OK that we lose the + // Resource.Meta will be handled separately, so it's OK that we lose the // timeout values here. expectedState, err := StateValueFromInstanceState(expected, testSchema.Block.ImpliedType()) if err != nil { diff --git a/internal/legacy/tofu/diff.go b/internal/legacy/tofu/diff.go index b90bcd9ae4..3f02eab10f 100644 --- a/internal/legacy/tofu/diff.go +++ b/internal/legacy/tofu/diff.go @@ -717,7 +717,7 @@ func (d *InstanceDiff) applySingleAttrDiff(path []string, attrs map[string]strin return result, nil } - // check for missmatched diff values + // check for mismatched diff values if exists && old != diff.Old && old != hcl2shim.UnknownVariableValue && @@ -1333,7 +1333,7 @@ func (d *InstanceDiff) Same(d2 *InstanceDiff) (bool, string) { continue } - // If the last diff was a computed value then the absense of + // If the last diff was a computed value then the absence of // that value is allowed since it may mean the value ended up // being the same. if diffOld.NewComputed { diff --git a/internal/legacy/tofu/schemas.go b/internal/legacy/tofu/schemas.go index a230f8d1d2..cd4c9b3cc3 100644 --- a/internal/legacy/tofu/schemas.go +++ b/internal/legacy/tofu/schemas.go @@ -50,7 +50,7 @@ func (ss *Schemas) ProviderConfig(provider addrs.Provider) *configschema.Block { // resource type belonging to a given provider type, or nil of no such // schema is available. // -// In many cases the provider type is inferrable from the resource type name, +// In many cases the provider type is inferable from the resource type name, // but this is not always true because users can override the provider for // a resource using the "provider" meta-argument. Therefore it's important to // always pass the correct provider name, even though it many cases it feels diff --git a/internal/legacy/tofu/state.go b/internal/legacy/tofu/state.go index ca9a3d6db4..32aefd29e7 100644 --- a/internal/legacy/tofu/state.go +++ b/internal/legacy/tofu/state.go @@ -812,7 +812,7 @@ func (s *BackendState) SetConfig(val cty.Value, schema *configschema.Block) erro return nil } -// ForPlan produces an alternative representation of the reciever that is +// ForPlan produces an alternative representation of the receiver that is // suitable for storing in a plan. The current workspace must additionally // be provided, to be stored alongside the backend configuration. // @@ -2070,7 +2070,7 @@ func ReadStateV2(jsonBytes []byte) (*State, error) { } } - // catch any unitialized fields in the state + // catch any uninitialized fields in the state state.init() // Sort it @@ -2105,7 +2105,7 @@ func ReadStateV3(jsonBytes []byte) (*State, error) { } } - // catch any unitialized fields in the state + // catch any uninitialized fields in the state state.init() // Sort it diff --git a/internal/logging/panic.go b/internal/logging/panic.go index 1fd2189782..6ec0f5f462 100644 --- a/internal/logging/panic.go +++ b/internal/logging/panic.go @@ -37,7 +37,7 @@ var panicMutex sync.Mutex // PanicHandler is called to recover from an internal panic in OpenTofu, and // augments the standard stack trace with a more user friendly error message. -// PanicHandler must be called as a defered function, and must be the first +// PanicHandler must be called as a deferred function, and must be the first // defer called at the start of a new goroutine. func PanicHandler() { // Have all managed goroutines checkin here, and prevent them from exiting @@ -54,8 +54,8 @@ func PanicHandler() { // PanicHandlerWithTraceFn returns a function similar to PanicHandler which is // called to recover from an internal panic in OpenTofu, and augments the // standard stack trace with a more complete stack trace. -// The calling stack trace is captured before returing the augmented panicHandler -// The returned panicHandler must be called as a defered function, and must be the +// The calling stack trace is captured before returning the augmented panicHandler +// The returned panicHandler must be called as a deferred function, and must be the // first defer called at the start of a new goroutine. // // Callers of this function should create the panicHandler before any tight looping diff --git a/internal/plans/changes.go b/internal/plans/changes.go index a62bdc5e6a..113f919e12 100644 --- a/internal/plans/changes.go +++ b/internal/plans/changes.go @@ -251,7 +251,7 @@ type ResourceInstanceChange struct { Private []byte } -// Encode produces a variant of the reciever that has its change values +// Encode produces a variant of the receiver that has its change values // serialized so it can be written to a plan file. Pass the implied type of the // corresponding resource type schema for correct operation. func (rc *ResourceInstanceChange) Encode(ty cty.Type) (*ResourceInstanceChangeSrc, error) { @@ -488,7 +488,7 @@ type OutputChange struct { Sensitive bool } -// Encode produces a variant of the reciever that has its change values +// Encode produces a variant of the receiver that has its change values // serialized so it can be written to a plan file. func (oc *OutputChange) Encode() (*OutputChangeSrc, error) { cs, err := oc.Change.Encode(cty.DynamicPseudoType) @@ -547,7 +547,7 @@ type Change struct { GeneratedConfig string } -// Encode produces a variant of the reciever that has its change values +// Encode produces a variant of the receiver that has its change values // serialized so it can be written to a plan file. Pass the type constraint // that the values are expected to conform to; to properly decode the values // later an identical type constraint must be provided at that time. diff --git a/internal/plans/dynamic_value.go b/internal/plans/dynamic_value.go index b02e8e16d0..aa9a94d5f9 100644 --- a/internal/plans/dynamic_value.go +++ b/internal/plans/dynamic_value.go @@ -66,7 +66,7 @@ func NewDynamicValue(val cty.Value, ty cty.Type) (DynamicValue, error) { // used to create the receiver. // // A nil DynamicValue decodes to cty.NilVal, which is not a valid value and -// instead represents the absense of a value. +// instead represents the absence of a value. func (v DynamicValue) Decode(ty cty.Type) (cty.Value, error) { if v == nil { return cty.NilVal, nil diff --git a/internal/plans/internal/planproto/planfile.proto b/internal/plans/internal/planproto/planfile.proto index 4a93aa6a19..657168618d 100644 --- a/internal/plans/internal/planproto/planfile.proto +++ b/internal/plans/internal/planproto/planfile.proto @@ -191,7 +191,7 @@ message ResourceInstanceChange { string prev_run_addr = 14; // NOTE: Earlier versions of this format had fields 1 through 6 describing - // various indivdual parts of "addr". We're now using our standard compact + // various individual parts of "addr". We're now using our standard compact // string representation to capture the same information. We don't support // preserving plan files from one OpenTofu version to the next, so we // no longer declare nor accept those fields. diff --git a/internal/plans/objchange/compatible.go b/internal/plans/objchange/compatible.go index 45653fe488..1d7598f301 100644 --- a/internal/plans/objchange/compatible.go +++ b/internal/plans/objchange/compatible.go @@ -59,7 +59,7 @@ func assertObjectCompatible(schema *configschema.Block, planned, actual cty.Valu path := append(path, cty.GetAttrStep{Name: name}) // Unmark values here before checking value assertions, - // but save the marks so we can see if we should supress + // but save the marks so we can see if we should suppress // exposing a value through errors unmarkedActualV, marksA := actualV.UnmarkDeep() unmarkedPlannedV, marksP := plannedV.UnmarkDeep() @@ -332,7 +332,7 @@ func indexStrForErrors(v cty.Value) string { // with sets that may contain unknown values as long as the unknown case is // addressed in some reasonable way in the callback function. // -// The callback always recieves values from set a as its first argument and +// The callback always receives values from set a as its first argument and // values from set b in its second argument, so it is safe to use with // non-commutative functions. // diff --git a/internal/plans/objchange/objchange_test.go b/internal/plans/objchange/objchange_test.go index 917a2c33e9..5908a267e6 100644 --- a/internal/plans/objchange/objchange_test.go +++ b/internal/plans/objchange/objchange_test.go @@ -151,7 +151,7 @@ func TestProposedNew(t *testing.T) { "boz": cty.String, })), }), - // The bloop attribue and baz block does not exist in the config, + // The bloop attribute and baz block does not exist in the config, // and therefore shouldn't be planned. cty.ObjectVal(map[string]cty.Value{ "foo": cty.StringVal("bar"), diff --git a/internal/plans/plan.go b/internal/plans/plan.go index b619ffc4ef..6043613e2f 100644 --- a/internal/plans/plan.go +++ b/internal/plans/plan.go @@ -118,7 +118,7 @@ type Plan struct { Timestamp time.Time } -// CanApply returns true if and only if the recieving plan includes content +// CanApply returns true if and only if the receiving plan includes content // that would make sense to apply. If it returns false, the plan operation // should indicate that there's nothing to do and OpenTofu should exit // without prompting the user to confirm the changes. diff --git a/internal/plugin/discovery/meta_set.go b/internal/plugin/discovery/meta_set.go index 33c3706fbd..17cc048268 100644 --- a/internal/plugin/discovery/meta_set.go +++ b/internal/plugin/discovery/meta_set.go @@ -180,7 +180,7 @@ func (s PluginMetaSet) OverridePaths(paths map[string]string) PluginMetaSet { ret := make(PluginMetaSet) for p := range s { if _, ok := paths[p.Name]; ok { - // Skip plugins that we're overridding + // Skip plugins that we're overriding continue } diff --git a/internal/plugin6/doc.go b/internal/plugin6/doc.go index 6c008f5c71..62d9212994 100644 --- a/internal/plugin6/doc.go +++ b/internal/plugin6/doc.go @@ -11,4 +11,4 @@ package plugin6 // functions in this package are used by various mocks and in tests. // When provider protocol v5 is deprecated, some functions may need to be moved -// here, or the existing functions updated, before removing the plugin pacakge. +// here, or the existing functions updated, before removing the plugin package. diff --git a/internal/providercache/installer.go b/internal/providercache/installer.go index 26a560fc30..0662ab1fad 100644 --- a/internal/providercache/installer.go +++ b/internal/providercache/installer.go @@ -108,7 +108,7 @@ func (i *Installer) ProviderSource() getproviders.Source { func (i *Installer) SetGlobalCacheDir(cacheDir *Dir) { // A little safety check to catch straightforward mistakes where the // directories overlap. Better to panic early than to do - // possibly-distructive actions on the cache directory downstream. + // possibly-destructive actions on the cache directory downstream. if same, err := copydir.SameFile(i.targetDir.baseDir, cacheDir.baseDir); err == nil && same { panic(fmt.Sprintf("global cache directory %s must not match the installation target directory %s", cacheDir.baseDir, i.targetDir.baseDir)) } diff --git a/internal/providercache/installer_test.go b/internal/providercache/installer_test.go index 02d610520f..b7f24199de 100644 --- a/internal/providercache/installer_test.go +++ b/internal/providercache/installer_test.go @@ -658,7 +658,7 @@ func TestEnsureProviderVersions(t *testing.T) { LockFile: ` # This is approximating the awkward situation where the lock # file was populated by someone who installed from a location - # other than the origin registry annd so the set of checksums + # other than the origin registry and so the set of checksums # is incomplete. In this case we can't prove that our cache # entry is valid and so we silently ignore the cache entry # and try to install from upstream anyway, in the hope that diff --git a/internal/providers/provider.go b/internal/providers/provider.go index 7deb2d983b..6ce46b2a39 100644 --- a/internal/providers/provider.go +++ b/internal/providers/provider.go @@ -167,7 +167,7 @@ type FunctionParameterSpec struct { Name string // Type constraint for the parameter Type cty.Type - // Null values alowed for the parameter + // Null values allowed for the parameter AllowNullValue bool // Unknown Values allowed for the parameter // Implies the Return type of the function is also Unknown diff --git a/internal/registry/regsrc/friendly_host.go b/internal/registry/regsrc/friendly_host.go index ce1fb44337..a63d63ca27 100644 --- a/internal/registry/regsrc/friendly_host.go +++ b/internal/registry/regsrc/friendly_host.go @@ -31,7 +31,7 @@ var ( // valid Unicode points in IDN RFC (some with conditions). We are just going // with being liberal with matching and then erroring if we fail to convert // to punycode later (which validates chars fully). This at least ensures - // ascii chars dissalowed by the RC1123 parts above don't become legal + // ascii chars disallowed by the RC1123 parts above don't become legal // again. urlLabelUnicodeSubRe = "[^[:ascii:]]" diff --git a/internal/registry/test/mock_registry.go b/internal/registry/test/mock_registry.go index 6a1827b521..7e4a89d1ae 100644 --- a/internal/registry/test/mock_registry.go +++ b/internal/registry/test/mock_registry.go @@ -213,7 +213,7 @@ func mockRegHandler(config map[uint8]struct{}) http.Handler { } // only adding the single requested module for now - // this is the minimal that any regisry is epected to support + // this is the minimal that any regisry is expected to support mpvs := &response.ModuleProviderVersions{ Source: name, } diff --git a/internal/states/module.go b/internal/states/module.go index 187b5828e2..199d883e4c 100644 --- a/internal/states/module.go +++ b/internal/states/module.go @@ -306,7 +306,7 @@ func (ms *Module) PruneResourceHusks() { } } -// empty returns true if the receving module state is contributing nothing +// empty returns true if the receiving module state is contributing nothing // to the state. In other words, it returns true if the module could be // removed from the state altogether without changing the meaning of the state. // diff --git a/internal/states/resource.go b/internal/states/resource.go index 1777b8413b..01faf6bf41 100644 --- a/internal/states/resource.go +++ b/internal/states/resource.go @@ -177,7 +177,7 @@ func (i *ResourceInstance) findUnusedDeposedKey() DeposedKey { type DeposedKey string // NotDeposed is a special invalid value of DeposedKey that is used to represent -// the absense of a deposed key. It must not be used as an actual deposed key. +// the absence of a deposed key. It must not be used as an actual deposed key. const NotDeposed = DeposedKey("") var deposedKeyRand = rand.New(rand.NewSource(time.Now().UnixNano())) @@ -206,7 +206,7 @@ func (k DeposedKey) GoString() string { } // Generation is a helper method to convert a DeposedKey into a Generation. -// If the reciever is anything other than NotDeposed then the result is +// If the receiver is anything other than NotDeposed then the result is // just the same value as a Generation. If the receiver is NotDeposed then // the result is CurrentGen. func (k DeposedKey) Generation() Generation { diff --git a/internal/states/state.go b/internal/states/state.go index 42048872ab..d2b66a0d4f 100644 --- a/internal/states/state.go +++ b/internal/states/state.go @@ -504,7 +504,7 @@ func (s *State) MoveAbsResourceInstance(src, dst addrs.AbsResourceInstance) { // MaybeMoveAbsResourceInstance moves the given src AbsResourceInstance's // current state to the new dst address. This function will succeed if both the // src address does not exist in state and the dst address does; the return -// value indicates whether or not the move occured. This function will panic if +// value indicates whether or not the move occurred. This function will panic if // either the src does not exist or the dst does exist (but not both). func (s *State) MaybeMoveAbsResourceInstance(src, dst addrs.AbsResourceInstance) bool { // get the src and dst resource instances from state @@ -570,7 +570,7 @@ func (s *State) MoveModuleInstance(src, dst addrs.ModuleInstance) { // MaybeMoveModuleInstance moves the given src ModuleInstance's current state to // the new dst address. This function will succeed if both the src address does // not exist in state and the dst address does; the return value indicates -// whether or not the move occured. This function will panic if either the src +// whether or not the move occurred. This function will panic if either the src // does not exist or the dst does exist (but not both). func (s *State) MaybeMoveModuleInstance(src, dst addrs.ModuleInstance) bool { if src.IsRoot() || dst.IsRoot() { diff --git a/internal/states/state_deepcopy.go b/internal/states/state_deepcopy.go index 22fe5d62db..c634c37f8f 100644 --- a/internal/states/state_deepcopy.go +++ b/internal/states/state_deepcopy.go @@ -16,11 +16,11 @@ import ( // in this file comprehensively copy all parts of the state data structure // that could be mutated via pointers. -// DeepCopy returns a new state that contains equivalent data to the reciever +// DeepCopy returns a new state that contains equivalent data to the receiver // but shares no backing memory in common. // // As with all methods on State, this method is not safe to use concurrently -// with writing to any portion of the recieving data structure. It is the +// with writing to any portion of the receiving data structure. It is the // caller's responsibility to ensure mutual exclusion for the duration of the // operation, but may then freely modify the receiver and the returned copy // independently once this method returns. @@ -43,7 +43,7 @@ func (s *State) DeepCopy() *State { // receiver but shares no backing memory in common. // // As with all methods on Module, this method is not safe to use concurrently -// with writing to any portion of the recieving data structure. It is the +// with writing to any portion of the receiving data structure. It is the // caller's responsibility to ensure mutual exclusion for the duration of the // operation, but may then freely modify the receiver and the returned copy // independently once this method returns. @@ -78,7 +78,7 @@ func (ms *Module) DeepCopy() *Module { // receiver but shares no backing memory in common. // // As with all methods on Resource, this method is not safe to use concurrently -// with writing to any portion of the recieving data structure. It is the +// with writing to any portion of the receiving data structure. It is the // caller's responsibility to ensure mutual exclusion for the duration of the // operation, but may then freely modify the receiver and the returned copy // independently once this method returns. @@ -103,7 +103,7 @@ func (rs *Resource) DeepCopy() *Resource { // to the receiver but shares no backing memory in common. // // As with all methods on ResourceInstance, this method is not safe to use -// concurrently with writing to any portion of the recieving data structure. It +// concurrently with writing to any portion of the receiving data structure. It // is the caller's responsibility to ensure mutual exclusion for the duration // of the operation, but may then freely modify the receiver and the returned // copy independently once this method returns. @@ -127,7 +127,7 @@ func (i *ResourceInstance) DeepCopy() *ResourceInstance { // to the receiver but shares no backing memory in common. // // As with all methods on ResourceInstanceObjectSrc, this method is not safe to -// use concurrently with writing to any portion of the recieving data structure. +// use concurrently with writing to any portion of the receiving data structure. // It is the caller's responsibility to ensure mutual exclusion for the duration // of the operation, but may then freely modify the receiver and the returned // copy independently once this method returns. @@ -162,7 +162,7 @@ func (os *ResourceInstanceObjectSrc) DeepCopy() *ResourceInstanceObjectSrc { copy(private, os.Private) } - // Some addrs.Referencable implementations are technically mutable, but + // Some addrs.Referenceable implementations are technically mutable, but // we treat them as immutable by convention and so we don't deep-copy here. var dependencies []addrs.ConfigResource if os.Dependencies != nil { @@ -186,7 +186,7 @@ func (os *ResourceInstanceObjectSrc) DeepCopy() *ResourceInstanceObjectSrc { // to the receiver but shares no backing memory in common. // // As with all methods on ResourceInstanceObject, this method is not safe to use -// concurrently with writing to any portion of the recieving data structure. It +// concurrently with writing to any portion of the receiving data structure. It // is the caller's responsibility to ensure mutual exclusion for the duration // of the operation, but may then freely modify the receiver and the returned // copy independently once this method returns. @@ -222,7 +222,7 @@ func (o *ResourceInstanceObject) DeepCopy() *ResourceInstanceObject { // to the receiver but shares no backing memory in common. // // As with all methods on OutputValue, this method is not safe to use -// concurrently with writing to any portion of the recieving data structure. It +// concurrently with writing to any portion of the receiving data structure. It // is the caller's responsibility to ensure mutual exclusion for the duration // of the operation, but may then freely modify the receiver and the returned // copy independently once this method returns. diff --git a/internal/states/state_equal.go b/internal/states/state_equal.go index d829dc39d3..1ad9b63e8a 100644 --- a/internal/states/state_equal.go +++ b/internal/states/state_equal.go @@ -25,7 +25,7 @@ func (s *State) Equal(other *State) bool { } // ManagedResourcesEqual returns true if all of the managed resources tracked -// in the reciever are functionally equivalent to the same tracked in the +// in the receiver are functionally equivalent to the same tracked in the // other given state. // // This is a more constrained version of Equal that disregards other diff --git a/internal/states/state_test.go b/internal/states/state_test.go index c53388a4c4..1f40721877 100644 --- a/internal/states/state_test.go +++ b/internal/states/state_test.go @@ -494,7 +494,7 @@ func TestState_MoveAbsResource(t *testing.T) { Mode: addrs.ManagedResourceMode, Type: "test_thing", Name: "child", - }.Instance(addrs.IntKey(0)), // Moving the AbsResouce moves all instances + }.Instance(addrs.IntKey(0)), // Moving the AbsResource moves all instances &ResourceInstanceObjectSrc{ Status: ObjectReady, SchemaVersion: 1, @@ -510,7 +510,7 @@ func TestState_MoveAbsResource(t *testing.T) { Mode: addrs.ManagedResourceMode, Type: "test_thing", Name: "child", - }.Instance(addrs.IntKey(1)), // Moving the AbsResouce moves all instances + }.Instance(addrs.IntKey(1)), // Moving the AbsResource moves all instances &ResourceInstanceObjectSrc{ Status: ObjectReady, SchemaVersion: 1, diff --git a/internal/states/statefile/read.go b/internal/states/statefile/read.go index e168205a44..3673749d94 100644 --- a/internal/states/statefile/read.go +++ b/internal/states/statefile/read.go @@ -198,7 +198,7 @@ func sniffJSONStateVersion(src []byte) (uint64, tfdiags.Diagnostics) { diags = diags.Append(tfdiags.Sourceless( tfdiags.Error, unsupportedFormat, - fmt.Sprintf("The state file can not be checked for presense of encryption: %s", err.Error()), + fmt.Sprintf("The state file can not be checked for presence of encryption: %s", err.Error()), )) return 0, diags } diff --git a/internal/states/statefile/version4.go b/internal/states/statefile/version4.go index a318e6cb49..f1aaecc3e2 100644 --- a/internal/states/statefile/version4.go +++ b/internal/states/statefile/version4.go @@ -300,7 +300,7 @@ func prepareStateV4(sV4 *stateV4) (*File, tfdiags.Diagnostics) { } // Saved check results from the previous run, if any. - // We differentiate absense from an empty array here so that we can + // We differentiate absence from an empty array here so that we can // recognize if the previous run was with a version of OpenTofu that // didn't support checks yet, or if there just weren't any checkable // objects to record, in case that's important for certain messaging. diff --git a/internal/states/statemgr/filesystem.go b/internal/states/statemgr/filesystem.go index 2b92d06985..bf95aff128 100644 --- a/internal/states/statemgr/filesystem.go +++ b/internal/states/statemgr/filesystem.go @@ -357,7 +357,7 @@ func (s *Filesystem) Lock(info *LockInfo) (string, error) { return s.lockID, s.writeLockInfo(info) } -// Unlock is the companion to Lock, completing the implemention of Locker. +// Unlock is the companion to Lock, completing the implementation of Locker. func (s *Filesystem) Unlock(id string) error { defer s.mutex()() diff --git a/internal/states/sync.go b/internal/states/sync.go index 703e98966f..3788a610ce 100644 --- a/internal/states/sync.go +++ b/internal/states/sync.go @@ -411,7 +411,7 @@ func (s *SyncState) MaybeRestoreResourceInstanceDeposed(addr addrs.AbsResourceIn } // RemovePlannedResourceInstanceObjects removes from the state any resource -// instance objects that have the status ObjectPlanned, indiciating that they +// instance objects that have the status ObjectPlanned, indicating that they // are just transient placeholders created during planning. // // Note that this does not restore any "ready" or "tainted" object that might diff --git a/internal/terminal/streams.go b/internal/terminal/streams.go index 24433b7f05..f758c0fd0b 100644 --- a/internal/terminal/streams.go +++ b/internal/terminal/streams.go @@ -31,7 +31,7 @@ import ( // available, such as detecting the current terminal width. If we're connected // to something else, such as a pipe or a file on disk, the stream will // typically provide placeholder values or do-nothing stubs for -// terminal-requiring operatons. +// terminal-requiring operations. // // Note that it's possible for only a subset of the streams to be connected // to a terminal. For example, this happens if the user runs OpenTofu with diff --git a/internal/tfdiags/consolidate_warnings.go b/internal/tfdiags/consolidate_warnings.go index 12df90dae1..9dd303513d 100644 --- a/internal/tfdiags/consolidate_warnings.go +++ b/internal/tfdiags/consolidate_warnings.go @@ -17,7 +17,7 @@ import "fmt" // particularly if they are going to be interpreted by software rather than // by a human reader. // -// The returned slice always has a separate backing array from the reciever, +// The returned slice always has a separate backing array from the receiver, // but some diagnostic values themselves might be shared. // // The definition of "unreasonable" is given as the threshold argument. At most diff --git a/internal/tfdiags/diagnostic.go b/internal/tfdiags/diagnostic.go index 47ef35871c..4780f7e6d3 100644 --- a/internal/tfdiags/diagnostic.go +++ b/internal/tfdiags/diagnostic.go @@ -23,7 +23,7 @@ type Diagnostic interface { // ExtraInfo returns the raw extra information value. This is a low-level // API which requires some work on the part of the caller to properly - // access associated information, so in most cases it'll be more convienient + // access associated information, so in most cases it'll be more convenient // to use the package-level ExtraInfo function to try to unpack a particular // specialized interface from this value. ExtraInfo() interface{} diff --git a/internal/tfdiags/diagnostic_extra.go b/internal/tfdiags/diagnostic_extra.go index b849b990c4..87f2043c79 100644 --- a/internal/tfdiags/diagnostic_extra.go +++ b/internal/tfdiags/diagnostic_extra.go @@ -87,7 +87,7 @@ func ExtraInfoNext[T any](previous interface{}) T { // // Diagnostic recipients which want to examine "Extra" values to sniff for // particular types of extra data can either type-assert this interface -// directly and repeatedly unwrap until they recieve nil, or can use the +// directly and repeatedly unwrap until they receive nil, or can use the // helper function DiagnosticExtra. // // This interface intentionally matches hcl.DiagnosticExtraUnwrapper, so that @@ -95,7 +95,7 @@ func ExtraInfoNext[T any](previous interface{}) T { // tfdiags API, but that non-HCL uses of this will not need to implement HCL // just to get this interface. type DiagnosticExtraUnwrapper interface { - // If the reciever is wrapping another "diagnostic extra" value, returns + // If the receiver is wrapping another "diagnostic extra" value, returns // that value. Otherwise returns nil to indicate dynamically that nothing // is wrapped. // diff --git a/internal/tfplugin5/tfplugin5.pb.go b/internal/tfplugin5/tfplugin5.pb.go index e71e9dd689..1bb38cc70c 100644 --- a/internal/tfplugin5/tfplugin5.pb.go +++ b/internal/tfplugin5/tfplugin5.pb.go @@ -10,7 +10,7 @@ // use protoc to generate stubs for your target language. // // This file will not be updated. Any minor versions of protocol 5 to follow -// should copy this file and modify the copy while maintaing backwards +// should copy this file and modify the copy while maintaining backwards // compatibility. Breaking changes, if any are required, will come // in a subsequent major version with its own separate proto definition. // diff --git a/internal/tfplugin6/tfplugin6.pb.go b/internal/tfplugin6/tfplugin6.pb.go index 6866c1fbc0..068040cb74 100644 --- a/internal/tfplugin6/tfplugin6.pb.go +++ b/internal/tfplugin6/tfplugin6.pb.go @@ -10,7 +10,7 @@ // use protoc to generate stubs for your target language. // // This file will not be updated. Any minor versions of protocol 6 to follow -// should copy this file and modify the copy while maintaing backwards +// should copy this file and modify the copy while maintaining backwards // compatibility. Breaking changes, if any are required, will come // in a subsequent major version with its own separate proto definition. // diff --git a/internal/tofu/context.go b/internal/tofu/context.go index 0c03dc1e48..c5c7ba7486 100644 --- a/internal/tofu/context.go +++ b/internal/tofu/context.go @@ -329,7 +329,7 @@ func (c *Context) watchStop(walker *ContextGraphWalker) (chan struct{}, <-chan s return stop, wait } -// checkConfigDependencies checks whether the recieving context is able to +// checkConfigDependencies checks whether the receiving context is able to // support the given configuration, returning error diagnostics if not. // // Currently this function checks whether the current OpenTofu CLI version diff --git a/internal/tofu/context_apply2_test.go b/internal/tofu/context_apply2_test.go index e5b9302c7e..25e98346d3 100644 --- a/internal/tofu/context_apply2_test.go +++ b/internal/tofu/context_apply2_test.go @@ -197,7 +197,7 @@ func TestContext2Apply_destroyThenUpdate(t *testing.T) { m := testModuleInline(t, map[string]string{ "main.tf": ` resource "test_instance" "a" { - value = "udpated" + value = "updated" } `, }) @@ -2049,7 +2049,7 @@ resource "test_resource" "b" { } func TestContext2Apply_destroyUnusedModuleProvider(t *testing.T) { - // an unsued provider within a module should not be called during destroy + // an unused provider within a module should not be called during destroy unusedProvider := testProvider("unused") testProvider := testProvider("test") ctx := testContext2(t, &ContextOpts{ diff --git a/internal/tofu/context_input.go b/internal/tofu/context_input.go index 3eac31a6d9..187643b9f4 100644 --- a/internal/tofu/context_input.go +++ b/internal/tofu/context_input.go @@ -23,7 +23,7 @@ import ( // configurations. // // Unlike the other better-behaved operation methods, this one actually -// modifies some internal state inside the receving context so that the +// modifies some internal state inside the receiving context so that the // captured values will be implicitly available to a subsequent call to Plan, // or to some other operation entry point. Hopefully a future iteration of // this will change design to make that data flow more explicit. @@ -127,7 +127,7 @@ func (c *Context) Input(config *configs.Config, mode InputMode) tfdiags.Diagnost continue } - // For our purposes here we just want to detect if attrbutes are + // For our purposes here we just want to detect if attributes are // set in config at all, so rather than doing a full decode // (which would require us to prepare an evalcontext, etc) we'll // use the low-level HCL API to process only the top-level diff --git a/internal/tofu/context_plan.go b/internal/tofu/context_plan.go index 5be81d6f7e..98e3cb69dc 100644 --- a/internal/tofu/context_plan.go +++ b/internal/tofu/context_plan.go @@ -717,7 +717,7 @@ func (c *Context) planWalk(config *configs.Config, prevRunState *states.State, o if moveResults.Blocked.Len() > 0 && !diags.HasErrors() { // If we had blocked moves and we're not going to be returning errors // then we'll report the blockers as a warning. We do this only in the - // absense of errors because invalid move statements might well be + // absence of errors because invalid move statements might well be // the root cause of the blockers, and so better to give an actionable // error message than a less-actionable warning. diags = diags.Append(blockedMovesWarningDiag(moveResults)) diff --git a/internal/tofu/context_plan2_test.go b/internal/tofu/context_plan2_test.go index 3977f5c555..74a9717276 100644 --- a/internal/tofu/context_plan2_test.go +++ b/internal/tofu/context_plan2_test.go @@ -963,7 +963,7 @@ resource "test_object" "a" { // In the destroy-with-refresh codepath we end up calling // UpgradeResourceState twice, because we do so once during refreshing // (as part making a normal plan) and then again during the plan-destroy - // walk. The second call recieves the result of the earlier refresh, + // walk. The second call receives the result of the earlier refresh, // so we need to tolerate both "before" and "current" as possible // inputs here. if !bytes.Contains(req.RawStateJSON, []byte("before")) { @@ -1744,7 +1744,7 @@ resource "test_object" "b" { // external changes trigger a "drift report", but because test_object.b was // not targeted, the state was not fixed to match the schema and cannot be - // deocded for the report. + // decoded for the report. p.ReadResourceFn = func(req providers.ReadResourceRequest) (resp providers.ReadResourceResponse) { obj := req.PriorState.AsValueMap() // test_number changed externally @@ -4152,7 +4152,7 @@ output "out" { assertNoErrors(t, diags) } -// Make sure the data sources in the prior state are serializeable even if +// Make sure the data sources in the prior state are serializable even if // there were an error in the plan. func TestContext2Plan_dataSourceReadPlanError(t *testing.T) { m, snap := testModuleWithSnapshot(t, "data-source-read-with-plan-error") @@ -4955,7 +4955,7 @@ import { } if len(plan.Changes.Resources) != len(configuration.ImportResults) { - t.Fatalf("excpected %d resource chnages in the plan, got %d instead", len(configuration.ImportResults), len(plan.Changes.Resources)) + t.Fatalf("expected %d resource changes in the plan, got %d instead", len(configuration.ImportResults), len(plan.Changes.Resources)) } for _, importResult := range configuration.ImportResults { @@ -7630,7 +7630,7 @@ func TestContext2Plan_importResourceWithSensitiveDataSource(t *testing.T) { }) } -func TestContext2Plan_insuffient_block(t *testing.T) { +func TestContext2Plan_insufficient_block(t *testing.T) { type testcase struct { filename string start hcl.Pos diff --git a/internal/tofu/context_plan_test.go b/internal/tofu/context_plan_test.go index 84d249140d..e9cb97cc36 100644 --- a/internal/tofu/context_plan_test.go +++ b/internal/tofu/context_plan_test.go @@ -1730,7 +1730,7 @@ func TestContext2Plan_blockNestingGroup(t *testing.T) { // This represents the situation where the remote service _always_ creates // a single "blah", regardless of whether the block is present, but when // the block _is_ present the user can override some aspects of it. The - // absense of the block means "use the defaults", in that case. + // absence of the block means "use the defaults", in that case. Config: cty.ObjectVal(map[string]cty.Value{ "blah": cty.ObjectVal(map[string]cty.Value{ "baz": cty.NullVal(cty.String), @@ -2685,7 +2685,7 @@ aws_instance.foo.2: provider = provider["registry.opentofu.org/hashicorp/aws"]` if plan.PriorState.String() != expectedState { - t.Fatalf("epected state:\n%q\n\ngot state:\n%q\n", expectedState, plan.PriorState.String()) + t.Fatalf("expected state:\n%q\n\ngot state:\n%q\n", expectedState, plan.PriorState.String()) } } @@ -4356,7 +4356,7 @@ func TestContext2Plan_targetedModuleUntargetedVariable(t *testing.T) { } } -// ensure that outputs missing references due to targetting are removed from +// ensure that outputs missing references due to targeting are removed from // the graph. func TestContext2Plan_outputContainsTargetedResource(t *testing.T) { m := testModule(t, "plan-untargeted-resource-output") diff --git a/internal/tofu/context_test.go b/internal/tofu/context_test.go index 8e953b1398..e50699760e 100644 --- a/internal/tofu/context_test.go +++ b/internal/tofu/context_test.go @@ -762,7 +762,7 @@ func contextOptsForPlanViaFile(t *testing.T, configSnap *configload.Snapshot, pl } // legacyPlanComparisonString produces a string representation of the changes -// from a plan and a given state togther, as was formerly produced by the +// from a plan and a given state together, as was formerly produced by the // String method of tofu.Plan. // // This is here only for compatibility with existing tests that predate our diff --git a/internal/tofu/context_validate_test.go b/internal/tofu/context_validate_test.go index 4e5be65574..0bdaf02e32 100644 --- a/internal/tofu/context_validate_test.go +++ b/internal/tofu/context_validate_test.go @@ -1380,7 +1380,7 @@ func TestContext2Validate_invalidDependsOnResourceRef(t *testing.T) { m := testModuleInline(t, map[string]string{ "main.tf": ` resource "test_instance" "bar" { - depends_on = [test_resource.nonexistant] + depends_on = [test_resource.nonexistent] } `, }) diff --git a/internal/tofu/eval_variable_test.go b/internal/tofu/eval_variable_test.go index 5f7fd87f29..b26eef8e20 100644 --- a/internal/tofu/eval_variable_test.go +++ b/internal/tofu/eval_variable_test.go @@ -1130,7 +1130,7 @@ func TestEvalVariableValidations_jsonErrorMessageEdgeCase(t *testing.T) { }, status: checks.StatusFail, }, - // Invalid variable validation declaration due to an unparseable + // Invalid variable validation declaration due to an unparsable // template string. Assigning a value which passes the condition // results in a warning about the error message. { diff --git a/internal/tofu/evaluate.go b/internal/tofu/evaluate.go index f46bc16302..a710069202 100644 --- a/internal/tofu/evaluate.go +++ b/internal/tofu/evaluate.go @@ -908,7 +908,7 @@ func (d *evaluationStateData) GetResource(addr addrs.Resource, rng tfdiags.Sourc func (d *evaluationStateData) getResourceSchema(addr addrs.Resource, providerAddr addrs.Provider) *configschema.Block { schema, _, err := d.Evaluator.Plugins.ResourceTypeSchema(providerAddr, addr.Mode, addr.Type) if err != nil { - // We have plently other codepaths that will detect and report + // We have plenty of other codepaths that will detect and report // schema lookup errors before we'd reach this point, so we'll just // treat a failure here the same as having no schema. return nil @@ -1004,7 +1004,7 @@ func (d *evaluationStateData) GetCheckBlock(addr addrs.Check, rng tfdiags.Source // For now, check blocks don't contain any meaningful data and can only // be referenced from the testing scope within an expect_failures attribute. // - // We've added them into the scope explicitly since they are referencable, + // We've added them into the scope explicitly since they are referenceable, // but we'll actually just return an error message saying they can't be // referenced in this context. var diags tfdiags.Diagnostics diff --git a/internal/tofu/node_resource_abstract_instance.go b/internal/tofu/node_resource_abstract_instance.go index 4cf17cb62e..fd7cba1f67 100644 --- a/internal/tofu/node_resource_abstract_instance.go +++ b/internal/tofu/node_resource_abstract_instance.go @@ -277,11 +277,11 @@ func (n *NodeAbstractResourceInstance) writeResourceInstanceStateImpl(ctx EvalCo if err != nil { return err } - logFuncName := "NodeAbstractResouceInstance.writeResourceInstanceState" + logFuncName := "NodeAbstractResourceInstance.writeResourceInstanceState" if deposedKey == states.NotDeposed { log.Printf("[TRACE] %s to %s for %s", logFuncName, targetState, absAddr) } else { - logFuncName = "NodeAbstractResouceInstance.writeResourceInstanceStateDeposed" + logFuncName = "NodeAbstractResourceInstance.writeResourceInstanceStateDeposed" log.Printf("[TRACE] %s to %s for %s (deposed key %s)", logFuncName, targetState, absAddr, deposedKey) } @@ -1166,7 +1166,7 @@ func (n *NodeAbstractResourceInstance) plan( Action: action, Before: priorVal, // Pass the marked planned value through in our change - // to propogate through evaluation. + // to propagate through evaluation. // Marks will be removed when encoding. After: plannedNewVal, GeneratedConfig: n.generatedConfigHCL, diff --git a/internal/tofu/node_resource_import.go b/internal/tofu/node_resource_import.go index 8a517e807b..5e7c042275 100644 --- a/internal/tofu/node_resource_import.go +++ b/internal/tofu/node_resource_import.go @@ -246,7 +246,7 @@ func (n *graphNodeImportStateSub) Execute(ctx EvalContext, op walkOperation) (di return diags } - // Verify the existance of the imported resource + // Verify the existence of the imported resource if state.Value.IsNull() { var diags tfdiags.Diagnostics diags = diags.Append(tfdiags.Sourceless( diff --git a/internal/tofu/node_resource_plan_instance.go b/internal/tofu/node_resource_plan_instance.go index b49cbf1492..73fedffaba 100644 --- a/internal/tofu/node_resource_plan_instance.go +++ b/internal/tofu/node_resource_plan_instance.go @@ -313,7 +313,7 @@ func (n *NodePlannableResourceInstance) managedResourceExecute(ctx EvalContext) change.Importing = &plans.Importing{ID: n.importTarget.ID} } - // FIXME: here we udpate the change to reflect the reason for + // FIXME: here we update the change to reflect the reason for // replacement, but we still overload forceReplace to get the correct // change planned. if len(n.replaceTriggeredBy) > 0 { @@ -396,7 +396,7 @@ func (n *NodePlannableResourceInstance) managedResourceExecute(ctx EvalContext) // Even if we don't plan changes, we do still need to at least update // the working state to reflect the refresh result. If not, then e.g. - // any output values refering to this will not react to the drift. + // any output values referring to this will not react to the drift. // (Even if we didn't actually refresh above, this will still save // the result of any schema upgrading we did in readResourceInstanceState.) diags = diags.Append(n.writeResourceInstanceState(ctx, instanceRefreshState, workingState)) diff --git a/internal/tofu/node_resource_validate_test.go b/internal/tofu/node_resource_validate_test.go index 0ced3dab37..e14fec4fff 100644 --- a/internal/tofu/node_resource_validate_test.go +++ b/internal/tofu/node_resource_validate_test.go @@ -418,7 +418,7 @@ func TestNodeValidatableResource_ValidateResource_invalidDependsOn(t *testing.T) Config: configs.SynthBody("", map[string]cty.Value{}), DependsOn: []hcl.Traversal{ // Depending on path.module is pointless, since it is immediately - // available, but we allow all of the referencable addrs here + // available, but we allow all of the referenceable addrs here // for consistency: referencing them is harmless, and avoids the // need for us to document a different subset of addresses that // are valid in depends_on. diff --git a/internal/tofu/schemas.go b/internal/tofu/schemas.go index 9a6581d852..f721260409 100644 --- a/internal/tofu/schemas.go +++ b/internal/tofu/schemas.go @@ -43,7 +43,7 @@ func (ss *Schemas) ProviderConfig(provider addrs.Provider) *configschema.Block { // resource type belonging to a given provider type, or nil of no such // schema is available. // -// In many cases the provider type is inferrable from the resource type name, +// In many cases the provider type is inferable from the resource type name, // but this is not always true because users can override the provider for // a resource using the "provider" meta-argument. Therefore it's important to // always pass the correct provider name, even though it many cases it feels diff --git a/internal/tofu/testdata/plan-targeted-module-orphan/main.tf b/internal/tofu/testdata/plan-targeted-module-orphan/main.tf index 2b33fedaed..97d06364bf 100644 --- a/internal/tofu/testdata/plan-targeted-module-orphan/main.tf +++ b/internal/tofu/testdata/plan-targeted-module-orphan/main.tf @@ -1,4 +1,4 @@ -# Once opon a time, there was a child module here +# Once upon a time, there was a child module here /* module "child" { source = "./child" diff --git a/internal/tofu/transform_destroy_cbd.go b/internal/tofu/transform_destroy_cbd.go index 24880106af..84a5d7719a 100644 --- a/internal/tofu/transform_destroy_cbd.go +++ b/internal/tofu/transform_destroy_cbd.go @@ -47,7 +47,7 @@ func (t *ForcedCBDTransformer) Transform(g *Graph) error { } if !dn.CreateBeforeDestroy() { - // If there are no CBD decendent (dependent nodes), then we + // If there are no CBD descendent (dependent nodes), then we // do nothing here. if !t.hasCBDDescendent(g, v) { log.Printf("[TRACE] ForcedCBDTransformer: %q (%T) has no CBD descendent, so skipping", dag.VertexName(v), v) @@ -117,7 +117,7 @@ func (t *ForcedCBDTransformer) hasCBDDescendent(g *Graph, v dag.Vertex) bool { // DiffTransformer when building the apply graph. type CBDEdgeTransformer struct { // Module and State are only needed to look up dependencies in - // any way possible. Either can be nil if not availabile. + // any way possible. Either can be nil if not available. Config *configs.Config State *states.State } diff --git a/internal/tofu/transform_destroy_edge.go b/internal/tofu/transform_destroy_edge.go index c2445c60ef..697378a853 100644 --- a/internal/tofu/transform_destroy_edge.go +++ b/internal/tofu/transform_destroy_edge.go @@ -46,7 +46,7 @@ type GraphNodeCreator interface { type DestroyEdgeTransformer struct { // FIXME: GraphNodeCreators are not always applying changes, and should not // participate in the destroy graph if there are no operations which could - // interract with destroy nodes. We need Changes for now to detect the + // interact with destroy nodes. We need Changes for now to detect the // action type, but perhaps this should be indicated somehow by the // DiffTransformer which was intended to be the only transformer operating // from the change set. diff --git a/internal/tofu/transform_provider.go b/internal/tofu/transform_provider.go index b36ab2f8ee..1632bfdbe7 100644 --- a/internal/tofu/transform_provider.go +++ b/internal/tofu/transform_provider.go @@ -103,13 +103,13 @@ func (t *ProviderTransformer) Transform(g *Graph) error { var diags tfdiags.Diagnostics // To start, we'll collect the _requested_ provider addresses for each - // node, which we'll then resolve (handling provider inheritence, etc) in + // node, which we'll then resolve (handling provider inheritance, etc) in // the next step. // Our "requested" map is from graph vertices to string representations of // provider config addresses (for deduping) to requests. type ProviderRequest struct { Addr addrs.AbsProviderConfig - Exact bool // If true, inheritence from parent modules is not attempted + Exact bool // If true, inheritance from parent modules is not attempted } requested := map[dag.Vertex]map[string]ProviderRequest{} needConfigured := map[string]addrs.AbsProviderConfig{} @@ -387,7 +387,7 @@ func (t *CloseProviderTransformer) Transform(g *Graph) error { for _, p := range pm { key := p.ProviderAddr().String() - // get the close provider of this type if we alread created it + // get the close provider of this type if we already created it closer := cpm[key] if closer == nil { @@ -429,7 +429,7 @@ func (t *CloseProviderTransformer) Transform(g *Graph) error { // This transformer may create extra nodes that are not needed in practice, // due to overriding provider configurations in child modules. // PruneProviderTransformer can then remove these once ProviderTransformer -// has resolved all of the inheritence, etc. +// has resolved all of the inheritance, etc. type MissingProviderTransformer struct { // MissingProviderTransformer needs the config to rule out _implied_ default providers Config *configs.Config @@ -613,7 +613,7 @@ type ProviderConfigTransformer struct { // each provider node is stored here so that the proxy nodes can look up // their targets by name. providers map[string]GraphNodeProvider - // record providers that can be overriden with a proxy + // record providers that can be overridden with a proxy proxiable map[string]bool // Config is the root node of the configuration tree to add providers from. diff --git a/internal/tofu/validate_selfref.go b/internal/tofu/validate_selfref.go index 99daf91523..8849a3a606 100644 --- a/internal/tofu/validate_selfref.go +++ b/internal/tofu/validate_selfref.go @@ -18,7 +18,7 @@ import ( ) // validateSelfRef checks to ensure that expressions within a particular -// referencable block do not reference that same block. +// referenceable block do not reference that same block. func validateSelfRef(addr addrs.Referenceable, config hcl.Body, providerSchema providers.ProviderSchema) tfdiags.Diagnostics { var diags tfdiags.Diagnostics diff --git a/internal/tofu/variables.go b/internal/tofu/variables.go index 39fdc71258..129d27907f 100644 --- a/internal/tofu/variables.go +++ b/internal/tofu/variables.go @@ -39,7 +39,7 @@ type InputValue struct { // // If a particular variable declared in the root module is _not_ set by // the user then the caller must still provide an InputValue for it but - // must set Value to cty.NilVal to represent the absense of a value. + // must set Value to cty.NilVal to represent the absence of a value. // This requirement is to help detect situations where the caller isn't // correctly detecting and handling all of the declared variables. // @@ -117,13 +117,13 @@ func (v *InputValue) GoString() string { } } -// HasSourceRange returns true if the reciever has a source type for which +// HasSourceRange returns true if the receiver has a source type for which // we expect the SourceRange field to be populated with a valid range. func (v *InputValue) HasSourceRange() bool { return v.SourceType.HasSourceRange() } -// HasSourceRange returns true if the reciever is one of the source types +// HasSourceRange returns true if the receiver is one of the source types // that is used along with a valid SourceRange field when appearing inside an // InputValue object. func (v ValueSourceType) HasSourceRange() bool { @@ -214,7 +214,7 @@ func (vv InputValues) SameValues(other InputValues) bool { return true } -// HasValues returns true if the reciever has the same values as in the given +// HasValues returns true if the receiver has the same values as in the given // map, disregarding the source types and source ranges. // // Values are compared using the cty "RawEquals" method, which means that diff --git a/rfc/20231106-registry-repository-folder-structure.md b/rfc/20231106-registry-repository-folder-structure.md index e353750edc..d51b61bac1 100644 --- a/rfc/20231106-registry-repository-folder-structure.md +++ b/rfc/20231106-registry-repository-folder-structure.md @@ -18,22 +18,22 @@ The folder structure would include a `modules` and `providers` folders. Each sho ``` ├── modules │ ├── ≈ (first letter of the module namespace) -│ │ ├── bridgecrewio (module namepsace that starts with "b") +│ │ ├── bridgecrewio (module namespace that starts with "b") │ │ │ ├── apigateway-cors │ │ │ │ ├── aws.json │ │ │ ├── bridgecrew-read-only │ │ │ │ ├── aws.json │ ├── c (first letter of the module namespace) -│ │ ├── claranet (module namepsace that starts with "c") +│ │ ├── claranet (module namespace that starts with "c") │ │ │ ├── detectors │ │ │ │ ├── signalfx.json ├── providers │ ├── a (first letter of the module namespace) -│ │ ├── aliyun (module namepsace that starts with "a") +│ │ ├── aliyun (module namespace that starts with "a") │ │ │ ├── alibabacloudstack.json │ │ │ ├── alicloud.json │ ├── o (first letter of the module namespace) -│ │ ├── oracle (module namepsace that starts with "o") +│ │ ├── oracle (module namespace that starts with "o") │ │ │ ├── oci.json ``` diff --git a/rfc/20240513-static-evaluation/module-expansion.md b/rfc/20240513-static-evaluation/module-expansion.md index e80a1a1781..ccb50e27a1 100644 --- a/rfc/20240513-static-evaluation/module-expansion.md +++ b/rfc/20240513-static-evaluation/module-expansion.md @@ -11,14 +11,14 @@ For example: # main.tf module "mod" { for_each = {"us" = "first", "eu" = "second"} - source = "./my-mod-${each.vakue}" + source = "./my-mod-${each.value}" name = each.key } ``` Each instance of "mod" will have a different source. This is a complex situation that must have intense validation, inputs and outputs must be identical between the two modules. -The example is a bit contrived, but is a simpler representation of why it's difficult to have different module sources for different instaces down a configuration tree. +The example is a bit contrived, but is a simpler representation of why it's difficult to have different module sources for different instances down a configuration tree. If we want to allow this, modules which have static for_each and count expressions must be expanded at the config layer. This must happen before the graph building, transformers, and walking. @@ -43,7 +43,7 @@ Post-expansion * EvaluationContext (mixed) -## Example represenations: +## Example representations: Variables and providers have been excluded for this example. @@ -139,7 +139,7 @@ addrs.Module is simply a []string, while addrs.ModuleInstance is a pair of {stri * CountKey for int count * ForEachKey for string for_each -## Example represenations for Module -> ModuleInstance: +## Example representations for Module -> ModuleInstance: **HCL (identical):** ```hcl diff --git a/scripts/staticcheck.sh b/scripts/staticcheck.sh index 4b4a79d4a0..6e35fc43e6 100755 --- a/scripts/staticcheck.sh +++ b/scripts/staticcheck.sh @@ -17,7 +17,7 @@ packages=$(go list ./... | egrep -v ${skip}) # We are skipping style-related checks, since tofu intentionally breaks # some of these. The goal here is to find issues that reduce code clarity, or -# may result in bugs. We also disable fucntion deprecation checks (SA1019) +# may result in bugs. We also disable function deprecation checks (SA1019) # because our policy is to update deprecated calls locally while making other # nearby changes, rather than to make cross-cutting changes to update them all. go run honnef.co/go/tools/cmd/staticcheck -checks 'all,-SA1019,-ST*' ${packages} diff --git a/testing/equivalence-tests/tests/basic_map_update/spec.json b/testing/equivalence-tests/tests/basic_map_update/spec.json index 332a515865..35e230b635 100644 --- a/testing/equivalence-tests/tests/basic_map_update/spec.json +++ b/testing/equivalence-tests/tests/basic_map_update/spec.json @@ -1,5 +1,5 @@ { - "description": "basic test coverting updating a simple map", + "description": "basic test covering updating a simple map", "include_files": [], "ignore_fields": {} } diff --git a/testing/equivalence-tests/tests/basic_set/spec.json b/testing/equivalence-tests/tests/basic_set/spec.json index 5ac9530a80..25e5ab5ab4 100644 --- a/testing/equivalence-tests/tests/basic_set/spec.json +++ b/testing/equivalence-tests/tests/basic_set/spec.json @@ -1,5 +1,5 @@ { - "description": "basic test coverting creation of a simple set", + "description": "basic test covering creation of a simple set", "include_files": [], "ignore_fields": {} } diff --git a/website/docs/cli/config/config-file.mdx b/website/docs/cli/config/config-file.mdx index 3271915d04..81c9152ad9 100644 --- a/website/docs/cli/config/config-file.mdx +++ b/website/docs/cli/config/config-file.mdx @@ -20,14 +20,14 @@ on the host operating system: in the relevant user's `%APPDATA%` directory. The physical location of this directory depends on your Windows version and system configuration; use `$env:APPDATA` in PowerShell to find its location on your system. - The `terraform.rc` is supported for backward-compatability purposes. + The `terraform.rc` is supported for backward-compatibility purposes. If both `terraform.rc` and `tofu.rc` files exists, the later would take precedence. * On all other systems, the file must be named `.tofurc` (note the leading period) and placed directly in the home directory of the relevant user or be named `tofurc` and placed in a valid [XDG Base Directory](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) config directory such as `$XDG_CONFIG_HOME/opentofu`. - The `.terraformrc` is supported for backward-compatability purposes. + The `.terraformrc` is supported for backward-compatibility purposes. If both `.terraformrc` and `.tofurc` files exists, the latter would take precedence. When using an XDG config directory `.terraformrc` and `terraformrc` are ignored. diff --git a/website/docs/cli/plugins/signing.mdx b/website/docs/cli/plugins/signing.mdx index b0d213c36e..1cd4bb1996 100644 --- a/website/docs/cli/plugins/signing.mdx +++ b/website/docs/cli/plugins/signing.mdx @@ -16,7 +16,7 @@ OpenTofu providers installed from the Registry are cryptographically signed and is verified at time of installation. OpenTofu does **NOT** support fetching and using unsigned binaries, but you can manually install -unsigned binaries. You should take extreme care when doing so as no programatic authentication is performed. +unsigned binaries. You should take extreme care when doing so as no programmatic authentication is performed. ## Environment Variables diff --git a/website/docs/internals/json-format.mdx b/website/docs/internals/json-format.mdx index 3c16010d69..64f98a0089 100644 --- a/website/docs/internals/json-format.mdx +++ b/website/docs/internals/json-format.mdx @@ -680,7 +680,7 @@ A `` describes the current state of a checkable object in // evaluation of the repetition argument. You can distinguish these cases // using the "status" property, which will be "pass" or "error" for a // zero-instance object and "unknown" for situations where an error blocked - // evalation. + // evaluation. "instances": [ { // "address" is an object similar to the property of the same name in diff --git a/website/docs/internals/machine-readable-ui.mdx b/website/docs/internals/machine-readable-ui.mdx index b7e3fdbe58..94aef1e773 100644 --- a/website/docs/internals/machine-readable-ui.mdx +++ b/website/docs/internals/machine-readable-ui.mdx @@ -237,7 +237,7 @@ Performing OpenTofu operations to a resource will often result in several messag - `provision_start`: when starting a provisioner step - `provision_progress`: on provisioner output - `provision_complete`: on successful provisioning -- `provision_errored`: when an error is enountered during provisioning +- `provision_errored`: when an error is encountered during provisioning - `refresh_start`: when reading a resource during refresh - `refresh_complete`: on successful refresh diff --git a/website/docs/internals/module-registry-protocol.mdx b/website/docs/internals/module-registry-protocol.mdx index 8a05ace478..5b3c62465e 100644 --- a/website/docs/internals/module-registry-protocol.mdx +++ b/website/docs/internals/module-registry-protocol.mdx @@ -137,7 +137,7 @@ $ curl 'https://registry.opentofu.org/v1/modules/hashicorp/consul/aws/versions' The `modules` array in the response always includes the requested module as the first element. -OpenTofu does not use the other elements of this list. However, third-party implementations should always use a single-element list for forward compatiblity. +OpenTofu does not use the other elements of this list. However, third-party implementations should always use a single-element list for forward compatibility. Each returned module has an array of available versions, which OpenTofu matches against any version constraints given in configuration. diff --git a/website/docs/language/expressions/custom-conditions.mdx b/website/docs/language/expressions/custom-conditions.mdx index 71536828a0..7b73bcf6f0 100644 --- a/website/docs/language/expressions/custom-conditions.mdx +++ b/website/docs/language/expressions/custom-conditions.mdx @@ -68,7 +68,7 @@ OpenTofu checks a precondition _before_ evaluating the object it is associated w ### Usage -Each precondition and postcondition requires a [`condition` argument](#condition-expressions). This is an expression that must return `true` if the conditition is fufilled or `false` if it is invalid. The expression can refer to any other objects in the same module, as long as the references do not create cyclic dependencies. Resource postconditions can also use the [`self` object](#self-object) to refer to attributes of each instance of the resource where they are configured. +Each precondition and postcondition requires a [`condition` argument](#condition-expressions). This is an expression that must return `true` if the conditition is fulfilled or `false` if it is invalid. The expression can refer to any other objects in the same module, as long as the references do not create cyclic dependencies. Resource postconditions can also use the [`self` object](#self-object) to refer to attributes of each instance of the resource where they are configured. If the condition evaluates to `false`, OpenTofu will produce an [error message](#error-messages) that includes the result of the `error_message` expression. If you declare multiple preconditions or postconditions, OpenTofu returns error messages for all failed conditions. diff --git a/website/docs/language/files/dependency-lock.mdx b/website/docs/language/files/dependency-lock.mdx index 24c4f4d514..fe86b60aec 100644 --- a/website/docs/language/files/dependency-lock.mdx +++ b/website/docs/language/files/dependency-lock.mdx @@ -1,7 +1,7 @@ --- title: Dependency Lock File description: >- - OpenTofu uses the dependency lock file .teraform.lock.hcl to track and select + OpenTofu uses the dependency lock file .terraform.lock.hcl to track and select provider versions. Learn about dependency installation and lock file changes. --- diff --git a/website/docs/language/functions/regex.mdx b/website/docs/language/functions/regex.mdx index 937caa3147..83aaafcbeb 100644 --- a/website/docs/language/functions/regex.mdx +++ b/website/docs/language/functions/regex.mdx @@ -121,7 +121,7 @@ The available flags are listed in the table below: | `i` | Case insensitive: a literal letter in the pattern matches both lowercase and uppercase versions of that letter | | `m` | The `^` and `$` operators also match the beginning and end of lines within the string, marked by newline characters; behavior of `\A` and `\z` is unchanged | | `s` | The `.` operator also matches newline | -| `U` | The meaning of presence or absense `?` after a repetition operator is inverted. For example, `x*` is interpreted like `x*?` and vice-versa. | +| `U` | The meaning of presence or absence `?` after a repetition operator is inverted. For example, `x*` is interpreted like `x*?` and vice-versa. | ## Examples diff --git a/website/docs/language/resources/provisioners/file.mdx b/website/docs/language/resources/provisioners/file.mdx index 0f5fb27f30..bbe3a6e64c 100644 --- a/website/docs/language/resources/provisioners/file.mdx +++ b/website/docs/language/resources/provisioners/file.mdx @@ -103,7 +103,7 @@ your `destination` argument when using WinRM, because it can serve as a vector for arbitrary PowerShell code execution on the remote system. Modern Windows systems support running an OpenSSH server, so we strongly -recommend choosing SSH over WinRM whereever possible, and using WinRM only as +recommend choosing SSH over WinRM wherever possible, and using WinRM only as a last resort when working with obsolete Windows versions. ## Directory Uploads diff --git a/website/docs/language/settings/backends/configuration.mdx b/website/docs/language/settings/backends/configuration.mdx index 5e7ebaf7a3..6bac516e77 100644 --- a/website/docs/language/settings/backends/configuration.mdx +++ b/website/docs/language/settings/backends/configuration.mdx @@ -79,7 +79,7 @@ or state operations. After you initialize, OpenTofu creates a `.terraform/` directory locally. This directory contains the most recent backend configuration, including any authentication parameters you provided to the OpenTofu CLI. Do not check this directory into Git, as it may contain sensitive credentials for your remote backend. -The local backend configuration is different and entirely separate from the `terraform.tfstate` file that contains [state data](../../../language/state/index.mdx) about your real-world infrastruture. OpenTofu stores the `terraform.tfstate` file in your remote backend. +The local backend configuration is different and entirely separate from the `terraform.tfstate` file that contains [state data](../../../language/state/index.mdx) about your real-world infrastructure. OpenTofu stores the `terraform.tfstate` file in your remote backend. When you change backends, OpenTofu gives you the option to migrate your state to the new backend. This lets you adopt backends without losing diff --git a/website/docs/language/v1-compatibility-promises.mdx b/website/docs/language/v1-compatibility-promises.mdx index 8169e4ccd2..f2649370a5 100644 --- a/website/docs/language/v1-compatibility-promises.mdx +++ b/website/docs/language/v1-compatibility-promises.mdx @@ -304,7 +304,7 @@ compatibility promises. ## Community-maintained State Storage Backends The `azurerm`, `consul`, `s3`, and `kubernetes` backends are maintained by -other teams at HashiCorp. Those teams intend to continue basic maintenence at +other teams at HashiCorp. Those teams intend to continue basic maintenance at the level of bug fixes through the v1.x releases, unless we implement a plugin protocol for backends at which point development of these backends is likely to continue in the external plugins only, which may require configuration @@ -488,7 +488,7 @@ processing of logs by OpenTofu developers. All of the following commands and their subcommands/options are _not_ subject to compatibility promises, either because we have existing plans to improve them during the v1.x series or because we are aware of shortcomings in their -design that might require breaking changes for ongoing maintenence. +design that might require breaking changes for ongoing maintenance. While you can freely use these commands when running OpenTofu interactively as long as they remain supported, we don't recommend using them as part of