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

Update acc-tests V2 #39

Open
wants to merge 112 commits into
base: fix/update-acctests
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
197c82b
Bump github.com/hashicorp/go-retryablehttp from 0.7.4 to 0.7.5 (#423)
dependabot[bot] Nov 13, 2023
ef31fe1
Bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.29.0 to 2.30…
dependabot[bot] Nov 13, 2023
a99e6ac
Bump github.com/hashicorp/terraform-plugin-go from 0.19.0 to 0.19.1 (…
dependabot[bot] Nov 21, 2023
604bd8f
updated config for users and groups
vmanilo Nov 27, 2023
d554f26
Feature: added security_policy_id to resource definition (#425)
vmanilo Nov 28, 2023
6c2e491
Bump github.com/hasura/go-graphql-client from 0.10.0 to 0.10.1 (#428)
dependabot[bot] Dec 4, 2023
3fcbb68
Added optional attribute is_active to twingate_resource (#438)
vmanilo Dec 12, 2023
b12299a
added new attributes for resources datasource
vmanilo Dec 17, 2023
858c510
added optional name attributes for resources datasource
vmanilo Dec 17, 2023
e203748
added feature branch
vmanilo Dec 17, 2023
ea6a201
fix test
vmanilo Dec 18, 2023
8347c58
remove feature branch
vmanilo Dec 18, 2023
605b1df
enable tests
vmanilo Dec 23, 2023
ac7dbfe
remove feature branch
vmanilo Dec 23, 2023
12d0164
added filtering by name for service_accounts datasource
vmanilo Dec 24, 2023
e605540
remove feature branch
vmanilo Dec 24, 2023
d0fb2ba
refactore
vmanilo Dec 24, 2023
c0be702
Merge branch 'feature/add-filtering-support-for-twingate_resources-da…
vmanilo Dec 24, 2023
5ed4cb0
added optional filters to users datasource
vmanilo Jan 1, 2024
1361403
updated docs
vmanilo Jan 1, 2024
35fbd8e
Merge branch 'feature/add-filtering-support-for-twingate_resources-da…
vmanilo Jan 1, 2024
00eaf13
updated docs
vmanilo Jan 1, 2024
7fd9289
Merge branch 'feature/add-filtering-support-for-twingate_resources-da…
vmanilo Jan 1, 2024
5c7602f
Bump golang.org/x/crypto from 0.15.0 to 0.17.0 (#444)
dependabot[bot] Jan 2, 2024
a9bd6be
wip: adding acc tests
vmanilo Jan 2, 2024
f1954f2
Merge remote-tracking branch 'upstream/main' into feature/add-filteri…
vmanilo Jan 3, 2024
118a6a7
update resources datasource: allow to list all resources
vmanilo Jan 3, 2024
bf322a6
Merge branch 'feature/add-filtering-support-for-twingate_resources-da…
vmanilo Jan 3, 2024
b755d93
added tests for email filter
vmanilo Jan 3, 2024
af0c800
Feature: migrate Resource object to new TF SDK, breaking changes for …
vmanilo Jan 5, 2024
1eec4b8
Bump github.com/hashicorp/terraform-plugin-go from 0.19.1 to 0.20.0 (…
dependabot[bot] Jan 5, 2024
1a94b29
Fix tests for upgrade terraform-plugin-testing from 1.5.1 to 1.6.0 (…
vmanilo Jan 5, 2024
c1f33ba
Merge branch 'main' into feature/add-filtering-support-for-twingate_r…
vmanilo Jan 7, 2024
f09c6a0
Bump github.com/hasura/go-graphql-client from 0.10.1 to 0.10.2 (#448)
dependabot[bot] Jan 8, 2024
6586348
Bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.30.0 to 2.31…
dependabot[bot] Jan 8, 2024
d5b7929
Fix: datasource twingate groups with empty filters (#447)
vmanilo Jan 8, 2024
afee845
Bump github.com/cloudflare/circl from 1.3.3 to 1.3.7 (#449)
dependabot[bot] Jan 8, 2024
5043500
Merge branch 'main' into feature/add-filtering-support-for-twingate_r…
vmanilo Jan 10, 2024
481c83f
Merge branch 'main' into feature/add-filtering-for-service_accounts-d…
vmanilo Jan 10, 2024
1c93b93
wip: adding user tests
vmanilo Jan 10, 2024
c7b39a5
Merge remote-tracking branch 'upstream/main' into feature/add-filteri…
vmanilo Jan 10, 2024
3f7e1cf
added acctests for users datasource
vmanilo Jan 10, 2024
71a546b
enable tests
vmanilo Jan 10, 2024
8b8ee92
fix test
vmanilo Jan 10, 2024
4b5f4b6
fix test
vmanilo Jan 10, 2024
061e6f6
fix test
vmanilo Jan 10, 2024
c5f7f88
fix url address (#450)
vmanilo Jan 12, 2024
d022d52
Fix: resource migration v0 to v1 (#452)
vmanilo Jan 16, 2024
0fb349a
Run CI for hotfixes
ekampf Jan 16, 2024
e36c65c
Merge branch 'main' into feature/add-filtering-support-for-twingate_r…
vmanilo Jan 17, 2024
e3362d3
Merge branch 'main' into feature/add-filtering-for-service_accounts-d…
vmanilo Jan 17, 2024
9d385c2
Merge remote-tracking branch 'upstream/main' into feature/add-filteri…
vmanilo Jan 17, 2024
189f369
Merge remote-tracking branch 'upstream/main' into feature/add-filteri…
vmanilo Jan 18, 2024
eb2b8aa
revert ci changes
vmanilo Jan 18, 2024
831c140
Bump github.com/hashicorp/terraform-plugin-docs from 0.16.0 to 0.17.0…
dependabot[bot] Jan 18, 2024
9b49c98
added filter options for security_policy datasource
vmanilo Jan 20, 2024
3498e5e
enable test
vmanilo Jan 20, 2024
44341c5
revert ci changes
vmanilo Jan 20, 2024
290340f
Merge remote-tracking branch 'upstream/main' into feature/add-support…
vmanilo Jan 20, 2024
e846b3e
Merge branch 'main' into feature/add-filtering-support-for-twingate_r…
vmanilo Jan 20, 2024
6f75583
wip
vmanilo Jan 20, 2024
e39fa34
fix docs
vmanilo Jan 20, 2024
7eb7d16
Merge remote-tracking branch 'origin/feature/add-filtering-support-fo…
vmanilo Jan 20, 2024
0ba38d1
Merge branch 'feature/add-filtering-support-for-twingate_users-dataso…
vmanilo Jan 20, 2024
43204fa
Merge remote-tracking branch 'origin/feature/add-filtering-support-fo…
vmanilo Jan 20, 2024
0bcdf1c
Merge remote-tracking branch 'origin/feature/add-filtering-support-fo…
vmanilo Jan 20, 2024
341e0c6
Merge remote-tracking branch 'origin/feature/add-filtering-support-fo…
vmanilo Jan 20, 2024
f169f3f
added optional filters for twingate_remote_networks datasource
vmanilo Jan 21, 2024
7773b76
enable test
vmanilo Jan 21, 2024
e671e16
enable test
vmanilo Jan 21, 2024
d84de32
revert sweeper changes
vmanilo Jan 21, 2024
3404803
run only datasource tests
vmanilo Jan 21, 2024
5c61f3c
fix users basic test
vmanilo Jan 21, 2024
5ef8588
revert test.sh
vmanilo Jan 22, 2024
2ea65ae
fix users test
vmanilo Jan 22, 2024
6099925
revert ci.yml
vmanilo Jan 22, 2024
d11fc26
Bump github.com/hashicorp/terraform-plugin-framework from 1.4.2 to 1.…
dependabot[bot] Jan 22, 2024
4cf8df2
wip
vmanilo Jan 24, 2024
12394e7
added group tests
vmanilo Jan 27, 2024
81bffd8
enable test
vmanilo Jan 27, 2024
07e7fce
fix query test
vmanilo Jan 27, 2024
3413dac
revert ci.yml
vmanilo Jan 27, 2024
5572f68
Merge branch 'main' into feature/add-filtering-support-for-twingate_r…
vmanilo Jan 27, 2024
73df101
added optional filters for connectors
vmanilo Jan 27, 2024
4eeee0e
enable tests
vmanilo Jan 27, 2024
1ab1b20
fix test
vmanilo Jan 27, 2024
fbdc770
revert ci.yml
vmanilo Jan 27, 2024
f730cb0
Bump github.com/hashicorp/terraform-plugin-go from 0.20.0 to 0.21.0 (…
dependabot[bot] Jan 29, 2024
10436ab
Bump github.com/hashicorp/terraform-plugin-docs from 0.17.0 to 0.18.0…
dependabot[bot] Jan 29, 2024
e0c21cc
Fix: create twingate-connector with disabled status (#453)
vmanilo Jan 29, 2024
2111bae
Fix: resource access (#461)
vmanilo Jan 29, 2024
fa232b6
Merge branch 'main' into feature/add-filtering-support-for-twingate_r…
vmanilo Feb 1, 2024
3177c7e
Merge remote-tracking branch 'upstream/main' into fix/update-acctests-v2
vmanilo Feb 1, 2024
352da71
Merge remote-tracking branch 'upstream/main' into fix/update-acctests-v2
vmanilo Feb 1, 2024
fbbe906
merge with upstream/main
vmanilo Feb 1, 2024
5211230
minor change
vmanilo Feb 1, 2024
178bbbc
Merge remote-tracking branch 'origin/feature/add-filtering-support-fo…
vmanilo Feb 1, 2024
e0dbb06
Merge remote-tracking branch 'origin/feature/add-support-filtering-tw…
vmanilo Feb 1, 2024
c4158e2
Merge remote-tracking branch 'origin/feature/add-support-for-filterin…
vmanilo Feb 1, 2024
48c6f65
Merge remote-tracking branch 'origin/feature/add-filtering-for-twinga…
vmanilo Feb 1, 2024
6b7a44a
Merge remote-tracking branch 'origin/feature/add-support-for-filterin…
vmanilo Feb 2, 2024
2e7bde4
Merge remote-tracking branch 'origin/feature/add-filtering-support-fo…
vmanilo Feb 2, 2024
6dc246b
Merge remote-tracking branch 'origin/feature/add-filtering-for-servic…
vmanilo Feb 2, 2024
78f4e52
Bump github.com/hasura/go-graphql-client from 0.10.2 to 0.11.0 (#467)
dependabot[bot] Feb 12, 2024
ece0f4c
updated remote_network resource test
vmanilo Feb 12, 2024
0bffd0b
Fix linter (#470)
vmanilo Feb 16, 2024
18a10c4
Merge remote-tracking branch 'upstream/main' into fix/update-acctests-v2
vmanilo Feb 16, 2024
e588d94
added config for service-account, service-key and connector
vmanilo Feb 20, 2024
ec1e212
wip
vmanilo Feb 26, 2024
d3c9176
wip
vmanilo Feb 29, 2024
8fb2213
wip
vmanilo Mar 4, 2024
9ba841b
wip
vmanilo Mar 6, 2024
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
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:
branches:
- main
- fix/update-acctests
- "hotfix/**"
paths-ignore:
- 'README.md'

Expand All @@ -16,7 +16,8 @@ on:
- 'README.md'
branches:
- main
- fix/update-acctests
- fix/update-acctests-v2


# Ensures only 1 action runs per PR and previous is canceled on new trigger
concurrency:
Expand Down Expand Up @@ -126,7 +127,8 @@ jobs:
fail-fast: false
matrix:
terraform:
- '1.3.*'
- '1.4.*'
- '1.5.*'
- 'latest'
steps:

Expand Down
15 changes: 14 additions & 1 deletion docs/data-sources/connectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@ Connectors provide connectivity to Remote Networks. For more information, see Tw
## Example Usage

```terraform
data "twingate_connectors" "all" {}
data "twingate_connectors" "all" {
name = "<your connector's name>"
# name_regexp = "<regular expression of connector name>"
# name_contains = "<a string in the connector name>"
# name_exclude = "<your connector's name to exclude>"
# name_prefix = "<prefix of connector name>"
# name_suffix = "<suffix of connector name>"
}
```

<!-- schema generated by tfplugindocs -->
Expand All @@ -22,6 +29,12 @@ data "twingate_connectors" "all" {}
### Optional

- `connectors` (Attributes List) List of Connectors (see [below for nested schema](#nestedatt--connectors))
- `name` (String) Returns only connectors that exactly match this name. If no options are passed it will return all connectors. Only one option can be used at a time.
- `name_contains` (String) Match when the value exist in the name of the connector.
- `name_exclude` (String) Match when the value does not exist in the name of the connector.
- `name_prefix` (String) The name of the connector must start with the value.
- `name_regexp` (String) The regular expression match of the name of the connector.
- `name_suffix` (String) The name of the connector must end with the value.

### Read-Only

Expand Down
14 changes: 12 additions & 2 deletions docs/data-sources/groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ Groups are how users are authorized to access Resources. For more information, s
```terraform
data "twingate_groups" "foo" {
name = "<your group's name>"
# name_regexp = "<regular expression of group name>"
# name_contains = "<a string in the group name>"
# name_exclude = "<your group's name to exclude>"
# name_prefix = "<prefix of resource name>"
# name_suffix = "<suffix of resource name>"
}

# Group names are not constrained to be unique within Twingate,
Expand All @@ -28,8 +33,13 @@ data "twingate_groups" "foo" {

- `groups` (Attributes List) List of Groups (see [below for nested schema](#nestedatt--groups))
- `is_active` (Boolean) Returns only Groups matching the specified state.
- `name` (String) Returns only Groups that exactly match this name.
- `type` (String) Returns only Groups of the specified type (valid: `MANUAL`, `SYNCED`, `SYSTEM`).
- `name` (String) Returns only groups that exactly match this name. If no options are passed it will return all resources. Only one option can be used at a time.
- `name_contains` (String) Match when the value exist in the name of the group.
- `name_exclude` (String) Match when the value does not exist in the name of the group.
- `name_prefix` (String) The name of the group must start with the value.
- `name_regexp` (String) The regular expression match of the name of the group.
- `name_suffix` (String) The name of the group must end with the value.
- `types` (Set of String) Returns groups that match a list of types. valid types: `MANUAL`, `SYNCED`, `SYSTEM`.

### Read-Only

Expand Down
14 changes: 13 additions & 1 deletion docs/data-sources/remote_networks.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ data "twingate_remote_networks" "all" {}
<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- `name` (String) Returns only remote networks that exactly match this name. If no options are passed it will return all remote networks. Only one option can be used at a time.
- `name_contains` (String) Match when the value exist in the name of the remote network.
- `name_exclude` (String) Match when the value does not exist in the name of the remote network.
- `name_prefix` (String) The name of the remote network must start with the value.
- `name_regexp` (String) The regular expression match of the name of the remote network.
- `name_suffix` (String) The name of the remote network must end with the value.

### Read-Only

- `id` (String) The ID of this resource.
Expand All @@ -27,8 +36,11 @@ data "twingate_remote_networks" "all" {}
<a id="nestedatt--remote_networks"></a>
### Nested Schema for `remote_networks`

Optional:

- `name` (String) The name of the Remote Network.

Read-Only:

- `id` (String) The ID of the Remote Network.
- `location` (String) The location of the Remote Network. Must be one of the following: AWS, AZURE, GOOGLE_CLOUD, ON_PREMISE, OTHER.
- `name` (String) The name of the Remote Network
14 changes: 12 additions & 2 deletions docs/data-sources/resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ Resources in Twingate represent servers on the private network that clients can
```terraform
data "twingate_resources" "foo" {
name = "<your resource's name>"
# name_regexp = "<regular expression of resource name>"
# name_contains = "<a string in the resource name>"
# name_exclude = "<your resource's name to exclude>"
# name_prefix = "<prefix of resource name>"
# name_suffix = "<suffix of resource name>"
}

# Resource names are not constrained to be unique within Twingate,
Expand All @@ -24,9 +29,14 @@ data "twingate_resources" "foo" {
<!-- schema generated by tfplugindocs -->
## Schema

### Required
### Optional

- `name` (String) The name of the Resource
- `name` (String) Returns only resources that exactly match this name. If no options are passed it will return all resources. Only one option can be used at a time.
- `name_contains` (String) Match when the value exist in the name of the resource.
- `name_exclude` (String) Match when the value does not exist in the name of the resource.
- `name_prefix` (String) The name of the resource must start with the value.
- `name_regexp` (String) The regular expression match of the name of the resource.
- `name_suffix` (String) The name of the resource must end with the value.

### Read-Only

Expand Down
15 changes: 14 additions & 1 deletion docs/data-sources/security_policies.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,27 @@ Security Policies are defined in the Twingate Admin Console and determine user a
## Example Usage

```terraform
data "twingate_security_policies" "all" {}
data "twingate_security_policies" "all" {
name = "<your security policy's name>"
# name_regexp = "<regular expression of security policy name>"
# name_contains = "<a string in the security policy name>"
# name_exclude = "<your security policy's name to exclude>"
# name_prefix = "<prefix of security policy name>"
# name_suffix = "<suffix of security policy name>"
}
```

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

### Optional

- `name` (String) Returns only security policies that exactly match this name. If no options are passed it will return all security policies. Only one option can be used at a time.
- `name_contains` (String) Match when the value exist in the name of the security policy.
- `name_exclude` (String) Match when the value does not exist in the name of the security policy.
- `name_prefix` (String) The name of the security policy must start with the value.
- `name_regexp` (String) The regular expression match of the name of the security policy.
- `name_suffix` (String) The name of the security policy must end with the value.
- `security_policies` (Attributes List) (see [below for nested schema](#nestedatt--security_policies))

### Read-Only
Expand Down
12 changes: 11 additions & 1 deletion docs/data-sources/service_accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ Service Accounts offer a way to provide programmatic, centrally-controlled, and
```terraform
data "twingate_service_accounts" "foo" {
name = "<your service account's name>"
# name_regexp = "<regular expression of service account name>"
# name_contains = "<a string in the service account name>"
# name_exclude = "<your service account's name to exclude>"
# name_prefix = "<prefix of service account name>"
# name_suffix = "<suffix of service account name>"
}
```

Expand All @@ -23,7 +28,12 @@ data "twingate_service_accounts" "foo" {

### Optional

- `name` (String) Filter results by the name of the Service Account.
- `name` (String) Returns only service accounts that exactly match this name. If no options are passed it will return all service accounts. Only one option can be used at a time.
- `name_contains` (String) Match when the value exist in the name of the service account.
- `name_exclude` (String) Match when the value does not exist in the name of the service account.
- `name_prefix` (String) The name of the service account must start with the value.
- `name_regexp` (String) The regular expression match of the name of the service account.
- `name_suffix` (String) The name of the service account must end with the value.

### Read-Only

Expand Down
1 change: 0 additions & 1 deletion docs/data-sources/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ data "twingate_user" "foo" {

- `email` (String) The email address of the User
- `first_name` (String) The first name of the User
- `is_admin` (Boolean, Deprecated) Indicates whether the User is an admin
- `last_name` (String) The last name of the User
- `role` (String) Indicates the User's role. Either ADMIN, DEVOPS, SUPPORT, or MEMBER
- `type` (String) Indicates the User's type. Either MANUAL or SYNCED.
48 changes: 46 additions & 2 deletions docs/data-sources/users.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,57 @@ Users in Twingate can be given access to Twingate Resources and may either be ad
## Example Usage

```terraform
data "twingate_users" "all" {}
data "twingate_users" "all" {
# email = "<your user's email>"
# email_regexp = "<regular expression of user email>"
# email_contains = "<a string in the user email>"
# email_exclude = "<your user's email to exclude>"
# email_prefix = "<prefix of user email>"
# email_suffix = "<suffix of user email>"

# first_name = "<your user's first name>"
# first_name_regexp = "<regular expression of user first name>"
# first_name_contains = "<a string in the user first name>"
# first_name_exclude = "<your user's first name to exclude>"
# first_name_prefix = "<prefix of user first name>"
# first_name_suffix = "<suffix of user first name>"

# last_name = "<your user's last name>"
# last_name_regexp = "<regular expression of user last name>"
# last_name_contains = "<a string in the user last name>"
# last_name_exclude = "<your user's last name to exclude>"
# last_name_prefix = "<prefix of user last name>"
# last_name_suffix = "<suffix of user last name>"

# roles = ["ADMIN", "DEVOPS", "SUPPORT", "MEMBER"]
}
```

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

### Optional

- `email` (String) Returns only users that exactly match this email.
- `email_contains` (String) Match when the value exist in the email of the user.
- `email_exclude` (String) Match when the value does not exist in the email of the user.
- `email_prefix` (String) The email of the user must start with the value.
- `email_regexp` (String) The regular expression match of the email of the user.
- `email_suffix` (String) The email of the user must end with the value.
- `first_name` (String) Returns only users that exactly match the first name.
- `first_name_contains` (String) Match when the value exist in the first name of the user.
- `first_name_exclude` (String) Match when the value does not exist in the first name of the user.
- `first_name_prefix` (String) The first name of the user must start with the value.
- `first_name_regexp` (String) The regular expression match of the first name of the user.
- `first_name_suffix` (String) The first name of the user must end with the value.
- `last_name` (String) Returns only users that exactly match the last name.
- `last_name_contains` (String) Match when the value exist in the last name of the user.
- `last_name_exclude` (String) Match when the value does not exist in the last name of the user.
- `last_name_prefix` (String) The last name of the user must start with the value.
- `last_name_regexp` (String) The regular expression match of the last name of the user.
- `last_name_suffix` (String) The last name of the user must end with the value.
- `roles` (Set of String) Returns users that match a list of roles. Valid roles: `ADMIN`, `DEVOPS`, `SUPPORT`, `MEMBER`.

### Read-Only

- `id` (String) The ID of this resource.
Expand All @@ -32,7 +77,6 @@ Read-Only:
- `email` (String) The email address of the User
- `first_name` (String) The first name of the User
- `id` (String) The ID of the User
- `is_admin` (Boolean, Deprecated) Indicates whether the User is an admin
- `last_name` (String) The last name of the User
- `role` (String) Indicates the User's role. Either ADMIN, DEVOPS, SUPPORT, or MEMBER.
- `type` (String) Indicates the User's type. Either MANUAL or SYNCED.
73 changes: 73 additions & 0 deletions docs/guides/migration-v1-to-v2-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
subcategory: "migration"
page_title: "v1 to v2 Migration Guide"
description: |-
This document covers how to migrate from v1 to v2 of the Twingate Terraform provider.
---

# Migration Guide
j
This guide covers how to migrate from v1 to v2 of the Twingate Terraform provider. Migration needs to be done for the following objects:
- Resources
- `twingate_resource`
- Data sources
- `twingate_user`
- `twingate_users`

## Migrating Resources

The `protocols` attribute in the `twingate_resource` Resource has been changed from a block to an object.

In v1, the following was valid:

```terraform
resource "twingate_resource" "resource" {
name = "resource"
address = "internal.int"
remote_network_id = twingate_remote_network.aws_network.id

protocols {
allow_icmp = true
tcp {
policy = "RESTRICTED"
ports = ["80", "82-83"]
}
udp {
policy = "ALLOW_ALL"
}
}
}
```

The `protocols`, `tcp` and `udp` attributes were blocks and not objects. In v2, these are now objects:

```
protocols { -> protocols = {
tcp { -> tcp = {
udp { -> udp = {
```

In v2, the above resource needs to be rewritten like this:

```terraform
resource "twingate_resource" "resource" {
name = "resource"
address = "internal.int"
remote_network_id = twingate_remote_network.aws_network.id

protocols = {
allow_icmp = true
tcp = {
policy = "RESTRICTED"
ports = ["80", "82-83"]
}
udp = {
policy = "ALLOW_ALL"
}
}
}
```

## Migrating data sources

The attribute `is_admin` has been removed from the `twingate_user` and `twingate_users` data sources. Similar information is now available via the [`role` attribute](https://registry.terraform.io/providers/Twingate/twingate/latest/docs/data-sources/users#role).
3 changes: 2 additions & 1 deletion docs/resources/connector.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ resource "twingate_remote_network" "aws_network" {

resource "twingate_connector" "aws_connector" {
remote_network_id = twingate_remote_network.aws_network.id
status_updates_enabled = true
}
```

Expand All @@ -37,7 +38,7 @@ resource "twingate_connector" "aws_connector" {
### Optional

- `name` (String) Name of the Connector, if not provided one will be generated.
- `status_updates_enabled` (Boolean) Determines whether status notifications are enabled for the Connector.
- `status_updates_enabled` (Boolean) Determines whether status notifications are enabled for the Connector. Default is `true`.

### Read-Only

Expand Down
Loading
Loading