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

Added docs for terraform credential/inventory source #15004

Merged
merged 9 commits into from
Apr 5, 2024

Conversation

tvo318
Copy link
Member

@tvo318 tvo318 commented Mar 15, 2024

SUMMARY

Addresses new terraform feature. Resolves: #14960
See credential PR - #14828
Inventory source PR - #14840

Rendered content can be previewed here:

ISSUE TYPE
  • New or Enhanced Feature
COMPONENT NAME
  • Docs
AWX VERSION

latest

@tvo318
Copy link
Member Author

tvo318 commented Mar 15, 2024

@hakbailey - Can you also review this PR for me? I can't seem to add you to the reviewers list! Thanks!

Copy link
Contributor

@lucasaoki lucasaoki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a nit. but looks good to me

docs/docsite/rst/userguide/inventories.rst Outdated Show resolved Hide resolved
Copy link
Collaborator

@hakbailey hakbailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a couple of suggestions inline, and I also think we may want to edit the images slightly: for the images that include the Execution Environment field (inventories-create-source-terraform-example.png and job-template-terraform-inv-source-example.png), we probably want to have a Terraform EE in that field because the AWX EE will not include a Terraform binary and so can't be used for this.

---
backend_type: s3

5. Enter an |ee| in the **Execution Environment** field that contains a Terraform binary. This is required for the inventory plugin to run the Terraform commands that read inventory data from the Terraform state file.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we want to link here to information on how to create a working EE with a Terraform binary. I'm moving the demo EE config from my personal repo to an Ansible repo and will add a link here when that's ready.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thank you!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can link to the README here now! https://github.com/ansible-cloud/terraform_ee

.. image:: ../common/images/inventories-create-source-terraform-example.png
:width: 1400px

6. To add hosts for AWS EC2, GCE, and Azure instances:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I totally get why this step was added but I think it's a bit confusing, as it doesn't cover all of what needs to happen in that job template to deploy those resources via Terraform. I wonder if it might be better to just say here that the Terraform state file in the backend must contain state for resources already deployed to EC2, GCE, or Azure. And then we can point to other documentation on how to do that. @gravesm any thoughts?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hakbailey - do you know where the other documentation lives? Can you drop the links here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My inclination would be to say something like "Refer to the AWS, GCE, or Azure Terraform providers to provision instances." If we want to link to the documentation for those providers we can, but I don't think we should maintain docs on how to use them.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^^^Agree!


.. |Credentials - create terraform credential| image:: ../common/images/credentials-create-terraform-credential.png
:alt: Credentials - create Terraform backend configuration credential form

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized we should add to this section information on how to use the credential in job templates: it stores the file path to the backend configuration in an env variable TF_BACKEND_CONFIG_FILE that is made available to any job with the credential attached.

Copy link
Collaborator

@hakbailey hakbailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small suggestion but otherwise this looks good!

docs/docsite/rst/userguide/inventories.rst Outdated Show resolved Hide resolved
Copy link
Member

@gravesm gravesm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Thanks!

Copy link
Contributor

@lucasaoki lucasaoki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! generated the docs and read through.

EMcWhinn added a commit to EMcWhinn/aap-docs that referenced this pull request Apr 4, 2024
@tvo318 tvo318 merged commit f1d9966 into ansible:devel Apr 5, 2024
21 checks passed
@tvo318 tvo318 deleted the terraform branch April 5, 2024 15:57
EMcWhinn added a commit to EMcWhinn/aap-docs that referenced this pull request May 3, 2024
ianf77 pushed a commit to ansible/aap-docs that referenced this pull request May 9, 2024
* Adding sections for new terraform config

Create product docs for terraform-provider-aap

https://issues.redhat.com/browse/ACA-1187

Affects `controller-user-guide`

* Second commit

* Peer review edits

* Edits as per Helen's review and TVo's PR:
ansible/awx#15004

* Fifth commit: Adding Terraform provider docs link
djyasin pushed a commit to djyasin/awx that referenced this pull request Sep 16, 2024
* Added docs for terraform credential/inventory source

* Updated screen captures for inventories and source to match wfjt example

* Added docs for terraform credential/inventory source

* Updated screen captures for inventories and source to match wfjt example

* Update docs/docsite/rst/userguide/inventories.rst

Co-authored-by: Aoki <[email protected]>

* Revised per review feedback.

* Update docs/docsite/rst/userguide/inventories.rst

Co-authored-by: Helen Bailey <[email protected]>

---------

Co-authored-by: Aoki <[email protected]>
Co-authored-by: Helen Bailey <[email protected]>
djyasin pushed a commit to djyasin/awx that referenced this pull request Nov 11, 2024
* Added docs for terraform credential/inventory source

* Updated screen captures for inventories and source to match wfjt example

* Added docs for terraform credential/inventory source

* Updated screen captures for inventories and source to match wfjt example

* Update docs/docsite/rst/userguide/inventories.rst

Co-authored-by: Aoki <[email protected]>

* Revised per review feedback.

* Update docs/docsite/rst/userguide/inventories.rst

Co-authored-by: Helen Bailey <[email protected]>

---------

Co-authored-by: Aoki <[email protected]>
Co-authored-by: Helen Bailey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DOCS] Add terraform inventory source to Inventories chapter of Userguide
5 participants