-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Conversation
@hakbailey - Can you also review this PR for me? I can't seem to add you to the reviewers list! Thanks! |
There was a problem hiding this 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
There was a problem hiding this 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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, thank you!
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^^^Agree!
Co-authored-by: Aoki <[email protected]>
|
||
.. |Credentials - create terraform credential| image:: ../common/images/credentials-create-terraform-credential.png | ||
:alt: Credentials - create Terraform backend configuration credential form | ||
|
There was a problem hiding this comment.
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.
There was a problem hiding this 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!
Co-authored-by: Helen Bailey <[email protected]>
There was a problem hiding this 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!
There was a problem hiding this 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.
* 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
* 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]>
* 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]>
SUMMARY
Addresses new terraform feature. Resolves: #14960
See credential PR - #14828
Inventory source PR - #14840
Rendered content can be previewed here:
Credential types: https://ansible--15004.org.readthedocs.build/projects/awx/en/15004/userguide/credentials.html#terraform-backend-configuration
Inventory source: https://ansible--15004.org.readthedocs.build/projects/awx/en/15004/userguide/inventories.html#terraform-state
ISSUE TYPE
COMPONENT NAME
AWX VERSION
latest