Skip to content

Commit

Permalink
Revert "add EC test client and format terraform resources"
Browse files Browse the repository at this point in the history
This reverts commit 5e19adc.
  • Loading branch information
tgoodsell-tempus committed Sep 12, 2023
1 parent b9c4e95 commit ae9f4f4
Show file tree
Hide file tree
Showing 53 changed files with 209 additions and 209 deletions.
6 changes: 3 additions & 3 deletions examples/okta_admin_role_custom_assignments/basic.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "hostname" {
type = string
type=string
}

locals {
Expand All @@ -15,7 +15,7 @@ resource "okta_admin_role_custom" "test" {
resource "okta_resource_set" "test" {
label = "testAcc_replace_with_uuid"
description = "testing, testing"
resources = [
resources = [
format("%s/api/v1/users", local.org_url),
format("%s/api/v1/apps/%s", local.org_url, okta_app_swa.test.id)
]
Expand All @@ -24,7 +24,7 @@ resource "okta_resource_set" "test" {
resource "okta_admin_role_custom_assignments" "test" {
resource_set_id = okta_resource_set.test.id
custom_role_id = okta_admin_role_custom.test.id
members = [
members = [
format("%s/api/v1/users/%s", local.org_url, okta_user.test.id),
format("%s/api/v1/groups/%s", local.org_url, okta_group.test.id)
]
Expand Down
6 changes: 3 additions & 3 deletions examples/okta_admin_role_custom_assignments/updated.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "hostname" {
type = string
type=string
}

locals {
Expand All @@ -15,7 +15,7 @@ resource "okta_admin_role_custom" "test" {
resource "okta_resource_set" "test" {
label = "testAcc_replace_with_uuid"
description = "testing, testing"
resources = [
resources = [
format("%s/api/v1/users", local.org_url),
format("%s/api/v1/apps/%s", local.org_url, okta_app_swa.test.id)
]
Expand All @@ -24,7 +24,7 @@ resource "okta_resource_set" "test" {
resource "okta_admin_role_custom_assignments" "test" {
resource_set_id = okta_resource_set.test.id
custom_role_id = okta_admin_role_custom.test.id
members = [
members = [
format("%s/api/v1/users/%s", local.org_url, okta_user.test.id)
]
}
Expand Down
18 changes: 9 additions & 9 deletions examples/okta_admin_role_targets/basic.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
resource "okta_user" "test" {
first_name = "TestAcc"
last_name = "blah"
login = "testAcc_replace_with_uuid@example.com"
email = "testAcc_replace_with_uuid@example.com"
first_name = "TestAcc"
last_name = "blah"
login = "testAcc_replace_with_uuid@example.com"
email = "testAcc_replace_with_uuid@example.com"
}

resource "okta_user_admin_roles" "test" {
user_id = okta_user.test.id
user_id = okta_user.test.id
admin_roles = [
"APP_ADMIN",
"GROUP_MEMBERSHIP_ADMIN"
Expand All @@ -33,8 +33,8 @@ resource "okta_admin_role_targets" "test_app" {
}

resource "okta_admin_role_targets" "test_group" {
user_id = okta_user.test.id
role_type = "GROUP_MEMBERSHIP_ADMIN"
groups = [okta_group.test.id]
depends_on = [okta_user_admin_roles.test]
user_id = okta_user.test.id
role_type = "GROUP_MEMBERSHIP_ADMIN"
groups = [okta_group.test.id]
depends_on = [ okta_user_admin_roles.test ]
}
10 changes: 5 additions & 5 deletions examples/okta_admin_role_targets/updated.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
resource "okta_user" "test" {
first_name = "TestAcc"
last_name = "blah"
login = "testAcc_replace_with_uuid@example.com"
email = "testAcc_replace_with_uuid@example.com"
first_name = "TestAcc"
last_name = "blah"
login = "testAcc_replace_with_uuid@example.com"
email = "testAcc_replace_with_uuid@example.com"
}

resource "okta_user_admin_roles" "test" {
user_id = okta_user.test.id
user_id = okta_user.test.id
admin_roles = [
"APP_ADMIN",
"GROUP_MEMBERSHIP_ADMIN"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ data "okta_policy" "test" {
resource "okta_app_signon_policy" "test" {
name = "testAcc_Policy_replace_with_uuid"
description = "Sign On Policy"
depends_on = [
depends_on = [
data.okta_policy.test
]
}
Expand Down
4 changes: 2 additions & 2 deletions examples/okta_app_bookmark/basic.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource "okta_app_bookmark" "test" {
label = "testAcc_replace_with_uuid"
url = "https://test.com"
label = "testAcc_replace_with_uuid"
url = "https://test.com"
}
10 changes: 5 additions & 5 deletions examples/okta_app_oauth/service_with_jwks_uri.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
resource "okta_app_oauth" "test" {
label = "testAcc_replace_with_uuid"
type = "service"
response_types = ["token"]
grant_types = ["client_credentials"]
jwks_uri = "https://example.com"
label = "testAcc_replace_with_uuid"
type = "service"
response_types = ["token"]
grant_types = ["client_credentials"]
jwks_uri = "https://example.com"
}
4 changes: 2 additions & 2 deletions examples/okta_app_saml/basic_inline_hook.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ resource "okta_inline_hook" "test" {
uri = "https://example.com/test1"
method = "POST"
}
auth = {
auth = {
key = "Authorization"
type = "HEADER"
value = "secret"
Expand All @@ -31,7 +31,7 @@ resource "okta_app_saml" "test" {
honor_force_authn = false
authn_context_class_ref = "urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport"
inline_hook_id = okta_inline_hook.test.id
depends_on = [
depends_on = [
okta_inline_hook.test
]
attribute_statements {
Expand Down
22 changes: 11 additions & 11 deletions examples/okta_app_saml_app_settings/preconfigured.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ resource "okta_app_saml" "test" {
}

resource "okta_app_saml_app_settings" "test" {
app_id = okta_app_saml.test.id
app_id = okta_app_saml.test.id
settings = jsonencode(
{
"appFilter" : "okta",
"awsEnvironmentType" : "aws.amazon",
"groupFilter" : "aws_(?{{accountid}}\\\\d+)_(?{{role}}[a-zA-Z0-9+=,.@\\\\-_]+)",
"joinAllRoles" : false,
"loginURL" : "https://console.aws.amazon.com/ec2/home",
"roleValuePattern" : "arn:aws:iam::$${accountid}:saml-provider/OKTA,arn:aws:iam::$${accountid}:role/$${role}",
"sessionDuration" : 7600,
"useGroupMapping" : false
}
{
"appFilter" : "okta",
"awsEnvironmentType" : "aws.amazon",
"groupFilter" : "aws_(?{{accountid}}\\\\d+)_(?{{role}}[a-zA-Z0-9+=,.@\\\\-_]+)",
"joinAllRoles" : false,
"loginURL" : "https://console.aws.amazon.com/ec2/home",
"roleValuePattern" : "arn:aws:iam::$${accountid}:saml-provider/OKTA,arn:aws:iam::$${accountid}:role/$${role}",
"sessionDuration" : 7600,
"useGroupMapping" : false
}
)
}
22 changes: 11 additions & 11 deletions examples/okta_app_saml_app_settings/preconfigured_updated.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ resource "okta_app_saml" "test" {
}

resource "okta_app_saml_app_settings" "test" {
app_id = okta_app_saml.test.id
app_id = okta_app_saml.test.id
settings = jsonencode(
{
"appFilter" : "okta",
"awsEnvironmentType" : "aws.amazon",
"groupFilter" : "aws_(?{{accountid}}\\\\d+)_(?{{role}}[a-zA-Z0-9+=,.@\\\\-_]+)",
"joinAllRoles" : false,
"loginURL" : "https://console.aws.amazon.com/ec2/home",
"roleValuePattern" : "arn:aws:iam::$${accountid}:saml-provider/OKTA,arn:aws:iam::$${accountid}:role/$${role}",
"sessionDuration" : 3200,
"useGroupMapping" : false
}
{
"appFilter" : "okta",
"awsEnvironmentType" : "aws.amazon",
"groupFilter" : "aws_(?{{accountid}}\\\\d+)_(?{{role}}[a-zA-Z0-9+=,.@\\\\-_]+)",
"joinAllRoles" : false,
"loginURL" : "https://console.aws.amazon.com/ec2/home",
"roleValuePattern" : "arn:aws:iam::$${accountid}:saml-provider/OKTA,arn:aws:iam::$${accountid}:role/$${role}",
"sessionDuration" : 3200,
"useGroupMapping" : false
}
)
}
6 changes: 3 additions & 3 deletions examples/okta_app_shared_credentials/basic.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ resource "okta_app_shared_credentials" "test" {
// deprecated in OIE
// https://developer.okta.com/docs/reference/api/apps/#accessibility-object
// accessibility_login_redirect_url = "https://example.com/redirect_url_2"
auto_submit_toolbar = true
hide_ios = true
logo = "../examples/okta_app_basic_auth/terraform_icon.png"
auto_submit_toolbar = true
hide_ios = true
logo = "../examples/okta_app_basic_auth/terraform_icon.png"
}
6 changes: 3 additions & 3 deletions examples/okta_app_shared_credentials/updated.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ resource "okta_app_shared_credentials" "test" {
// deprecated in OIE
// https://developer.okta.com/docs/reference/api/apps/#accessibility-object
// accessibility_login_redirect_url = "https://example.com/redirect_url_2"
auto_submit_toolbar = true
hide_ios = true
logo = "../examples/okta_app_basic_auth/terraform_icon.png"
auto_submit_toolbar = true
hide_ios = true
logo = "../examples/okta_app_basic_auth/terraform_icon.png"
}
60 changes: 30 additions & 30 deletions examples/okta_app_signon_policy_rule/basic_updated.tf
Original file line number Diff line number Diff line change
Expand Up @@ -60,33 +60,33 @@ data "okta_user_type" "default" {
}

resource "okta_policy_device_assurance_android" "test" {
name = "test"
name = "test"
os_version = "12"
jailbreak = false
jailbreak = false
}

resource "okta_app_signon_policy_rule" "test" {
name = "testAcc_replace_with_uuid_updated"
policy_id = data.okta_app_signon_policy.test.id
access = "ALLOW"
custom_expression = "user.status == \"ACTIVE\""
device_is_managed = false
device_is_registered = true
factor_mode = "2FA"
groups_excluded = [
name = "testAcc_replace_with_uuid_updated"
policy_id = data.okta_app_signon_policy.test.id
access = "ALLOW"
custom_expression = "user.status == \"ACTIVE\""
device_is_managed = false
device_is_registered = true
factor_mode = "2FA"
groups_excluded = [
okta_group.this[2].id,
okta_group.this[3].id,
okta_group.this[4].id
]
groups_included = [
groups_included = [
okta_group.this[0].id,
okta_group.this[1].id
]
device_assurances_included = [
okta_policy_device_assurance_android.test.id
]
network_connection = "ZONE"
network_includes = [
network_connection = "ZONE"
network_includes = [
okta_network_zone.test.id
]
platform_include {
Expand All @@ -101,18 +101,18 @@ resource "okta_app_signon_policy_rule" "test" {
os_type = "MACOS"
type = "DESKTOP"
}
# FIXME Okta API for /api/v1/policies/{policyId}/rules/{ruleId}
# is not returning os_expression even when it has been set throwing off the TF state.
# platform_include {
# os_expression = ".*"
# os_type = "OTHER"
# type = "DESKTOP"
# }
# platform_include {
# os_expression = ".*"
# os_type = "OTHER"
# type = "MOBILE"
# }
# FIXME Okta API for /api/v1/policies/{policyId}/rules/{ruleId}
# is not returning os_expression even when it has been set throwing off the TF state.
# platform_include {
# os_expression = ".*"
# os_type = "OTHER"
# type = "DESKTOP"
# }
# platform_include {
# os_expression = ".*"
# os_type = "OTHER"
# type = "MOBILE"
# }
platform_include {
os_type = "WINDOWS"
type = "DESKTOP"
Expand All @@ -125,22 +125,22 @@ resource "okta_app_signon_policy_rule" "test" {
re_authentication_frequency = "PT43800H"
inactivity_period = "PT2H"
type = "ASSURANCE"
user_types_excluded = [
user_types_excluded = [
okta_user_type.test.id
]
user_types_included = [
user_types_included = [
data.okta_user_type.default.id
]
users_excluded = [
users_excluded = [
okta_user.test[2].id,
okta_user.test[3].id,
okta_user.test[4].id
]
users_included = [
users_included = [
okta_user.test[0].id,
okta_user.test[1].id
]
constraints = [
constraints = [
jsonencode({
"knowledge" : {
"reauthenticateIn" : "PT2H",
Expand Down
12 changes: 6 additions & 6 deletions examples/okta_auth_server_policy/datasource.tf
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
resource "okta_auth_server_policy" "test" {
status = "ACTIVE"
name = "test"
description = "test"
priority = 1
status = "ACTIVE"
name = "test"
description = "test"
priority = 1
client_whitelist = [
"ALL_CLIENTS"
]
auth_server_id = okta_auth_server.test.id
auth_server_id = okta_auth_server.test.id
}

resource "okta_auth_server" "test" {
name = "testAcc_replace_with_uuid"
description = "test"
audiences = [
audiences = [
"whatever.rise.zone"
]
}
Expand Down
24 changes: 12 additions & 12 deletions examples/okta_authenticator/on_prem_provider_json.tf
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
resource "okta_authenticator" "test" {
name = "On-Prem MFA"
key = "onprem_mfa"
key = "onprem_mfa"
provider_json = jsonencode(
{
"type" : "DEL_OATH",
"configuration" : {
"authPort" : 999,
"userNameTemplate" : {
"template" : "global.assign.userName.login"
},
"hostName" : "localhost",
"sharedSecret" : "Sh4r3d s3cr3t"
}
}
{
"type": "DEL_OATH",
"configuration": {
"authPort": 999,
"userNameTemplate": {
"template": "global.assign.userName.login"
},
"hostName": "localhost",
"sharedSecret": "Sh4r3d s3cr3t"
}
}
)
}
Loading

0 comments on commit ae9f4f4

Please sign in to comment.