Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

support for cloudflare_logpush_job kind attribute #52

Merged
merged 1 commit into from
Jun 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions internal/provider/resource_cloudflare_logpush_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func getJobFromResource(d *schema.ResourceData) (cloudflare.LogpushJob, *AccessI
job := cloudflare.LogpushJob{
ID: id,
Enabled: d.Get("enabled").(bool),
Kind: d.Get("kind").(string),
Name: d.Get("name").(string),
Dataset: d.Get("dataset").(string),
LogpullOptions: d.Get("logpull_options").(string),
Expand Down Expand Up @@ -130,6 +131,7 @@ func resourceCloudflareLogpushJobRead(ctx context.Context, d *schema.ResourceDat
}

d.Set("name", job.Name)
d.Set("kind", job.Kind)
d.Set("enabled", job.Enabled)
d.Set("logpull_options", job.LogpullOptions)
d.Set("destination_conf", job.DestinationConf)
Expand Down
6 changes: 6 additions & 0 deletions internal/provider/schema_cloudflare_logpush_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ func resourceCloudflareLogpushJobSchema() map[string]*schema.Schema {
Optional: true,
Description: "Whether to enable the job.",
},
"kind": {
Type: schema.TypeString,
Optional: true,
// TODO: update list of valid values when known.
Description: "The kind of logpush job to create. Valid values are \"edge\" or \"\".",
},
"name": {
Type: schema.TypeString,
Optional: true,
Expand Down