Skip to content

bug: failure if AWS account alias isn't set #205

@cpboyd

Description

@cpboyd

Currently, the default is to tag with an AWS account alias, but this fails with an error if the account alias has not been set:

  │ Error: reading IAM Account Alias: empty result
  │ 
  │   with module.observe.module.config[0].data.aws_iam_account_alias.current[0],
  │   on .terraform/modules/observe/modules/config/alias.tf line 1, in data "aws_iam_account_alias" "current":
  │    1: data "aws_iam_account_alias" "current" {
  │ 

Suggestions:

  1. Use try() or some other method to gracefully handle if this is empty.
  2. Allow manual overrides (or custom tags), in case someone wants to make use of this tag without setting an alias within AWS.

Workaround:

  config = {
    tag_account_alias      = false
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions