Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions modules/cloud_account/aws/0.1/facets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,17 @@ outputs:
role_arn: attributes.aws_iam_role
session_name: attributes.session_name
external_id: attributes.external_id
aws3:
source: hashicorp/aws3
version: "= 3.74.0"
attributes:
region: attributes.aws_region
skip_region_validation: true
attributes:
assume_role:
role_arn: attributes.aws_iam_role
session_name: attributes.session_name
external_id: attributes.external_id
Comment on lines +50 to +60
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# Read the full facets.yaml file to understand context
cat -n modules/cloud_account/aws/0.1/facets.yaml

Repository: Facets-cloud/facets-modules

Length of output: 2368


🏁 Script executed:

# Search for documentation about this framework or provider setup
find . -name "README*" -o -name "*facet*" -o -name "*.md" | head -20

Repository: Facets-cloud/facets-modules

Length of output: 783


🏁 Script executed:

# Search for references to hashicorp/aws3, aws4, aws5 in the codebase
rg "hashicorp/aws[345]" --type yaml --type json

Repository: Facets-cloud/facets-modules

Length of output: 289


🏁 Script executed:

# Check if there's any documentation or comments about this provider naming pattern
rg "aws3|aws4|aws5" -A 3 -B 3 --type yaml

Repository: Facets-cloud/facets-modules

Length of output: 1927


🏁 Script executed:

# Check README for information about provider configuration
head -100 README.md

Repository: Facets-cloud/facets-modules

Length of output: 149


🏁 Script executed:

# Look for documentation files
find . -name "*.md" -type f | xargs grep -l "provider\|aws3\|aws4\|aws5" 2>/dev/null | head -10

Repository: Facets-cloud/facets-modules

Length of output: 760


🏁 Script executed:

# Search for examples of how providers are used in other modules
find modules -name "facets.yaml" -type f | xargs grep -l "source: hashicorp" | head -10

Repository: Facets-cloud/facets-modules

Length of output: 198


🏁 Script executed:

# Check if there's any explanation in the PR template or contributing docs
cat .github/pull_request_template.md

Repository: Facets-cloud/facets-modules

Length of output: 1423


🏁 Script executed:

# Search for any configuration transformation or mapping of these providers
rg "aws3|aws4|aws5" -B 5 -A 5 --type yaml -l

Repository: Facets-cloud/facets-modules

Length of output: 112


🏁 Script executed:

# Check if there are similar patterns in the Azure or GCP cloud_account modules
cat modules/cloud_account/azure/0.1/facets.yaml | head -80

Repository: Facets-cloud/facets-modules

Length of output: 2000


🏁 Script executed:

# Search for any test files or examples that explain provider usage
find . -name "*test*" -o -name "*example*" | grep -i provider | head -10

Repository: Facets-cloud/facets-modules

Length of output: 53


🏁 Script executed:

# Look for any code that processes these facets.yaml files to understand transformation
find . -name "*.py" -o -name "*.js" -o -name "*.go" | head -20

Repository: Facets-cloud/facets-modules

Length of output: 491


🏁 Script executed:

# Check the validation script to understand how providers are processed
cat validate_yamls.py

Repository: Facets-cloud/facets-modules

Length of output: 951


🏁 Script executed:

# Look at the GCP cloud_account to see if it follows the same pattern
cat modules/cloud_account/gcp/0.1/facets.yaml

Repository: Facets-cloud/facets-modules

Length of output: 1085


🏁 Script executed:

# Check if there's documentation about custom provider sources in the Facets framework
find . -name "*.md" -exec grep -l "provider\|aws3\|aws4" {} \; 2>/dev/null

Repository: Facets-cloud/facets-modules

Length of output: 3752


🏁 Script executed:

# Search for any git history or comments about these custom providers
git log --oneline --all | head -30

Repository: Facets-cloud/facets-modules

Length of output: 1518


🏁 Script executed:

# Check if hashicorp/aws3 sources are mentioned in any config or documentation
rg "hashicorp/aws3|custom.*provider|provider.*source" --type md -A 2 -B 2

Repository: Facets-cloud/facets-modules

Length of output: 50383


Clarify the purpose and design rationale for the aws3 provider.

This is a Facets framework configuration, and the custom provider source naming (hashicorp/aws3, hashicorp/aws4, etc.) appears to be an intentional design pattern used consistently across AWS, Azure, and GCP cloud account modules. This won't fail Terraform validation as assumed in the original comment.

However, the addition of aws3 with version 3.74.0 duplicates the aws provider which also uses version 3.74.0 but with a different source. Clarify:

  • Why both aws and aws3 are needed if they target the same version
  • How these custom provider sources are resolved within the Facets framework
  • Whether aws3 should be positioned alongside other major version 3.x providers rather than after aws5
🤖 Prompt for AI Agents
In modules/cloud_account/aws/0.1/facets.yaml around lines 50–60, the custom
provider entry "aws3" duplicates the standard "aws" provider version 3.74.0 and
its intent/resolution within Facets is unclear; update this block to either (A)
remove the duplicate and use the existing aws provider if no distinct provider
instance is required, or (B) add a brief inline comment and module-level
documentation that explains why a separate "hashicorp/aws3" source is declared
(what difference it represents vs. "aws", how Facets resolves custom provider
source names to actual provider plugins, and why it must be named/positioned
here), and if this provider is meant to represent the 3.x line ensure it is
grouped with other 3.x provider declarations (not placed after aws5); also
confirm and document any required provider aliasing/requirements mapping in the
Facets provider resolution config so reviewers can see why both entries are
present.

sample:
version: "0.1"
flavor: aws
Expand Down