Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 6 additions & 20 deletions docs/resources/trusted_origin.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ Creates a Trusted Origin. This resource allows you to create and configure a Tru
resource "okta_trusted_origin" "example" {
name = "example"
origin = "https://example.com"
scopes {
type = "CORS"
}
scopes = ["CORS"]
}
```

Expand All @@ -25,29 +23,17 @@ resource "okta_trusted_origin" "example" {

### Required

- `name` (String) Unique name for the trusted origin
- `origin` (String) Unique origin URL for the trusted origin.
- `scopes` (Block List, Min: 1) Array of scope types that this trusted origin is used for (see [below for nested schema](#nestedblock--scopes))
- `name` (String) Unique name for this trusted origin
- `origin` (String) Unique origin URL for this trusted origin
- `scopes` (List of String) Scopes of the Trusted Origin - can either be `CORS` and/or `REDIRECT`

### Optional

- `status` (String) Status of the trusted origin. Values: ACTIVE, INACTIVE
- `active` (Boolean) Whether the Trusted Origin is active or not - can only be issued post-creation. By default, it is `true`.

### Read-Only

- `id` (String) The unique identifier for the resource.
- `created` (String) Timestamp when the trusted origin was created
- `created_by` (String) The ID of the user who created the trusted origin
- `last_updated` (String) Timestamp when the trusted origin was last updated
- `last_updated_by` (String) The ID of the user who last updated the trusted origin

<a id="nestedblock--scopes"></a>
### Nested Schema for `scopes`

Optional:

- `type` (String) The scope type. Supported values: `CORS`, `REDIRECT`, `IFRAME_EMBED`
- `allowed_okta_apps` (List of String) The allowed Okta apps for the trusted origin scope
- `id` (String) The ID of this resource.

## Import

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
resource "okta_trusted_origin" "testAcc_replace_with_uuid" {
name = "testAcc-replace_with_uuid"
origin = "https://example-replace_with_uuid.com"
scopes {
type = "CORS"
}
scopes = ["CORS"]
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
resource "okta_trusted_origin" "testAcc_replace_with_uuid" {
name = "testAcc-replace_with_uuid"
status = "INACTIVE"
active = false
origin = "https://example2-replace_with_uuid.com"
scopes {
type = "CORS"
}
scopes {
type = "REDIRECT"
}
scopes = ["CORS", "REDIRECT"]
}
2 changes: 0 additions & 2 deletions okta/fwprovider/framework_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ func (p *FrameworkProvider) Configure(ctx context.Context, req provider.Configur
func (p *FrameworkProvider) DataSources(_ context.Context) []func() datasource.DataSource {
var sources []func() datasource.DataSource
sources = append(sources, idaas.FWProviderDataSources()...)
sources = append(sources, idaas.FWProviderGeneratedDataSources()...)
sources = append(sources, governance.FWProviderDataSources()...)

// Wrap all data sources with SafeDataSource for panic recovery
Expand All @@ -251,7 +250,6 @@ func (p *FrameworkProvider) Resources(_ context.Context) []func() resource.Resou

// Append resources from various modules
res = append(res, idaas.FWProviderResources()...)
res = append(res, idaas.FWProviderGeneratedResources()...)
res = append(res, governance.FWProviderResources()...)

// Wrap all resources with SafeResource for panic recovery
Expand Down
162 changes: 0 additions & 162 deletions okta/services/idaas/data_source_okta_trusted_origin.go

This file was deleted.

2 changes: 1 addition & 1 deletion okta/services/idaas/idaas.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ func providerIsClassicOrg(ctx context.Context, m interface{}) bool {

func FWProviderResources() []func() resource.Resource {
rawResources := []func() resource.Resource{
newTrustedOriginResource,
newAppAccessPolicyAssignmentResource,
newAppOAuthRoleAssignmentResource,
newTrustedServerResource,
Expand Down Expand Up @@ -288,6 +287,7 @@ func ProviderResources() map[string]*schema.Resource {
resources.OktaIDaaSTemplateSms: resourceTemplateSms(),
resources.OktaIDaaSTheme: resourceTheme(),
resources.OktaIDaaSThreatInsightSettings: resourceThreatInsightSettings(),
resources.OktaIDaaSTrustedOrigin: resourceTrustedOrigin(),
resources.OktaIDaaSUser: resourceUser(),
resources.OktaIDaaSUserAdminRoles: resourceUserAdminRoles(),
resources.OktaIDaaSUserBaseSchemaProperty: resourceUserBaseSchemaProperty(),
Expand Down
19 changes: 0 additions & 19 deletions okta/services/idaas/idaas_generated_registration.go

This file was deleted.

7 changes: 1 addition & 6 deletions okta/services/idaas/resource_okta_brand_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,7 @@ func TestAccResourceOktaBrand_Issue_1846_with_classic_application_uri(t *testing
resource okta_trusted_origin test{
name = "testAcc-replace_with_uuid"
origin = "https://examplesss.com"
scopes {
type = "CORS"
}
scopes {
type = "REDIRECT"
}
scopes = ["CORS", "REDIRECT"]
}

resource okta_brand test{
Expand Down
Loading