Skip to content

Onboarding Intake(2/3): Onboard intakes resource - #1689

Open
devanshcache wants to merge 5 commits into
stackitcloud:mainfrom
stackit-intake:onboard-intakes-resource
Open

Onboarding Intake(2/3): Onboard intakes resource#1689
devanshcache wants to merge 5 commits into
stackitcloud:mainfrom
stackit-intake:onboard-intakes-resource

Conversation

@devanshcache

Copy link
Copy Markdown
Contributor

Description

This PR onboards the new STACKIT Intake (ticket) service into the Terraform provider.

Intake is composed of three components:

Intake Runners: dedicated, isolated runtime data ingestion environment
Intakes: a specific data stream or topic within an Intake Runner
Intake Users: provides secure access credentials for your applications to connect to your Intake

This PR contains the Intakes part only to make a quicker and less overwhelming review.

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Examples were added / adjusted (see examples/ directory)
  • Docs are up-to-date: make generate-docs (will be checked by CI)
  • Unit tests got implemented or updated
  • Acceptance tests got implemented or updated (see e.g. here)
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

@devanshcache
devanshcache requested a review from a team as a code owner August 14, 2026 07:43
@cgoetz-inovex

Copy link
Copy Markdown
Contributor

Hi @devanshcache ,
thanks for your contribution, I've created an internal tracking issue for the review of your changes

@devanshcache

Copy link
Copy Markdown
Contributor Author

Hi @cgoetz-inovex, Thank you looking forward for your feedback :)

@github-actions

Copy link
Copy Markdown

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.

@github-actions github-actions Bot added the Stale PR is marked as stale due to inactivity. label Aug 25, 2026
labels = {
"env" = "development"
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add "import-by-string-id.tf" (import statement)


// Schema defines the schema for the data source
func (d *intakesDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {
descriptions := map[string]string{ //nolint:gosec // descriptions

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description can be shared between datasource and resource.

Optional: true,
Description: descriptions["region"],
},
"dremio_personal_access_token": schema.StringAttribute{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

access_token should not be stored in state.
Add write only here (see for example telemetrylink resource)

Description: descriptions["runner_id"],
Computed: true,
},
"name": schema.StringAttribute{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is "displayName" in the API, right?
If so this should be renamed to displayName to be consistent with the API docs.
Additionally a validator should be added.

"description": schema.StringAttribute{
Description: descriptions["description"],
Computed: true,
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deadLetterTopic and topic is missing?

maps.Copy(tempConfig, base)
tempConfig["intake_name"] = config.StringVariable(intakeNameMaxUpd)
tempConfig["description"] = config.StringVariable("Updated full intake description")
tempConfig["max_messages_per_hour"] = config.IntegerVariable(1100)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would add also update values for the catalog stuff here

}
}

func testIntakesConfigVarsMin() config.Variables {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the API docs only uri and warhouse of catalog is marked as required. So the dremio part could be removed here (auth not marked as required). API doc bug or intentionally?

},
"catalog_uri": schema.StringAttribute{
Description: descriptions["catalog_uri"],
Optional: true,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

marked as required in API docs

},
"catalog_warehouse": schema.StringAttribute{
Description: descriptions["catalog_warehouse"],
Optional: true,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

// getDremioPAT authenticates against Dremio UI API, enables PAT support key, resolves user UUID, and issues a PAT
func getDremioPAT(ctx context.Context, uiEndpoint, username, password string) (string, error) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function does not feel right.
Can you explain please why this is needed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

has internal tracking issue Stale PR is marked as stale due to inactivity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants