Skip to content

Commit

Permalink
Add comments (#338)
Browse files Browse the repository at this point in the history
Closes #323
  • Loading branch information
andrzejressel authored Aug 24, 2024
1 parent 0893a76 commit c7072df
Show file tree
Hide file tree
Showing 491 changed files with 28,747 additions and 42 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ jobs:
run: just test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: git add . && git diff
- run: git diff --cached
- name: Ensure no files have changed
run: git add . && git diff --quiet && git diff --cached --quiet

Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions providers/pulumi_wasm_provider_cloudflare_rust/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
use pulumi_wasm_rust::Output;
use pulumi_wasm_wit::client_bindings::component::pulumi_wasm::output_interface::Output as WitOutput;
#[allow(clippy::doc_lazy_continuation, clippy::tabs_in_doc_comments)]
mod types;
pub use types::*;
#[allow(clippy::doc_lazy_continuation, clippy::tabs_in_doc_comments)]
mod resource;
pub use resource::*;

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,17 +1,197 @@
//! Cloudflare Access can replace traditional SSH key models with
//! short-lived certificates issued to your users based on the token
//! generated by their Access login.
//!
//! > It's required that an `account_id` or `zone_id` is provided and in
//! most cases using either is fine. However, if you're using a scoped
//! access token, you must provide the argument that matches the token's
//! scope. For example, an access token that is scoped to the "example.com"
//! zone needs to use the `zone_id` argument.
//!
//! ## Example Usage
//!
//! <!--Start PulumiCodeChooser -->
//! ### Typescript
//! ```typescript
//! import * as pulumi from "@pulumi/pulumi";
//! import * as cloudflare from "@pulumi/cloudflare";
//!
//! // account level
//! const example = new cloudflare.AccessCaCertificate("example", {
//! accountId: "f037e56e89293a057740de681ac9abbe",
//! applicationId: "6cd6cea3-3ef2-4542-9aea-85a0bbcd5414",
//! });
//! // zone level
//! const anotherExample = new cloudflare.AccessCaCertificate("anotherExample", {
//! applicationId: "fe2be0ff-7f13-4350-8c8e-a9b9795fe3c2",
//! zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
//! });
//! ```
//! ### Python
//! ```python
//! import pulumi
//! import pulumi_cloudflare as cloudflare
//!
//! # account level
//! example = cloudflare.AccessCaCertificate("example",
//! account_id="f037e56e89293a057740de681ac9abbe",
//! application_id="6cd6cea3-3ef2-4542-9aea-85a0bbcd5414")
//! # zone level
//! another_example = cloudflare.AccessCaCertificate("anotherExample",
//! application_id="fe2be0ff-7f13-4350-8c8e-a9b9795fe3c2",
//! zone_id="0da42c8d2132a9ddaf714f9e7c920711")
//! ```
//! ### C#
//! ```csharp
//! using System.Collections.Generic;
//! using System.Linq;
//! using Pulumi;
//! using Cloudflare = Pulumi.Cloudflare;
//!
//! return await Deployment.RunAsync(() =>
//! {
//! // account level
//! var example = new Cloudflare.AccessCaCertificate("example", new()
//! {
//! AccountId = "f037e56e89293a057740de681ac9abbe",
//! ApplicationId = "6cd6cea3-3ef2-4542-9aea-85a0bbcd5414",
//! });
//!
//! // zone level
//! var anotherExample = new Cloudflare.AccessCaCertificate("anotherExample", new()
//! {
//! ApplicationId = "fe2be0ff-7f13-4350-8c8e-a9b9795fe3c2",
//! ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
//! });
//!
//! });
//! ```
//! ### Go
//! ```go
//! package main
//!
//! import (
//! "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
//! "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//! )
//!
//! func main() {
//! pulumi.Run(func(ctx *pulumi.Context) error {
//! // account level
//! _, err := cloudflare.NewAccessCaCertificate(ctx, "example", &cloudflare.AccessCaCertificateArgs{
//! AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
//! ApplicationId: pulumi.String("6cd6cea3-3ef2-4542-9aea-85a0bbcd5414"),
//! })
//! if err != nil {
//! return err
//! }
//! // zone level
//! _, err = cloudflare.NewAccessCaCertificate(ctx, "anotherExample", &cloudflare.AccessCaCertificateArgs{
//! ApplicationId: pulumi.String("fe2be0ff-7f13-4350-8c8e-a9b9795fe3c2"),
//! ZoneId: pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
//! })
//! if err != nil {
//! return err
//! }
//! return nil
//! })
//! }
//! ```
//! ### Java
//! ```java
//! package generated_program;
//!
//! import com.pulumi.Context;
//! import com.pulumi.Pulumi;
//! import com.pulumi.core.Output;
//! import com.pulumi.cloudflare.AccessCaCertificate;
//! import com.pulumi.cloudflare.AccessCaCertificateArgs;
//! import java.util.List;
//! import java.util.ArrayList;
//! import java.util.Map;
//! import java.io.File;
//! import java.nio.file.Files;
//! import java.nio.file.Paths;
//!
//! public class App {
//! public static void main(String[] args) {
//! Pulumi.run(App::stack);
//! }
//!
//! public static void stack(Context ctx) {
//! // account level
//! var example = new AccessCaCertificate("example", AccessCaCertificateArgs.builder()
//! .accountId("f037e56e89293a057740de681ac9abbe")
//! .applicationId("6cd6cea3-3ef2-4542-9aea-85a0bbcd5414")
//! .build());
//!
//! // zone level
//! var anotherExample = new AccessCaCertificate("anotherExample", AccessCaCertificateArgs.builder()
//! .applicationId("fe2be0ff-7f13-4350-8c8e-a9b9795fe3c2")
//! .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
//! .build());
//!
//! }
//! }
//! ```
//! ### YAML
//! ```yaml
//! resources:
//! # account level
//! example:
//! type: cloudflare:AccessCaCertificate
//! properties:
//! accountId: f037e56e89293a057740de681ac9abbe
//! applicationId: 6cd6cea3-3ef2-4542-9aea-85a0bbcd5414
//! # zone level
//! anotherExample:
//! type: cloudflare:AccessCaCertificate
//! properties:
//! applicationId: fe2be0ff-7f13-4350-8c8e-a9b9795fe3c2
//! zoneId: 0da42c8d2132a9ddaf714f9e7c920711
//! ```
//! <!--End PulumiCodeChooser -->
//!
//! ## Import
//!
//! Account level CA certificate import.
//!
//! ```sh
//! $ pulumi import cloudflare:index/accessCaCertificate:AccessCaCertificate example account/<account_id>/<application_id>
//! ```
//!
//! Zone level CA certificate import.
//!
//! ```sh
//! $ pulumi import cloudflare:index/accessCaCertificate:AccessCaCertificate example account/<zone_id>/<application_id>
//! ```
//!
pub struct AccessCaCertificateArgs {
/// The account identifier to target for the resource. Conflicts with `zone_id`.
pub account_id: pulumi_wasm_rust::Output<Option<String>>,
/// The Access Application ID to associate with the CA certificate.
pub application_id: pulumi_wasm_rust::Output<String>,
/// The zone identifier to target for the resource. Conflicts with `account_id`.
pub zone_id: pulumi_wasm_rust::Output<Option<String>>,
}

pub struct AccessCaCertificateResult {
/// The account identifier to target for the resource. Conflicts with `zone_id`.
pub account_id: pulumi_wasm_rust::Output<String>,
/// The Access Application ID to associate with the CA certificate.
pub application_id: pulumi_wasm_rust::Output<String>,
/// Application Audience (AUD) Tag of the CA certificate.
pub aud: pulumi_wasm_rust::Output<String>,
/// Cryptographic public key of the generated CA certificate.
pub public_key: pulumi_wasm_rust::Output<String>,
/// The zone identifier to target for the resource. Conflicts with `account_id`.
pub zone_id: pulumi_wasm_rust::Output<String>,
}

///
/// Registers a new resource with the given unique name and arguments
///
pub fn create(name: &str, args: AccessCaCertificateArgs) -> AccessCaCertificateResult {
let result = crate::bindings::pulumi::cloudflare::access_ca_certificate::invoke(
name,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,153 @@
//! Provides a resource to customize the pages your end users will see
//! when trying to reach applications behind Cloudflare Access.
//!
//! ## Example Usage
//!
//! <!--Start PulumiCodeChooser -->
//! ### Typescript
//! ```typescript
//! import * as pulumi from "@pulumi/pulumi";
//! import * as cloudflare from "@pulumi/cloudflare";
//!
//! const example = new cloudflare.AccessCustomPage("example", {
//! customHtml: "<html><body><h1>Forbidden</h1></body></html>",
//! name: "example",
//! type: "forbidden",
//! zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
//! });
//! ```
//! ### Python
//! ```python
//! import pulumi
//! import pulumi_cloudflare as cloudflare
//!
//! example = cloudflare.AccessCustomPage("example",
//! custom_html="<html><body><h1>Forbidden</h1></body></html>",
//! name="example",
//! type="forbidden",
//! zone_id="0da42c8d2132a9ddaf714f9e7c920711")
//! ```
//! ### C#
//! ```csharp
//! using System.Collections.Generic;
//! using System.Linq;
//! using Pulumi;
//! using Cloudflare = Pulumi.Cloudflare;
//!
//! return await Deployment.RunAsync(() =>
//! {
//! var example = new Cloudflare.AccessCustomPage("example", new()
//! {
//! CustomHtml = "<html><body><h1>Forbidden</h1></body></html>",
//! Name = "example",
//! Type = "forbidden",
//! ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
//! });
//!
//! });
//! ```
//! ### Go
//! ```go
//! package main
//!
//! import (
//! "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
//! "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//! )
//!
//! func main() {
//! pulumi.Run(func(ctx *pulumi.Context) error {
//! _, err := cloudflare.NewAccessCustomPage(ctx, "example", &cloudflare.AccessCustomPageArgs{
//! CustomHtml: pulumi.String("<html><body><h1>Forbidden</h1></body></html>"),
//! Name: pulumi.String("example"),
//! Type: pulumi.String("forbidden"),
//! ZoneId: pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
//! })
//! if err != nil {
//! return err
//! }
//! return nil
//! })
//! }
//! ```
//! ### Java
//! ```java
//! package generated_program;
//!
//! import com.pulumi.Context;
//! import com.pulumi.Pulumi;
//! import com.pulumi.core.Output;
//! import com.pulumi.cloudflare.AccessCustomPage;
//! import com.pulumi.cloudflare.AccessCustomPageArgs;
//! import java.util.List;
//! import java.util.ArrayList;
//! import java.util.Map;
//! import java.io.File;
//! import java.nio.file.Files;
//! import java.nio.file.Paths;
//!
//! public class App {
//! public static void main(String[] args) {
//! Pulumi.run(App::stack);
//! }
//!
//! public static void stack(Context ctx) {
//! var example = new AccessCustomPage("example", AccessCustomPageArgs.builder()
//! .customHtml("<html><body><h1>Forbidden</h1></body></html>")
//! .name("example")
//! .type("forbidden")
//! .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
//! .build());
//!
//! }
//! }
//! ```
//! ### YAML
//! ```yaml
//! resources:
//! example:
//! type: cloudflare:AccessCustomPage
//! properties:
//! customHtml: <html><body><h1>Forbidden</h1></body></html>
//! name: example
//! type: forbidden
//! zoneId: 0da42c8d2132a9ddaf714f9e7c920711
//! ```
//! <!--End PulumiCodeChooser -->
pub struct AccessCustomPageArgs {
/// The account identifier to target for the resource. Conflicts with `zone_id`. **Modifying this attribute will force creation of a new resource.**
pub account_id: pulumi_wasm_rust::Output<Option<String>>,
/// Number of apps to display on the custom page.
pub app_count: pulumi_wasm_rust::Output<Option<i32>>,
/// Custom HTML to display on the custom page.
pub custom_html: pulumi_wasm_rust::Output<Option<String>>,
/// Friendly name of the Access Custom Page configuration.
pub name: pulumi_wasm_rust::Output<String>,
/// Type of Access custom page to create. Available values: `identity_denied`, `forbidden`.
pub type_: pulumi_wasm_rust::Output<String>,
/// The zone identifier to target for the resource. Conflicts with `account_id`. **Modifying this attribute will force creation of a new resource.**
pub zone_id: pulumi_wasm_rust::Output<Option<String>>,
}

pub struct AccessCustomPageResult {
/// The account identifier to target for the resource. Conflicts with `zone_id`. **Modifying this attribute will force creation of a new resource.**
pub account_id: pulumi_wasm_rust::Output<Option<String>>,
/// Number of apps to display on the custom page.
pub app_count: pulumi_wasm_rust::Output<Option<i32>>,
/// Custom HTML to display on the custom page.
pub custom_html: pulumi_wasm_rust::Output<Option<String>>,
/// Friendly name of the Access Custom Page configuration.
pub name: pulumi_wasm_rust::Output<String>,
/// Type of Access custom page to create. Available values: `identity_denied`, `forbidden`.
pub type_: pulumi_wasm_rust::Output<String>,
/// The zone identifier to target for the resource. Conflicts with `account_id`. **Modifying this attribute will force creation of a new resource.**
pub zone_id: pulumi_wasm_rust::Output<Option<String>>,
}

///
/// Registers a new resource with the given unique name and arguments
///
pub fn create(name: &str, args: AccessCustomPageArgs) -> AccessCustomPageResult {
let result = crate::bindings::pulumi::cloudflare::access_custom_page::invoke(
name,
Expand Down
Loading

0 comments on commit c7072df

Please sign in to comment.