Skip to content

Commit

Permalink
Ditto for identity_group
Browse files Browse the repository at this point in the history
  • Loading branch information
lawliet89 committed Feb 25, 2019
1 parent 0d18abf commit 95a1205
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion vault/resource_gcp_auth_backend_role.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ func gcpAuthResourceRead(d *schema.ResourceData, meta interface{}) error {
for _, k := range []string{"ttl", "max_ttl", "project_id", "bound_projects", "period", "policies", "add_group_aliases", "max_jwt_exp", "bound_service_accounts", "bound_zones", "bound_regions", "bound_instance_groups", "bound_labels"} {
if v, ok := resp.Data[k]; ok {
if err := d.Set(k, v); err != nil {
return fmt.Errorf("error reading %s for GCP Auth Backend Role %q", k, path)
return fmt.Errorf("error reading %s for GCP Auth Backend Role %q: %q", k, path, err)
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion vault/resource_identity_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,11 @@ func identityGroupRead(d *schema.ResourceData, meta interface{}) error {
}

for _, k := range []string{"name", "type", "metadata", "policies", "member_entity_ids", "member_group_ids"} {
d.Set(k, resp.Data[k])
if v, ok := resp.Data[k]; ok {
if err := d.Set(k, v); err != nil {
return fmt.Errorf("error reading %s for Identity Group %q: %q", k, path, err)
}
}
}
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion vault/resource_kubernetes_auth_backend_role.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func kubernetesAuthBackendRoleRead(d *schema.ResourceData, meta interface{}) err
for _, k := range []string{"bound_cidrs", "bound_service_account_names", "bound_service_account_namespaces", "num_uses", "policies", "ttl", "max_ttl", "period"} {
if v, ok := resp.Data[k]; ok {
if err := d.Set(k, v); err != nil {
return fmt.Errorf("error reading %s for Kubernetes Auth Backend Role %q", k, path)
return fmt.Errorf("error reading %s for Kubernetes Auth Backend Role %q: %q", k, path, err)
}
}
}
Expand Down

0 comments on commit 95a1205

Please sign in to comment.