// resourceGroupMembershipCreate creates a new jira issue using the jira api
resourceGroupMembershipCreate creates a new jira issue using the jira api
// resourceGroupMembershipCreate creates a new jira issue using the jira api
func resourceGroupMembershipCreate(d *schema.ResourceData, m interface{}) error {
	config := m.(*Config)
	username := d.Get("username").(string)
	group := d.Get("group").(string)
	groupMembership := new(Group)
	groupMembership.Name = username
	relativeURL, _ := url.Parse(groupUserAPIEndpoint)
	query := relativeURL.Query()
	query.Set("groupname", group)
	relativeURL.RawQuery = query.Encode()
	err := request(config.jiraClient, "POST", relativeURL.String(), groupMembership, nil)
	if err != nil {
		return errors.Wrap(err, "Request failed")
	}
	d.SetId(fmt.Sprintf("%s:%s", username, group))
	return resourceGroupMembershipRead(d, m)
}
func resourceGroupMembershipCreate ( d * schema . ResourceData , m interface { } ) error { config := m . ( * Config ) username := d . Get ( " " ) . ( string ) group := d . Get ( " " ) . ( string ) groupMembership := new ( Group ) groupMembership . Name = username relativeURL , _ := url . Parse ( groupUserAPIEndpoint ) query := relativeURL . Query ( ) query . Set ( " " , group ) relativeURL . RawQuery = query . Encode ( ) err := request ( config . jiraClient , " " , relativeURL . String ( ) , groupMembership , nil ) if err != nil { return errors . Wrap ( err , " " ) } d . SetId ( fmt . Sprintf ( " " , username , group ) ) return resourceGroupMembershipRead ( d , m ) }
resourceGroupMembershipCreate creates a new jira issue using the jira api
resourceGroupMembershipCreate creates a new jira issue using the jira api