Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Merge pull request #9 from jhernand/update_docs
Browse files Browse the repository at this point in the history
Update documentation
  • Loading branch information
jhernand authored Nov 18, 2021
2 parents f4f3a8b + a205111 commit 7809df9
Show file tree
Hide file tree
Showing 6 changed files with 143 additions and 111 deletions.
26 changes: 0 additions & 26 deletions docs/data-sources/cloud_providers.md

This file was deleted.

28 changes: 28 additions & 0 deletions docs/data-sources/ocm_cloud_providers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
page_title: "ocm_cloud_providers Data Source"
subcategory: ""
description: |-
List of cloud providers.
---

# ocm_cloud_providers (Data Source)

List of cloud providers.

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

### Read-Only

- **items** (Attributes List) Items of the list. (see [below for nested schema](#nestedatt--items))

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

Read-Only:

- **display_name** (String) Human friendly name of the cloud provider, for example 'AWS' or 'GCP'
- **id** (String) Unique identifier of the cloud provider. This is what should be used when referencing the cloud providers from other places, for example in the 'cloud_provider' attribute of the cluster resource.
- **name** (String) Short name of the cloud provider, for example 'aws' or 'gcp'.


54 changes: 49 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,60 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "ocm Provider"
subcategory: ""
page_title: "OCM Provider"
subcategory: "Cloud Automation"
description: |-
Experimental provider for creating and managing OpenShift managed clusters
using the OpenShift Cluster Manager application programming interface.
---

# ocm Provider
# OCM Provider

> **IMPORTANT**: The version of the provider is currently 0.1 to indicate that
> it is at very early stage of development. The functionality isn't complete
> and there is no backwards compatibility guarantee.
>
> When it is ready for production the version will be updated to 1.0.
The OCM provider simplifies the provisioning of _OpenShift_ managed clusters
using the [OpenShift Cluster Manager_](https://console.redhat.com/openshift)
application programming interface.

For example, to create a simple cluster with an identity provider that allows
login with a simple user name and password create a `main.tf` file similar this
and then run `terraform apply`:

```hcl
terraform {
required_providers {
ocm = {
version = ">= 0.1"
source = "openshift-online/ocm"
}
}
}
provider "ocm" {
token = "..."
}
resource "ocm_cluster" "my_cluster" {
name = "my-cluster"
cloud_provider = "aws"
cloud_region = "us-east-1"
}
resource "ocm_identity_provider" "my_idp" {
cluster_id = ocm_cluster.my_cluster.id
name = "my-idp"
htpasswd = {
username = "my-user"
password = "my-password"
}
}
```

The value of the `token` attribute of the provider should be the OCM
authentication token that you can get [here](https://console.redhat.com/openshift/token).

<!-- schema generated by tfplugindocs -->
## Schema
Expand All @@ -21,7 +65,7 @@ description: |-
- **client_secret** (String, Sensitive) OpenID client secret.
- **insecure** (Boolean) When set to 'true' enables insecure communication with the server. This disables verification of TLS certificates and host names and it isn't recommended for production environments.
- **password** (String, Sensitive) User password.
- **token** (String, Sensitive) Access or refresh token.
- **token** (String, Sensitive) Access or refresh token. If this isn't explicitly provided and o other mechanism to obtain credentials is used (password or client secret) then the value will be take from the 'OCM_TOKEN' environment variable, if that exists.
- **token_url** (String) OpenID token URL.
- **trusted_cas** (String) PEM encoded certificates of authorities that will be trusted. If this isn't explicitly specified then the provider will trust the certificate authorities trusted by default by the system.
- **url** (String) URL of the API server.
Expand Down
63 changes: 0 additions & 63 deletions docs/resources/identity_provider.md

This file was deleted.

23 changes: 6 additions & 17 deletions docs/resources/cluster.md → docs/resources/ocm_cluster.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "ocm_cluster Resource - terraform-provider-ocm"
page_title: "ocm_cluster Resource"
subcategory: ""
description: |-
Creates an OpenShift managed cluster.
OpenShift managed cluster.
---

# ocm_cluster (Resource)

Creates an OpenShift managed cluster.


OpenShift managed cluster.

<!-- schema generated by tfplugindocs -->
## Schema
Expand All @@ -23,21 +20,13 @@ Creates an OpenShift managed cluster.

### Optional

- **id** (String) The ID of this resource.
- **multi_az** (Boolean) Indicates if the cluster should be deployed to multiple availability zones.
- **multi_az** (Boolean) Indicates if the cluster should be deployed to multiple availability zones. Default value is 'false'.
- **properties** (Map of String) User defined properties.
- **timeouts** (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
- **wait** (Boolean) Wait till the cluster is ready.

### Read-Only

- **state** (Map of String) State of the cluster.

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

Optional:

- **create** (String)
- **id** (String) Unique identifier of the cluster.
- **state** (String) State of the cluster.


60 changes: 60 additions & 0 deletions docs/resources/ocm_identity_provider.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
page_title: "ocm_identity_provider Resource"
subcategory: ""
description: |-
Identity provider.
---

# ocm_identity_provider (Resource)

Identity provider.

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

### Required

- **cluster_id** (String) Identifier of the cluster.
- **name** (String) Name of the identity provider.

### Optional

- **htpasswd** (Attributes) Details of the 'htpasswd' identity provider. (see [below for nested schema](#nestedatt--htpasswd))
- **ldap** (Attributes) Details of the LDAP identity provider. (see [below for nested schema](#nestedatt--ldap))

### Read-Only

- **id** (String) Unique identifier of the identity provider.

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

Optional:

- **password** (String, Sensitive) User password.
- **username** (String) User name.


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

Optional:

- **attributes** (Attributes) (see [below for nested schema](#nestedatt--ldap--attributes))
- **bind_dn** (String)
- **bind_password** (String, Sensitive)
- **ca** (String)
- **insecure** (Boolean)
- **url** (String)

<a id="nestedatt--ldap--attributes"></a>
### Nested Schema for `ldap.attributes`

Optional:

- **email** (List of String)
- **id** (List of String) The ID of this resource.
- **name** (List of String)
- **preferred_username** (List of String)


0 comments on commit 7809df9

Please sign in to comment.