github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/builtin/providers/docker/resource_docker_image.go (about) 1 package docker 2 3 import ( 4 "github.com/hashicorp/terraform/helper/schema" 5 ) 6 7 func resourceDockerImage() *schema.Resource { 8 return &schema.Resource{ 9 Create: resourceDockerImageCreate, 10 Read: resourceDockerImageRead, 11 Update: resourceDockerImageUpdate, 12 Delete: resourceDockerImageDelete, 13 14 Schema: map[string]*schema.Schema{ 15 "name": &schema.Schema{ 16 Type: schema.TypeString, 17 Required: true, 18 }, 19 20 "latest": &schema.Schema{ 21 Type: schema.TypeString, 22 Computed: true, 23 }, 24 25 "keep_locally": &schema.Schema{ 26 Type: schema.TypeBool, 27 Optional: true, 28 }, 29 30 "pull_trigger": &schema.Schema{ 31 Type: schema.TypeString, 32 Optional: true, 33 ForceNew: true, 34 ConflictsWith: []string{"pull_triggers"}, 35 Deprecated: "Use field pull_triggers instead", 36 }, 37 38 "pull_triggers": &schema.Schema{ 39 Type: schema.TypeSet, 40 Optional: true, 41 ForceNew: true, 42 Elem: &schema.Schema{Type: schema.TypeString}, 43 Set: schema.HashString, 44 }, 45 }, 46 } 47 }