Skip to content

Commit

Permalink
CDPCP-11953 Added workload password to machine user resource
Browse files Browse the repository at this point in the history
- Added a sensitive field called workload_password to machine user schema. It is updateable
- Added missing IAM examples
- Added missing doc template files
  • Loading branch information
daszabo authored and gregito committed May 3, 2024
1 parent 586d36d commit 624cbae
Show file tree
Hide file tree
Showing 44 changed files with 674 additions and 106 deletions.
7 changes: 2 additions & 5 deletions docs/data-sources/environments_keytab.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "cdp_environments_keytab Data Source - terraform-provider-cdp"
subcategory: ""
subcategory: "environments"
description: |-
---
Expand All @@ -25,6 +24,4 @@ description: |-

### Read-Only

- `keytab` (String) The contents of the keytab encoded as a base64 string.


- `keytab` (String) The contents of the keytab encoded as a base64 string.
7 changes: 2 additions & 5 deletions docs/resources/datahub_azure_cluster.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "cdp_datahub_azure_cluster Resource - terraform-provider-cdp"
subcategory: ""
subcategory: "datahub"
description: |-
Creates an Azure Data hub cluster.
---
Expand Down Expand Up @@ -291,6 +290,4 @@ Required:

Optional:

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


- `polling_timeout` (Number) Timeout value in minutes that specifies for how long should the polling go for resource creation/deletion.
7 changes: 2 additions & 5 deletions docs/resources/datahub_gcp_cluster.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "cdp_datahub_gcp_cluster Resource - terraform-provider-cdp"
subcategory: ""
subcategory: "datahub"
description: |-
Creates an GCP Data hub cluster.
---
Expand Down Expand Up @@ -104,6 +103,4 @@ Required:

Optional:

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


- `polling_timeout` (Number) Timeout value in minutes that specifies for how long should the polling go for resource creation/deletion.
7 changes: 2 additions & 5 deletions docs/resources/datalake_gcp_datalake.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "cdp_datalake_gcp_datalake Resource - terraform-provider-cdp"
subcategory: ""
subcategory: "datalake"
description: |-
A Data Lake is a service which provides a protective ring around the data stored in a cloud object store, including authentication, authorization, and governance support.
---
Expand Down Expand Up @@ -129,6 +128,4 @@ Optional:
Required:

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


