pulumi-opnsense


Namepulumi-opnsense JSON
Version 0.3.42 PyPI version JSON
download
home_pageNone
SummaryThe Pulumi OpnSense provider is used to interact with the resources supported by OpnSense.
upload_time2025-01-30 13:16:07
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseApache-2.0
keywords pulumi opnsense
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Pulumi Native Provider Boilerplate

This repository is a boilerplate showing how to create and locally test a native Pulumi provider.

## Authoring a Pulumi Native Provider

This boilerplate creates a working Pulumi-owned provider named `opnsense`.
It implements a random number generator that you can [build and test out for yourself](#test-against-the-example) and then replace the Random code with code specific to your provider.


### Prerequisites

Prerequisites for this repository are already satisfied by the [Pulumi Devcontainer](https://github.com/pulumi/devcontainer) if you are using Github Codespaces, or VSCode.

If you are not using VSCode, you will need to ensure the following tools are installed and present in your `$PATH`:

* [`pulumictl`](https://github.com/pulumi/pulumictl#installation)
* [Go 1.21](https://golang.org/dl/) or 1.latest
* [NodeJS](https://nodejs.org/en/) 14.x.  We recommend using [nvm](https://github.com/nvm-sh/nvm) to manage NodeJS installations.
* [Yarn](https://yarnpkg.com/)
* [TypeScript](https://www.typescriptlang.org/)
* [Python](https://www.python.org/downloads/) (called as `python3`).  For recent versions of MacOS, the system-installed version is fine.
* [.NET](https://dotnet.microsoft.com/download)


### Build & test the boilerplate XYZ provider

1. Create a new Github CodeSpaces environment using this repository.
1. Open a terminal in the CodeSpaces environment.
1. Run `make build install` to build and install the provider.
1. Run `make gen_examples` to generate the example programs in `examples/` off of the source `examples/yaml` example program.
1. Run `make up` to run the example program in `examples/yaml`.
1. Run `make down` to tear down the example program.

### Creating a new provider repository

Pulumi offers this repository as a [GitHub template repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template) for convenience.  From this repository:

1. Click "Use this template".
1. Set the following options:
   * Owner: pulumi 
   * Repository name: pulumi-opnsense-native (replace "opnsense" with the name of your provider)
   * Description: Pulumi provider for opnsense
   * Repository type: Public
1. Clone the generated repository.

From the templated repository:

1. Run the following command to update files to use the name of your provider (third-party: use your GitHub organization/username):

    ```bash
    make prepare NAME=foo REPOSITORY=github.com/pulumi/pulumi-foo ORG=myorg
    ```

   This will do the following:
   - rename folders in `provider/cmd` to `pulumi-resource-{NAME}`
   - replace dependencies in `provider/go.mod` to reflect your repository name
   - find and replace all instances of the boilerplate `opnsense` with the `NAME` of your provider.
   - find and replace all instances of the boilerplate `oss4u` with the `ORG` of your provider.
   - replace all instances of the `github.com/oss4u/pulumi-opnsense` repository with the `REPOSITORY` location

#### Build the provider and install the plugin

   ```bash
   $ make build install
   ```
   
This will:

1. Create the SDK codegen binary and place it in a `./bin` folder (gitignored)
2. Create the provider binary and place it in the `./bin` folder (gitignored)
3. Generate the dotnet, Go, Node, and Python SDKs and place them in the `./sdk` folder
4. Install the provider on your machine.

#### Test against the example
   
```bash
$ cd examples/simple
$ yarn link @pulumi/opnsense
$ yarn install
$ pulumi stack init test
$ pulumi up
```

Now that you have completed all of the above steps, you have a working provider that generates a random string for you.

#### A brief repository overview

You now have:

1. A `provider/` folder containing the building and implementation logic
    1. `cmd/pulumi-resource-opnsense/main.go` - holds the provider's sample implementation logic.
2. `deployment-templates` - a set of files to help you around deployment and publication
3. `sdk` - holds the generated code libraries created by `pulumi-gen-opnsense/main.go`
4. `examples` a folder of Pulumi programs to try locally and/or use in CI.
5. A `Makefile` and this `README`.

#### Additional Details

This repository depends on the pulumi-go-provider library. For more details on building providers, please check
the [Pulumi Go Provider docs](https://github.com/pulumi/pulumi-go-provider).

### Build Examples

Create an example program using the resources defined in your provider, and place it in the `examples/` folder.

You can now repeat the steps for [build, install, and test](#test-against-the-example).

## Configuring CI and releases

1. Follow the instructions laid out in the [deployment templates](./deployment-templates/README-DEPLOYMENT.md).

## References

Other resources/examples for implementing providers:
* [Pulumi Command provider](https://github.com/pulumi/pulumi-command/blob/master/provider/pkg/provider/provider.go)
* [Pulumi Go Provider repository](https://github.com/pulumi/pulumi-go-provider)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pulumi-opnsense",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "pulumi, opnsense",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/71/2f/4bedeeeef664f607147eaa97c2a3df851ad8ce645b2960350a776ee8c505/pulumi_opnsense-0.3.42.tar.gz",
    "platform": null,
    "description": "# Pulumi Native Provider Boilerplate\n\nThis repository is a boilerplate showing how to create and locally test a native Pulumi provider.\n\n## Authoring a Pulumi Native Provider\n\nThis boilerplate creates a working Pulumi-owned provider named `opnsense`.\nIt implements a random number generator that you can [build and test out for yourself](#test-against-the-example) and then replace the Random code with code specific to your provider.\n\n\n### Prerequisites\n\nPrerequisites for this repository are already satisfied by the [Pulumi Devcontainer](https://github.com/pulumi/devcontainer) if you are using Github Codespaces, or VSCode.\n\nIf you are not using VSCode, you will need to ensure the following tools are installed and present in your `$PATH`:\n\n* [`pulumictl`](https://github.com/pulumi/pulumictl#installation)\n* [Go 1.21](https://golang.org/dl/) or 1.latest\n* [NodeJS](https://nodejs.org/en/) 14.x.  We recommend using [nvm](https://github.com/nvm-sh/nvm) to manage NodeJS installations.\n* [Yarn](https://yarnpkg.com/)\n* [TypeScript](https://www.typescriptlang.org/)\n* [Python](https://www.python.org/downloads/) (called as `python3`).  For recent versions of MacOS, the system-installed version is fine.\n* [.NET](https://dotnet.microsoft.com/download)\n\n\n### Build & test the boilerplate XYZ provider\n\n1. Create a new Github CodeSpaces environment using this repository.\n1. Open a terminal in the CodeSpaces environment.\n1. Run `make build install` to build and install the provider.\n1. Run `make gen_examples` to generate the example programs in `examples/` off of the source `examples/yaml` example program.\n1. Run `make up` to run the example program in `examples/yaml`.\n1. Run `make down` to tear down the example program.\n\n### Creating a new provider repository\n\nPulumi offers this repository as a [GitHub template repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template) for convenience.  From this repository:\n\n1. Click \"Use this template\".\n1. Set the following options:\n   * Owner: pulumi \n   * Repository name: pulumi-opnsense-native (replace \"opnsense\" with the name of your provider)\n   * Description: Pulumi provider for opnsense\n   * Repository type: Public\n1. Clone the generated repository.\n\nFrom the templated repository:\n\n1. Run the following command to update files to use the name of your provider (third-party: use your GitHub organization/username):\n\n    ```bash\n    make prepare NAME=foo REPOSITORY=github.com/pulumi/pulumi-foo ORG=myorg\n    ```\n\n   This will do the following:\n   - rename folders in `provider/cmd` to `pulumi-resource-{NAME}`\n   - replace dependencies in `provider/go.mod` to reflect your repository name\n   - find and replace all instances of the boilerplate `opnsense` with the `NAME` of your provider.\n   - find and replace all instances of the boilerplate `oss4u` with the `ORG` of your provider.\n   - replace all instances of the `github.com/oss4u/pulumi-opnsense` repository with the `REPOSITORY` location\n\n#### Build the provider and install the plugin\n\n   ```bash\n   $ make build install\n   ```\n   \nThis will:\n\n1. Create the SDK codegen binary and place it in a `./bin` folder (gitignored)\n2. Create the provider binary and place it in the `./bin` folder (gitignored)\n3. Generate the dotnet, Go, Node, and Python SDKs and place them in the `./sdk` folder\n4. Install the provider on your machine.\n\n#### Test against the example\n   \n```bash\n$ cd examples/simple\n$ yarn link @pulumi/opnsense\n$ yarn install\n$ pulumi stack init test\n$ pulumi up\n```\n\nNow that you have completed all of the above steps, you have a working provider that generates a random string for you.\n\n#### A brief repository overview\n\nYou now have:\n\n1. A `provider/` folder containing the building and implementation logic\n    1. `cmd/pulumi-resource-opnsense/main.go` - holds the provider's sample implementation logic.\n2. `deployment-templates` - a set of files to help you around deployment and publication\n3. `sdk` - holds the generated code libraries created by `pulumi-gen-opnsense/main.go`\n4. `examples` a folder of Pulumi programs to try locally and/or use in CI.\n5. A `Makefile` and this `README`.\n\n#### Additional Details\n\nThis repository depends on the pulumi-go-provider library. For more details on building providers, please check\nthe [Pulumi Go Provider docs](https://github.com/pulumi/pulumi-go-provider).\n\n### Build Examples\n\nCreate an example program using the resources defined in your provider, and place it in the `examples/` folder.\n\nYou can now repeat the steps for [build, install, and test](#test-against-the-example).\n\n## Configuring CI and releases\n\n1. Follow the instructions laid out in the [deployment templates](./deployment-templates/README-DEPLOYMENT.md).\n\n## References\n\nOther resources/examples for implementing providers:\n* [Pulumi Command provider](https://github.com/pulumi/pulumi-command/blob/master/provider/pkg/provider/provider.go)\n* [Pulumi Go Provider repository](https://github.com/pulumi/pulumi-go-provider)\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "The Pulumi OpnSense provider is used to interact with the resources supported by OpnSense.",
    "version": "0.3.42",
    "project_urls": {
        "Homepage": "https://github.com/oss4u/pulumi-opnsense",
        "Repository": "https://github.com/oss4u/pulumi-opnsense"
    },
    "split_keywords": [
        "pulumi",
        " opnsense"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ae755135af49f93a26e546981b56c0802ffc2c25c42495cb01984a4ba3e7e267",
                "md5": "446d218107681f086c1befb6e7a382a7",
                "sha256": "b65c3d2786b14f1475558ebe944a290a8c208bb9aa48f45fb61c3c1c9fc95784"
            },
            "downloads": -1,
            "filename": "pulumi_opnsense-0.3.42-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "446d218107681f086c1befb6e7a382a7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 16606,
            "upload_time": "2025-01-30T13:16:05",
            "upload_time_iso_8601": "2025-01-30T13:16:05.990045Z",
            "url": "https://files.pythonhosted.org/packages/ae/75/5135af49f93a26e546981b56c0802ffc2c25c42495cb01984a4ba3e7e267/pulumi_opnsense-0.3.42-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "712f4bedeeeef664f607147eaa97c2a3df851ad8ce645b2960350a776ee8c505",
                "md5": "53bd49ba56165b0335c23685d6379156",
                "sha256": "cf576ea74cf6db730bbcd7651a68f50eb458535d985b4d59582d1a82e7e111e6"
            },
            "downloads": -1,
            "filename": "pulumi_opnsense-0.3.42.tar.gz",
            "has_sig": false,
            "md5_digest": "53bd49ba56165b0335c23685d6379156",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 12554,
            "upload_time": "2025-01-30T13:16:07",
            "upload_time_iso_8601": "2025-01-30T13:16:07.676329Z",
            "url": "https://files.pythonhosted.org/packages/71/2f/4bedeeeef664f607147eaa97c2a3df851ad8ce645b2960350a776ee8c505/pulumi_opnsense-0.3.42.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-30 13:16:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "oss4u",
    "github_project": "pulumi-opnsense",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pulumi-opnsense"
}
        
Elapsed time: 8.09705s