Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added email provider #157

Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: "1.20"
go-version: "1.21.11"
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Require: The version of golangci-lint to use.
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
version: v1.53
version: v1.59.1

# Optional: working directory, useful for monorepos
# working-directory: somedir
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: "1.20.6"
go-version: "1.21.11"
- run: go mod download
- run: go test -v -cover ./provider/
env:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ website/vendor

# Keep windows files with windows line endings
*.winfile eol=crlf

#local
local
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ linters:
- unconvert
- unparam
- unused
- vet
- govet
9 changes: 7 additions & 2 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ PLATFORM ?= $(shell go env GOOS)_$(shell go env GOARCH)
default: testacc

install:
go build -o ~/.terraform.d/plugins/registry.terraform.io/frontegg/frontegg/1.0.0/$(PLATFORM)/terraform-provider-frontegg
@go build -o ~/.terraform.d/plugins/registry.terraform.io/frontegg/frontegg/1.0.0/$(PLATFORM)/terraform-provider-frontegg
@rm .terraform.lock.hcl

.PHONY: testacc
testacc:
TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 120m
@TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 120m

capply: install
@terraform init
@terraform apply
2 changes: 0 additions & 2 deletions docs/data-sources/permission.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,3 @@ output "permission_id" {
- `description` (String) A human-readable description of the permission.
- `id` (String) The ID of this resource.
- `name` (String) A human-readable name for the permission.


5 changes: 2 additions & 3 deletions docs/guides/v1-migration.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

---
AlexFrontegg marked this conversation as resolved.
Show resolved Hide resolved
page_title: "frontegg_migration-v0 Migration - V0 to V1 migration"
subcategory: ""
Expand All @@ -10,12 +11,10 @@ description: |-
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.
Expand All @@ -38,4 +37,4 @@ custom_domains = [
]
```

[Frontegg]: https://frontegg.com
[Frontegg]: https://frontegg.com
5 changes: 2 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ provided the configuration will be cross-environments.

```terraform
provider "frontegg" {
client_id = "[your-personal-token-client-id]"
secret_key = "[your-personal-token-api-key]"

client_id = "[your-personal-token-client-id]"
secret_key = "[your-personal-token-api-key]"
environment_id = "[your-environment-id]"

api_base_url = "https://api.frontegg.com"
Expand Down
2 changes: 0 additions & 2 deletions docs/resources/allowed_origin.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,3 @@ Configures a Frontegg allowed origin.
### Read-Only

- `id` (String) The ID of this resource.


33 changes: 33 additions & 0 deletions docs/resources/email_provider.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "frontegg_email_provider Resource - terraform-provider-frontegg"
subcategory: ""
description: |-
Configures a Frontegg Email provider.
---

# frontegg_email_provider (Resource)

Configures a Frontegg Email provider.



<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `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

- `domain` (String) Required for Mailgun (required only for Mailgun).
- `provider_id` (String) Provider ID (required only for AWS SES).
- `region` (String) Required for AWS SES or Mailgun.

### Read-Only

- `created_at` (String) The timestamp at which the permission was created.
- `id` (String) The ID of this resource.
- `updated_at` (String) The timestamp at which the permission was updated.
2 changes: 0 additions & 2 deletions docs/resources/permission.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,3 @@ data "frontegg_permission" "read_users" {

- `created_at` (String) The timestamp at which the permission was created.
- `id` (String) The ID of this resource.


2 changes: 0 additions & 2 deletions docs/resources/permission_category.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,3 @@ resource "frontegg_permission_category" "example" {

- `created_at` (String) The timestamp at which the permission category was created.
- `id` (String) The ID of this resource.


2 changes: 0 additions & 2 deletions docs/resources/redirect_uri.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,3 @@ Configures a Frontegg Redirect URI.

- `id` (String) The ID of this resource.
- `key` (String) The redirect URI key.


2 changes: 0 additions & 2 deletions docs/resources/role.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,3 @@ resource "frontegg_role" "example" {
- `created_at` (String) The timestamp at which the role was created.
- `id` (String) The ID of this resource.
- `vendor_id` (String) The ID of the vendor that owns the role.


2 changes: 0 additions & 2 deletions docs/resources/tenant.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,3 @@ Configures a Frontegg tenant.
### Read-Only

- `id` (String) The ID of this resource.


2 changes: 0 additions & 2 deletions docs/resources/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,3 @@ Configures a Frontegg user.
### Read-Only

- `id` (String) The ID of this resource.


2 changes: 0 additions & 2 deletions docs/resources/webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,3 @@ resource "frontegg_webhook" "example" {
- `id` (String) The ID of this resource.
- `type` (String) The type of the webhook.
- `vendor_id` (String) The ID of the vendor that owns the webhook.


9 changes: 4 additions & 5 deletions docs/resources/workspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ resource "frontegg_workspace" "example" {
enable_usage = false
enable_users = false
enable_webhooks = false
enable_groups = false
enable_provisioning = false

palette {
error {
Expand Down Expand Up @@ -190,23 +192,20 @@ resource "frontegg_workspace" "example" {
```

<!-- schema generated by tfplugindocs -->

## Schema

### Required

- `admin_portal` (Block List, Min: 1, Max: 1) Configures the admin portal. (see [below for nested schema](#nestedblock--admin_portal))
- `allowed_origins` (Set of String) The origins that are allowed to access the workspace.

This parameter controls the value of the "Origin" header for API responses.

This parameter controls the value of the "Origin" header for API responses.
- `auth_policy` (Block List, Min: 1, Max: 1) Configures the general authentication policy. (see [below for nested schema](#nestedblock--auth_policy))
- `backend_stack` (String) The backend stack of the application associated with the workspace.
- `country` (String) The country associated with the workspace.
- `frontegg_domain` (String) The domain at which the Frontegg API is served for this workspace.

The domain must end with ".frontegg.com" or ".us.frontegg.com".

The domain must end with ".frontegg.com" or ".us.frontegg.com".
- `frontend_stack` (String) The frontend stack of the application associated with the worksapce.
- `mfa_policy` (Block List, Min: 1, Max: 1) Configures the multi-factor authentication (MFA) policy. (see [below for nested schema](#nestedblock--mfa_policy))
- `name` (String) The name of the workspace.
Expand Down
8 changes: 4 additions & 4 deletions examples/provider/provider.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
provider "frontegg" {
client_id = "e295e71d-40b3-4178-b0de-f7a1f3818ea4"
secret_key = "29c55559-6968-4d60-8f4e-40ebeec5a459"
environment_id = "eee00841-99fd-4914-bc76-29b38b2e36e8"
client_id = "[your-personal-token-client-id]"
secret_key = "[your-personal-token-api-key]"
environment_id = "[your-environment-id]"

api_base_url = "https://api.frontegg.com"
portal_base_url = "https://frontegg-portal.frontegg.com"
}
}
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/frontegg/terraform-provider-frontegg

go 1.20
go 1.21

require (
github.com/hashicorp/terraform-plugin-docs v0.16.0
Expand Down Expand Up @@ -60,8 +60,8 @@ require (
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/zclconf/go-cty v1.14.1 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect
golang.org/x/mod v0.18.0 // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
Expand Down
Loading
Loading