func (rs *Resource) CreateInstance(key addrs.InstanceKey) *ResourceInstance {
	is := NewResourceInstance()
	rs.Instances[key] = is
	return is
}
CreateInstance creates an instance and adds it to the resource
package states
import (
	"fmt"
	"math/rand"
	"time"
	"github.com/camptocamp/terraboard/internal/terraform/addrs"
)
type Resource struct {
	Addr addrs.AbsResource
	Instances map[addrs.InstanceKey]*ResourceInstance
	ProviderConfig addrs.AbsProviderConfig
}
func (rs *Resource) Instance(key addrs.InstanceKey) *ResourceInstance {
	return rs.Instances[key]
}