github.com/minamijoyo/terraform@v0.7.8-0.20161029001309-18b3736ba44b/builtin/providers/random/provider.go (about) 1 package random 2 3 import ( 4 "github.com/hashicorp/terraform/helper/schema" 5 "github.com/hashicorp/terraform/terraform" 6 ) 7 8 // Provider returns a terraform.ResourceProvider. 9 func Provider() terraform.ResourceProvider { 10 return &schema.Provider{ 11 Schema: map[string]*schema.Schema{}, 12 13 ResourcesMap: map[string]*schema.Resource{ 14 "random_id": resourceId(), 15 "random_shuffle": resourceShuffle(), 16 }, 17 } 18 } 19 20 // stubRead is a do-nothing Read implementation used for our resources, 21 // which don't actually need to do anything on read. 22 func stubRead(d *schema.ResourceData, meta interface{}) error { 23 return nil 24 } 25 26 // stubDelete is a do-nothing Dete implementation used for our resources, 27 // which don't actually need to do anything unusual on delete. 28 func stubDelete(d *schema.ResourceData, meta interface{}) error { 29 d.SetId("") 30 return nil 31 }