Open JasonCubic opened 1 month ago
Voting for Prioritization
Volunteering to Work on This Issue
this is the resource where I set the timeouts:
resource "aws_networkmanager_core_network" "core_network" {
description = "Cloud WAN ${var.base_policy_region_name} core network"
global_network_id = aws_networkmanager_global_network.global_network.id
base_policy_document = data.aws_networkmanager_core_network_policy_document.base_policy.json
create_base_policy = true
tags = {
Name = var.cwan_core_network_name
}
timeouts {
create = "30m"
update = "30m"
delete = "30m"
}
}
this is the resource that reports as failing in the error message:
resource "aws_networkmanager_core_network_policy_attachment" "policy_attachment" {
core_network_id = var.core_network_id
policy_document = data.aws_networkmanager_core_network_policy_document.cwan_policy.json
timeouts {
update = "30m"
}
}
Terraform Core Version
1.9.3
AWS Provider Version
5.61.0
Affected Resource(s)
aws_networkmanager_core_network_policy_attachment
Expected Behavior
timeout value of 30m set on aws_networkmanager_core_network be respected. When I try to attach a network policy the terraform crashes.
Workaround is to wait and run the terraform again.
Actual Behavior
Instead the timeout value falls back to 5m and my policy fails to attach. 5m might no longer be reasonable since AWS has added network configuration groups to the core network.
Possibly because of this line? https://github.com/hashicorp/terraform-provider-aws/blob/v5.61.0/internal/service/networkmanager/core_network.go#L40
Relevant Error/Panic Output Snippet
Terraform Configuration Files
I'm sorry, but I am unable to share this network policy document. As this issue can be resolved by making the timeout value configurable, I hope it is not needed.
https://github.com/hashicorp/terraform-provider-aws/blob/v5.61.0/internal/service/networkmanager/core_network.go#L40
Steps to Reproduce
Create a reasonably complicated core network policy and try to attach it in the same terraform apply. I have ~100 lines of policy with various segments, segment_actions, and attachment policies.
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None