-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Open
Labels
enhancementRequests to existing resources that expand the functionality or scope.Requests to existing resources that expand the functionality or scope.service/iamIssues and PRs that pertain to the iam service.Issues and PRs that pertain to the iam service.
Description
Terraform Core Version
1.1.5
AWS Provider Version
3.22.0
Affected Resource(s)
The aws_iam_account_alias data source, when operating in a brand new AWS account where the administrator has not set an IAM alias yet, returns an error: "no IAM account alias found."
Yet there is a default alias which matches the 12-digit account number of the AWS account.
Expected Behavior
Perhaps a reasonable alternative is to return the 12-digit account ID when an account alias does not exist?
Actual Behavior
Terraform plan fails.
Relevant Error/Panic Output Snippet
Error: no IAM account alias found
with module.bucket.data.aws_iam_account_alias.current,
on .terraform/modules/bucket/terraform-backend-bucket/data.tf line 1, in data "aws_iam_account_alias" "current":
1: data "aws_iam_account_alias" "current" {
Terraform Configuration Files
data "aws_iam_account_alias" "current" {}
Steps to Reproduce
run terraform plan in a new AWS account
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None
sierra-alpha, Roman-Clumio, gsc2001, iniinikoski, jose-pablo-camacho and 3 more
Metadata
Metadata
Assignees
Labels
enhancementRequests to existing resources that expand the functionality or scope.Requests to existing resources that expand the functionality or scope.service/iamIssues and PRs that pertain to the iam service.Issues and PRs that pertain to the iam service.