- `recipe_names` (Set of String) The set of recipe names that are going to be applied on the given instance group.
4 changes: 2 additions & 2 deletions docs/resources/environments_azure_environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ resource "cdp_environments_azure_environment" "example-env" {
storage_location_base = "abfs://[email protected]"
managed_identity = "/subscriptions/123e4567-e89b-12d3-a456-426614174000/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/logger"
}
resource_group_name = "rg-name"
resource_group_name = "rg-name"
encryption_user_managed_identity = "some-identity"
use_public_ip = true
use_public_ip = true
}
output "environment_name" {
Expand Down
7 changes: 2 additions & 5 deletions docs/resources/environments_azure_image_terms.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "cdp_environments_azure_image_terms Resource - terraform-provider-cdp"
subcategory: ""
subcategory: "environments"
description: |-
Updates account level Azure Marketplace image policy. CDP is capable to automatically accept Azure Marketplace image terms during cluster deployment. You can use this setting in your account to opt in or opt out this behaviour.
---
Expand All @@ -21,6 +20,4 @@ Updates account level Azure Marketplace image policy. CDP is capable to automati

### Read-Only

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


- `id` (String) The ID of this resource.
7 changes: 2 additions & 5 deletions docs/resources/environments_gcp_credential.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "cdp_environments_gcp_credential Resource - terraform-provider-cdp"
subcategory: ""
subcategory: "environments"
description: |-
The GCP credential is used for authorization to provision resources such as compute instances within your cloud provider account.
---
Expand Down Expand Up @@ -62,6 +61,4 @@ output "credential_key" {
### Read-Only

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


- `id` (String) The ID of this resource.
7 changes: 2 additions & 5 deletions docs/resources/environments_gcp_environment.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "cdp_environments_gcp_environment Resource - terraform-provider-cdp"
subcategory: ""
subcategory: "environments"
description: |-
The environment is a logical entity that represents the association of your user account with multiple compute resources using which you can provision and manage workloads.
---
Expand Down Expand Up @@ -184,6 +183,4 @@ Optional:
Optional:

- `default_security_group_id` (String) Firewall rule for other hosts.
- `security_group_id_for_knox` (String) Firewall rule for Knox hosts.


- `security_group_id_for_knox` (String) Firewall rule for Knox hosts.
7 changes: 2 additions & 5 deletions docs/resources/environments_proxy_configuration.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "cdp_environments_proxy_configuration Resource - terraform-provider-cdp"
subcategory: ""
subcategory: "environments"
description: |-
---
Expand Down Expand Up @@ -31,6 +30,4 @@ description: |-

### Read-Only

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


- `id` (String) The ID of this resource.
42 changes: 37 additions & 5 deletions docs/resources/iam_machine_user.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "cdp_iam_machine_user Resource - terraform-provider-cdp"
subcategory: ""
subcategory: "iam"
description: |-
---
Expand All @@ -10,7 +9,38 @@ description: |-



## Example Usage

```terraform
## Copyright 2024 Cloudera. All Rights Reserved.
#
# This file is licensed under the Apache License Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
#
# This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
# OF ANY KIND, either express or implied. Refer to the License for the specific
# permissions and limitations governing your use of the file.
variable "password" {
type = string
}
resource "cdp_iam_machine_user" "example" {
name = "example"
# Optional
workload_password = var.password
}
output "machine_user" {
value = cdp_iam_machine_user.example.name
}
output "password_expiration_date" {
value = cdp_iam_machine_user.example.workload_password_details.expiration_date
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand All @@ -19,6 +49,10 @@ description: |-

- `name` (String)

### Optional

- `workload_password` (String, Sensitive)

### Read-Only

- `azure_cloud_identities` (Attributes Set) (see [below for nested schema](#nestedatt--azure_cloud_identities))
Expand All @@ -44,6 +78,4 @@ Read-Only:

- `expiration_date` (String)
- `is_password_set` (Boolean)
- `min_lifetime_date` (String)


- `min_lifetime_date` (String)
49 changes: 49 additions & 0 deletions docs/resources/iam_machine_user_group_assignment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
page_title: "cdp_iam_machine_user_group_assignment Resource - terraform-provider-cdp"
subcategory: "iam"
description: |-
---

# cdp_iam_machine_user_group_assignment (Resource)



## Example Usage

```terraform
## Copyright 2024 Cloudera. All Rights Reserved.
#
# This file is licensed under the Apache License Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
#
# This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
# OF ANY KIND, either express or implied. Refer to the License for the specific
# permissions and limitations governing your use of the file.
resource "cdp_iam_machine_user_group_assignment" "example" {
machine_user = "example"
group = "some-group"
}
output "machine_user" {
value = cdp_iam_machine_user_group_assignment.example.machine_user
}
output "role" {
value = cdp_iam_machine_user_group_assignment.example.group
}
```

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

### Required

- `group` (String)
- `machine_user` (String)

### Read-Only

- `id` (String) The ID of this resource.
51 changes: 51 additions & 0 deletions docs/resources/iam_machine_user_resource_role_assignment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
page_title: "cdp_iam_machine_user_resource_role_assignment Resource - terraform-provider-cdp"
subcategory: "iam"
description: |-
---

# cdp_iam_machine_user_resource_role_assignment (Resource)



## Example Usage

```terraform
## Copyright 2024 Cloudera. All Rights Reserved.
#
# This file is licensed under the Apache License Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
#
# This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
# OF ANY KIND, either express or implied. Refer to the License for the specific
# permissions and limitations governing your use of the file.
resource "cdp_iam_machine_user_resource_role_assignment" "example" {
machine_user = "example"
resource_crn = "crn:cdp:environments:us-west-1:00000000-0000-0000-0000-000000000000:environment:00000000-0000-0000-0000-000000000000"
resource_role_crn = "crn:altus:iam:us-west-1:altus:resourceRole:EnvironmentUser"
}
output "machine_use" {
value = cdp_iam_machine_user_resource_role_assignment.example.machine_user
}
output "resource_role_crn" {
value = cdp_iam_machine_user_resource_role_assignment.example.resource_role_crn
}
```

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

### Required

- `machine_user` (String) The machine user the role is assigned to. Can be the machine user’s name or CRN.
- `resource_crn` (String) The resource for which the resource role rights are granted.
- `resource_role_crn` (String) The CRN of the resource role to assign to the machine user.

### Read-Only

- `id` (String) The ID of this resource.
49 changes: 49 additions & 0 deletions docs/resources/iam_machine_user_role_assignment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
page_title: "cdp_iam_machine_user_role_assignment Resource - terraform-provider-cdp"
subcategory: "iam"
description: |-
---

# cdp_iam_machine_user_role_assignment (Resource)



## Example Usage

```terraform
## Copyright 2024 Cloudera. All Rights Reserved.
#
# This file is licensed under the Apache License Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
#
# This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
# OF ANY KIND, either express or implied. Refer to the License for the specific
# permissions and limitations governing your use of the file.
resource "cdp_iam_machine_user_role_assignment" "example" {
machine_user = "example"
role = "some-role"
}
output "machine_use" {
value = cdp_iam_machine_user_role_assignment.example.machine_user
}
output "role" {
value = cdp_iam_machine_user_role_assignment.example.role
}
```

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

### Required

- `machine_user` (String) The machine user the role is assigned to. Can be the machine user’s name or CRN.
- `role` (String) The role to assign to the machine user. Can be the role’s name or CRN.

### Read-Only

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

0 comments on commit 624cbae

Please sign in to comment.