Skip to content

Conversation

@jonquilwilliams
Copy link
Contributor

@jonquilwilliams jonquilwilliams commented Nov 11, 2025

@jonquilwilliams jonquilwilliams added documentation Improvements or additions to documentation Ready for technical review Content is ready for technical reviews 2.5 Content applies to AAP 2.5 Delay backport Content can't be backported to a release branch yet 2.6 Content applies for 2.6 labels Nov 11, 2025
Copy link

@dleehr dleehr left a comment

Choose a reason for hiding this comment

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

Minor suggestion around best practices for credentials needed for configuration.

host = "https://AAP_HOST"
username = "ansible"
password = "test123!"
token = "my-aap-token" # Also supports AAP_TOKEN environment variable
Copy link

Choose a reason for hiding this comment

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

I believe this example comes from our registry docs https://registry.terraform.io/providers/ansible/aap/latest/docs#example-usage, and have been thinking about we demonstrate best practices around tokens/passwords.

As a best practice we should not encourage putting a token (or password - anything secret) directly into a file like this since these files get committed to version control and shared. Putting secrets in them is just asking for trouble. We should make sure and that users are aware of that, and recommend using the AAP_TOKEN environment variable instead of putting a credential directly in the file.

The AWS provider has a pretty good warning that calls this out, so I suggest we include something like that in our docs (and what we put on the registry). From https://registry.terraform.io/providers/hashicorp/aws/latest/docs#provider-configuration:

Warning:
Hard-coded credentials are not recommended in any Terraform configuration and risks secret leakage should this file ever be committed to a public version control system.

Suggested change
token = "my-aap-token" # Also supports AAP_TOKEN environment variable
token = "my-aap-token" # Do not record credentials directly in Terraform configuration. Provide your token via the AAP_TOKEN environment variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.5 Content applies to AAP 2.5 2.6 Content applies for 2.6 Delay backport Content can't be backported to a release branch yet documentation Improvements or additions to documentation Ready for technical review Content is ready for technical reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants