Update some comments in states package

This commit is contained in:
Pam Selle 2020-10-07 10:57:25 -04:00
parent bad0adb996
commit 923f9f226d
2 changed files with 5 additions and 8 deletions

View File

@ -76,16 +76,14 @@ func (ms *Module) RemoveResource(addr addrs.Resource) {
// SetResourceInstanceCurrent saves the given instance object as the current // SetResourceInstanceCurrent saves the given instance object as the current
// generation of the resource instance with the given address, simultaneously // generation of the resource instance with the given address, simultaneously
// updating the recorded provider configuration address, dependencies, and // updating the recorded provider configuration address and dependencies.
// resource EachMode.
// //
// Any existing current instance object for the given resource is overwritten. // Any existing current instance object for the given resource is overwritten.
// Set obj to nil to remove the primary generation object altogether. If there // Set obj to nil to remove the primary generation object altogether. If there
// are no deposed objects then the instance will be removed altogether. // are no deposed objects then the instance will be removed altogether.
// //
// The provider address and "each mode" are resource-wide settings and so they // The provider address is a resource-wide setting and is updated for all other
// are updated for all other instances of the same resource as a side-effect of // instances of the same resource as a side-effect of this call.
// this call.
func (ms *Module) SetResourceInstanceCurrent(addr addrs.ResourceInstance, obj *ResourceInstanceObjectSrc, provider addrs.AbsProviderConfig) { func (ms *Module) SetResourceInstanceCurrent(addr addrs.ResourceInstance, obj *ResourceInstanceObjectSrc, provider addrs.AbsProviderConfig) {
rs := ms.Resource(addr.Resource) rs := ms.Resource(addr.Resource)
// if the resource is nil and the object is nil, don't do anything! // if the resource is nil and the object is nil, don't do anything!

View File

@ -316,9 +316,8 @@ func (s *SyncState) MaybeFixUpResourceInstanceAddressForCount(addr addrs.ConfigR
// concurrently mutated during this call, but may be freely used again once // concurrently mutated during this call, but may be freely used again once
// this function returns. // this function returns.
// //
// The provider address and "each mode" are resource-wide settings and so they // The provider address is a resource-wide settings and is updated
// are updated for all other instances of the same resource as a side-effect of // for all other instances of the same resource as a side-effect of this call.
// this call.
// //
// If the containing module for this resource or the resource itself are not // If the containing module for this resource or the resource itself are not
// already tracked in state then they will be added as a side-effect. // already tracked in state then they will be added as a side-effect.