This repository has been archived by the owner on Jun 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Require target_id on profile mapping
Also add data source to allow users to determine target/source ids Update CHANGELOG Update new data source to be more specific All other profile mapping sources are do not have unique names Update find profile mapping source to take type as well Update docs
- Loading branch information
Showing
15 changed files
with
173 additions
and
45 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package okta | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/hashicorp/terraform-plugin-sdk/helper/schema" | ||
"github.com/okta/okta-sdk-golang/okta/query" | ||
) | ||
|
||
func dataSourceUserProfileMappingSource() *schema.Resource { | ||
return &schema.Resource{ | ||
Read: dataSourceUserProfileMappingSourceRead, | ||
|
||
Schema: map[string]*schema.Schema{ | ||
"name": { | ||
Type: schema.TypeString, | ||
Computed: true, | ||
}, | ||
"type": { | ||
Type: schema.TypeString, | ||
Computed: true, | ||
}, | ||
}, | ||
} | ||
} | ||
|
||
func dataSourceUserProfileMappingSourceRead(d *schema.ResourceData, m interface{}) error { | ||
client := getSupplementFromMetadata(m) | ||
|
||
mapping, _, err := client.FindProfileMappingSource("user", "user", &query.Params{}) | ||
if err != nil { | ||
return fmt.Errorf("Error Listing User Profile Mapping Source in Okta: %v", err) | ||
} | ||
|
||
d.SetId(mapping.ID) | ||
d.Set("type", mapping.Type) | ||
d.Set("name", mapping.Name) | ||
|
||
return nil | ||
} |
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
layout: "okta" | ||
page_title: "Okta: okta_user_profile_mapping_source" | ||
sidebar_current: "docs-okta-datasource-user-profile-mapping-source" | ||
description: |- | ||
Get the base user Profile Mapping source or target from Okta. | ||
--- | ||
|
||
# okta_user_profile_mapping_source | ||
|
||
Use this data source to retrieve the base user Profile Mapping source or target from Okta. | ||
|
||
## Example Usage | ||
|
||
```hcl | ||
data "okta_user_profile_mapping_source" "example" {} | ||
``` | ||
|
||
## Attributes Reference | ||
|
||
* `id` - id of the source. | ||
|
||
* `name` - name of source. | ||
|
||
* `type` - type of source. |
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
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