Skip to content

Commit

Permalink
CDPCP-11541 - fixing Provider returned invalid result object after apply
Browse files Browse the repository at this point in the history
  • Loading branch information
gregito committed Mar 12, 2024
1 parent 18503a4 commit af3b8cb
Show file tree
Hide file tree
Showing 11 changed files with 275 additions and 47 deletions.
1 change: 1 addition & 0 deletions docs/resources/datalake_aws_datalake.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ Optional:

Optional:

- `async` (Boolean) Boolean value that specifies if Terraform should wait for resource creation/deletion.
- `polling_timeout` (Number) Timeout value in minutes that specifies for how long should the polling go for resource creation/deletion.


Expand Down
3 changes: 2 additions & 1 deletion docs/resources/datalake_azure_datalake.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ A Data Lake is a service which provides a protective ring around the data stored

### Optional

- `database_type` (Number) The type of the azure database. FLEXIBLE_SERVER is the next generation managed PostgreSQL service in Azure that provides maximum flexibility over your database, built-in cost-optimizations. SINGLE_SERVER is a fully managed database service with minimal requirements for customizations of the database.
- `database_type` (String) The type of the azure database. FLEXIBLE_SERVER is the next generation managed PostgreSQL service in Azure that provides maximum flexibility over your database, built-in cost-optimizations. SINGLE_SERVER is a fully managed database service with minimal requirements for customizations of the database.
- `enable_ranger_raz` (Boolean)
- `image` (Attributes) (see [below for nested schema](#nestedatt--image))
- `java_version` (Number)
Expand Down Expand Up @@ -65,6 +65,7 @@ Optional:

Optional:

- `async` (Boolean) Boolean value that specifies if Terraform should wait for resource creation/deletion.
- `polling_timeout` (Number) Timeout value in minutes that specifies for how long should the polling go for resource creation/deletion.


Expand Down
8 changes: 3 additions & 5 deletions docs/resources/datalake_gcp_datalake.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ Optional:

Optional:

- `async` (Boolean) Boolean value that specifies if Terraform should wait for resource creation/deletion.
- `polling_timeout` (Number) Timeout value in minutes that specifies for how long should the polling go for resource creation/deletion.


Expand All @@ -127,10 +128,7 @@ Optional:

Required:

- `instance_group_name` (String)
- `recipe_names` (Attributes Set) (see [below for nested schema](#nestedatt--recipes--recipe_names))

<a id="nestedatt--recipes--recipe_names"></a>
### Nested Schema for `recipes.recipe_names`
- `instance_group_name` (String) The name of the designated instance group.
- `recipe_names` (Set of String) The set of recipe names that are going to be applied on the given instance group.


58 changes: 43 additions & 15 deletions docs/resources/environments_aws_environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ resource "cdp_environments_aws_environment" "example" {
storage_location_base = "s3a://storage-bucket/location"
instance_profile = "arn:aws:iam::11111111111:instance-profile/storage-instance-profile"
}
freeipa = {
}
}
output "environment_name" {
Expand All @@ -52,6 +54,10 @@ output "environment_name" {
output "crn" {
value = cdp_environments_aws_environment.example.crn
}
output "freeipa" {
value = cdp_environments_aws_environment.example.freeipa
}
```

<!-- schema generated by tfplugindocs -->
Expand All @@ -62,6 +68,7 @@ output "crn" {
- `authentication` (Attributes) (see [below for nested schema](#nestedatt--authentication))
- `credential_name` (String)
- `environment_name` (String)
- `freeipa` (Attributes) (see [below for nested schema](#nestedatt--freeipa))
- `log_storage` (Attributes) (see [below for nested schema](#nestedatt--log_storage))
- `region` (String)
- `security_access` (Attributes) (see [below for nested schema](#nestedatt--security_access))
Expand All @@ -75,7 +82,6 @@ output "crn" {
- `encryption_key_arn` (String)
- `endpoint_access_gateway_scheme` (String)
- `endpoint_access_gateway_subnet_ids` (Set of String)
- `freeipa` (Attributes) (see [below for nested schema](#nestedatt--freeipa))
- `network_cidr` (String)
- `polling_options` (Attributes) Polling related configuration options that could specify various values that will be used during CDP resource creation. (see [below for nested schema](#nestedatt--polling_options))
- `proxy_config_name` (String)
Expand Down Expand Up @@ -103,6 +109,41 @@ Optional:
- `public_key_id` (String)


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

Optional:

- `catalog` (String)
- `image_id` (String)
- `instance_count_by_group` (Number)
- `instance_type` (String)
- `instances` (Attributes Set) (see [below for nested schema](#nestedatt--freeipa--instances))
- `multi_az` (Boolean)
- `os` (String)
- `recipes` (Set of String)

<a id="nestedatt--freeipa--instances"></a>
### Nested Schema for `freeipa.instances`

Read-Only:

- `availability_zone` (String)
- `discovery_fqdn` (String)
- `instance_group` (String)
- `instance_id` (String)
- `instance_status` (String)
- `instance_status_reason` (String)
- `instance_type` (String)
- `instance_vm_type` (String)
- `life_cycle` (String)
- `private_ip` (String)
- `public_ip` (String)
- `ssh_port` (Number)
- `subnet_id` (String)



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

Expand All @@ -128,23 +169,10 @@ Optional:
- `security_group_ids_for_knox` (Set of String)


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

Optional:

- `catalog` (String)
- `image_id` (String)
- `instance_count_by_group` (Number)
- `instance_type` (String)
- `multi_az` (Boolean)
- `os` (String)
- `recipes` (Set of String)


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

Optional:

- `async` (Boolean) Boolean value that specifies if Terraform should wait for resource creation/deletion.
- `polling_timeout` (Number) Timeout value in minutes that specifies for how long should the polling go for resource creation/deletion.
57 changes: 43 additions & 14 deletions docs/resources/environments_azure_environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ resource "cdp_environments_azure_environment" "example-env" {
}
resource_group_name = "rg-name"
use_public_ip = true
freeipa = {
}
}
output "environment_name" {
Expand All @@ -61,6 +63,10 @@ output "environment_name" {
output "crn" {
value = cdp_environments_azure_environment.example-env.crn
}
output "freeipa" {
value = cdp_environments_azure_environment.example-env.freeipa
}
```

<!-- schema generated by tfplugindocs -->
Expand All @@ -70,6 +76,7 @@ output "crn" {

- `credential_name` (String)
- `environment_name` (String)
- `freeipa` (Attributes) (see [below for nested schema](#nestedatt--freeipa))
- `log_storage` (Attributes) (see [below for nested schema](#nestedatt--log_storage))
- `public_key` (String)
- `region` (String)
Expand All @@ -87,7 +94,6 @@ output "crn" {
- `endpoint_access_gateway_scheme` (String) The scheme for the endpoint gateway. PUBLIC creates an external endpoint that can be accessed over the Internet. Defaults to PRIVATE which restricts the traffic to be internal to the VPC.
- `endpoint_access_gateway_subnet_ids` (Set of String) The subnets to use for endpoint access gateway.
- `existing_network_params` (Attributes) (see [below for nested schema](#nestedatt--existing_network_params))
- `freeipa` (Attributes) (see [below for nested schema](#nestedatt--freeipa))
- `new_network_params` (Attributes) (see [below for nested schema](#nestedatt--new_network_params))
- `polling_options` (Attributes) Polling related configuration options that could specify various values that will be used during CDP resource creation. (see [below for nested schema](#nestedatt--polling_options))
- `proxy_config_name` (String)
Expand All @@ -103,6 +109,41 @@ output "crn" {
- `status` (String)
- `status_reason` (String)

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

Optional:

- `catalog` (String)
- `image_id` (String)
- `instance_count_by_group` (Number)
- `instance_type` (String)
- `instances` (Attributes Set) (see [below for nested schema](#nestedatt--freeipa--instances))
- `multi_az` (Boolean)
- `os` (String)
- `recipes` (Set of String)

<a id="nestedatt--freeipa--instances"></a>
### Nested Schema for `freeipa.instances`

Read-Only:

- `availability_zone` (String)
- `discovery_fqdn` (String)
- `instance_group` (String)
- `instance_id` (String)
- `instance_status` (String)
- `instance_status_reason` (String)
- `instance_type` (String)
- `instance_vm_type` (String)
- `life_cycle` (String)
- `private_ip` (String)
- `public_ip` (String)
- `ssh_port` (Number)
- `subnet_id` (String)



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

Expand Down Expand Up @@ -144,19 +185,6 @@ Optional:
- `flexible_server_subnet_ids` (Set of String)


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

Optional:

- `catalog` (String)
- `image_id` (String)
- `instance_count_by_group` (Number)
- `instance_type` (String)
- `os` (String)
- `recipes` (Set of String)


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

Expand All @@ -170,4 +198,5 @@ Required:

Optional:

- `async` (Boolean) Boolean value that specifies if Terraform should wait for resource creation/deletion.
- `polling_timeout` (Number) Timeout value in minutes that specifies for how long should the polling go for resource creation/deletion.
40 changes: 36 additions & 4 deletions docs/resources/environments_gcp_environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ resource "cdp_environments_gcp_environment" "example" {
subnet_names = ["<value>", "<value2>", "..."] // one or more entries accepted
shared_project_id = "<value>"
}
freeipa = {
}
}
output "environment_name" {
Expand Down Expand Up @@ -71,6 +73,10 @@ output "subnet_names" {
output "shared_project_id" {
value = cdp_environments_gcp_environment.example.existing_network_params.shared_project_id
}
output "freeipa" {
value = cdp_environments_gcp_environment.example.freeipa
}
```

<!-- schema generated by tfplugindocs -->
Expand All @@ -81,6 +87,7 @@ output "shared_project_id" {
- `credential_name` (String) Name of the credential to use for the environment.
- `environment_name` (String) The name of the environment. Must contain only lowercase letters, numbers and hyphens.
- `existing_network_params` (Attributes) Parameters needed to use an existing VPC and Subnets. For now only existing network params is supported. (see [below for nested schema](#nestedatt--existing_network_params))
- `freeipa` (Attributes) (see [below for nested schema](#nestedatt--freeipa))
- `public_key` (String) Public SSH key string. The associated private key can be used to get root-level access to the Data Lake instance and Data Hub cluster instances.
- `region` (String) The region of the environment.
- `use_public_ip` (Boolean) Whether to associate public IPs to the resources within the network or not.
Expand All @@ -92,7 +99,6 @@ output "shared_project_id" {
- `enable_tunnel` (Boolean) Whether to enable SSH tunneling for the environment.
- `encryption_key` (String) Key Resource ID of the customer managed encryption key to encrypt GCP resources.
- `endpoint_access_gateway_scheme` (String) The scheme for the endpoint gateway. PUBLIC creates an external endpoint that can be accessed over the Internet. Defaults to PRIVATE which restricts the traffic to be internal to the VPC.
- `freeipa` (Attributes) The FreeIPA creation request for the environment. (see [below for nested schema](#nestedatt--freeipa))
- `log_storage` (Attributes) GCP storage configuration for cluster and audit logs. (see [below for nested schema](#nestedatt--log_storage))
- `polling_options` (Attributes) Polling related configuration options that could specify various values that will be used during CDP resource creation. (see [below for nested schema](#nestedatt--polling_options))
- `proxy_config_name` (String) Name of the proxy config to use for the environment.
Expand Down Expand Up @@ -123,9 +129,34 @@ Required:

Optional:

- `instance_count_by_group` (Number) The number of FreeIPA instances to create per group when creating FreeIPA in the environment.
- `instance_type` (String) Custom instance type of FreeIPA instances.
- `recipes` (Set of String) The recipes for the FreeIPA cluster.
- `catalog` (String)
- `image_id` (String)
- `instance_count_by_group` (Number)
- `instance_type` (String)
- `instances` (Attributes Set) (see [below for nested schema](#nestedatt--freeipa--instances))
- `multi_az` (Boolean)
- `os` (String)
- `recipes` (Set of String)

<a id="nestedatt--freeipa--instances"></a>
### Nested Schema for `freeipa.instances`

Read-Only:

- `availability_zone` (String)
- `discovery_fqdn` (String)
- `instance_group` (String)
- `instance_id` (String)
- `instance_status` (String)
- `instance_status_reason` (String)
- `instance_type` (String)
- `instance_vm_type` (String)
- `life_cycle` (String)
- `private_ip` (String)
- `public_ip` (String)
- `ssh_port` (Number)
- `subnet_id` (String)



<a id="nestedatt--log_storage"></a>
Expand All @@ -146,6 +177,7 @@ Optional:

Optional:

- `async` (Boolean) Boolean value that specifies if Terraform should wait for resource creation/deletion.
- `polling_timeout` (Number) Timeout value in minutes that specifies for how long should the polling go for resource creation/deletion.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ resource "cdp_environments_aws_environment" "example" {
storage_location_base = "s3a://storage-bucket/location"
instance_profile = "arn:aws:iam::11111111111:instance-profile/storage-instance-profile"
}
freeipa = {
}
}

output "environment_name" {
Expand All @@ -38,3 +40,7 @@ output "environment_name" {
output "crn" {
value = cdp_environments_aws_environment.example.crn
}

output "freeipa" {
value = cdp_environments_aws_environment.example.freeipa
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ resource "cdp_environments_azure_environment" "example-env" {
}
resource_group_name = "rg-name"
use_public_ip = true
freeipa = {
}
}

output "environment_name" {
Expand All @@ -47,3 +49,7 @@ output "environment_name" {
output "crn" {
value = cdp_environments_azure_environment.example-env.crn
}

output "freeipa" {
value = cdp_environments_azure_environment.example-env.freeipa
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ resource "cdp_environments_gcp_environment" "example" {
subnet_names = ["<value>", "<value2>", "..."] // one or more entries accepted
shared_project_id = "<value>"
}
freeipa = {
}
}

output "environment_name" {
Expand Down Expand Up @@ -55,4 +57,8 @@ output "subnet_names" {

output "shared_project_id" {
value = cdp_environments_gcp_environment.example.existing_network_params.shared_project_id
}

output "freeipa" {
value = cdp_environments_gcp_environment.example.freeipa
}
Loading

0 comments on commit af3b8cb

Please sign in to comment.