Skip to content
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

cloudflare: missing comments #4955

Merged
merged 2 commits into from
Dec 4, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions providers/cloudflare/resources/cloudflare.lr
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ private cloudflare.zone @defaults("name account.name") {
one() cloudflare.one
}

// Cloudflare account
private cloudflare.zone.account @defaults("name") {
// Account identifier
id string
Expand All @@ -65,7 +66,9 @@ private cloudflare.zone.account @defaults("name") {
email string
}

// Cloudflare DNS
private cloudflare.dns {
// List all DNS records
records() []cloudflare.dns.record
}

Expand All @@ -74,7 +77,7 @@ private cloudflare.dns.record @defaults("type content name") {
// Cloudflare internal ID
id string

// Record name
// Record name
name string
// Comment
comment string
Expand Down Expand Up @@ -248,6 +251,7 @@ private cloudflare.workers.worker @defaults("id") {
modifiedOn time
}

// Cloudflare Pages page
private cloudflare.workers.page @defaults("shortId") {
// Worker ID
id string
Expand All @@ -268,9 +272,12 @@ private cloudflare.workers.page @defaults("shortId") {
modifiedOn time
}

// Cloudflare One
private cloudflare.one {
apps() []cloudflare.one.app // Cloudflare Zero Trust applications
identityProviders() []cloudflare.one.idp // Identity providers
// Cloudflare Zero Trust applications
apps() []cloudflare.one.app
// Identity providers
identityProviders() []cloudflare.one.idp
}

// Cloudflare One application
Expand Down Expand Up @@ -310,6 +317,7 @@ private cloudflare.one.app @defaults("name id") {
updatedAt time
}

// CORS headers
private cloudflare.corsHeaders {
allowAllHeaders bool
allowAllMethods bool
Expand All @@ -323,6 +331,7 @@ private cloudflare.corsHeaders {
maxAge int // The maximum number of seconds the results of a preflight request can be cached.
}

// Cloudflare One identity provider
private cloudflare.one.idp @defaults("name") {
id string // UUID
name string // The name of the identity provider, shown to users on the login page.
Expand Down
7 changes: 6 additions & 1 deletion providers/cloudflare/resources/cloudflare.lr.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions providers/cloudflare/resources/r2.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ func (c *mqlCloudflareZone) r2() (*mqlCloudflareR2, error) {
return r2, nil
}

func (c *mqlCloudflareR2Bucket) id() (string, error) {
return c.GetName().Data, nil
}

func (c *mqlCloudflareR2) buckets() ([]any, error) {
conn := c.MqlRuntime.Connection.(*connection.CloudflareConnection)

Expand Down
Loading