-
Notifications
You must be signed in to change notification settings - Fork 10
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
Update resources state handling #2
Comments
@Mongey is the KSQL cm-update-confluent still the branch for the terraformer plugin? |
@louich it should be on master now (but I will need to check quickly). Are you running into issues? Haven't been able to read the full issue yet (sorry, busy day!) |
It's not issues related to this one but I was only wondering what were your plans going forward knowing that the terraform plugin would beneficiate from I have issues with the I can open PRs for |
Goals
create
function to return theread
functionread
function to alter the resource stateDESCRIBE
infosTerraform plugins basics
create
function:d.SetId("[ID]")
to indicate the resource was successfully created.destroy
function:d.SetId("")
to indicate that the resource was sucessfully deleted, but is not necessary since any non-error return value assumes the resource was deleted successfully.read
function:Proposed changes
Update resources
create
function to return theread
functionAs stated in the Terraform doc:
Example from Terraform on table implementation:
Suppress diffs for resource name case sensitivity
The resource
name
should be case insensitive asSQL
language does not take capitalization into account and theKSQL
server stores the value uppercased. No differences should therefore be seen between capitalization.Update
read
function to alter the resource stateAll the schema fields should be updated from the upstream configuration for sync
purposes.
Update the state with the
DESCRIBE
infosIf the schema gets more complex it could be interesting to parse the
DESCRIBE
query content in order to resolve the resource infos.KSQL
DESCRIBE
Query:
Result:
Resource state
Not all of the payload from the above is required and relevant regarding the the resource's state considering the actual schema and could be similar to:
It is to note that the
query
would only be present on aCREATE AS SELECT
query type.The text was updated successfully, but these errors were encountered: