Duplicate Output and Variable Detection
Closed this issue · 3 comments
aliwinter commented
Description
when initializing this module i get the following errors
Error: Duplicate output definition
│
│ on .terraform/modules/service_sagemaker.sagemaker.sagemaker/outputs.tf line 360:
│ 360: output "sagemaker_human_task_ui_arn" {
│
│ An output named "sagemaker_human_task_ui_arn" was already defined at .terraform/modules/service_sagemaker.sagemaker.sagemaker/outputs.tf:355,1-37. Output names must be unique within a module.
╵
╷
│ Error: Duplicate variable declaration
│
│ on .terraform/modules/service_sagemaker.sagemaker.sagemaker/variables.tf line 487:
│ 487: variable "sagemaker_device_fleet_name" {
│
│ A variable named "sagemaker_device_fleet_name" was already declared at .terraform/modules/service_sagemaker.sagemaker.sagemaker/variables.tf:454,1-39. Variable names must be unique within a module.
╵
╷
│ Error: Duplicate variable declaration
│
│ on .terraform/modules/service_sagemaker.sagemaker.sagemaker/variables.tf line 492:
│ 492: variable "sagemaker_device_fleet_role_arn" {
│
│ A variable named "sagemaker_device_fleet_role_arn" was already declared at .terraform/modules/service_sagemaker.sagemaker.sagemaker/variables.tf:459,1-43. Variable names must be unique within a module.
Proposed solution
- remove the duplicate variables
- also once you remove those duplicate variables you will need to also fix the
.terraform/modules/service_sagemaker.sagemaker.sagemaker/sagemaker_device.tf
file as it hasrole_arn
but isn't supposed to be there and also usesvar.enable
in thedevice_fleet_name
SebastianUA commented
Hi @aliwinter
I have fixed it. You can use the new tag with this fix. Thank you for your finds.
SebastianUA commented
The tag is the same: https://github.com/SebastianUA/terraform-aws-sagemaker/releases/tag/v2.0.0
aliwinter commented
Thank you 👍 !!!!