Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(SPM-1798): discuss OCI authentication in documentation #11

Merged
merged 2 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

A Terraform Module to create a user and group to be used to integrate and OCI
cloud account with Lacework.

<!-- BEGIN_TF_DOCS -->
## Requirements

Expand Down Expand Up @@ -46,7 +47,7 @@ No modules.
| <a name="input_email"></a> [email](#input\_email) | Email associated with the created user | `string` | n/a | yes |
| <a name="input_freeform_tags"></a> [freeform\_tags](#input\_freeform\_tags) | freeform tags for the resources created for Lacework integration | `map(any)` | `{}` | no |
| <a name="input_group_name"></a> [group\_name](#input\_group\_name) | Name of the identity group for the Lacework user (overrides name\_prefix) | `string` | `""` | no |
| <a name="input_name_prefix"></a> [name\_prefix](#input\_name\_prefix) | Names for the created resources will be ${name\_prefix}\_{user,group} | `string` | `"lacework_security_integration"` | no |
| <a name="input_name_prefix"></a> [name\_prefix](#input\_name\_prefix) | Names for the created resources will be ${name\_prefix}\_{user,group} | `string` | `"lw_"` | no |
| <a name="input_tenancy_id"></a> [tenancy\_id](#input\_tenancy\_id) | OCID of the OCI tenancy to be integrated with Lacework | `string` | n/a | yes |
| <a name="input_user_name"></a> [user\_name](#input\_user\_name) | Name of the IAM user used for Lacework integration (overrides name\_prefix) | `string` | `""` | no |

Expand All @@ -61,4 +62,4 @@ No modules.
| <a name="output_user_ocid"></a> [user\_ocid](#output\_user\_ocid) | OCID of the user created for the Lacework integration |
| <a name="output_user_private_key_pem"></a> [user\_private\_key\_pem](#output\_user\_private\_key\_pem) | The private key of the API key of the user created for integration |
| <a name="output_user_public_key_fingerprint"></a> [user\_public\_key\_fingerprint](#output\_user\_public\_key\_fingerprint) | The public key fingerprint of the API key created for integration |
<!-- END_TF_DOCS -->
<!-- END_TF_DOCS -->
8 changes: 5 additions & 3 deletions examples/custom-iam-user/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# Skip creation of resources

This example shows how to use the Terraform module with custom names for
resources.
resources. The following example will use the OCI credentials in your
~/.oci/config file. See the OCI Terraform Provider documentation [on
authentication](https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/terraformproviderconfiguration.htm) for alternative approaches of providing
credentials to the OCI provider.

```hcl
module "lacework_iam_user" {
source = "../.."
source = "lacework/iam-user/oci"
tenancy_id = var.tenancy_ocid
email = "example@example.com"
name_prefix = "lacework_test"
}

variable "tenancy_ocid" {
Expand Down
3 changes: 2 additions & 1 deletion examples/custom-iam-user/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ module "lacework_iam_user" {
source = "../.."
tenancy_id = var.tenancy_ocid
email = "example@example.com"
name_prefix = "lacework_test"
user_name = "custom_user_name"
group_name = "custom_group_name"
}

variable "tenancy_ocid" {
Expand Down
10 changes: 7 additions & 3 deletions examples/default-iam-user/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
# Default Example

This example creates an IAM user, group, and policy needed for Lacework integration/
This example creates an OCI user, group, and policy needed for Lacework
integration. The following example will use the OCI credentials in your
~/.oci/config file. See the OCI Terraform Provider documentation [on
authentication](https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/terraformproviderconfiguration.htm) for alternative approaches of providing
credentials to the OCI provider.

```hcl
module "lacework_iam_user" {
source = "../.."
source = "lacework/iam-user/oci"
kolbeinn marked this conversation as resolved.
Show resolved Hide resolved
tenancy_id = var.tenancy_id
email = "email@example.com"
}

variable "tenancy_id" {
type = string
description = "OCID of the tenancy to be integrated with Lacework"
}

```
7 changes: 6 additions & 1 deletion examples/skip-creation-iam-user/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# Skip creation of resources

This example shows how to run the Terraform module without creating resources.
The following example will use the OCI credentials in your
~/.oci/config file. See the OCI Terraform Provider documentation [on
authentication](https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/terraformproviderconfiguration.htm) for alternative approaches of providing
credentials to the OCI provider.

```hcl
module "lacework_iam_user" {
source = "../.."
source = "lacework/iam-user/oci"
tenancy_id = var.tenancy_id
create = false
email = "email@example.com"
}

variable "tenancy_id" {
Expand Down
2 changes: 0 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,3 @@ resource "oci_identity_api_key" "lacework_api_key" {
user_id = oci_identity_user.lacework_user[count.index].id
key_value = tls_private_key.rsa_key[count.index].public_key_pem
}

# Use public_key_fingerprint_md5, private_key_pem, public_key_pem
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ variable "freeform_tags" {

variable "name_prefix" {
type = string
default = "lacework_security_integration"
default = "lw_"
description = "Names for the created resources will be $${name_prefix}_{user,group}"
}

Expand Down