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

Support clean DaVinci environments #250

Merged
merged 70 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from 67 commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
6197fbf
development in progress
patrickcping Dec 29, 2023
a99fe38
Merge branch 'main' into support-clean-davinci-environment-creation-2…
patrickcping Dec 29, 2023
a42316a
update index
patrickcping Dec 29, 2023
c602bce
update `davinci_connection` schema
patrickcping Jan 3, 2024
c77f2d9
fix `davinci_connection` bugs
patrickcping Jan 3, 2024
e944753
`connection` stability
patrickcping Jan 8, 2024
1f11f88
updates and corrections
patrickcping Jan 9, 2024
43737d6
update docs
patrickcping Jan 11, 2024
7ebf592
remove panic outcomes
patrickcping Jan 11, 2024
5def203
applications resource (in progress testing)
patrickcping Jan 11, 2024
6bc7dc2
defer retry condition to SDK
patrickcping Jan 11, 2024
cd5a0d2
`application` in progress
patrickcping Jan 15, 2024
d124d85
raise retry limit to 20
patrickcping Jan 15, 2024
f110a76
final `application`
patrickcping Jan 15, 2024
8f0360e
flow policy - in progress
patrickcping Jan 15, 2024
25032bf
flow policy docs
patrickcping Jan 15, 2024
37eec4b
`application_flow_policy` in progress
patrickcping Jan 16, 2024
8dfc174
update connection doc
patrickcping Jan 16, 2024
72da670
add ability to replace a connection name in flow import
patrickcping Jan 16, 2024
4ff9335
add connections docs
patrickcping Jan 22, 2024
67aa7eb
`connections` data source
patrickcping Jan 22, 2024
057d480
update `connection`
patrickcping Jan 24, 2024
271161e
update `connections`
patrickcping Jan 24, 2024
907b30b
changelog (pre-sdk uplift)
patrickcping Jan 24, 2024
3e5fdb6
docs update
patrickcping Jan 24, 2024
248b9a9
`application` doc update
patrickcping Jan 25, 2024
c7f25e9
changelog update
patrickcping Jan 25, 2024
6b6d8c8
`applications` data source
patrickcping Jan 25, 2024
e4fd47f
`connections` update
patrickcping Jan 25, 2024
507494e
terrafmt
patrickcping Jan 25, 2024
52e5414
`connection` update
patrickcping Jan 25, 2024
af8a047
`application` data source update
patrickcping Jan 25, 2024
f404688
documentation updates
patrickcping Jan 25, 2024
66e4a3d
documentation updates
patrickcping Jan 25, 2024
eb471c6
flow test draft
patrickcping Feb 1, 2024
fac4b05
terrafmt
patrickcping Feb 1, 2024
0415263
adjust error responses
patrickcping Feb 1, 2024
8f7b26f
framework inclusion, sdk updates
patrickcping Feb 5, 2024
5c1269b
update `davinci_connection`
patrickcping Feb 13, 2024
54eaebb
update `davinci_flow`
patrickcping Feb 13, 2024
8a7f797
updates to data models and `davinci_flow`
patrickcping Feb 14, 2024
8d5f3d2
flow difference calculation (1)
patrickcping Feb 15, 2024
56980bb
flow difference calculation (2)
patrickcping Feb 16, 2024
9752148
obfuscate secrets in debug
patrickcping Feb 16, 2024
8c89f5d
fix epoch data type issues
patrickcping Feb 16, 2024
6b63226
update flow testing
patrickcping Feb 19, 2024
efe3c34
fix tests
patrickcping Feb 19, 2024
2c6085e
compute flow diffs WIP
patrickcping Feb 20, 2024
1587080
update flow diff
patrickcping Feb 22, 2024
041e5ef
bug fixes
patrickcping Mar 11, 2024
5b45832
bug fixes
patrickcping Mar 12, 2024
182c585
update flow resource docs
patrickcping Mar 12, 2024
02c3755
code optimisation
patrickcping Mar 13, 2024
dbeeced
defer auth retry logic to sdk
patrickcping Mar 13, 2024
cdf0f90
fix testing issues on non-flow resources/datasources
patrickcping Mar 13, 2024
6e86c39
testing corrections `flow`
patrickcping Mar 14, 2024
9774014
bug fixes
patrickcping Mar 18, 2024
26b8942
updated warning messages
patrickcping Mar 19, 2024
79d2a4d
update P1 client user agent suffix
patrickcping Mar 19, 2024
9f16f32
code optimisation
patrickcping Mar 19, 2024
d696ec5
update go deps
patrickcping Mar 19, 2024
05c7e96
changelog
patrickcping Mar 19, 2024
f2ee950
lint issue fix
patrickcping Mar 22, 2024
e529a39
bump module `github.com/samir-gandhi/davinci-client-go`
patrickcping Mar 22, 2024
7284c66
lint corrections
patrickcping Mar 22, 2024
e4967d2
update connection reference docs
patrickcping Mar 25, 2024
794dfad
update `dvgenerate` module
patrickcping Mar 25, 2024
9c6c30c
update `flow_json` description
patrickcping Mar 26, 2024
b9d30e8
update connection doc sorting
patrickcping Mar 26, 2024
537d0c4
bump `dvgenerate`
patrickcping Mar 26, 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
191 changes: 191 additions & 0 deletions .changelog/250.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
```release-note:note
bump `github.com/patrickcping/pingone-go-sdk-v2/management` 0.34.0 => 0.36.0
```

