Closed cilindrox closed 3 years ago
@mumoshu this is a super rough approach - lmk if it makes sense. Happy to discuss alternatives.
Was thinking perhaps the timeout can be configured as an instance property of the m *Manager
on the function - so I'd read that from m.getTimeout
or something.
@cilindrox Hey! Thanks a lot for your effort here.
I fully agree this should be configurable.
Ideally, this should be configurable at the provider level https://github.com/mumoshu/terraform-provider-eksctl/blob/1ae92fefbf8b6a5199bd78e5fe1bba49c5053bac/pkg/provider/configure.go#L18 and/or the resource-level https://github.com/mumoshu/terraform-provider-eksctl/blob/1ae92fefbf8b6a5199bd78e5fe1bba49c5053bac/pkg/resource/cluster/resource.go#L21
Implementation-wise, passing it from some ResourceData into m *Manager
as you pointed out sounds good.
Would you mind giving it a try?
Thanks for the comments @mumoshu - will take a stab at it
edit: this being a global var - might be a bit more useful to initially roll with it at as a provider-level flag?
edit: this being a global var - might be a bit more useful to initially roll with it at as a provider-level flag?
@cilindrox What do you mean by this?
ProviderInstance
isn't a global var. It's passed as meta interface{}
in the Terraform's Resource
functions that can be seen in e.g. https://github.com/mumoshu/terraform-provider-eksctl/blob/1ae92fefbf8b6a5199bd78e5fe1bba49c5053bac/pkg/resource/cluster/resource.go#L41
You can define provider-level attributes in https://github.com/mumoshu/terraform-provider-eksctl/blob/1ae92fefbf8b6a5199bd78e5fe1bba49c5053bac/pkg/provider/provider.go#L19 and key-values for those prover-level attributes are available via d *schema.ResourceData
in the providerConfigure
function https://github.com/mumoshu/terraform-provider-eksctl/blob/1ae92fefbf8b6a5199bd78e5fe1bba49c5053bac/pkg/provider/configure.go#L14
Closing this, since it seems the timeout was due to a bug with eksctl upstream. Upgrading to v0.52.0+ did the trick.
Might revisit this later, but don't want to abandon an open PR.
eksctl defaults to a 25 minute hard timeout for operations, which prevents things like nodegroup creation from completing gracefully.