-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix optional parameters in resource repository local account (#123)
- Loading branch information
Showing
4 changed files
with
140 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
# Repository Local Account Resource | ||
|
||
Provides a resource to handle repository local accounts. | ||
|
||
## Example Usage | ||
|
||
### AWS IAM | ||
|
||
```hcl | ||
resource "cyral_repository_local_account" "some_resource_name" { | ||
repository_id = cyral_repository.SOME_REPOSITORY_RESOURCE_NAME.id | ||
aws_iam { | ||
database_name = "" | ||
local_account = "" | ||
role_arn = "" | ||
} | ||
} | ||
``` | ||
|
||
### AWS Secrets Manager | ||
|
||
```hcl | ||
resource "cyral_repository_local_account" "some_resource_name" { | ||
repository_id = cyral_repository.SOME_REPOSITORY_RESOURCE_NAME.id | ||
aws_secrets_manager { | ||
database_name = "" | ||
local_account = "" | ||
secret_arn = "" | ||
} | ||
} | ||
``` | ||
|
||
### Cyral Storage | ||
|
||
```hcl | ||
resource "cyral_repository_local_account" "some_resource_name" { | ||
repository_id = cyral_repository.SOME_REPOSITORY_RESOURCE_NAME.id | ||
cyral_storage { | ||
database_name = "" | ||
local_account = "" | ||
password = "" | ||
} | ||
} | ||
``` | ||
|
||
### Hashicorp Vault | ||
|
||
```hcl | ||
resource "cyral_repository_local_account" "some_resource_name" { | ||
repository_id = cyral_repository.SOME_REPOSITORY_RESOURCE_NAME.id | ||
hashicorp_vault { | ||
database_name = "" | ||
local_account = "" | ||
path = "" | ||
} | ||
} | ||
``` | ||
|
||
### Environment variable | ||
|
||
```hcl | ||
resource "cyral_repository_local_account" "some_resource_name" { | ||
repository_id = cyral_repository.SOME_REPOSITORY_RESOURCE_NAME.id | ||
environment_variable { | ||
local_account = "" | ||
variable_name = "" | ||
} | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
* `repository_id` - (Required) ID of the repository that will be used by the local account. | ||
* `aws_iam` - (Optional) Credential option to set the local account from AWS IAM. | ||
* `aws_secrets_manager` - (Optional) Credential option to set the local account from AWS Secrets Manager. | ||
* `cyral_storage` - (Optional) Credential option to set the local account from Cyral Storage. | ||
* `hashicorp_vault` - (Optional) Credential option to set the local account from Hashicorp Vault. | ||
|
||
The `aws_iam` object supports the following arguments: | ||
|
||
* `database_name` - (Optional) Database name that the local account corresponds to. | ||
* `local_account` - (Required) Local account name. | ||
* `role_arn` - (Required) AWS IAM role ARN. | ||
|
||
The `aws_secrets_manager` object supports the following arguments: | ||
|
||
* `database_name` - (Optional) Database name that the local account corresponds to. | ||
* `local_account` - (Required) Local account name. | ||
* `secret_arn` - (Required) ARN of the AWS Secret Manager that stores the credential. | ||
|
||
The `cyral_storage` object supports the following arguments: | ||
|
||
* `database_name` - (Optional) Database name that the local account corresponds to. | ||
* `local_account` - (Required) Local account name. | ||
* `password` - (Required) Local account password. | ||
|
||
The `hashicorp_vault` object supports the following arguments: | ||
|
||
* `database_name` - (Optional) Database name that the local account corresponds to. | ||
* `local_account` - (Required) Local account name. | ||
* `path` - (Required) Hashicorp Vault path. | ||
|
||
The `environment_variable` object supports the following arguments: | ||
|
||
* `database_name` - (Optional) Database name that the local account corresponds to. | ||
* `local_account` - (Required) Local account name. | ||
* `environment_name` - (Required) Name of the environment variable that will store credentials. | ||
|
||
## Attribute Reference | ||
|
||
* `id` - The ID of this resource. |