This PR supports the feature of resume the Flink statement with a different principal/compute_pool.
Namely when stopped parameter has change from true -> false, we can update the principal and/or compute_pool in place and avoid recreating the Flink statement resource.
Code changes:
Split the flinkStatementUpdate() into flinkStatementStop() and flinkStatementResume() due to different behaviors in the process of stop and resume.
Add custom diff function resourceFlinkStatementDiff() to remind and avoid users running into invalid scenarios when initiating stop or resume.
Update the Flink statement to remove RESUMING statement status.
:tada: All Contributor License Agreements have been signed. Ready to merge. Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.
Summary:
This PR supports the feature of resume the Flink statement with a different principal/compute_pool.
Namely when
stopped
parameter has change from true -> false, we can update theprincipal
and/orcompute_pool
in place and avoid recreating the Flink statement resource.Code changes:
flinkStatementUpdate()
intoflinkStatementStop()
andflinkStatementResume()
due to different behaviors in the process of stop and resume.resourceFlinkStatementDiff()
to remind and avoid users running into invalid scenarios when initiating stop or resume.RESUMING
statement status.Reference:
This PR also updates the Flink statement status type according to the latest DML flow here: https://confluentinc.atlassian.net/wiki/spaces/FLINK/pages/3420389383/Refine+the+Customer+Facing+Statement+Status#Finite-State-Machine-Definitions-and-Logic-for-Flink-in-Confluent-Cloud
The whole verification for Terraform is done and documented in the docs below.
Testing Done:
https://docs.google.com/document/d/1dutVZmbEwJBBqMzx57uCXqllV1SEr2vxnjUrtTPCwBk/edit?usp=sharing