Onboarding Intake(1/3): Intake Runner#1086
Onboarding Intake(1/3): Intake Runner#1086devanshcache wants to merge 38 commits intostackitcloud:mainfrom
Conversation
89b2fc8 to
540b360
Compare
|
@yago-123 could you please resolve the comments you adressed already? I will only start with another review as soon as all open comments are resolved. |
|
And please check that failing CI pipeline. Maybe run a |
Yes! notice this is still in progress though |
9d5b54d to
3922287
Compare
…AndLogStateFields
|
This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it. |
| project_id = var.project_id | ||
| name = var.name | ||
| region = var.region | ||
| description = "An example runner for Intake" |
There was a problem hiding this comment.
Please use a variable here instead of hardcoding
| resource.TestCheckResourceAttr(intakeRunnerResource, "max_message_size_kib", testutil.ConvertConfigVariable(testIntakeRunnerConfigVarsMin["max_message_size_kib"])), | ||
| resource.TestCheckResourceAttr(intakeRunnerResource, "max_messages_per_hour", testutil.ConvertConfigVariable(testIntakeRunnerConfigVarsMin["max_messages_per_hour"])), | ||
| resource.TestCheckResourceAttrSet(intakeRunnerResource, "id"), | ||
| resource.TestCheckResourceAttr(intakeRunnerResource, "region", testutil.ConvertConfigVariable(testIntakeRunnerConfigVarsMax["region"])), |
There was a problem hiding this comment.
Please verify here that the description field is unset
| resource.TestCheckResourceAttrPair(intakeRunnerResource, "runner_id", "data.stackit_intake_runner.example", "runner_id"), | ||
| resource.TestCheckResourceAttrPair(intakeRunnerResource, "name", "data.stackit_intake_runner.example", "name"), | ||
| resource.TestCheckResourceAttrPair(intakeRunnerResource, "region", "data.stackit_intake_runner.example", "region"), | ||
| resource.TestCheckResourceAttrPair(intakeRunnerResource, "max_messages_per_hour", "data.stackit_intake_runner.example", "max_messages_per_hour"), |
| resource.TestCheckResourceAttr(intakeRunnerResource, "max_messages_per_hour", testutil.ConvertConfigVariable(testIntakeRunnerConfigVarsMin["max_messages_per_hour"])), | ||
| resource.TestCheckResourceAttr(intakeRunnerResource, "region", testutil.ConvertConfigVariable(testIntakeRunnerConfigVarsMax["region"])), | ||
| resource.TestCheckResourceAttrSet(intakeRunnerResource, "runner_id"), | ||
| resource.TestCheckResourceAttrSet(intakeRunnerResource, "id"), |
| resource.TestCheckResourceAttr(intakeRunnerResource, "max_message_size_kib", testutil.ConvertConfigVariable(testIntakeRunnerConfigVarsMin["max_message_size_kib"])), | ||
| resource.TestCheckResourceAttr(intakeRunnerResource, "max_messages_per_hour", testutil.ConvertConfigVariable(testIntakeRunnerConfigVarsMin["max_messages_per_hour"])), | ||
| resource.TestCheckResourceAttrSet(intakeRunnerResource, "id"), | ||
| resource.TestCheckResourceAttr(intakeRunnerResource, "region", testutil.ConvertConfigVariable(testIntakeRunnerConfigVarsMax["region"])), |
There was a problem hiding this comment.
| resource.TestCheckResourceAttr(intakeRunnerResource, "region", testutil.ConvertConfigVariable(testIntakeRunnerConfigVarsMax["region"])), | |
| resource.TestCheckResourceAttr(intakeRunnerResource, "region", testutil.Region), |
Don't use the max values in the min test please :)
| resource.TestCheckResourceAttr(intakeRunnerResource, "name", testutil.ConvertConfigVariable(testIntakeRunnerConfigVarsMinUpdated()["name"])), | ||
| resource.TestCheckResourceAttr(intakeRunnerResource, "max_message_size_kib", testutil.ConvertConfigVariable(testIntakeRunnerConfigVarsMin["max_message_size_kib"])), | ||
| resource.TestCheckResourceAttr(intakeRunnerResource, "max_messages_per_hour", testutil.ConvertConfigVariable(testIntakeRunnerConfigVarsMin["max_messages_per_hour"])), | ||
| resource.TestCheckResourceAttr(intakeRunnerResource, "region", testutil.ConvertConfigVariable(testIntakeRunnerConfigVarsMax["region"])), |
There was a problem hiding this comment.
| resource.TestCheckResourceAttr(intakeRunnerResource, "region", testutil.ConvertConfigVariable(testIntakeRunnerConfigVarsMax["region"])), | |
| resource.TestCheckResourceAttr(intakeRunnerResource, "region", testutil.Region), |
| Description: descriptions["region"], | ||
| PlanModifiers: []planmodifier.String{ | ||
| stringplanmodifier.RequiresReplace(), | ||
| }, |
There was a problem hiding this comment.
What about the uri and create_time fields? Could be included as computed fields. Same for the datasource.
There was a problem hiding this comment.
Don't forget to include them in your Acc tests.
You can also do it in a follow-up PR if you want, then we can merge this one first.
| @@ -0,0 +1,268 @@ | |||
| package intake_test | |||
There was a problem hiding this comment.
please name that file intake_acc_test.go to stick with our conventions
|
Also please rebase your branch, you have some conflicts here |
Description
This PR onboards the new STACKIT Intake (ticket) service into the Terraform provider.
Intake is composed of three components:
This PR contains the Intake Runners part only to make a quicker and less overwhelming review.
Checklist
make fmtexamples/directory)make generate-docs(will be checked by CI)make test(will be checked by CI)make lint(will be checked by CI)