```release-note:note
bump `github.com/samir-gandhi/davinci-client-go` 0.0.55 => 0.1.0
```

```release-note:note
Provider updated thoughout to support environments that have been created without demo/bootstrapped configuration automatically applied. Creation of environments without demo/bootstrapped configuration is best practice going forward.
```

```release-note:note
Index documentation updated to reflect latest best practices for admin role requirements and creation of PingOne environments that do not have demo/bootstrapped configuration automatically applied.
```

```release-note:bug
Fixed bug where resources may be created in the incorrect PingOne environment when multiple DaVinci environments are being configured in the same `apply` routine.
```

```release-note:note
Added plugin mux factory and plugin framework (v6 protocol) provider to facilitate migration from SDKv2 (v5 protocol).
```

```release-note:note
Code optimisations to remove unnecessary SDK retry logic.
```

```release-note:note
Added regex validation for resource/data-source parameters that require platform IDs.
```

```release-note:bug
Fixed intermittent `Unable to retrieve access_token within 60s for environment` error.
```

```release-note:note
`data-source/davinci_applications`: Corrected documentation category.
```

```release-note:note
`data-source/davinci_application`: Un-deprecate the `application_id` parameter, and deprecated the `id` parameter for the purpose of fetching an application by it's ID. The `application_id` should be used going forward.
```

```release-note:note
`data-source/davinci_application`: Deprecated the `user_portal` and `saml` block parameters as they are no longer used. The parameters will be removed in the next major release.
```

```release-note:bug
`data-source/davinci_applications`: Fixed bug where not all applications are returned for an environment due to eventual consistency considerations on environment creation.
```

```release-note:note
`data-source/davinci_applications`: Deprecated the `user_portal` and `saml` block parameters as they are no longer used. The parameters will be removed in the next major release.
```

```release-note:enhancement
`data-source/davinci_applications`: Added a configurable timeout parameter and updated the default timeout to `20m` due to eventual consistency considerations on environment creation.
```

```release-note:bug
`data-source/davinci_applications`: Fixed issue where not all connections are returned due to eventual consistency considerations on environment creation.
```

```release-note:enhancement
`data-source/davinci_connection`: Added a new `connection_id` parameter and deprecated the `id` parameter for the purpose of fetching a connection by it's ID. The `connection_id` should be used going forward.
```

```release-note:enhancement
`data-source/davinci_connection`: Added a configurable timeout parameter and updated the default timeout to `20m` due to eventual consistency considerations on environment creation.
```

```release-note:bug
`data-source/davinci_connection`: Fixed issue where a connection isn't returned due to eventual consistency considerations on environment creation.
```

```release-note:note
`data-source/davinci_connections`: Deprecated the `connections.company_id` parameter as it is a duplicate of the `environment_id` parameter.
```

```release-note:bug
`data-source/davinci_connections`: Fixed the `connections.customer_id` attribute not being stored into state.
```

```release-note:enhancement
`data-source/davinci_connections`: Added a configurable timeout parameter and updated the default timeout to `20m` due to eventual consistency considerations on environment creation.
```

```release-note:bug
`resource/davinci_application`: Fixed inability to set `api_key_enabled`, `oauth.enabled` and `oauth.values.enabled` to `false`.
```

```release-note:bug
`resource/davinci_application`: Fixed panic crash when defining an application with an `oauth` block, but without `oauth.values`.
```

```release-note:note
`resource/davinci_application`: Deprecated the `user_portal` and `saml` parameters as they are no longer used. The parameters will be removed in the next major version release.
```

```release-note:bug
`resource/davinci_application_flow_policy`: Fixed inability to update the environment ID and application ID once created (resource now requires replacement).
```

```release-note:bug
`resource/davinci_application_flow_policy`: Fixed error when specifying a flow policy without any `policy_flow` blocks. The `policy_flow` block is now a required field.
```

```release-note:bug
`resource/davinci_application_flow_policy`: Fixed error when specifying a flow policy without `policy_flow.name` or `policy_flow.version` parameters. The `policy_flow.name` and `policy_flow.version` are now required fields.
```

