Closed milldr closed 2 years ago
@mcalhoun was able to resolve this issue as not a bug. The awsutils
provider needs to have proper credentials given to it in the same way as a typical aws
provider.
here is an example provider configuration:
provider "awsutils" {
region = var.region
profile = module.iam_roles.profiles_enabled ? coalesce(var.import_profile_name, module.iam_roles.terraform_profile_name) : null
dynamic "assume_role" {
for_each = module.iam_roles.profiles_enabled ? [] : ["role"]
content {
role_arn = coalesce(var.import_role_arn, module.iam_roles.terraform_role_arn)
}
}
}
module "iam_roles" {
source = "../account-map/modules/iam-roles"
context = module.this.context
}
variable "import_profile_name" {
type = string
default = null
description = "AWS Profile name to use when importing a resource"
}
variable "import_role_arn" {
type = string
default = null
description = "IAM Role ARN to use when importing a resource"
}
Found a bug? Maybe our Slack Community can help.
Describe the Bug
awsutils_guardduty_organization_settings
fails when attempting to deploy to the security account after settingvar.guardduty_admin_delegated=true
Expected Behavior
awsutils
should deployawsutils_guardduty_organization_settings
successfullySteps to Reproduce
Steps to reproduce the behavior:
compliance
andcompliance-root
modulescompliance
tosecurity
withvar.guardduty_admin_delegated=false
andsecurityhub_admin_delegated=false
compliance-root
toroot
compliance
tosecurity
withvar.guardduty_admin_delegated=true
andsecurityhub_admin_delegated=true
Logs
Environment:
Additional Context