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! |
lucasaoki
left a comment
There was a problem hiding this comment.
just a nit. but looks good to me
hakbailey
left a comment
There was a problem hiding this comment.
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.
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.
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.
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.
@hakbailey - do you know where the other documentation lives? Can you drop the links here?
There was a problem hiding this comment.
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.
Co-authored-by: Aoki <lucasaoki@users.noreply.github.com>
|
|
||
| .. |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.
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.
hakbailey
left a comment
There was a problem hiding this comment.
One small suggestion but otherwise this looks good!
Co-authored-by: Helen Bailey <hakbailey@gmail.com>
gravesm
left a comment
There was a problem hiding this comment.
This looks great! Thanks!
lucasaoki
left a comment
There was a problem hiding this comment.
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 <lucasaoki@users.noreply.github.com> * Revised per review feedback. * Update docs/docsite/rst/userguide/inventories.rst Co-authored-by: Helen Bailey <hakbailey@gmail.com> --------- Co-authored-by: Aoki <lucasaoki@users.noreply.github.com> Co-authored-by: Helen Bailey <hakbailey@gmail.com>
* 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 <lucasaoki@users.noreply.github.com> * Revised per review feedback. * Update docs/docsite/rst/userguide/inventories.rst Co-authored-by: Helen Bailey <hakbailey@gmail.com> --------- Co-authored-by: Aoki <lucasaoki@users.noreply.github.com> Co-authored-by: Helen Bailey <hakbailey@gmail.com>
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