```release-note:bug
`resource/davinci_application_flow_policy`: Fixed inability to set `policy_flow.success_nodes`.
```

```release-note:enhancement
`resource/davinci_application_flow_policy`: Added `policy_flow.allowed_ip_list` to be able to configure an allowed IP list for policy flows.
```

```release-note:bug
`resource/davinci_connection`: Fixed inconsistent plan when specifying a property data type.
```

```release-note:bug
`resource/davinci_connection`: Fixed inability to update the environment ID, connection name and ID once created (resource now requires replacement).
```

```release-note:bug
`resource/davinci_connection`: Fixed `Error retrieving connectors / 7005` error in certain conditions.
```

```release-note:note
`resource/davinci_connection`: When the `property.type` parameter is not set for a property object, the default is now set to `string`.
```

```release-note:enhancement
`resource/davinci_flow`: Added the `connection_link.replace_import_connection_id` parameter to be able to replace the name of connectors with the specified connection ID in a flow import.
```

```release-note:enhancement
`resource/davinci_flow`: Added the `subflow_link.replace_import_subflow_id` parameter to be able to replace the name of subflows with the specified subflow ID in a flow import.
```

```release-note:bug
`resource/davinci_flow`: Fixed inability to update the environment ID after initial configuration (resource requires replacement).
```

```release-note:note
`resource/davinci_flow`: Migrated to plugin framework.
```

```release-note:bug
`resource/davinci_flow`: Corrected flow drift calculation errors, causing plan inconsistency.
```

```release-note:bug
`resource/davinci_flow`: Corrected panic errors on flow drift calculation and connection/subflow re-mapping.
```

```release-note:note
`resource/davinci_flow`: Updated warning messages when subflows and connectors are left unmapped. Going forward, all subflows and connections in a flow should be mapped using the `connection_link` and `subflow_link` parameters.
```

```release-note:enhancement
`resource/davinci_flow`: The `name` parameter is now an optional field, to be able to override the name of the flow on import.
```

```release-note:note
`resource/davinci_flow`: The `deploy` parameter is now deprecated. Deployment on import and update is now implicit. This parameter will be removed in the next major release.
```

```release-note:enhancement
`resource/davinci_flow`: Added the `description` parameter to be able to override the description of the flow on import.
```

```release-note:enhancement
`resource/davinci_flow`: Added the `flow_configuration_json` and `flow_export_json` attributes to the resource. `flow_configuration_json` is used to compute configuration changes and drift, while `flow_export_json` is used as a record of the resulting flow once imported to the target environment.
```

```release-note:breaking-change
`resource/davinci_flow`: The `flow_json` parameter does not now represent the flow after import. It now only represents the flow JSON payload from the source system. When needing to use the resulting flow after import in the target environment, `flow_export_json` should be used.
```

```release-note:note
`resource/davinci_flow`: The `flow_variables` computed attribute has changed data type. Previously the attribute was a block type. Going forward, the attribute is nested set type. There are no changes expected to HCL to use the new data type.
```

```release-note:bug
`resource/davinci_variable`: Fixed inability to update the environment ID once created (resource now requires replacement).
```
28 changes: 14 additions & 14 deletions docs/data-sources/application.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ description: |-

