Skip to content

Commit 7c23625

Browse files
Backport 2.5 4242 (ansible#4344)
* AAP-52745: Updating TOC and title of Getting started with Terraform and AAP guide (ansible#4214) * Updating TOC and title of Getting started with Terraform and AAP guide * Added more attributes * Remove attributes from docinfo file * Add Red Hat to name * Update master.adoc to remove attributes (ansible#4269) Testing build issue w/ attributes in the title. Can retest attributes in the title when building on stage. * AAP-50389-FIXED: Add Vault content to HashiCorp Getting Started guide (ansible#4242) * Add Vault content for HashiCorp Getting Started * Add simlink * Edits to Vault and terraform content * Fixed code styles * Edits based on feedback * More edits and refinement * Edits based on peer review * Fixed links * Added attributes * More edits for accessibility --------- Co-authored-by: ccopelloRH <[email protected]>
1 parent 10fafb1 commit 7c23625

20 files changed

+504
-9
lines changed

downstream/assemblies/terraform-aap/assembly-terraform-introduction.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[id="terraform-introduction"]
44

5-
= About this Integration
5+
= About the {Terraform} integration
66

77
The integration of {PlatformName} and {TerraformEnterpriseFullName} offers a powerful solution for streamlining IT operations. This collaboration combines the strengths of both tools to save time and effort while reducing risks in complex IT environments.
88

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
3+
[id="terraform-product"]
4+
5+
= {Terraform} integration
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
3+
[id="vault-authenticating"]
4+
5+
= Authenticating to `hashicorp.vault`
6+
7+
After you install or migrate to the `hashicorp.vault` collection, authentication is configured in the {PlatformNameShort} user interface:
8+
9+
* An administrator creates a custom credential type to authenticate to {Vault}.
10+
11+
* Users create credentials (based on the credential type) to use with job templates in {PlatformNameShort}.
12+
13+
14+
15+
include::vault-aap/con-vault-authentication-architecture.adoc[leveloffset=+1]
16+
include::vault-aap/proc-vault-creating-credential-type.adoc[leveloffset=+1]
17+
include::vault-aap/proc-vault-creating-custom-credential.adoc[leveloffset=+1]
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
3+
[id="vault-introduction"]
4+
5+
= About the {Vault} integration
6+
7+
The integration of {PlatformName} and {VaultFullName} provides fully automated Key/Value V2 (KV2) secret lifecycle management for {Vault}.
8+
9+
include::vault-aap/con-vault-intro.adoc[leveloffset=+1]
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
3+
[id="vault-migrating-from-community-hashi-vault"]
4+
5+
= Migrating from `community.hashi_vault`
6+
7+
If you are using the `community.hashi_vault` collection, you can migrate your existing playbooks to the `hashicorp.vault` collection.
8+
9+
There are two modules for `hashicorp.vault` that you must configure:
10+
11+
* **`hashicorp.vault.kv2_secret`** - A unified module for CRUD operations on KV2 secrets.
12+
* **`hashicorp.vault.kv2_secret_get lookup`** - A lookup plugin for reading KV2 secrets.
13+
14+
In the following procedures, you will replicate the parameters from the `community.hashi_vault` modules to these required `hashicorp.vault` modules.
15+
16+
include::vault-aap/proc-vault-configuring-kv2-secret.adoc[leveloffset=+1]
17+
include::vault-aap/proc-vault-configuring-kv2-secret-get-lookup.adoc[leveloffset=+1]
18+
include::vault-aap/con-vault-migration-examples-secret-module.adoc[leveloffset=+1]
19+
include::vault-aap/con-vault-migration-examples-secret-get-lookup.adoc[leveloffset=+1]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
3+
[id="vault-product"]
4+
5+
= {Vault} integration
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../modules/vault-aap

downstream/attributes/attributes.adoc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,22 @@
128128
:Runner: Ansible Runner
129129
:Role: Role ARG Spec
130130

131+
//HashiCorp
132+
:HashiCorpFullName: IBM HashiCorp
133+
:HashiCorpShortName: HashiCorp
134+
131135
// Terraform
132136
:TerraformEnterpriseFullName: IBM HashiCorp Terraform
133137
:TerraformEnterpriseShortName: Terraform Enterprise
134138
:TerraformCloudShortName: HCP Terraform
135139
:TerraformCommunityName: Terraform Community Edition
136140
:Terraform: Terraform
137141

142+
// Vault
143+
:VaultFullName: IBM HashiCorp Vault
144+
:VaultCommunityName: Vault Community Edition
145+
:Vault: Vault
146+
138147
// Ansible development tools
139148
:ToolsName: Ansible development tools
140149
:AAPRHDH: Ansible plug-ins for Red Hat Developer Hub
@@ -509,3 +518,13 @@
509518
:TitleSaaSAWSGuide: Red Hat Ansible Automation Platform Service on AWS
510519
:URLSaaSAWSGuide: {BaseURL}/ansible_on_clouds/2.x_latest/html/red_hat_ansible_automation_platform_service_on_aws
511520
:LinkSaaSAWSGuide: link:{URLSaaSAWSGuide}[{TitleSaaSAWSGuide}]
521+
//
522+
// titles/automation-dashboard
523+
:TitleAutomationDashboard: Using Automation Dashboard
524+
:URLAutomationDashboard: {BaseURL}/red_hat_ansible_automation_platform/{PlatformVers}/html/using_automation_dashboard
525+
:LinkAutomationDashboard: {URLAutomationDashboard}[{TitleAutomationDashboard}]
526+
//
527+
// titles/terraform (Hashicorp)
528+
:TitleHashiGuide: Getting Started with HashiCorp and Ansible Automation Platform Guide
529+
:URLHashiGuide: {BaseURL}/red_hat_ansible_automation_platform/{PlatformVers}/html/getting_started_with_hashicorp_and_ansible_automation_platform
530+
:LinkHashiGuide: link:{URLHashiGuide}[{TitleHashiGuide}]
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
:_mod-docs-content-type: CONCEPT
2+
3+
[id="vault-auth-architecture"]
4+
5+
= Authentication architecture
6+
7+
[role="_abstract"]
8+
9+
The `hashicorp.vault` collection manages authentication through environment variables and client initialization. This approach enhances security by preventing sensitive credentials from being passed directly as module parameters within playbook tasks. Instead, `hashicorp.vault` injects credentials into job templates with environment variables, so you get simpler, cleaner task definitions while ensuring that authentication details remain secure.
10+
11+
The following authentication types are supported:
12+
13+
* **appRole authentication:** Use either one of the following methods when using appRole authentication:
14+
15+
** Set the `VAULT_APPROLE_ROLE_ID` and `VAULT_APPROLE_SECRET_ID` environment variables. When you use environment variables, you must also create a custom credential type and credentials that will be passed to the job template.
16+
17+
** Directly pass the `role_id` and `secret_id` parameters to the tasks, for example:
18+
+
19+
----
20+
- name: Create a secret with AppRole authentication
21+
hashicorp.vault.kv2_secret:
22+
url: https://vault.example.com:8200
23+
auth_method: approle
24+
role_id: "{{ vault_role_id }}"
25+
secret_id: "{{ vault_secret_id }}"
26+
path: myapp/config
27+
data:
28+
api_key: secret-api-key
29+
----
30+
31+
* **Token authentication:** Set the `VAULT_TOKEN` environment variable.
32+
+
33+
Optionally, you can configure parameters for the token. If parameters are not provided, then the module uses environment variables.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
:_mod-docs-content-type: CONCEPT
2+
3+
[id="vault-intro"]
4+
5+
= Introduction
6+
7+
[role="_abstract"]
8+
9+
{Vault} lets you centrally store and manage secrets securely. The {PlatformNameShort} certified `hashicorp.vault` collection provides fully automated Key/Value V2 (KV2) secret lifecycle management for {Vault}. You can create, update, and delete secrets through playbooks.
10+
11+
* **Existing `community.hashi_vault` users:** The `hashicorp.vault` solution is intended to replace unsupported `community.hashi_vault` collection. Use the migration path to keep your existing playbooks. For more information about migrating, see link:{URLHashiGuide}/vault-migrating-from-community-hashi-vault[Migrating from `community.hashi_vault`].
12+
13+
* **New {Vault} users:** The `hashicorp.vault` collection is included in the supported execution environment from {HubName}.
14+
15+
[NOTE]
16+
====
17+
Although the `hashicorp.vault` and `hashi.terraform` collections work independently of each other and are designed for different tasks, you can use them together in advanced workflows.
18+
====

0 commit comments

Comments
 (0)