-
-
Save MoimHossain/b5f6626c0bfda1efde57acdb3b25af99 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"github.com/microsoft/terraform-provider-azuredevops/utils/converter" | |
"github.com/microsoft/terraform-provider-azuredevops/utils/tfhelper" | |
"os" | |
"log" | |
"github.com/google/uuid" | |
"github.com/hashicorp/terraform/helper/schema" | |
"github.com/microsoft/azure-devops-go-api/azuredevops/core" | |
"github.com/microsoft/azure-devops-go-api/azuredevops/graph" | |
) | |
func resourceTeam() *schema.Resource { | |
return &schema.Resource{ | |
Create: resourceTeamCreate, | |
Read: resourceTeamRead, | |
Update: resourceTeamUpdate, | |
Delete: resourceTeamDelete, | |
//https://godoc.org/github.com/hashicorp/terraform/helper/schema#Schema | |
Schema: map[string]*schema.Schema{ | |
"project_id": &schema.Schema{ | |
Type: schema.TypeString, | |
Required: true, | |
DiffSuppressFunc: tfhelper.DiffFuncSupressCaseSensitivity, | |
}, | |
"name": &schema.Schema{ | |
Type: schema.TypeString, | |
ForceNew: true, | |
Required: true, | |
DiffSuppressFunc: tfhelper.DiffFuncSupressCaseSensitivity, | |
}, | |
"description": &schema.Schema{ | |
Type: schema.TypeString, | |
Optional: true, | |
Default: "", | |
}, | |
"members": { | |
Type: schema.TypeSet, | |
Optional: true, | |
Computed: true, | |
Elem: &schema.Resource{ | |
Schema: map[string]*schema.Schema{ | |
"name": { | |
Type: schema.TypeString, | |
Required: true, | |
}, | |
"admin": { | |
Type: schema.TypeBool, | |
Required: true, | |
Sensitive: true, | |
}, | |
}, | |
}, | |
}, | |
}, | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment