Skip to content

Commit

Permalink
feat(docs): Added documentation for cloud provisioning
Browse files Browse the repository at this point in the history
Added cloud_keystore_installation resource doc
Added cloud_provider data source doc
Added cloud_keystore data source doc

Added categories for the documentation
Removed unnecessary files and metadata from docs

Closes VC-32723
  • Loading branch information
rvelaVenafi committed Jun 11, 2024
1 parent 1c96bdc commit 2830d0e
Show file tree
Hide file tree
Showing 10 changed files with 132 additions and 34 deletions.
4 changes: 4 additions & 0 deletions website/allowed-subcategories.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

Certificate Issuance
Cloud Provisioning
Policy Management
40 changes: 40 additions & 0 deletions website/docs/d/venafi_cloud_keystore.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
subcategory: "Cloud Provisioning"
layout: "venafi"
page_title: "Venafi: venafi_cloud_keystore"
description: |-
Get information on a Venafi Control Plane (VCP) Cloud Keystore
---

# Data source: venafi_cloud_keystore

Use this data source to get the `ID` of a cloud keystore in Venafi Control Plane, referenced by its name and parent
cloud provider ID. You can use `venafi_cloud_provider` data source to obtain the ID of the parent cloud provider.

## Example Usage

```hcl
# Find a cloud keystore with a static cloud provider id
data "venafi_cloud_keystore" "ck_example_by_id" {
cloud_provider_id = "e48897d0-2762-11ef-8fab-79ac590dd358"
name = "Cloud Keystore Example"
}
# Find a cloud keystore by using venafi_cloud_provider data source as input
data "venafi_cloud_keystore" "ck_example" {
cloud_provider_id = data.venafi_cloud_provider.cp_example.id
name = "Cloud Keystore example"
}
```

## Argument Reference

* `cloud_provider_id` - (Required, string) ID of the cloud provider whom the cloud keystore to look up belongs to.
* `name` - (Required, string) Name of the cloud keystore to look up.

## Attribute Reference

This data source exports the following attributes in addition to the arguments above:

* `machine_identities_count` - Number of machine identities provisioned to the cloud keystore.
* `type` - The cloud keystore type. Either `ACM`, `AKV` or `GCM`.
33 changes: 33 additions & 0 deletions website/docs/d/venafi_cloud_provider.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
subcategory: "Cloud Provisioning"
layout: "venafi"
page_title: "Venafi: venafi_cloud_provider"
description: |-
Get information on a Venafi Control Plane (VCP) Cloud Provider
---

# Data Source: venafi_cloud_provider

Use this data source to get the `ID` of a cloud provider in Venafi Control Plane, referenced by its name.

## Example Usage

```hcl
# Find a cloud provider
data "venafi_cloud_provider" "cp_example" {
name = "Cloud Provider Example"
}
```

## Argument Reference

* `name` - (Required, string) Name of the Cloud Provider to look up.

## Attribute Reference

This data source exports the following attributes in addition to the arguments above:

* `keystores_count` - Number of Cloud Keystores configured with the Cloud Provider
* `status` - The status of the Cloud Provider. Either `VALIDATED` or `NOT_VALIDATED`.
* `status_details` - The details of the Cloud Provider status. If the status is `VALIDATED`, this value will be empty.
* `type` - The Cloud Provider type. Either `AWS`, `AZURE` or `GCP`
6 changes: 3 additions & 3 deletions website/docs/index.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ layout: "venafi"
page_title: "Provider: Venafi"
sidebar_current: "docs-venafi-index"
description: |-
Venafi is the enterprise platform for Machine Identity Protection. The Venafi provider streamlines the process of
acquiring SSL/TLS keys and certificates from Venafi services giving assurance of compliance with Information Security
policies. It provides resources that allow private keys and certificates to be created as part of a Terraform deployment.
Venafi is the enterprise platform for Machine Identity Protection. The Venafi provider streamlines the process of
acquiring SSL/TLS keys and certificates from Venafi services giving assurance of compliance with Information Security
policies. It provides resources that allow private keys and certificates to be created as part of a Terraform deployment.
---