```terraform
data "davinci_application" "by_app_id" {
application_id = var.application_id
environment_id = var.environment_id
application_id = var.application_id
}

output "davinci_app_one_key" {
Expand All @@ -27,26 +27,26 @@ output "davinci_app_one_key" {

### Required

- `environment_id` (String) PingOne environment id
- `environment_id` (String) The ID of the PingOne environment to create the DaVinci application. Must be a valid PingOne resource ID.

### Optional

- `application_id` (String) DEPRECATED: Use field 'id'. id of the application to retrieve.
- `id` (String) id of the application to retrieve.
- `application_id` (String) The ID of the application to retrieve.
- `id` (String) The ID of the application. Use of this parameter to fetch the application data is deprecated, use the `application_id` parameter instead.

### Read-Only

- `api_key_enabled` (Boolean) Enabled by default in UI
- `api_keys` (Map of String) Appplication Api Key
- `created_date` (Number) Resource creation date
- `customer_id` (String) Internal used field
- `metadata` (Map of String) Appplication Metadata
- `name` (String) Application name
- `oauth` (Set of Object) OIDC configuration (see [below for nested schema](#nestedatt--oauth))
- `api_key_enabled` (Boolean) A boolean that specifies whether the API key is enabled for the application.
- `api_keys` (Map of String) A map of strings that represents the application's API Key.
- `created_date` (Number) Resource creation date as epoch.
- `customer_id` (String) An ID that represents the customer tenant.
- `metadata` (Map of String) Application Metadata.
- `name` (String) The application name.
- `oauth` (Set of Object) A single list item specifying OIDC/OAuth 2.0 configuration. (see [below for nested schema](#nestedatt--oauth))
- `policy` (Set of Object) Flow Policy Configuration (see [below for nested schema](#nestedatt--policy))
- `saml` (Set of Object) SAML configuration (see [below for nested schema](#nestedatt--saml))
- `user_pools` (Map of String) Internal read only field.
- `user_portal` (Set of Object) This is deprecated in the UI and will be removed in a future release. (see [below for nested schema](#nestedatt--user_portal))
- `saml` (Set of Object, Deprecated) **Deprecation notice**: SAML configuration is now deprecated in the service and will be removed in the next major release. A single list item that specifies SAML configuration. (see [below for nested schema](#nestedatt--saml))
- `user_pools` (Map of String) Application User Pools.
- `user_portal` (Set of Object, Deprecated) **Deprecation notice** This is now deprecated in the service and will be removed from the provider in the next major release. A single object that describes user portal settings. (see [below for nested schema](#nestedatt--user_portal))

<a id="nestedatt--oauth"></a>
### Nested Schema for `oauth`
Expand Down
24 changes: 16 additions & 8 deletions docs/data-sources/applications.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
page_title: "davinci_applications Data Source - terraform-provider-davinci"
subcategory: "Connection"
subcategory: "Application"
description: |-

---
Expand All @@ -12,27 +12,35 @@ description: |-
## Example Usage

```terraform
data "davinci_applications" "all" {
data "davinci_applications" "all_applications" {
environment_id = var.environment_id
}

output "davinci_applications" {
value = data.davinci_applications.all.applications
}
```

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

### Required

- `environment_id` (String) PingOne environment id
- `environment_id` (String) The ID of the PingOne environment to retrieve applications from. Must be a valid PingOne resource ID.

### Optional

- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))

### Read-Only

- `applications` (Set of Object) List of applications in the environment. (see [below for nested schema](#nestedatt--applications))
- `applications` (Set of Object) A set of applications retrieved from the environment. (see [below for nested schema](#nestedatt--applications))
- `id` (String) The ID of this resource.

<a id="nestedblock--timeouts"></a>
### Nested Schema for `timeouts`

Optional:

- `read` (String)


<a id="nestedatt--applications"></a>
### Nested Schema for `applications`

Expand Down
34 changes: 22 additions & 12 deletions docs/data-sources/connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ description: |-
## Example Usage

```terraform
data "davinci_connection" "http_by_name" {
data "davinci_connection" "example_by_name" {
environment_id = var.pingone_environment_id
name = "Http"

name = "Http"
}

data "davinci_connection" "http_by_id" {
data "davinci_connection" "example_by_id" {
environment_id = var.pingone_environment_id
// This will filter output to only include connections using the "httpConnector" type.
// Helpful for validation that only one of a certain type exists.

id = "867ed4363b2bc21c860085ad2baa817d"
}
```
Expand All @@ -30,19 +30,29 @@ data "davinci_connection" "http_by_id" {

### Required

- `environment_id` (String) PingOne environment id
- `environment_id` (String) The ID of the PingOne environment to retrieve a connection from. Must be a valid PingOne resource ID.

### Optional

- `id` (String) ID of the connection to retrieve. Either id or name must be specified.
- `name` (String) Name of the connection to retrieve. Either id or name must be specified.
- `connection_id` (String) A string that specifies the ID of the connection to retrieve. Either `connection_id` or `name` must be specified.
- `id` (String) A string that specifies the ID of the connection to retrieve. This field is deprecated for retrieving the connection and will be made read only in a future release, use `connection_id` instead.
- `name` (String) A string that specifies the name of the connection to retrieve. Either `id` or `name` must be specified.
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))

### Read-Only

- `connector_id` (String) DaVinci internal connector type. Only found via API read response (e.g Http Connector is 'httpConnector')
- `created_date` (Number) Resource creation date as epoch.
- `customer_id` (String) Internal DaVinci id. Should not be set by user.
- `property` (Set of Object) Connection configuration (see [below for nested schema](#nestedatt--property))
- `connector_id` (String) The DaVinci internal connector type ID, which can be found in the [DaVinci Connection Definitions](../../resources/connection#davinci-connection-definitions) documentation.
- `created_date` (Number) Resource creation date as epoch timestamp.
- `customer_id` (String) An ID that represents the customer tenant.
- `property` (Set of Object) Connection properties. These are specific to the connector type configured in `connector_id`. See the [DaVinci Connection Definitions](#davinci-connection-definitions) document to find the appropriate property name/value pairs for the connection. (see [below for nested schema](#nestedatt--property))

<a id="nestedblock--timeouts"></a>
### Nested Schema for `timeouts`

Optional:

- `read` (String)


<a id="nestedatt--property"></a>
### Nested Schema for `property`
Expand Down
Loading