Skip to content

Commit

Permalink
Update connector_resource docs (#34)
Browse files Browse the repository at this point in the history
* connector_resource docs update

* connector_resource docs typo fix

* Update docs/resources/connector.md

Co-authored-by: 5tran-alexil <[email protected]>

* Update docs/resources/connector.md

Co-authored-by: 5tran-alexil <[email protected]>

* Apply suggestions from code review

Co-authored-by: 5tran-alexil <[email protected]>
  • Loading branch information
beevital and 5tran-alexil authored May 27, 2022
1 parent 0bb404a commit 53a73da
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased](https://github.com/fivetran/terraform-provider-fivetran/compare/v0.4.3...HEAD)

## [0.4.4](https://github.com/fivetran/terraform-provider-fivetran/compare/v0.4.3...v0.4.4) - 2022-06-01

## Documentation
- `connector_resource` documentation update with information about how to solve indirect dependency between connector and destination

## [0.4.3](https://github.com/fivetran/terraform-provider-fivetran/compare/v0.4.2...v0.4.3) - 2022-05-24

## Fixed
Expand Down
22 changes: 22 additions & 0 deletions docs/resources/connector.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,28 @@ resource "fivetran_connector" "amplitude" {
}
```

### NOTE: resources indirect dependencies

The connector resource receives the `group_id` parameter value from the group resource, but the destination resource depends on the group resource. When you try to destroy the destination resource infrastructure, the terraform plan is created successfully, but once you run the `terraform apply` command, it returns an error because the Fivetran API doesn't let you delete destinations that have linked connectors. To solve this problem, you should either explicitly define `depends_on` between the connector and destination:

```hcl
resource "fivetran_connector" "amplitude" {
...
depends_on = [
fivetran_destination.my_destination
]
}
```

or get the group ID from the destination:

```hcl
resource "fivetran_connector" "amplitude" {
group_id = fivetran_destination.my_destination.group_id
...
}
```

## Schema

### Required
Expand Down

0 comments on commit 53a73da

Please sign in to comment.