Skip to content

Commit

Permalink
fix(modular): make account alias optional in onboarding module (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
jose-pablo-camacho authored Oct 10, 2024
1 parent 14e5159 commit 8cca4ab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 1 addition & 2 deletions modules/onboarding/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,12 @@ EOF
}

data "aws_caller_identity" "current" {}
data "aws_iam_account_alias" "current" {}

resource "sysdig_secure_cloud_auth_account" "cloud_auth_account" {
enabled = true
provider_id = data.aws_caller_identity.current.account_id
provider_type = "PROVIDER_AWS"
provider_alias = data.aws_iam_account_alias.current.account_alias
provider_alias = var.account_alias

component {
type = "COMPONENT_TRUSTED_ROLE"
Expand Down
7 changes: 7 additions & 0 deletions modules/onboarding/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,10 @@ variable "failure_tolerance_percentage" {
description = "The percentage of accounts, per Region, for which stack operations can fail before AWS CloudFormation stops the operation in that Region"
default = 90
}

variable "account_alias" {
type = string
description = "Account Alias"
default = ""
}

0 comments on commit 8cca4ab

Please sign in to comment.