Skip to content

Commit

Permalink
Merge pull request #93 from fortanix/shashi/DEVOPS-4964
Browse files Browse the repository at this point in the history
Minor doc updates
  • Loading branch information
ravigfortanix authored Jul 17, 2024
2 parents 0f06ed3 + c027e2a commit e767b33
Show file tree
Hide file tree
Showing 13 changed files with 44 additions and 112 deletions.
6 changes: 3 additions & 3 deletions docs/data-sources/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ data "dsm_app" "sample_app" {

### Required

- `app_id` (String) App id value
- `app_id` (String) App id value.

### Optional

- `new_credential` (Boolean) Set this if you want to rotate/regenerate the API key. The values can be set as True/False
- `new_credential` (Boolean) Set this if you want to rotate/regenerate the API key. The values can be set as true/false.

### Read-Only

- `credential` (String, Sensitive) The Fortanix DSM App API key
- `credential` (String, Sensitive) The Fortanix DSM App API key.
- `id` (String) The ID of this resource.
16 changes: 8 additions & 8 deletions docs/data-sources/aws_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@ data "dsm_aws_group" "sample_aws_group" {

### Required

- `name` (String) The AWS KMS group object name in Fortanix DSM
- `name` (String) The AWS KMS group object name in Fortanix DSM.

### Optional

- `access_key` (String) The Access Key ID used to communicate with AWS KMS
- `description` (String) The AWS KMS group object description
- `scan` (Boolean) Syncs keys from AWS KMS to the AWS KMS group in DSM. Value is either True/False
- `secret_key` (String, Sensitive) AWS KMS Secret key
- `access_key` (String) The Access Key ID used to communicate with AWS KMS.
- `description` (String) The AWS KMS group object description.
- `scan` (Boolean) Syncs keys from AWS KMS to the AWS KMS group in DSM. Value is either true/false.
- `secret_key` (String, Sensitive) AWS KMS Secret key.

### Read-Only

- `acct_id` (String) The Account ID from Fortanix DSM
- `acct_id` (String) The Account ID from Fortanix DSM.
- `creator` (Map of String) The creator of the security object from Fortanix DSM.
* `user`: If the security object was created by a user, the computed value will be the matching user id.
* `app`: If the security object was created by a app, the computed value will be the matching app id.
- `group_id` (String) The AWS KMS group object ID from Fortanix DSM
- `group_id` (String) The AWS KMS group object ID from Fortanix DSM.
- `id` (String) The ID of this resource.
- `region` (String) The AWS region mapped to the group from which keys are imported
- `region` (String) The AWS region mapped to the group from which keys are imported.
File renamed without changes.
14 changes: 7 additions & 7 deletions docs/data-sources/secret.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ data "dsm_secret" "sample_secret" {

### Required

- `name` (String) The secret security object name in Fortanix DSM
- `name` (String) The secret security object name in Fortanix DSM.

### Optional

- `export` (Boolean) Exports the secret based on the value shown. The value is either True/False
- `export` (Boolean) Exports the secret based on the value shown. The value is either true/false.

### Read-Only

- `acct_id` (String) The account ID from Fortanix DSM
- `acct_id` (String) The account ID from Fortanix DSM.
- `creator` (Map of String) The creator of the security object from Fortanix DSM.
* `user`: If the security object was created by a user, the computed value will be the matching user id.
* `app`: If the security object was created by a app, the computed value will be the matching app id.
- `description` (String) The Fortanix DSM security object description
- `description` (String) The Fortanix DSM security object description.
- `id` (String) The ID of this resource.
- `kid` (String) The unique ID of the secret from Fortanix DSM
- `pub_key` (String) Public key from DSM (If applicable)
- `value` (String, Sensitive) The (sensitive) value of the secret shown if exported in base64 format
- `kid` (String) The unique ID of the secret from Fortanix DSM.
- `pub_key` (String) Public key from DSM (If applicable).
- `value` (String, Sensitive) The (sensitive) value of the secret shown if exported in base64 format.
48 changes: 0 additions & 48 deletions docs/data-sources/sobject.md

This file was deleted.

8 changes: 4 additions & 4 deletions docs/data-sources/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "dsm_user Data Source - terraform-provider-dsm"
subcategory: ""
description: |-
Returns the DSM user ID from the cluster as a Data Source
Returns the DSM user ID from the cluster as a Data Source.
---

# dsm_user (Data Source)

Returns the DSM user ID from the cluster as a Data Source
Returns the DSM user ID from the cluster as a Data Source.

## Example Usage

Expand All @@ -23,9 +23,9 @@ data "dsm_user" "sample_users" {

### Required

- `user_email` (String) Email ID of the user
- `user_email` (String) Email ID of the user.

### Read-Only

- `id` (String) The ID of this resource.
- `user_id` (String) Unique ID to identify the user
- `user_id` (String) Unique ID to identify the user.
6 changes: 3 additions & 3 deletions dsm/data_source_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ func dataSourceApp() *schema.Resource {
Description: "Returns the Fortanix DSM app object from the cluster as a Data Source.",
Schema: map[string]*schema.Schema{
"app_id": {
Description: "App id value",
Description: "App id value.",
Type: schema.TypeString,
Required: true,
},
"credential": {
Description: "The Fortanix DSM App API key",
Description: "The Fortanix DSM App API key.",
Type: schema.TypeString,
Computed: true,
Sensitive: true,
},
"new_credential": {
Description: "Set this if you want to rotate/regenerate the API key. The values can be set as True/False",
Description: "Set this if you want to rotate/regenerate the API key. The values can be set as true/false.",
Type: schema.TypeBool,
Optional: true,
},
Expand Down
16 changes: 8 additions & 8 deletions dsm/data_source_aws_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ func dataSourceAWSGroup() *schema.Resource {
Description: "Returns the Fortanix DSM AWS KMS mapped group object from the cluster as a Data Source for AWS KMS.",
Schema: map[string]*schema.Schema{
"name": {
Description: "The AWS KMS group object name in Fortanix DSM",
Description: "The AWS KMS group object name in Fortanix DSM.",
Type: schema.TypeString,
Required: true,
},
"group_id": {
Description: "The AWS KMS group object ID from Fortanix DSM",
Description: "The AWS KMS group object ID from Fortanix DSM.",
Type: schema.TypeString,
Computed: true,
},
"acct_id": {
Description: "The Account ID from Fortanix DSM",
Description: "The Account ID from Fortanix DSM.",
Type: schema.TypeString,
Computed: true,
},
Expand All @@ -49,31 +49,31 @@ func dataSourceAWSGroup() *schema.Resource {
},
},
"region": {
Description: "The AWS region mapped to the group from which keys are imported",
Description: "The AWS region mapped to the group from which keys are imported.",
Type: schema.TypeString,
Computed: true,
},
"description": {
Description: "The AWS KMS group object description",
Description: "The AWS KMS group object description.",
Type: schema.TypeString,
Optional: true,
Default: "",
},
"access_key": {
Description: "The Access Key ID used to communicate with AWS KMS",
Description: "The Access Key ID used to communicate with AWS KMS.",
Type: schema.TypeString,
Optional: true,
Default: "na",
},
"secret_key": {
Description: "AWS KMS Secret key",
Description: "AWS KMS Secret key.",
Type: schema.TypeString,
Optional: true,
Default: "na",
Sensitive: true,
},
"scan": {
Description: "Syncs keys from AWS KMS to the AWS KMS group in DSM. Value is either True/False",
Description: "Syncs keys from AWS KMS to the AWS KMS group in DSM. Value is either true/false.",
Type: schema.TypeBool,
Optional: true,
Default: false,
Expand Down
14 changes: 7 additions & 7 deletions dsm/data_source_secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ func dataSourceSecret() *schema.Resource {
Description: "Returns the Fortanix DSM secret object from the cluster as a Data Source.",
Schema: map[string]*schema.Schema{
"name": {
Description: "The secret security object name in Fortanix DSM",
Description: "The secret security object name in Fortanix DSM.",
Type: schema.TypeString,
Required: true,
},
"kid": {
Description: "The unique ID of the secret from Fortanix DSM",
Description: "The unique ID of the secret from Fortanix DSM.",
Type: schema.TypeString,
Computed: true,
},
"pub_key": {
Description: "Public key from DSM (If applicable)",
Description: "Public key from DSM (If applicable).",
Type: schema.TypeString,
Computed: true,
},
"acct_id": {
Description: "The account ID from Fortanix DSM",
Description: "The account ID from Fortanix DSM.",
Type: schema.TypeString,
Computed: true,
},
Expand All @@ -52,18 +52,18 @@ func dataSourceSecret() *schema.Resource {
},
},
"description": {
Description: "The Fortanix DSM security object description",
Description: "The Fortanix DSM security object description.",
Type: schema.TypeString,
Computed: true,
},
"export": {
Description: "Exports the secret based on the value shown. The value is either True/False",
Description: "Exports the secret based on the value shown. The value is either true/false.",
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"value": {
Description: "The (sensitive) value of the secret shown if exported in base64 format",
Description: "The (sensitive) value of the secret shown if exported in base64 format.",
Type: schema.TypeString,
Computed: true,
Sensitive: true,
Expand Down
16 changes: 0 additions & 16 deletions dsm/data_source_sobject.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,58 +19,45 @@ import (
func dataSourceSobject() *schema.Resource {
return &schema.Resource{
ReadContext: dataSourceSobjectRead,
Description: "Returns the DSM security object from the cluster as a Data Source.",
Schema: map[string]*schema.Schema{
"name": {
Description: "Security object name",
Type: schema.TypeString,
Required: true,
},
"kid": {
Description: "Security object ID from DSM",
Type: schema.TypeString,
Computed: true,
},
"pub_key": {
Description: "Public key from DSM (If applicable)",
Type: schema.TypeString,
Computed: true,
},
"acct_id": {
Description: "Account ID from DSM",
Type: schema.TypeString,
Computed: true,
},
"creator": {
Description: "The creator of the security object from Fortanix DSM.\n" +
" * `user`: If the security object was created by a user, the computed value will be the matching user id.\n" +
" * `app`: If the security object was created by a app, the computed value will be the matching app id.",
Type: schema.TypeMap,
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"description": {
Description: "Security object description",
Type: schema.TypeString,
Computed: true,
},
"export": {
Description: "If set to true, value of the security object in base64 format will be stored in the data source",
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"value": {
Description: " Value of key material (only if export is allowed)",
Type: schema.TypeString,
Computed: true,
Sensitive: true,
},
"key_ops": {
Description: " The security object key permission from Fortanix DSM.\n" +
" * Default is to allow all permissions except EXPORT",
Type: schema.TypeList,
Optional: true,
Computed: true,
Expand All @@ -79,19 +66,16 @@ func dataSourceSobject() *schema.Resource {
},
},
"key_size": {
Description: "The size of the security object",
Type: schema.TypeInt,
Optional: true,
Computed: true,
},
"obj_type": {
Description: "Security object key type from DSM",
Type: schema.TypeString,
Optional: true,
Computed: true,
},
"enabled": {
Description: "Whether the security object will be Enabled or Disabled. The values are True/False",
Type: schema.TypeBool,
Optional: true,
Computed: true,
Expand Down
6 changes: 3 additions & 3 deletions dsm/data_source_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ import (
func dataSourceUser() *schema.Resource {
return &schema.Resource{
ReadContext: dataSourceUserRead,
Description: "Returns the DSM user ID from the cluster as a Data Source",
Description: "Returns the DSM user ID from the cluster as a Data Source.",
Schema: map[string]*schema.Schema{
"user_id": {
Description: "Unique ID to identify the user",
Description: "Unique ID to identify the user.",
Type: schema.TypeString,
Computed: true,
},
"user_email": {
Description: "Email ID of the user",
Description: "Email ID of the user.",
Type: schema.TypeString,
Required: true,
},
Expand Down
4 changes: 0 additions & 4 deletions examples/data-sources/dsm_sobject/data-source.tf

This file was deleted.

2 changes: 1 addition & 1 deletion examples/data-sources/dsm_user/data-source.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
data "dsm_user" "sample_users" {
user_email = "shashidhar.naraparaju@fortanix.com"
user_email = "user@test.com"
}

0 comments on commit e767b33

Please sign in to comment.