Skip to content

Commit

Permalink
a lil more work..
Browse files Browse the repository at this point in the history
but this will never work until this issue is resolved
hashicorp/terraform#2430
  • Loading branch information
brianantonelli committed Mar 22, 2017
1 parent c5765f8 commit 12ce693
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions resource_alks_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,13 @@ func resourceAlksSession() *schema.Resource {
return &schema.Resource{
Create: resourceAlksSessionCreate,
Read: resourceAlksSessionRead,
Exists: nil,
Update: resourceAlksSessionUpdate,
Delete: resourceAlksSessionDelete,

Schema: map[string]*schema.Schema{
"name": &schema.Schema{
Type: schema.TypeString,
Required: true,
ForceNew: true,
},
"use_iam": &schema.Schema{
Type: schema.TypeBool,
Required: true,
ForceNew: true,
},
"access_key": &schema.Schema{
Type: schema.TypeString,
Expand All @@ -41,8 +35,13 @@ func resourceAlksSession() *schema.Resource {
}
}

// No-op: ALKS Session is currently read-only
func resourceAlksSessionCreate(d *schema.ResourceData, meta interface{}) error {
log.Printf("[INFO] ALKS Session Create")
return resourceAlksSessionRead(d, meta)
}

func resourceAlksSessionRead(d *schema.ResourceData, meta interface{}) error {
log.Printf("[INFO] ALKS Session Read")

var useIam = d.Get("use_iam").(bool)
var name = d.Get("name").(string)
Expand All @@ -68,14 +67,13 @@ func resourceAlksSessionCreate(d *schema.ResourceData, meta interface{}) error {
return nil
}

func resourceAlksSessionRead(d *schema.ResourceData, meta interface{}) error {
log.Printf("[INFO] ALKS Session Read")

return nil
// No-op: ALKS Session is currently read-only
func resourceAlksSessionUpdate(d *schema.ResourceData, meta interface{}) error {
return resourceAlksSessionRead(d, meta)
}

// No-op: ALKS Session is currently read-only
func resourceAlksSessionDelete(d *schema.ResourceData, meta interface{}) error {
log.Printf("[INFO] ALKS Session Delete")

d.SetId("")
return nil
}

0 comments on commit 12ce693

Please sign in to comment.