Skip to content

Commit

Permalink
migration doc file is back and minor lint
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexFrontegg committed Jul 3, 2024
1 parent bceae85 commit ef50c00
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 3 deletions.
40 changes: 40 additions & 0 deletions docs/guides/v1-migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

---
page_title: "frontegg_migration-v0 Migration - V0 to V1 migration"
subcategory: ""
description: |-
Migration guide for the Frontegg provider from V0 to V1.
---

# V1 Migration Guide

This guide will help you migrate from Frontegg's V0 to V1.

> **This migration guide applies exclusively to users who have configured a custom domain with the provider.**
## Provider Configuration

> [!IMPORTANT]
> If you update your provider without proceeding with following guide, you'll get an error when running `terraform apply`.
### Custom Domains

We've made a significant update to the provider configuration, introducing the `custom_domains` field to replace the previous `custom_domain` field. The `custom_domains` field now accepts a list of strings, allowing you to configure multiple custom domains for the Frontegg application.

To implement this update, follow these steps:

1. Navigate to [Frontegg Portal](https://portal.frontegg.com) and initiate the custom domain migration process.
> For more information, see [Frontegg's custom domain migration guide](https://docs.frontegg.com/docs/custom-domain-migration).
> [!WARNING]
> Once you've migrated to the new version, you'll need to update your configuration to use the new `custom_domains` field, or you'll get error when running `terraform apply`.
2. Upon completion of the migration, you'll receive a list of custom domains available for use with the `custom_domains` field.
3. Ensure you're using Provider version V1.
4. Replace any instances of the old `custom_domain` field in your configuration (
<s>custom_domain = "https://yourcCustomDomain.com"</s>) with the new `custom_domains` field. Populate it with the list of custom domains as follows:

```hcl
custom_domains = [
"https://yourcCustomDomain.com",
"https://yourcCustomDomain2.com"
]
```

[Frontegg]: https://frontegg.com
2 changes: 1 addition & 1 deletion docs/resources/email_provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Configures a Frontegg Email provider.

### Required

- `provider_name` (String) Name of the email provider.
- `provider_name` (String) Name of the email provider (If the provider is changed, the old provider's configuration will be deleted).
- `secret` (String) A secret to be included with the event.

### Optional
Expand Down
2 changes: 1 addition & 1 deletion provider/resource_frontegg_email_providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func resourceFronteggEmailProvider() *schema.Resource {
Required: true,
},
"provider_name": {
Description: "Name of the email provider.",
Description: "Name of the email provider (If the provider is changed, the old provider's configuration will be deleted).",
Type: schema.TypeString,
Required: true,
ValidateFunc: validators.ValidateProvider,
Expand Down
2 changes: 1 addition & 1 deletion provider/validators/validator_email_providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func ValidateProvider(val interface{}, key string) (warns []string, errs []error
if !contain {
errs = append(errs, fmt.Errorf("%q must be either %v ,got: %s", key, strings.Join(ps, ", "), v))
}
return
return warns, errs
}

func ValidateRequiredFields(ctx context.Context, rd *schema.ResourceDiff, i interface{}) error {
Expand Down

0 comments on commit ef50c00

Please sign in to comment.