# Venafi Provider
Expand Down
4 changes: 2 additions & 2 deletions website/docs/r/venafi_certificate.html.markdown
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
subcategory: "Certificate Issuance"
layout: "venafi"
page_title: "Venafi: venafi_certificate"
sidebar_current: "docs-venafi-resource-venafi-certificate"
description: |-
Provides access to TLS key and certificate data in Venafi. This can be used to define a Venafi certificate.
Provides access to TLS key and certificate data in Venafi. This can be used to define a Venafi certificate.
---

# venafi_certificate
Expand Down
47 changes: 47 additions & 0 deletions website/docs/r/venafi_cloud_keystore_installation.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
subcategory: "Cloud Provisioning"
layout: "venafi"
page_title: "Venafi: venafi_cloud_keystore_installation"
description: |-
Provisions a Venafi managed certificate to an existing Cloud Keystore in Venafi Control Plane (VCP)
---

# Resource: venafi_cloud_keystore_installation

## Example Usage

```hcl
# Provision a certificate to cloud keystore with static values
resource "venafi_cloud_keystore_installation" "ck_installation_example_by_id" {
cloud_keystore_id = "e48897d0-2762-11ef-198k-79ac590dd358"
certificate_id = "1877af16-2762-11ef-8fab-cc123456ff7"
cloud_certificate_name = "com-terraform-example-com"
}
# Provision a certificate to cloud keystore
resource "venafi_cloud_keystore_installation" "ck_installation_example" {
cloud_keystore_id = data.venafi_cloud_keystore.ck_example.id
certificate_id = venafi_certificate.certificate_example.certificate_id
cloud_certificate_name = venafi_certificate.certificate_example.common_name
}
```

## Argument Reference

* `cloud_keystore_id` - (Required, string) ID of the cloud keystore where the certificate will be provisioned.
* `certificate_id` - (Required, string) ID of the certificate to be provisioned to the given `keystore_id`.
* `cloud_certificate_name` - (Optional, string) Name for the provisioned certificate in the keystore. If the name already exists, the provisioning will replace the previous certificate with the one from `certificate_id`. Only valid for AKV and GCM keystores.
* `arn` - (Optional, string) ARN of the AWS certificate. Use it to provision the VCP certificate to an existing ACM certificate, instead of a new one. Only valid for ACM keystores.

## Attribute Reference

* `cloud_certificate_id` -
* `cloud_certificate_metadata` -

## Import

Using `terraform import`, import a Machine Identity from Venafi Control Plane using their ID. For example:

```console
terraform import venafi_cloud_keystore_installation.example 2155bd32-2234-22ac-7cfd-ff1198845aa2
```
2 changes: 1 addition & 1 deletion website/docs/r/venafi_policy.html.markdown
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
subcategory: "Policy Management"
layout: "venafi"
page_title: "Venafi: venafi_policy"
sidebar_current: "docs-venafi-resource-venafi-policy"
description: |-
Provides access to read and write certificate policy in Venafi. This can be used to define a new policy.
---
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/venafi_ssh_certificate.html.markdown
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
subcategory: "Certificate Issuance"
layout: "venafi"
page_title: "Venafi: venafi_ssh_certificate"
sidebar_current: "docs-venafi-resource-venafi-ssh-certificate"
description: |-
Provides access to request and retrieve SSH certificates from Venafi Trust Protection Platform.
---
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/venafi_ssh_config.html.markdown
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
subcategory: "Certificate Issuance"
layout: "venafi"
page_title: "Venafi: venafi_ssh_config"
sidebar_current: "docs-venafi-resource-venafi-ssh-config"
description: |-
Provides access to retrieve configuration from SSH certificate issuance template from Venafi Trust Protection Platform.
---
Expand Down
26 changes: 0 additions & 26 deletions website/venafi.erb

This file was deleted.

0 comments on commit 2830d0e

Please sign in to comment.