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

Commit

Permalink
support for cloudflare_logpush_job kind attribute (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbfaulkner committed Jun 28, 2022
1 parent 37b83ad commit ae98d4a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/provider/resource_cloudflare_logpush_job.go
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
Expand Up @@ -27,6 +27,12 @@ func resourceCloudflareLogpushJobSchema() map[string]*schema.Schema {
Optional: true,
Description: "Whether to enable the job.",
},
"kind": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validation.StringInSlice([]string{"edge", "instant-logs", ""}, false),
Description: `The kind of logpush job to create. Valid values are "edge", "instant-logs", or "".`,
},
"name": {
Type: schema.TypeString,
Optional: true,
Expand Down

0 comments on commit ae98d4a

Please sign in to comment.