Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Configurable timeout for resources #11

Closed
lechnerc77 opened this issue May 8, 2023 · 12 comments · Fixed by #401
Closed

[FEATURE] Configurable timeout for resources #11

lechnerc77 opened this issue May 8, 2023 · 12 comments · Fixed by #401
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request relevant-for-ga GA relevant issue

Comments

@lechnerc77
Copy link
Member

After phase 1 the Timeouts in the Terraform provider resources are hard coded. These timeouts should be made configurable.
This also comprises a discussion around SLAs.

@lechnerc77 lechnerc77 added documentation Improvements or additions to documentation enhancement New feature or request labels May 8, 2023
@lechnerc77 lechnerc77 added this to the Phase 2 milestone May 8, 2023
@lechnerc77 lechnerc77 changed the title Configurable timeout for resource creation Configurable timeout for resources May 8, 2023
@lechnerc77 lechnerc77 removed this from the Phase 2 milestone Jun 27, 2023
@lechnerc77
Copy link
Member Author

Essential for Kyma Environment

@lechnerc77
Copy link
Member Author

Resources that need to be targeted for configurable timeouts (resource + command that needs to be enhanced)

Resource CREATE UPDATE DELETE
resource_directory
resource_subaccount_entitlement
resource_subaccount_environment_instance
resource_subaccount_service_binding n/a
resource_subaccount_service_instance
resource_subaccount_subscription n/a
resource_subaccount

Depends on #293 to have polling implemented consistently

@lechnerc77 lechnerc77 changed the title Configurable timeout for resources [FEATURE] Configurable timeout for resources Jul 25, 2023
@lechnerc77
Copy link
Member Author

Additional remark: As we can only specify timeouts but not the Delay or MinTimeOut w must calculate these values based on the configurable timeout value

@lechnerc77
Copy link
Member Author

Work started in branch feat-configurable-timeouts, namely:

  • enhancement of schema and create for resource environment_instance with timeout
  • addition of helper method to calculate polling interval etc. based on timeout

@aydin-ozcan
Copy link

Hi @lechnerc77 ,
Will the timeouts going to be effective both ways ?
On destruction of kyma , I get the timeout again .

btp_subaccount_environment_instance.kyma: Still destroying... [id=B63CBFF5-4970-4C97-8186-DA21FDA2DF2A, 10m0s elapsed]

│ Error: API Error Deleting Resource Environment Instance (Subaccount)

│ timeout while waiting for state to become 'DELETED, DELETION_FAILED' (last state: 'DELETING', timeout: 10m0s)

@v0lkc v0lkc self-assigned this Aug 7, 2023
@v0lkc
Copy link
Member

v0lkc commented Aug 7, 2023

Hi @aydin-ozcan,

yes this will have impact on all operations (create, delete, ...).

Best,
Chris

@lechnerc77
Copy link
Member Author

@aydin-ozcan - FYI: This feature will take a bit more time than expected. In the meantime we changed the timeout for environment instances and services instances from 10 to 60 minutes. The change is available in the new release 0.3.0-beta1 (https://registry.terraform.io/providers/SAP/btp/0.3.0-beta1).

@aydin-ozcan
Copy link

Thank you @lechnerc77 , this will be suffice for the moment to continue working with the provider .

@lechnerc77
Copy link
Member Author

Remark for development: currently data sources and resources might reuse the same internal data structure. This needs to be refactored as timeouts are only needed in resources.

@lechnerc77
Copy link
Member Author

Breaking the customizing down to the two main resources that potentially cause issues:

Resource CREATE UPDATE DELETE
resource_subaccount_environment_instance
resource_subaccount_service_instance

@lechnerc77 lechnerc77 added the relevant-for-ga GA relevant issue label Aug 28, 2023
@lechnerc77
Copy link
Member Author

lechnerc77 commented Aug 31, 2023

Rebased branch https://github.com/SAP/terraform-provider-btp/tree/feat-configurable-timeouts and added types for data sources of entitlement and service instance without timeout in schema

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request relevant-for-ga GA relevant issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants