fix: remove the definition of AWS provider in the module
There is a weird error in the failed job here below. I have tested working by removing the aws provider definition in this success job here.
The reason is that the terraform in the aws-dedicated-org repo is required_version = "~> 1.3" , therefore it has such limitation.
Note: I did not observe this error in terraform v1.4 like these ones we set up as ordinary aws security repos that use this module. Maybe also because we did not use the count, for_each or depends_on?
A module intended to be called by one or more other modules must not contain any
providerblocks. A module containing its own provider configurations is not compatible with thefor_each,count, anddepends_onarguments that were introduced in Terraform v0.13. For more information, see Legacy Shared Modules with Provider Configurations.
https://developer.hashicorp.com/terraform/language/modules/develop/providers
- wiz_outpost_connector_role in .terraform/modules/wiz_outpost_connector_role/terraform/aws-wiz-role
╷
│ Error: Module is incompatible with count, for_each, and depends_on
│
│ on main.tf line 138, in module "wiz_outpost_connector_role":
│ 138: count = var.enable_wiz_outpost_connector ? 1 : 0
│
│ The module at module.wiz_outpost_connector_role is a legacy module which
│ contains its own local provider configurations, and so calls to it may not
│ use the count, for_each, or depends_on arguments.
│
│ If you also control the module
│ "git::https://gitlab.com/gitlab-com/gl-security/security-operations/infrastructure-security-public/aws-account-management//terraform/aws-wiz-role?ref=f86d90820f7ffe372192d4b5dd6e823c4b11845c",
│ consider updating this module to instead expect provider configurations to
│ be passed by its caller.
╵
╷
│ Error: Module is incompatible with count, for_each, and depends_on
│
│ on main.tf line 138, in module "wiz_outpost_connector_role":
│ 138: count = var.enable_wiz_outpost_connector ? 1 : 0
│
│ The module at module.wiz_outpost_connector_role is a legacy module which
│ contains its own local provider configurations, and so calls to it may not
│ use the count, for_each, or depends_on arguments.
│
│ If you also control the module
│ "git::https://gitlab.com/gitlab-com/gl-security/security-operations/infrastructure-security-public/aws-account-management//terraform/aws-wiz-role?ref=f86d90820f7ffe372192d4b5dd6e823c4b11845c",
│ consider updating this module to instead expect provider configurations to
│ be passed by its caller.
╵