Skip to content

Commit

Permalink
Merge branch 'remove-common-configs' into 'master'
Browse files Browse the repository at this point in the history
removed common_configs & redundant code moved to resource_base

See merge request cidaas-management/terraform!119
  • Loading branch information
Tujit Bora committed Oct 30, 2024
2 parents f9ee148 + 6db955c commit 233b349
Show file tree
Hide file tree
Showing 37 changed files with 3,378 additions and 4,909 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Changelog

### 3.3.0
#### Removed common_configs from resource app

The attribute `common_configs` is removed from the resource cidaas_app as we introduce [terraform-cidaas-app](https://github.com/Cidaas/terraform-cidaas-app) module.

### 3.2.0
#### Addition of datasources

Expand Down
338 changes: 81 additions & 257 deletions README.md

Large diffs are not rendered by default.

340 changes: 82 additions & 258 deletions docs/resources/app.md

Large diffs are not rendered by default.

113 changes: 19 additions & 94 deletions examples/resources/cidaas_app/resource.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
# This sample demonstrates the use of both main configuration attributes and common_configs.
# It is important to note that configuring both simultaneously is not necessary.
# Please refer to the documentation of the app resource for more details.

resource "cidaas_app" "sample" {
client_name = "Test Terraform Application" // unique
client_display_name = "Display Name of the app" // unique
content_align = "CENTER" // Default: CENTER
client_type = "SINGLE_PAGE"
accent_color = "#ef4923" // Default: #ef4923
primary_color = "#ef4923" // Default: #f7941d
media_type = "IMAGE" // Default: IMAGE
allow_login_with = ["EMAIL", "MOBILE", "USER_NAME"] // Default: ["EMAIL", "MOBILE", "USER_NAME"]
redirect_uris = ["https://cidaas.com"]
allowed_logout_urls = ["https://cidaas.com"]
enable_deduplication = true // Default: false
auto_login_after_register = true // Default: false
enable_passwordless_auth = false // Default: true
register_with_login_information = false // Default: false
fds_enabled = false // Default: true
hosted_page_group = "default" // Default: default
company_name = "Widas ID GmbH"
company_address = "01"
company_website = "https://cidaas.com"
allowed_scopes = ["openid", "cidaas:register", "profile"]
client_display_name = "Display Name of the app" // unique
content_align = "CENTER" // Default: CENTER
post_logout_redirect_uris = ["https://cidaas.com"]
logo_align = "CENTER" // Default: CENTER
allow_disposable_email = false // Default: false
Expand Down Expand Up @@ -89,92 +102,4 @@ resource "cidaas_app" "sample" {
status : "active"
version : "1.0.0"
}
// common config starts here. The attributes from common config can be part of main config
// if an attribute is available both common_config and main config then attribute from the main config will be considered to create an app
common_configs = {
client_type = "SINGLE_PAGE"
accent_color = "#ef4923" // Default: #ef4923
primary_color = "#ef4923" // Default: #f7941d
media_type = "IMAGE" // Default: IMAGE
allow_login_with = ["EMAIL", "MOBILE", "USER_NAME"] // Default: ["EMAIL", "MOBILE", "USER_NAME"]
redirect_uris = ["https://cidaas.com"]
allowed_logout_urls = ["https://cidaas.com"]
enable_deduplication = true // Default: false
auto_login_after_register = true // Default: false
enable_passwordless_auth = false // Default: true
register_with_login_information = false // Default: false
fds_enabled = false // Default: true
hosted_page_group = "default" // Default: default
company_name = "Widas ID GmbH"
company_address = "01"
company_website = "https://cidaas.com"
allowed_scopes = ["openid", "cidaas:register", "profile"]
response_types = ["code", "token", "id_token"] // Default: ["code", "token", "id_token"]
grant_types = ["client_credentials"] // Default: ["implicit", "authorization_code", "password", "refresh_token"]
login_providers = ["login_provider1", "login_provider2"]
is_hybrid_app = true // Default: false
allowed_web_origins = ["https://cidaas.com"]
allowed_origins = ["https://cidaas.com"]
default_max_age = 86400 // Default: 86400
token_lifetime_in_seconds = 86400 // Default: 86400
id_token_lifetime_in_seconds = 86400 // Default: 86400
refresh_token_lifetime_in_seconds = 15780000 // Default: 15780000
template_group_id = "custtemp" // Default: default
editable = true // Default: true
social_providers = [{
provider_name = "cidaas social provider"
social_id = "fdc63bd0-6044-4fa0-abff"
display_name = "cidaas"
}]
custom_providers = [{
logo_url = "https://cidaas.com/logo-url"
provider_name = "sample-custom-provider"
display_name = "sample-custom-provider"
type = "CUSTOM_OPENID_CONNECT"
}]
saml_providers = [{
logo_url = "https://cidaas.com/logo-url"
provider_name = "sample-sampl-provider"
display_name = "sample-sampl-provider"
type = "SAMPL_IDP_PROVIDER"
}]
ad_providers = [{
logo_url = "https://cidaas.com/logo-url"
provider_name = "sample-ad-provider"
display_name = "sample-ad-provider"
type = "ADD_PROVIDER"
}]
jwe_enabled = true // Default: false
user_consent = true // Default: false
allowed_groups = [{
group_id = "developer101"
roles = ["developer", "qa", "admin"]
default_roles = ["developer"]
}]
operations_allowed_groups = [{
group_id = "developer101"
roles = ["developer", "qa", "admin"]
default_roles = ["developer"]
}]
enabled = true // Default: true
always_ask_mfa = true // Default: false
allowed_mfa = ["OFF"]
email_verification_required = true // Default: true
allowed_roles = ["sample"]
default_roles = ["sample"]
enable_classical_provider = true // Default: true
is_remember_me_selected = true // Default: true
bot_provider = "CIDAAS" // Default: CIDAAS
allow_guest_login = true // Default: false
# mfa Default:
# {
# setting = "OFF"
# }
mfa = {
setting = "OFF"
}
webfinger = "no_redirection"
default_scopes = ["sample"]
pending_scopes = ["sample"]
}
}
201 changes: 0 additions & 201 deletions examples/resources/cidaas_app/sample1/app.tf

This file was deleted.

16 changes: 16 additions & 0 deletions examples/resources/cidaas_app/sample1/local.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
common_configs = {
client_type = "SINGLE_PAGE"
company_address = "Maybachstraße 2, 71299 Wimsheim, Germany"
company_name = "WidasConcepts GmbH"
company_website = "https://widas.com"
redirect_uris = [
"https://cidaas.de/home",
]
allowed_logout_urls = [
"https://cidaas.de/logout"
]
allowed_scopes = [
"openid",
]
accent_color = "#FFFFFF"
}
26 changes: 26 additions & 0 deletions examples/resources/cidaas_app/sample1/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
provider "cidaas" {
base_url = "https://cidaas.dev.de"
}

module "app1" {
source = "[email protected]:Cidaas/terraform-cidaas-app.git"

providers = {
cidaas = cidaas
}

client_name = "Demo SP App"
common_configs = var.common_configs
}

module "app2" {
source = "[email protected]:Cidaas/terraform-cidaas-app.git"

providers = {
cidaas = cidaas
}

client_name = "Test ISO App"
client_type = "IOS"
common_configs = var.common_configs
}
Loading

0 comments on commit 233b349

Please sign in to comment.