├── .ci-mgmt.yaml ├── .devcontainer ├── Dockerfile └── devcontainer.json ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug.yaml │ └── epic.md ├── actions │ ├── download-prerequisites │ │ └── action.yml │ ├── download-provider │ │ └── action.yml │ ├── download-sdk │ │ └── action.yml │ ├── download-tfgen │ │ └── action.yml │ ├── setup-tools │ │ └── action.yml │ ├── upload-bin │ │ └── action.yml │ ├── upload-prerequisites │ │ └── action.yml │ └── upload-sdk │ │ └── action.yml └── workflows │ ├── build_provider.yml │ ├── build_sdk.yml │ ├── command-dispatch.yml │ ├── community-moderation.yml │ ├── license.yml │ ├── lint.yml │ ├── main-post-build.yml │ ├── main.yml │ ├── nightly-test.yml │ ├── prerelease.yml │ ├── prerequisites.yml │ ├── publish.yml │ ├── pull-request.yml │ ├── release.yml │ ├── release_command.yml │ ├── run-acceptance-tests.yml │ ├── test.yml │ ├── upgrade-bridge.yml │ ├── upgrade-provider.yml │ └── verify-release.yml ├── .gitignore ├── .golangci.yml ├── .pulumi-java-gen.version ├── .upgrade-config.yml ├── CHANGELOG_OLD.md ├── CODE-OF-CONDUCT.md ├── CONTRIBUTING.md ├── COPYRIGHT ├── LICENSE ├── Makefile ├── README.md ├── devbox.json ├── devbox.lock ├── docs └── _index.md ├── examples ├── examples_dotnet_test.go ├── examples_go_test.go ├── examples_nodejs_test.go ├── examples_py_test.go ├── examples_test.go ├── examples_yaml_test.go ├── get-cert │ └── yaml │ │ └── Pulumi.yaml ├── go.mod ├── go.sum ├── private-key │ ├── dotnet │ │ ├── .gitignore │ │ ├── MyStack.cs │ │ ├── Program.cs │ │ ├── Pulumi.yaml │ │ └── dotnet.csproj │ ├── go │ │ ├── Pulumi.yaml │ │ ├── go.mod │ │ ├── go.sum │ │ └── main.go │ ├── py │ │ ├── .gitignore │ │ ├── Pulumi.yaml │ │ ├── __main__.py │ │ └── requirements.txt │ └── ts │ │ ├── Pulumi.yaml │ │ ├── index.ts │ │ ├── package.json │ │ └── tsconfig.json ├── provider-update │ └── ts │ │ ├── Pulumi.yaml │ │ ├── index.ts │ │ ├── package.json │ │ └── tsconfig.json ├── self-signed-cert │ ├── go │ │ ├── Pulumi.yaml │ │ ├── go.mod │ │ ├── go.sum │ │ └── main.go │ ├── ts │ │ ├── Pulumi.yaml │ │ ├── index.ts │ │ ├── package-lock.json │ │ ├── package.json │ │ └── tsconfig.json │ └── yaml │ │ ├── Pulumi.yaml │ │ └── keypair.pem └── testdata │ └── recorded │ └── TestProviderUpgrade │ ├── ts │ ├── 4.11.1 │ │ ├── grpc.json │ │ └── stack.json │ └── 5.0.0 │ │ ├── grpc.json │ │ └── stack.json │ └── yaml │ └── 5.0.0 │ ├── grpc.json │ └── stack.json ├── provider ├── cmd │ ├── pulumi-resource-tls │ │ ├── Pulumi.yaml │ │ ├── bridge-metadata.json │ │ ├── generate.go │ │ ├── main.go │ │ └── schema.json │ └── pulumi-tfgen-tls │ │ └── main.go ├── go.mod ├── go.sum ├── pkg │ └── version │ │ └── version.go ├── provider_program_test.go ├── resources.go ├── shim │ ├── go.mod │ ├── go.sum │ └── shim.go ├── test-programs │ ├── index_certrequest │ │ ├── .gitignore │ │ └── Pulumi.yaml │ └── index_privatekey │ │ ├── .gitignore │ │ └── Pulumi.yaml └── testdata │ └── recorded │ └── TestProviderUpgrade │ ├── index_certrequest │ └── 5.0.2 │ │ ├── grpc.json │ │ └── stack.json │ └── index_privatekey │ └── 5.0.2 │ ├── grpc.json │ └── stack.json ├── scripts ├── crossbuild.mk ├── plugins.mk └── upstream.sh └── sdk ├── dotnet ├── CertRequest.cs ├── Config │ ├── Config.cs │ └── README.md ├── GetCertificate.cs ├── GetPublicKey.cs ├── Inputs │ ├── CertRequestSubjectArgs.cs │ ├── CertRequestSubjectGetArgs.cs │ ├── ProviderProxyArgs.cs │ ├── SelfSignedCertSubjectArgs.cs │ └── SelfSignedCertSubjectGetArgs.cs ├── LocallySignedCert.cs ├── Outputs │ ├── CertRequestSubject.cs │ ├── GetCertificateCertificateResult.cs │ └── SelfSignedCertSubject.cs ├── PrivateKey.cs ├── Provider.cs ├── Pulumi.Tls.csproj ├── Pulumi.yaml ├── README.md ├── SelfSignedCert.cs ├── Utilities.cs ├── go.mod ├── logo.png └── pulumi-plugin.json ├── go.mod ├── go.sum ├── go ├── Pulumi.yaml └── tls │ ├── certRequest.go │ ├── config │ ├── config.go │ └── pulumiTypes.go │ ├── doc.go │ ├── getCertificate.go │ ├── getPublicKey.go │ ├── init.go │ ├── internal │ ├── pulumiUtilities.go │ └── pulumiVersion.go │ ├── locallySignedCert.go │ ├── privateKey.go │ ├── provider.go │ ├── pulumi-plugin.json │ ├── pulumiTypes.go │ └── selfSignedCert.go ├── java ├── README.md ├── build.gradle ├── go.mod ├── settings.gradle └── src │ └── main │ └── java │ └── com │ └── pulumi │ └── tls │ ├── CertRequest.java │ ├── CertRequestArgs.java │ ├── Config.java │ ├── LocallySignedCert.java │ ├── LocallySignedCertArgs.java │ ├── PrivateKey.java │ ├── PrivateKeyArgs.java │ ├── Provider.java │ ├── ProviderArgs.java │ ├── SelfSignedCert.java │ ├── SelfSignedCertArgs.java │ ├── TlsFunctions.java │ ├── Utilities.java │ ├── config │ └── inputs │ │ └── Proxy.java │ ├── inputs │ ├── CertRequestState.java │ ├── CertRequestSubjectArgs.java │ ├── GetCertificateArgs.java │ ├── GetCertificatePlainArgs.java │ ├── GetPublicKeyArgs.java │ ├── GetPublicKeyPlainArgs.java │ ├── LocallySignedCertState.java │ ├── PrivateKeyState.java │ ├── ProviderProxyArgs.java │ ├── SelfSignedCertState.java │ └── SelfSignedCertSubjectArgs.java │ └── outputs │ ├── CertRequestSubject.java │ ├── GetCertificateCertificate.java │ ├── GetCertificateResult.java │ ├── GetPublicKeyResult.java │ └── SelfSignedCertSubject.java ├── nodejs ├── Pulumi.yaml ├── README.md ├── certRequest.ts ├── config │ ├── index.ts │ └── vars.ts ├── getCertificate.ts ├── getPublicKey.ts ├── go.mod ├── index.ts ├── locallySignedCert.ts ├── package.json ├── privateKey.ts ├── provider.ts ├── selfSignedCert.ts ├── tsconfig.json ├── types │ ├── index.ts │ ├── input.ts │ └── output.ts └── utilities.ts └── python ├── Pulumi.yaml ├── README.md ├── go.mod ├── pulumi_tls ├── README.md ├── __init__.py ├── _inputs.py ├── _utilities.py ├── cert_request.py ├── config │ ├── __init__.py │ ├── __init__.pyi │ ├── outputs.py │ └── vars.py ├── get_certificate.py ├── get_public_key.py ├── locally_signed_cert.py ├── outputs.py ├── private_key.py ├── provider.py ├── pulumi-plugin.json ├── py.typed └── self_signed_cert.py └── pyproject.toml /.ci-mgmt.yaml: -------------------------------------------------------------------------------- 1 | provider: tls 2 | major-version: 5 3 | makeTemplate: bridged 4 | generate-nightly-test-workflow: true 5 | plugins: 6 | - name: std 7 | version: "1.6.2" 8 | - name: terraform 9 | version: "1.0.16" 10 | kind: converter 11 | - name: aws 12 | version: "4.26.0" 13 | providerDefaultBranch: main 14 | team: ecosystem 15 | license: 16 | ignore: 17 | - github.com/hashicorp/terraform-provider-tls/shim 18 | pulumiConvert: 1 19 | registryDocs: true 20 | releaseVerification: 21 | nodejs: examples/private-key/ts 22 | python: examples/private-key/py 23 | dotnet: examples/private-key/dotnet 24 | go: examples/private-key/go 25 | integrationTestProvider: true 26 | -------------------------------------------------------------------------------- /.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM jetpackio/devbox:latest 2 | 3 | # Installing your devbox project 4 | WORKDIR /code 5 | COPY devbox.json devbox.json 6 | COPY devbox.lock devbox.lock 7 | RUN sudo chown -R "${DEVBOX_USER}:${DEVBOX_USER}" /code 8 | 9 | 10 | RUN devbox run -- echo "Installed Packages." 11 | 12 | RUN devbox shellenv --init-hook >> ~/.profile 13 | -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Devbox Remote Container", 3 | "build": { 4 | "dockerfile": "./Dockerfile", 5 | "context": ".." 6 | }, 7 | "customizations": { 8 | "vscode": { 9 | "settings": {}, 10 | "extensions": [ 11 | "jetpack-io.devbox" 12 | ] 13 | } 14 | }, 15 | "remoteUser": "devbox" 16 | } -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | sdk/**/* linguist-generated=true 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug.yaml: -------------------------------------------------------------------------------- 1 | name: Bug Report 2 | description: Report something that's not working correctly 3 | labels: ["kind/bug", "needs-triage"] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | Thanks for taking the time to fill out this bug report! 9 | You can also ask questions on our [Community Slack](https://slack.pulumi.com/). 10 | - type: textarea 11 | id: what-happened 12 | attributes: 13 | label: Describe what happened 14 | description: Please summarize what happened, including what Pulumi commands you ran, as well as 15 | an inline snippet of any relevant error or console output. 16 | validations: 17 | required: true 18 | - type: textarea 19 | id: sample-program 20 | attributes: 21 | label: Sample program 22 | description: | 23 |
Provide a reproducible sample program 24 | If this is a bug you encountered while running a Pulumi command, please provide us with a minimal, 25 | self-contained Pulumi program that reproduces this behavior so that we can investigate on our end. 26 | Without a functional reproduction, we will not be able to prioritize this bug. 27 | **Note:** If the program output is more than a few lines, please send us a Gist or a link to a file. 28 |
29 | validations: 30 | required: true 31 | - type: textarea 32 | id: log-output 33 | attributes: 34 | label: Log output 35 | description: | 36 |
How to Submit Logs 37 | If this is something that is dependent on your environment, please also provide us with the output of 38 | `pulumi up --logtostderr --logflow -v=10` from the root of your project. 39 | We may also ask you to supply us with debug output following [these steps](https://www.pulumi.com/docs/using-pulumi/pulumi-packages/debugging-provider-packages/). 40 | **Note:** If the log output is more than a few lines, please send us a Gist or a link to a file. 41 |
42 | - type: textarea 43 | id: resources 44 | attributes: 45 | label: Affected Resource(s) 46 | description: Please list the affected Pulumi Resource(s) or Function(s). 47 | validations: 48 | required: false 49 | - type: textarea 50 | id: versions 51 | attributes: 52 | label: Output of `pulumi about` 53 | description: Provide the output of `pulumi about` from the root of your project. 54 | validations: 55 | required: true 56 | - type: textarea 57 | id: ctx 58 | attributes: 59 | label: Additional context 60 | description: Anything else you would like to add? 61 | validations: 62 | required: false 63 | - type: textarea 64 | id: voting 65 | attributes: 66 | label: Contributing 67 | value: | 68 | Vote on this issue by adding a 👍 reaction. 69 | To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already). -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/epic.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Epic 3 | about: Tracks a shippable unit of work 4 | title: '[Epic] {your-title-here}' 5 | labels: kind/epic 6 | projects: ['pulumi/32'] 7 | assignees: '' 8 | type: Epic 9 | --- 10 | 11 | ## Overview 12 | 13 | 14 | ## Key KPIs 15 | 16 | 17 | ## Key Stakeholders 18 | - Product and Engineering: 19 | - Documentation: 20 | - Marketing/Partnerships: 21 | - Customers: 22 | 23 | ## Key Deliverables 24 | 25 | 26 | ### References 📔 27 | 28 | 29 | - [ ] Project View 30 | - [ ] PR/FAQ 31 | - [ ] Design Doc 32 | - [ ] UX Designs 33 | - [ ] Decision Log 34 | 35 | 36 | -------------------------------------------------------------------------------- /.github/actions/download-prerequisites/action.yml: -------------------------------------------------------------------------------- 1 | name: Download the code generator binary 2 | description: Downloads the code generator binary to `bin/`. 3 | 4 | runs: 5 | using: "composite" 6 | steps: 7 | - name: Download the prerequisites bin 8 | uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 9 | with: 10 | name: prerequisites-bin 11 | path: bin 12 | 13 | - name: Restore executable permissions 14 | shell: bash 15 | run: chmod +x $(< bin/executables.txt) 16 | 17 | - name: Remove executables list 18 | shell: bash 19 | run: rm bin/executables.txt 20 | 21 | - name: Download schema-embed.json 22 | uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 23 | with: 24 | # Use a pattern to avoid failing if the artifact doesn't exist 25 | pattern: schema-embed.* 26 | # Avoid creating directories for each artifact 27 | merge-multiple: true 28 | path: provider/cmd/pulumi-resource-tls 29 | -------------------------------------------------------------------------------- /.github/actions/download-provider/action.yml: -------------------------------------------------------------------------------- 1 | name: Download the provider binary 2 | description: Downloads the provider binary to `bin/`. 3 | 4 | runs: 5 | using: "composite" 6 | steps: 7 | 8 | - name: Download pulumi-resource-tls 9 | uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 10 | with: 11 | pattern: pulumi-resource-tls-*-linux-amd64.tar.gz 12 | path: ${{ github.workspace }}/bin 13 | merge-multiple: true 14 | 15 | - name: Untar pulumi-resource-tls 16 | shell: bash 17 | run: | 18 | tar -zxf ${{ github.workspace }}/bin/*amd64.tar.gz -C ${{ github.workspace}}/bin 19 | 20 | - name: Mark pulumi-resource-tls as executable 21 | shell: bash 22 | run: | 23 | find ${{ github.workspace }} -name "pulumi-*-tls" -print -exec chmod +x {} \; 24 | -------------------------------------------------------------------------------- /.github/actions/download-sdk/action.yml: -------------------------------------------------------------------------------- 1 | name: Download SDK asset 2 | description: Restores the SDK asset for a language. 3 | 4 | inputs: 5 | language: 6 | required: true 7 | description: One of nodejs, python, dotnet, go, java 8 | 9 | runs: 10 | using: "composite" 11 | steps: 12 | - name: Download ${{ inputs.language }} SDK 13 | uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 14 | with: 15 | name: ${{ inputs.language }}-sdk.tar.gz 16 | path: ${{ github.workspace}}/sdk/ 17 | - name: Uncompress SDK folder 18 | shell: bash 19 | run: tar -zxf ${{ github.workspace }}/sdk/${{ inputs.language }}.tar.gz -C ${{ github.workspace }}/sdk/${{ inputs.language }} 20 | -------------------------------------------------------------------------------- /.github/actions/download-tfgen/action.yml: -------------------------------------------------------------------------------- 1 | name: Download the tfgen binary 2 | description: Downloads the tfgen binary to `bin/`. 3 | 4 | runs: 5 | using: "composite" 6 | steps: 7 | 8 | - name: Download pulumi-tfgen-tls 9 | uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 10 | with: 11 | name: pulumi-tfgen-tls 12 | path: ${{ github.workspace }}/bin 13 | 14 | - name: Ensure pulumi-tfgen-tls is executable 15 | shell: bash 16 | run: | 17 | find ${{ github.workspace }} -name "pulumi-*-tls" -print -exec chmod +x {} \; 18 | -------------------------------------------------------------------------------- /.github/actions/setup-tools/action.yml: -------------------------------------------------------------------------------- 1 | name: Setup tools 2 | description: Installs Go, Pulumi, pulumictl, schema-tools, Node.JS, Python, dotnet and Java. 3 | 4 | inputs: 5 | tools: 6 | description: | 7 | Comma separated list of tools to install. The default of "all" installs all tools. Available tools are: 8 | go 9 | pulumicli 10 | pulumictl 11 | schema-tools 12 | nodejs 13 | python 14 | dotnet 15 | java 16 | default: all 17 | cache-go: 18 | description: | 19 | Whether to enable the GitHub cache for Go. Appropriate for disabling in 20 | smaller jobs that typically completely before the "real" job has an 21 | opportunity to populate the cache. 22 | default: "true" 23 | 24 | runs: 25 | using: "composite" 26 | steps: 27 | - name: Install Go 28 | if: inputs.tools == 'all' || contains(inputs.tools, 'go') 29 | uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5 30 | with: 31 | go-version: "1.21.x" 32 | cache-dependency-path: | 33 | provider/*.sum 34 | upstream/*.sum 35 | sdk/go/*.sum 36 | sdk/*.sum 37 | *.sum 38 | # TODO(https://github.com/actions/setup-go/issues/316): Restore but don't save the cache. 39 | cache: ${{ inputs.cache-go }} 40 | 41 | - name: Install pulumictl 42 | if: inputs.tools == 'all' || contains(inputs.tools, 'pulumictl') 43 | uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 44 | with: 45 | tag: v0.0.46 46 | repo: pulumi/pulumictl 47 | 48 | - name: Install Pulumi CLI 49 | if: inputs.tools == 'all' || contains(inputs.tools, 'pulumicli') 50 | uses: pulumi/actions@df5a93ad715135263c732ba288301bd044c383c0 # v6 51 | with: 52 | pulumi-version: "dev" 53 | 54 | - name: Install Schema Tools 55 | if: inputs.tools == 'all' || contains(inputs.tools, 'schema-tools') 56 | uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 57 | with: 58 | repo: pulumi/schema-tools 59 | 60 | - name: Setup Node 61 | if: inputs.tools == 'all' || contains(inputs.tools, 'nodejs') 62 | uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 63 | with: 64 | node-version: 20.x 65 | registry-url: https://registry.npmjs.org 66 | 67 | - name: Setup DotNet 68 | if: inputs.tools == 'all' || contains(inputs.tools, 'dotnet') 69 | uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1 70 | with: 71 | dotnet-version: 8.0.x 72 | 73 | - name: Setup Python 74 | if: inputs.tools == 'all' || contains(inputs.tools, 'python') 75 | uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 76 | with: 77 | python-version: 3.11.8 78 | 79 | - name: Setup Java 80 | if: inputs.tools == 'all' || contains(inputs.tools, 'java') 81 | uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1 82 | with: 83 | cache: gradle 84 | distribution: temurin 85 | java-version: 11 86 | 87 | - name: Setup Gradle 88 | if: inputs.tools == 'all' || contains(inputs.tools, 'java') 89 | uses: gradle/gradle-build-action@ac2d340dc04d9e1113182899e983b5400c17cda1 # v3 90 | with: 91 | gradle-version: 7.6 92 | -------------------------------------------------------------------------------- /.github/actions/upload-bin/action.yml: -------------------------------------------------------------------------------- 1 | name: Upload bin assets 2 | description: Uploads the provider and tfgen binaries to `bin/`. 3 | 4 | runs: 5 | using: "composite" 6 | steps: 7 | - name: Tar provider binaries 8 | shell: bash 9 | run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace }}/bin/ pulumi-resource-tls pulumi-tfgen-tls 10 | - name: Upload artifacts 11 | uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 12 | with: 13 | name: tls-provider.tar.gz 14 | path: ${{ github.workspace }}/bin/provider.tar.gz 15 | retention-days: 30 16 | -------------------------------------------------------------------------------- /.github/actions/upload-prerequisites/action.yml: -------------------------------------------------------------------------------- 1 | name: Upload SDK asset 2 | description: Upload the SDK for a specific language as an asset for the workflow. 3 | 4 | runs: 5 | using: "composite" 6 | steps: 7 | - name: Capture executable permissions 8 | shell: bash 9 | run: find bin -type f -executable > bin/executables.txt 10 | 11 | - name: Upload prerequisites bin 12 | uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 13 | with: 14 | name: prerequisites-bin 15 | path: bin/* 16 | retention-days: 30 17 | 18 | - name: Upload schema-embed.json 19 | uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 20 | with: 21 | name: schema-embed.json 22 | path: provider/cmd/pulumi-resource-tls/schema-embed.json 23 | retention-days: 30 24 | -------------------------------------------------------------------------------- /.github/actions/upload-sdk/action.yml: -------------------------------------------------------------------------------- 1 | name: Upload SDK asset 2 | description: Upload the SDK for a specific language as an asset for the workflow. 3 | 4 | inputs: 5 | language: 6 | required: true 7 | description: One of nodejs, python, dotnet, go, java 8 | 9 | runs: 10 | using: "composite" 11 | steps: 12 | - name: Compress SDK folder 13 | shell: bash 14 | run: tar -zcf sdk/${{ inputs.language }}.tar.gz -C sdk/${{ inputs.language }} . 15 | - name: Upload artifacts 16 | uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 17 | with: 18 | name: ${{ inputs.language }}-sdk.tar.gz 19 | path: ${{ github.workspace}}/sdk/${{ inputs.language }}.tar.gz 20 | retention-days: 30 21 | -------------------------------------------------------------------------------- /.github/workflows/build_provider.yml: -------------------------------------------------------------------------------- 1 | # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt 2 | 3 | name: "Build Provider" 4 | 5 | on: 6 | workflow_call: 7 | inputs: 8 | version: 9 | required: true 10 | type: string 11 | description: Version of the provider to build 12 | matrix: 13 | required: false 14 | type: string 15 | default: | 16 | { 17 | "platform": [ 18 | {"os": "linux", "arch": "amd64"}, 19 | {"os": "linux", "arch": "arm64"}, 20 | {"os": "darwin", "arch": "amd64"}, 21 | {"os": "darwin", "arch": "arm64"}, 22 | {"os": "windows", "arch": "amd64"} 23 | ] 24 | } 25 | 26 | jobs: 27 | build_provider: 28 | name: Build ${{ matrix.platform.os }}-${{ matrix.platform.arch }} 29 | runs-on: ubuntu-latest 30 | env: 31 | PROVIDER_VERSION: ${{ inputs.version }} 32 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 33 | strategy: 34 | fail-fast: true 35 | matrix: ${{ fromJSON(inputs.matrix) }} 36 | steps: 37 | - name: Checkout Repo 38 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 39 | with: 40 | persist-credentials: false 41 | # Without ldid cross-compiling Node binaries on a Linux worker intended to work on darwin-arm64 fails to sign the 42 | # binaries properly and they do not work as expected. See https://github.com/pulumi/pulumi-awsx/issues/1490 43 | - uses: MOZGIII/install-ldid-action@v1 44 | with: 45 | tag: v2.1.5-procursus2 46 | - name: Setup tools 47 | uses: ./.github/actions/setup-tools 48 | with: 49 | tools: pulumictl, go 50 | # use per-platform/arch caches instead since we are doing cross-builds 51 | cache-go: false 52 | # Based on https://github.com/actions/cache/blob/main/examples.md#go---modules 53 | - name: Get GOCACHE 54 | id: gocache 55 | shell: bash 56 | run: | 57 | echo "path=$(go env GOCACHE)" >> "${GITHUB_OUTPUT}" 58 | - name: Get GOMODCACHE 59 | id: gomodcache 60 | shell: bash 61 | run: | 62 | echo "path=$(go env GOMODCACHE)" >> "${GITHUB_OUTPUT}" 63 | - name: Go Cache 64 | uses: actions/cache@v4 65 | with: 66 | path: | 67 | ${{ steps.gocache.outputs.path }} 68 | ${{ steps.gomodcache.outputs.path }} 69 | key: go-provider-${{ matrix.platform.os }}-${{ matrix.platform.arch }}-${{ hashFiles('provider/go.sum') }} 70 | restore-keys: | 71 | go-provider-${{ matrix.platform.os }}-${{ matrix.platform.arch }}- 72 | - name: Prepare local workspace before restoring previously built 73 | run: make prepare_local_workspace 74 | - name: Restore prerequisites 75 | uses: ./.github/actions/download-prerequisites 76 | - name: Restore makefile progress 77 | # This mirrors the targets completed in the prerequisites job 78 | run: make --touch provider schema 79 | 80 | - name: Build provider 81 | run: make "provider-${{ matrix.platform.os }}-${{ matrix.platform.arch }}" 82 | env: 83 | AZURE_SIGNING_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }} 84 | AZURE_SIGNING_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }} 85 | AZURE_SIGNING_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }} 86 | AZURE_SIGNING_KEY_VAULT_URI: ${{ secrets.AZURE_SIGNING_KEY_VAULT_URI }} 87 | SKIP_SIGNING: ${{ secrets.AZURE_SIGNING_CLIENT_ID == '' && secrets.AZURE_SIGNING_CLIENT_SECRET == '' && secrets.AZURE_SIGNING_TENANT_ID == '' && secrets.AZURE_SIGNING_KEY_VAULT_URI == '' }} 88 | 89 | - name: Package provider 90 | run: make provider_dist-${{ matrix.platform.os }}-${{ matrix.platform.arch }} 91 | 92 | - name: Upload artifacts 93 | uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 94 | with: 95 | name: pulumi-resource-tls-v${{ inputs.version }}-${{ matrix.platform.os }}-${{ matrix.platform.arch }}.tar.gz 96 | path: bin/pulumi-resource-tls-v${{ inputs.version }}-${{ matrix.platform.os }}-${{ matrix.platform.arch }}.tar.gz 97 | retention-days: 30 98 | -------------------------------------------------------------------------------- /.github/workflows/command-dispatch.yml: -------------------------------------------------------------------------------- 1 | # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt 2 | 3 | env: 4 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 5 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} 6 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 7 | NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} 8 | PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} 9 | PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} 10 | PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} 11 | PULUMI_API: https://api.pulumi-staging.io 12 | PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. 13 | PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget 14 | PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} 15 | PYPI_USERNAME: __token__ 16 | SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} 17 | SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} 18 | SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} 19 | TF_APPEND_USER_AGENT: pulumi 20 | jobs: 21 | command-dispatch-for-testing: 22 | name: command-dispatch-for-testing 23 | runs-on: ubuntu-latest 24 | steps: 25 | - name: Checkout Repo 26 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 27 | with: 28 | persist-credentials: false 29 | - uses: peter-evans/slash-command-dispatch@13bc09769d122a64f75aa5037256f6f2d78be8c4 # v4 30 | with: 31 | commands: | 32 | run-acceptance-tests 33 | release 34 | issue-type: pull-request 35 | permission: write 36 | reaction-token: ${{ secrets.GITHUB_TOKEN }} 37 | repository: pulumi/pulumi-tls 38 | token: ${{ secrets.PULUMI_BOT_TOKEN }} 39 | name: command-dispatch 40 | on: 41 | issue_comment: 42 | types: 43 | - created 44 | - edited 45 | -------------------------------------------------------------------------------- /.github/workflows/community-moderation.yml: -------------------------------------------------------------------------------- 1 | # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt 2 | 3 | env: 4 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 5 | jobs: 6 | warn_codegen: 7 | name: warn_codegen 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Checkout Repo 11 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 12 | with: 13 | persist-credentials: false 14 | - id: schema_changed 15 | name: Check for diff in schema 16 | uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 17 | with: 18 | filters: "changed: 'provider/cmd/**/schema.json'" 19 | - id: sdk_changed 20 | if: steps.schema_changed.outputs.changed == 'false' 21 | name: Check for diff in sdk/** 22 | uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 23 | with: 24 | filters: "changed: 'sdk/**'" 25 | - if: steps.sdk_changed.outputs.changed == 'true' && 26 | github.event.pull_request.head.repo.full_name != github.repository 27 | name: Send codegen warning as comment on PR 28 | uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1 29 | with: 30 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 31 | message: > 32 | Hello and thank you for your pull request! :heart: :sparkles: 33 | 34 | It looks like you're directly modifying files in the language SDKs, many of which are autogenerated. 35 | 36 | Be sure any files you're editing do not begin with a code generation warning. 37 | 38 | For generated files, you will need to make changes in `resources.go` instead, and [generate the code](https://github.com/pulumi/${{ github.event.repository.name }}/blob/master/CONTRIBUTING.md#committing-generated-code). 39 | name: warn-codegen 40 | on: 41 | pull_request_target: 42 | branches: 43 | - main 44 | types: 45 | - opened 46 | -------------------------------------------------------------------------------- /.github/workflows/license.yml: -------------------------------------------------------------------------------- 1 | # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt 2 | 3 | name: license_check 4 | 5 | on: 6 | workflow_call: 7 | inputs: {} 8 | 9 | env: 10 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 11 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} 12 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 13 | NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} 14 | PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} 15 | PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} 16 | PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} 17 | PULUMI_API: https://api.pulumi-staging.io 18 | PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. 19 | PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget 20 | PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} 21 | PYPI_USERNAME: __token__ 22 | SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} 23 | SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} 24 | SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} 25 | TF_APPEND_USER_AGENT: pulumi 26 | 27 | jobs: 28 | license_check: 29 | name: License Check 30 | runs-on: ubuntu-latest 31 | steps: 32 | - name: Checkout Repo 33 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 34 | with: 35 | persist-credentials: false 36 | - name: Setup tools 37 | uses: ./.github/actions/setup-tools 38 | with: 39 | tools: go 40 | cache-go: false 41 | - run: make prepare_local_workspace 42 | continue-on-error: true 43 | - uses: pulumi/license-check-action@main 44 | with: 45 | module-path: provider 46 | ignore-modules: >- 47 | github.com/hashicorp/terraform-provider-tls/shim, 48 | github.com/aead/chacha20, 49 | github.com/apache/arrow/go/v12, 50 | github.com/apache/thrift/lib/go/thrift, 51 | github.com/cloudflare/circl, 52 | github.com/golang, 53 | github.com/gorhill/cronexpr, 54 | github.com/in-toto/in-toto-golang, 55 | github.com/jmespath/go-jmespath, 56 | github.com/keybase/go-crypto, 57 | github.com/klauspost/compress, 58 | github.com/mattn/go-localereader, 59 | github.com/modern-go/reflect2, 60 | github.com/pierrec/lz4, 61 | github.com/pjbgf/sha1cd, 62 | github.com/pulumi, 63 | github.com/segmentio/asm, 64 | golang.org 65 | -------------------------------------------------------------------------------- /.github/workflows/lint.yml: -------------------------------------------------------------------------------- 1 | # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt 2 | 3 | name: lint 4 | 5 | on: 6 | workflow_call: 7 | inputs: {} 8 | 9 | env: 10 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 11 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} 12 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 13 | NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} 14 | PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} 15 | PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} 16 | PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} 17 | PULUMI_API: https://api.pulumi-staging.io 18 | PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. 19 | PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget 20 | PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} 21 | PYPI_USERNAME: __token__ 22 | SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} 23 | SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} 24 | SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} 25 | TF_APPEND_USER_AGENT: pulumi 26 | 27 | jobs: 28 | lint: 29 | name: lint 30 | runs-on: ubuntu-latest 31 | steps: 32 | - name: Checkout Repo 33 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 34 | with: 35 | persist-credentials: false 36 | - name: Install go 37 | uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5 38 | with: 39 | # The versions of golangci-lint and setup-go here cross-depend and need to update together. 40 | go-version: 1.23 41 | # Either this action or golangci-lint needs to disable the cache 42 | cache: false 43 | - name: disarm go:embed directives to enable lint 44 | continue-on-error: true # this fails if there are no go:embed directives 45 | run: | 46 | git grep -l 'go:embed' -- provider | xargs sed -i 's/go:embed/ goembed/g' 47 | - name: prepare workspace 48 | continue-on-error: true 49 | run: make prepare_local_workspace 50 | - name: golangci-lint 51 | uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6 52 | with: 53 | version: v1.64.6 54 | working-directory: provider 55 | -------------------------------------------------------------------------------- /.github/workflows/main-post-build.yml: -------------------------------------------------------------------------------- 1 | # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt 2 | 3 | name: "Main post-build" 4 | 5 | on: 6 | workflow_call: 7 | inputs: 8 | version: 9 | type: string 10 | required: true 11 | 12 | env: 13 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 14 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} 15 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 16 | NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} 17 | PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} 18 | PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} 19 | PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} 20 | PULUMI_API: https://api.pulumi-staging.io 21 | PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. 22 | PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget 23 | PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} 24 | PYPI_USERNAME: __token__ 25 | SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} 26 | SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} 27 | SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} 28 | TF_APPEND_USER_AGENT: pulumi 29 | 30 | jobs: 31 | generate_coverage_data: 32 | continue-on-error: true 33 | env: 34 | COVERAGE_OUTPUT_DIR: ${{ secrets.COVERAGE_OUTPUT_DIR }} 35 | name: generate_coverage_data 36 | runs-on: ubuntu-latest 37 | steps: 38 | - name: Free Disk Space (Ubuntu) 39 | uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 40 | with: 41 | tool-cache: false 42 | swap-storage: false 43 | - name: Checkout Repo 44 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 45 | with: 46 | persist-credentials: false 47 | - name: Configure AWS Credentials 48 | uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df # v4.2.1 49 | with: 50 | aws-access-key-id: ${{ secrets.AWS_CORP_S3_UPLOAD_ACCESS_KEY_ID }} 51 | aws-region: us-west-2 52 | aws-secret-access-key: ${{ secrets.AWS_CORP_S3_UPLOAD_SECRET_ACCESS_KEY }} 53 | - name: Setup tools 54 | uses: ./.github/actions/setup-tools 55 | with: 56 | tools: pulumictl, pulumicli, go, schema-tools 57 | - name: Echo Coverage Output Dir 58 | run: 'echo "Coverage output directory: ${{ env.COVERAGE_OUTPUT_DIR }}"' 59 | - name: Generate Coverage Data 60 | run: PULUMI_MISSING_DOCS_ERROR=true make tfgen 61 | - name: Summarize Provider Coverage Results 62 | run: cat ${{ env.COVERAGE_OUTPUT_DIR }}/shortSummary.txt 63 | - name: Upload coverage data to S3 64 | run: >- 65 | summaryName="${PROVIDER}_summary_$(date +"%Y-%m-%d_%H-%M-%S").json" 66 | 67 | s3FullURI="s3://${{ secrets.S3_COVERAGE_BUCKET_NAME }}/summaries/${summaryName}" 68 | 69 | aws s3 cp "${{ env.COVERAGE_OUTPUT_DIR }}/summary.json" "${s3FullURI}" --acl bucket-owner-full-control 70 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt 2 | 3 | env: 4 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 5 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} 6 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 7 | NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} 8 | PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} 9 | PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} 10 | PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} 11 | PULUMI_API: https://api.pulumi-staging.io 12 | PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. 13 | PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget 14 | PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} 15 | PYPI_USERNAME: __token__ 16 | SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} 17 | SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} 18 | SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} 19 | TF_APPEND_USER_AGENT: pulumi 20 | jobs: 21 | prerequisites: 22 | uses: ./.github/workflows/prerequisites.yml 23 | secrets: inherit 24 | with: 25 | default_branch: ${{ github.event.repository.default_branch }} 26 | is_pr: ${{ github.event_name == 'pull_request' }} 27 | is_automated: ${{ github.actor == 'dependabot[bot]' }} 28 | 29 | build_provider: 30 | uses: ./.github/workflows/build_provider.yml 31 | needs: prerequisites 32 | secrets: inherit 33 | with: 34 | version: ${{ needs.prerequisites.outputs.version }} 35 | 36 | build_sdk: 37 | name: build_sdk 38 | needs: prerequisites 39 | uses: ./.github/workflows/build_sdk.yml 40 | secrets: inherit 41 | with: 42 | version: ${{ needs.prerequisites.outputs.version }} 43 | 44 | post_build: 45 | name: post_build 46 | needs: prerequisites 47 | uses: ./.github/workflows/main-post-build.yml 48 | secrets: inherit 49 | with: 50 | version: ${{ needs.prerequisites.outputs.version }} 51 | 52 | lint: 53 | name: lint 54 | uses: ./.github/workflows/lint.yml 55 | secrets: inherit 56 | license_check: 57 | name: License Check 58 | uses: ./.github/workflows/license.yml 59 | secrets: inherit 60 | 61 | publish: 62 | name: publish 63 | permissions: 64 | contents: write 65 | id-token: write 66 | needs: 67 | - prerequisites 68 | - build_provider 69 | - test 70 | - license_check 71 | uses: ./.github/workflows/publish.yml 72 | secrets: inherit 73 | with: 74 | version: ${{ needs.prerequisites.outputs.version }} 75 | isPrerelease: true 76 | skipGoSdk: true 77 | skipJavaSdk: true 78 | 79 | tag_release_if_labeled_needs_release: 80 | name: Tag release if labeled as needs-release 81 | needs: publish 82 | runs-on: ubuntu-latest 83 | steps: 84 | - name: check if this commit needs release 85 | if: ${{ env.RELEASE_BOT_ENDPOINT != '' }} 86 | uses: pulumi/action-release-by-pr-label@main 87 | with: 88 | command: "release-if-needed" 89 | repo: ${{ github.repository }} 90 | commit: ${{ github.sha }} 91 | slack_channel: ${{ secrets.RELEASE_OPS_SLACK_CHANNEL }} 92 | env: 93 | RELEASE_BOT_ENDPOINT: ${{ secrets.RELEASE_BOT_ENDPOINT }} 94 | RELEASE_BOT_KEY: ${{ secrets.RELEASE_BOT_KEY }} 95 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 96 | 97 | test: 98 | uses: ./.github/workflows/test.yml 99 | needs: 100 | - prerequisites 101 | - build_provider 102 | - build_sdk 103 | permissions: 104 | contents: read 105 | id-token: write 106 | secrets: inherit 107 | with: 108 | version: ${{ needs.prerequisites.outputs.version }} 109 | 110 | name: main 111 | on: 112 | workflow_dispatch: {} 113 | push: 114 | branches: 115 | - main 116 | paths-ignore: 117 | - "**.md" 118 | tags-ignore: 119 | - v* 120 | - sdk/* 121 | - "**" 122 | -------------------------------------------------------------------------------- /.github/workflows/nightly-test.yml: -------------------------------------------------------------------------------- 1 | # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt 2 | 3 | env: 4 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 5 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} 6 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 7 | NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} 8 | PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} 9 | PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} 10 | PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} 11 | PULUMI_API: https://api.pulumi-staging.io 12 | PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. 13 | PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget 14 | PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} 15 | PYPI_USERNAME: __token__ 16 | SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} 17 | SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} 18 | SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} 19 | TF_APPEND_USER_AGENT: pulumi 20 | jobs: 21 | prerequisites: 22 | uses: ./.github/workflows/prerequisites.yml 23 | secrets: inherit 24 | with: 25 | default_branch: ${{ github.event.repository.default_branch }} 26 | is_pr: ${{ github.event_name == 'pull_request' }} 27 | is_automated: ${{ github.actor == 'dependabot[bot]' }} 28 | 29 | build_provider: 30 | uses: ./.github/workflows/build_provider.yml 31 | needs: prerequisites 32 | secrets: inherit 33 | with: 34 | version: ${{ needs.prerequisites.outputs.version }} 35 | 36 | build_sdk: 37 | name: build_sdk 38 | needs: prerequisites 39 | uses: ./.github/workflows/build_sdk.yml 40 | secrets: inherit 41 | with: 42 | version: ${{ needs.prerequisites.outputs.version }} 43 | 44 | test: 45 | uses: ./.github/workflows/test.yml 46 | needs: 47 | - prerequisites 48 | - build_provider 49 | - build_sdk 50 | permissions: 51 | contents: read 52 | id-token: write 53 | secrets: inherit 54 | with: 55 | version: ${{ needs.prerequisites.outputs.version }} 56 | 57 | name: cron 58 | on: 59 | schedule: 60 | - cron: 0 6 * * * 61 | -------------------------------------------------------------------------------- /.github/workflows/prerelease.yml: -------------------------------------------------------------------------------- 1 | # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt 2 | 3 | env: 4 | IS_PRERELEASE: true 5 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 6 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} 7 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 8 | NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} 9 | PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} 10 | PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} 11 | PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} 12 | PULUMI_API: https://api.pulumi-staging.io 13 | PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. 14 | PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget 15 | PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} 16 | PYPI_USERNAME: __token__ 17 | SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} 18 | SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} 19 | SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} 20 | TF_APPEND_USER_AGENT: pulumi 21 | jobs: 22 | prerequisites: 23 | uses: ./.github/workflows/prerequisites.yml 24 | secrets: inherit 25 | with: 26 | default_branch: ${{ github.event.repository.default_branch }} 27 | is_pr: ${{ github.event_name == 'pull_request' }} 28 | is_automated: ${{ github.actor == 'dependabot[bot]' }} 29 | 30 | build_provider: 31 | uses: ./.github/workflows/build_provider.yml 32 | needs: prerequisites 33 | secrets: inherit 34 | with: 35 | version: ${{ needs.prerequisites.outputs.version }} 36 | 37 | build_sdk: 38 | name: build_sdk 39 | needs: prerequisites 40 | uses: ./.github/workflows/build_sdk.yml 41 | secrets: inherit 42 | with: 43 | version: ${{ needs.prerequisites.outputs.version }} 44 | 45 | lint: 46 | name: lint 47 | uses: ./.github/workflows/lint.yml 48 | secrets: inherit 49 | license_check: 50 | name: License Check 51 | uses: ./.github/workflows/license.yml 52 | secrets: inherit 53 | 54 | publish: 55 | name: publish 56 | permissions: 57 | contents: write 58 | id-token: write 59 | needs: 60 | - prerequisites 61 | - build_provider 62 | - test 63 | - license_check 64 | uses: ./.github/workflows/publish.yml 65 | secrets: inherit 66 | with: 67 | version: ${{ needs.prerequisites.outputs.version }} 68 | isPrerelease: true 69 | 70 | test: 71 | uses: ./.github/workflows/test.yml 72 | needs: 73 | - prerequisites 74 | - build_provider 75 | - build_sdk 76 | permissions: 77 | contents: read 78 | id-token: write 79 | secrets: inherit 80 | with: 81 | version: ${{ needs.prerequisites.outputs.version }} 82 | 83 | name: prerelease 84 | on: 85 | push: 86 | tags: 87 | - v*.*.*-** 88 | -------------------------------------------------------------------------------- /.github/workflows/prerequisites.yml: -------------------------------------------------------------------------------- 1 | # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt 2 | 3 | name: "Prerequisites" 4 | 5 | on: 6 | workflow_call: 7 | inputs: 8 | is_pr: 9 | type: boolean 10 | required: true 11 | is_automated: 12 | type: boolean 13 | required: true 14 | default_branch: 15 | type: string 16 | required: true 17 | outputs: 18 | version: 19 | description: "Provider version being built" 20 | value: ${{ jobs.prerequisites.outputs.version }} 21 | 22 | env: 23 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 24 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} 25 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 26 | NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} 27 | PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} 28 | PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} 29 | PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} 30 | PULUMI_API: https://api.pulumi-staging.io 31 | PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. 32 | PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget 33 | PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} 34 | PYPI_USERNAME: __token__ 35 | SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} 36 | SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} 37 | SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} 38 | TF_APPEND_USER_AGENT: pulumi 39 | 40 | jobs: 41 | prerequisites: 42 | name: prerequisites 43 | runs-on: ubuntu-latest 44 | outputs: 45 | version: ${{ steps.provider-version.outputs.version }} 46 | steps: 47 | - name: Checkout Repo 48 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 49 | with: 50 | persist-credentials: false 51 | - uses: pulumi/provider-version-action@f96d032a2758fdda7939e5728eff6c0d980ae894 # v1.6.0 52 | id: provider-version 53 | with: 54 | major-version: 5 55 | set-env: 'PROVIDER_VERSION' 56 | - name: Cache examples generation 57 | uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4 58 | with: 59 | path: | 60 | .pulumi/examples-cache 61 | key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} 62 | - name: Setup tools 63 | uses: ./.github/actions/setup-tools 64 | with: 65 | tools: go, pulumictl, pulumicli, schema-tools 66 | - name: Prepare local workspace before restoring previously built files 67 | run: make prepare_local_workspace 68 | - name: Generate schema 69 | run: make schema 70 | - name: Build registry docs 71 | run: make build_registry_docs 72 | - name: Build provider binary 73 | run: make provider 74 | - name: Unit-test provider code 75 | run: make test_provider 76 | - name: Upload coverage reports to Codecov 77 | uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3 78 | env: 79 | CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} 80 | - if: inputs.is_pr 81 | name: Check Schema is Valid 82 | run: | 83 | EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) 84 | { 85 | echo "SCHEMA_CHANGES<<$EOF"; 86 | schema-tools compare -r github://api.github.com/pulumi -p tls -o "${{ inputs.default_branch }}" -n --local-path=provider/cmd/pulumi-resource-tls/schema.json; 87 | echo "$EOF"; 88 | } >> "$GITHUB_ENV" 89 | - if: inputs.is_pr && inputs.is_automated == false && github.actor != 'dependabot[bot]' 90 | name: Comment on PR with Details of Schema Check 91 | uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1 92 | with: 93 | github-token: ${{ secrets.GITHUB_TOKEN }} 94 | comment-tag: schemaCheck 95 | message: >+ 96 | ${{ env.SCHEMA_CHANGES }} 97 | 98 | 99 | Maintainer note: consult the [runbook](https://github.com/pulumi/platform-providers-team/blob/main/playbooks/tf-provider-updating.md) for dealing with any breaking changes. 100 | 101 | - name: Upload artifacts 102 | uses: ./.github/actions/upload-prerequisites 103 | -------------------------------------------------------------------------------- /.github/workflows/pull-request.yml: -------------------------------------------------------------------------------- 1 | # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt 2 | 3 | env: 4 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 5 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} 6 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 7 | NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} 8 | PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} 9 | PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} 10 | PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} 11 | PULUMI_API: https://api.pulumi-staging.io 12 | PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. 13 | PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget 14 | PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} 15 | PYPI_USERNAME: __token__ 16 | SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} 17 | SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} 18 | SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} 19 | TF_APPEND_USER_AGENT: pulumi 20 | jobs: 21 | comment-on-pr: 22 | if: github.event.pull_request.head.repo.full_name != github.repository 23 | name: comment-on-pr 24 | runs-on: ubuntu-latest 25 | steps: 26 | - name: Checkout Repo 27 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 28 | with: 29 | persist-credentials: false 30 | - name: Comment PR 31 | uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1 32 | with: 33 | github-token: ${{ secrets.GITHUB_TOKEN }} 34 | message: > 35 | PR is now waiting for a maintainer to run the acceptance tests. 36 | 37 | **Note for the maintainer:** To run the acceptance tests, please comment */run-acceptance-tests* on the PR 38 | name: pull-request 39 | on: 40 | pull_request_target: {} 41 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt 2 | name: release 3 | on: 4 | push: 5 | tags: 6 | - v*.*.* 7 | - "!v*.*.*-**" 8 | 9 | env: 10 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 11 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} 12 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 13 | NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} 14 | PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} 15 | PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} 16 | PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} 17 | PULUMI_API: https://api.pulumi-staging.io 18 | PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. 19 | PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget 20 | PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} 21 | PYPI_USERNAME: __token__ 22 | SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} 23 | SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} 24 | SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} 25 | TF_APPEND_USER_AGENT: pulumi 26 | jobs: 27 | prerequisites: 28 | uses: ./.github/workflows/prerequisites.yml 29 | secrets: inherit 30 | with: 31 | default_branch: ${{ github.event.repository.default_branch }} 32 | is_pr: ${{ github.event_name == 'pull_request' }} 33 | is_automated: ${{ github.actor == 'dependabot[bot]' }} 34 | 35 | build_provider: 36 | uses: ./.github/workflows/build_provider.yml 37 | needs: prerequisites 38 | secrets: inherit 39 | with: 40 | version: ${{ needs.prerequisites.outputs.version }} 41 | 42 | build_sdk: 43 | name: build_sdk 44 | needs: prerequisites 45 | uses: ./.github/workflows/build_sdk.yml 46 | secrets: inherit 47 | with: 48 | version: ${{ needs.prerequisites.outputs.version }} 49 | 50 | lint: 51 | name: lint 52 | uses: ./.github/workflows/lint.yml 53 | secrets: inherit 54 | license_check: 55 | name: License Check 56 | uses: ./.github/workflows/license.yml 57 | secrets: inherit 58 | 59 | publish: 60 | name: publish 61 | permissions: 62 | contents: write 63 | pull-requests: write 64 | id-token: write 65 | needs: 66 | - prerequisites 67 | - build_provider 68 | - test 69 | - license_check 70 | uses: ./.github/workflows/publish.yml 71 | secrets: inherit 72 | with: 73 | version: ${{ needs.prerequisites.outputs.version }} 74 | isPrerelease: false 75 | 76 | test: 77 | uses: ./.github/workflows/test.yml 78 | needs: 79 | - prerequisites 80 | - build_provider 81 | - build_sdk 82 | permissions: 83 | contents: read 84 | id-token: write 85 | secrets: inherit 86 | with: 87 | version: ${{ needs.prerequisites.outputs.version }} 88 | -------------------------------------------------------------------------------- /.github/workflows/release_command.yml: -------------------------------------------------------------------------------- 1 | # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt 2 | 3 | name: release-command 4 | on: 5 | repository_dispatch: 6 | types: 7 | - release-command 8 | jobs: 9 | should_release: 10 | name: Should release PR 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Checkout Repo 14 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 15 | with: 16 | persist-credentials: false 17 | - name: Should release PR 18 | uses: pulumi/action-release-by-pr-label@main 19 | with: 20 | command: "should-release" 21 | repo: ${{ github.repository }} 22 | pr: ${{ github.event.client_payload.pull_request.number }} 23 | version: ${{ github.event.client_payload.slash_command.args.all }} 24 | slack_channel: ${{ secrets.RELEASE_OPS_STAGING_SLACK_CHANNEL }} 25 | env: 26 | RELEASE_BOT_ENDPOINT: ${{ secrets.RELEASE_BOT_ENDPOINT }} 27 | RELEASE_BOT_KEY: ${{ secrets.RELEASE_BOT_KEY }} 28 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 29 | - if: failure() 30 | name: Notify failure 31 | uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0 32 | with: 33 | token: ${{ secrets.GITHUB_TOKEN }} 34 | repository: ${{ github.event.client_payload.github.payload.repository.full_name }} 35 | issue-number: ${{ github.event.client_payload.github.payload.issue.number }} 36 | body: | 37 | "release command failed: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" 38 | - if: success() 39 | name: Notify success 40 | uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0 41 | with: 42 | token: ${{ secrets.GITHUB_TOKEN }} 43 | repository: ${{ github.event.client_payload.github.payload.repository.full_name }} 44 | comment-id: ${{ github.event.client_payload.github.payload.comment.id }} 45 | reaction-type: hooray 46 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt 2 | 3 | name: "Test Provider" 4 | 5 | on: 6 | workflow_call: 7 | inputs: 8 | version: 9 | required: true 10 | type: string 11 | description: Version of the provider to test 12 | 13 | env: 14 | PR_COMMIT_SHA: ${{ github.event.client_payload.pull_request.head.sha }} 15 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 16 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} 17 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 18 | NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} 19 | PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} 20 | PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} 21 | PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} 22 | PULUMI_API: https://api.pulumi-staging.io 23 | PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. 24 | PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget 25 | PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} 26 | PYPI_USERNAME: __token__ 27 | SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} 28 | SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} 29 | SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} 30 | TF_APPEND_USER_AGENT: pulumi 31 | 32 | jobs: 33 | test: 34 | permissions: 35 | contents: read 36 | id-token: write 37 | runs-on: ubuntu-latest 38 | env: 39 | PROVIDER_VERSION: ${{ inputs.version }} 40 | steps: 41 | - name: Checkout Repo 42 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 43 | with: 44 | ref: ${{ env.PR_COMMIT_SHA }} 45 | persist-credentials: false 46 | - name: Checkout p/examples 47 | if: matrix.testTarget == 'pulumiExamples' 48 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 49 | with: 50 | repository: pulumi/examples 51 | path: p-examples 52 | - name: Setup tools 53 | uses: ./.github/actions/setup-tools 54 | with: 55 | tools: pulumictl, pulumicli, ${{ matrix.language }} 56 | - name: Prepare local workspace 57 | run: make prepare_local_workspace 58 | - name: Download bin 59 | uses: ./.github/actions/download-provider 60 | - name: Download SDK 61 | uses: ./.github/actions/download-sdk 62 | with: 63 | language: ${{ matrix.language }} 64 | - name: Restore makefile progress 65 | run: make --touch provider schema build_${{ matrix.language }} 66 | - name: Update path 67 | run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" 68 | - name: Install Python deps 69 | if: matrix.language == 'python' 70 | run: |- 71 | pip3 install virtualenv==20.0.23 72 | pip3 install pipenv 73 | - name: Install dependencies 74 | run: make install_${{ matrix.language}}_sdk 75 | - name: Run provider tests 76 | if: matrix.testTarget == 'local' 77 | working-directory: provider 78 | run: go test -v -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 79 | - name: Run tests 80 | if: matrix.testTarget == 'local' 81 | run: cd examples && go test -v -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -skip TestPulumiExamples -parallel 4 . 82 | - name: Run pulumi/examples tests 83 | if: matrix.testTarget == 'pulumiExamples' 84 | run: cd examples && go test -v -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -run TestPulumiExamples -parallel 4 . 85 | strategy: 86 | fail-fast: false 87 | matrix: 88 | language: 89 | - nodejs 90 | - python 91 | - dotnet 92 | - go 93 | - java 94 | testTarget: [local] 95 | -------------------------------------------------------------------------------- /.github/workflows/upgrade-provider.yml: -------------------------------------------------------------------------------- 1 | # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt 2 | 3 | name: Upgrade provider 4 | on: 5 | workflow_dispatch: 6 | inputs: 7 | version: 8 | description: | 9 | The version of the upstream provider to upgrade to, without the 'v' prefix 10 | 11 | If no version is specified, it will be inferred from the upstream provider's release tags. 12 | required: false 13 | type: string 14 | upgradeProviderVersion: 15 | description: | 16 | Version of upgrade-provider to use. This must be a valid git reference in the pulumi/upgrade-provider repo. Defaults to "main" 17 | 18 | See https://go.dev/ref/mod#versions for valid versions. E.g. "v0.1.0", "main", "da25dec". 19 | default: main 20 | type: string 21 | schedule: 22 | # 3 AM UTC ~ 8 PM PDT / 7 PM PST daily. Time chosen to run during off hours. 23 | - cron: 0 3 * * * 24 | 25 | permissions: 26 | contents: write 27 | issues: write 28 | pull-requests: write 29 | 30 | env: 31 | GH_TOKEN: ${{ secrets.PULUMI_PROVIDER_AUTOMATION_TOKEN || secrets.PULUMI_BOT_TOKEN || secrets.GITHUB_TOKEN }} 32 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 33 | 34 | jobs: 35 | upgrade_provider: 36 | name: upgrade-provider 37 | runs-on: ubuntu-latest 38 | steps: 39 | - name: Checkout Repo 40 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 41 | with: 42 | # Persist credentials so upgrade-provider can push a new branch. 43 | persist-credentials: true 44 | - name: Setup tools 45 | uses: ./.github/actions/setup-tools 46 | with: 47 | tools: pulumictl, pulumicli, nodejs, python, dotnet, go, java 48 | - name: Install upgrade-provider 49 | run: go install github.com/pulumi/upgrade-provider@${{ inputs.upgradeProviderVersion || 'main' }} 50 | shell: bash 51 | - name: "Set up git identity" 52 | run: | 53 | git config --global user.name 'bot@pulumi.com' 54 | git config --global user.email 'bot@pulumi.com' 55 | shell: bash 56 | - name: Create issues for new upstream version 57 | if: inputs.version == '' 58 | id: upstream_version 59 | # This step outputs `latest_version` if there is a pending upgrade 60 | run: upgrade-provider "$REPO" --kind=check-upstream-version 61 | env: 62 | REPO: ${{ github.repository }} 63 | shell: bash 64 | - name: Calculate target version 65 | id: target_version 66 | # Prefer the manually specified version if it exists 67 | # upstream_version will be empty if the provider is up-to-date 68 | run: echo "version=${{ github.event.inputs.version || steps.upstream_version.outputs.latest_version }}" >> "$GITHUB_OUTPUT" 69 | shell: bash 70 | - name: Call upgrade provider action 71 | id: upgrade_provider 72 | if: steps.target_version.outputs.version != '' 73 | continue-on-error: true 74 | uses: pulumi/pulumi-upgrade-provider-action@819d5a53c48d0c7ddd67acbc82eb220b342084eb # v0.0.16 75 | with: 76 | kind: provider 77 | email: bot@pulumi.com 78 | username: pulumi-bot 79 | automerge: true 80 | target-version: ${{ steps.target_version.outputs.version }} 81 | allow-missing-docs: true 82 | - name: Comment on upgrade issue if automated PR failed 83 | if: steps.upgrade_provider.outcome == 'failure' 84 | shell: bash 85 | run: | 86 | issue_number=$(gh issue list --search "pulumiupgradeproviderissue" --repo "${{ github.repository }}" --json=number --jq=".[0].number") 87 | gh issue comment "${issue_number}" --repo "${{ github.repository }}" --body "Failed to create automatic PR: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/" 88 | 89 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .code 3 | **/vendor/ 4 | .pulumi 5 | **/bin/ 6 | **/obj/ 7 | Pulumi.*.yaml 8 | **/node_modules/ 9 | 10 | .DS_Store 11 | 12 | **/command-output/ 13 | 14 | .idea/ 15 | *.iml 16 | 17 | yarn.lock 18 | **/pulumiManifest.go 19 | 20 | ci-scripts 21 | **/schema.go 22 | **/schema-embed.json 23 | **/version.txt 24 | **/nuget 25 | **/dist 26 | 27 | sdk/java/build 28 | sdk/java/.gradle 29 | sdk/java/gradle 30 | sdk/java/gradlew 31 | sdk/java/gradlew.bat 32 | 33 | 34 | sdk/python/venv 35 | 36 | 37 | # Ignore local build tracking directory 38 | .make 39 | 40 | go.work 41 | go.work.sum -------------------------------------------------------------------------------- /.golangci.yml: -------------------------------------------------------------------------------- 1 | # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt 2 | 3 | linters: 4 | enable: 5 | - errcheck 6 | - gci 7 | - goconst 8 | - gofmt 9 | - gosec 10 | - govet 11 | - ineffassign 12 | - lll 13 | - gosimple 14 | - staticcheck 15 | - misspell 16 | - nakedret 17 | - revive 18 | - unconvert 19 | - unused 20 | enable-all: false 21 | issues: 22 | exclude-dirs: 23 | - pkg/vendored 24 | exclude-files: 25 | - schema.go 26 | - pulumiManifest.go 27 | run: 28 | timeout: 20m 29 | linters-settings: 30 | gci: 31 | sections: 32 | - standard # Standard section: captures all standard library packages. 33 | - blank # Blank section: contains all blank imports. 34 | - default # Default section: contains all imports that could not be matched to another section type. 35 | - prefix(github.com/pulumi/) # Custom section: groups all imports with the github.com/pulumi/ prefix. 36 | - prefix(github.com/pulumi/pulumi-tls) # Custom section: local imports 37 | custom-order: true 38 | -------------------------------------------------------------------------------- /.pulumi-java-gen.version: -------------------------------------------------------------------------------- 1 | 1.12.0 -------------------------------------------------------------------------------- /.upgrade-config.yml: -------------------------------------------------------------------------------- 1 | # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt 2 | 3 | --- 4 | upstream-provider-name: terraform-provider-tls 5 | pulumi-infer-version: true 6 | remove-plugins: true 7 | -------------------------------------------------------------------------------- /CHANGELOG_OLD.md: -------------------------------------------------------------------------------- 1 | CHANGELOG 2 | ========= 3 | 4 | ## Notice (2022-01-06) 5 | 6 | *As of this notice, using CHANGELOG.md is DEPRECATED. We will be using [GitHub Releases](https://github.com/pulumi/pulumi-tls/releases) for this repository* 7 | 8 | ## HEAD (Unreleased) 9 | _(none)_ 10 | 11 | --- 12 | 13 | ## 4.1.0 (2021-11-24) 14 | * Upgrade to terraform-bridge 3.11.0 15 | * Upgrade to pulumi 3.17.0 16 | 17 | ## 4.0.0 (2021-04-19) 18 | * Depend on Pulumi 3.0, which includes improvements to Python resource arguments and key translation, Go SDK performance, 19 | Node SDK performance, general availability of Automation API, and more. 20 | 21 | ## 3.4.0 (2021-04-12) 22 | * Upgrade to pulumi-terraform-bridge v2.23.0 23 | 24 | ## 3.3.1 (2021-03-23) 25 | * Upgrade to pulumi-terraform-bridge v2.22.1 26 | **Please Note:** This includes a bug fix to the refresh operation regarding arrays 27 | 28 | ## 3.3.0 (2021-03-23) 29 | * Upgrade to pulumi-terraform-bridge v2.21.0 30 | * Release macOS arm64 binary 31 | 32 | ## 3.2.0 (2021-02-22) 33 | * Upgrade to v3.1.0 of the TLS Terraform Provider 34 | 35 | ## 3.1.1 (2021-02-16) 36 | * Upgrade to pulumi-terraform-bridge v2.19.0 37 | **Please Note:** This includes a bug fix that stops mutating resources options in the nodejs provider 38 | 39 | ## 3.1.0 (2021-01-29) 40 | * Upgrading pulumi-terraform-bridge to v2.18.0 41 | 42 | ## 3.0.0 (2020-12-22) 43 | * Upgrade to v3.0.0 of the TLS Terraform Provider 44 | 45 | ## 2.5.0 (2020-12-16) 46 | * Upgrade to v2.16.0 of pulumi-terraform-bridge 47 | * Preserve unknowns during provider preview 48 | * Upgrade NodeJS and Python versions to use Pulumi >= v2.15.0 49 | 50 | ## 2.4.2 (2020-11-24) 51 | * Upgrade to pulumi-terraform-bridge v2.13.2 52 | * This adds support for import specific examples in documentation 53 | 54 | ## 2.4.1 (2020-11-09) 55 | * Upgrade to pulumi-terraform-bridge v2.12.1 56 | 57 | ## 2.4.0 (2020-10-26) 58 | * Upgrade to Pulumi v2.12.0 and pulumi-terraform-bridge v2.11.0 59 | * Improving the accuracy of previews leading to a more accurate understanding of what will actually change rather than assuming all output properties will change. 60 | ** PLEASE NOTE:** 61 | This new preview functionality can be disabled by setting `PULUMI_DISABLE_PROVIDER_PREVIEW` to `1` or `false`. 62 | 63 | ## 2.3.0 (2020-08-31) 64 | * Upgrade to pulumi-terraform-bridge v2.7.3 65 | * Upgrade to Pulumi v2.9.0, which adds type annotations and input/output classes to Python 66 | 67 | ## 2.2.0 (2020-07-24) 68 | * Upgrade to v2.2.0 of the TLS Terraform Provider 69 | 70 | ## 2.1.3 (2020-06-11) 71 | * Switch to GitHub actions for build 72 | 73 | ## 2.1.2 (2020-05-28) 74 | * Upgrade to Pulumi v2.3.0 75 | * Upgrade to pulumi-terraform-bridge v2.4.0 76 | 77 | ## 2.1.1 (2020-05-12) 78 | * Upgrade to pulumi-terraform-bridge v2.3.1 79 | 80 | ## 2.1.0 (2020-04-28) 81 | * Regenerate datasource examples to be async 82 | * Upgrade to pulumi-terraform-bridge v2.1.0 83 | 84 | ## 2.0.0 (2020-04-17) 85 | * Upgrade to Pulumi v2.0.0 86 | * Upgrade to pulumi-terraform-bridge v2.0.0 87 | 88 | ## 1.6.0 (2020-03-31) 89 | * Convert to go modules 90 | * Upgrade to Pulumi v1.13.1 91 | * Upgrade to pulumi-terraform-bridge 1.8.4 92 | 93 | ## 1.5.0 (2020-03-16) 94 | * Upgrade to Pulumi v1.12.1 95 | * Upgrade to pulumi-terraform-bridge v1.8.2 96 | 97 | ## 1.4.0 (2020-01-29) 98 | * Upgrade to pulumi-terraform-bridge v1.6.4 99 | 100 | ## 1.3.0 (2020-01-06) 101 | * Upgrade to pulumi-terraform-bridge v1.5.2 102 | 103 | ## 1.2.0 (2019-12-04) 104 | * Upgrade to support go 1.13.x 105 | * Upgrade to pulumi-terraform-bridge v1.4.3 106 | 107 | ## 1.1.0 (2019-11-12) 108 | * Add a **preview** .NET SDK 109 | 110 | ## 1.0.0 (2019-10-09) 111 | * Upgrade to v2.1.1 of the TLS Terraform Provider 112 | 113 | ## 0.18.5 (2019-09-05) 114 | * Upgrade to Pulumi v1.0.0 115 | 116 | ## 0.18.4 (2019-08-29) 117 | * Upgrade pulumi-terraform to 3f206601e7 118 | 119 | ## 0.18.3 (2019-08-20) 120 | * Depend on latest pulumi package 121 | 122 | ## 0.18.2 (2019-08-09) 123 | * Upgrade to pulumi-terraform@9db2fc93cd 124 | 125 | ## 0.18.1 (2019-08-08) 126 | * Update to pulumi-terraform@013b95b1c8 127 | 128 | 129 | ## 0.18.0 (2019-07-10) 130 | * Initial release based on v2.0.1 of the TLS Terraform Provider 131 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to the Pulumi ecosystem 2 | 3 | Do you want to contribute to Pulumi? Awesome! We are so happy to have you. 4 | We have a few tips and housekeeping items to help you get up and running. 5 | 6 | ## Code of Conduct 7 | 8 | Please make sure to read and observe our [Code of Conduct](./CODE-OF-CONDUCT.md) 9 | 10 | ## Community Expectations 11 | 12 | Please read about our [contribution guidelines here.](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md#communications) 13 | 14 | ## Setting up your development environment 15 | 16 | ### Pulumi prerequisites 17 | 18 | Please refer to the [main Pulumi repo](https://github.com/pulumi/pulumi/)'s [CONTRIBUTING.md file]( 19 | https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md#developing) for details on how to get set up with Pulumi. 20 | 21 | ## Committing Generated Code 22 | 23 | You must generate and check in the SDKs on each pull request containing a code change, e.g. adding a new resource to `resources.go`. 24 | 25 | 1. Run `make build_sdks` from the root of this repository 26 | 1. Open a pull request containing all changes 27 | 1. *Note:* If a large number of seemingly-unrelated diffs are produced by `make build_sdks` (for example, lots of changes to comments unrelated to the change you are making), ensure that the latest dependencies for the provider are installed by running `go mod tidy` in the `provider/` directory of this repository. 28 | 29 | -------------------------------------------------------------------------------- /COPYRIGHT: -------------------------------------------------------------------------------- 1 | Except as otherwise noted below and/or in individual files, this 2 | project is licensed under the Apache License, Version 2.0 (see 3 | LICENSE or ). 4 | 5 | This project is a larger work that combines with software written 6 | by third parties, licensed under their own terms. 7 | 8 | Notably, this larger work combines with the Terraform TLS Provider, 9 | which is licensed under the Mozilla Public License 2.0 (see 10 | or the project itself at 11 | ). 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Actions Status](https://github.com/pulumi/pulumi-tls/workflows/master/badge.svg)](https://github.com/pulumi/pulumi-tls/actions) 2 | [![Slack](http://www.pulumi.com/images/docs/badges/slack.svg)](https://slack.pulumi.com) 3 | [![NPM version](https://badge.fury.io/js/%40pulumi%2Ftls.svg)](https://www.npmjs.com/package/@pulumi/tls) 4 | [![Python version](https://badge.fury.io/py/pulumi-tls.svg)](https://pypi.org/project/pulumi-tls) 5 | [![NuGet version](https://badge.fury.io/nu/pulumi.tls.svg)](https://badge.fury.io/nu/pulumi.tls) 6 | [![PkgGoDev](https://pkg.go.dev/badge/github.com/pulumi/pulumi-tls/sdk/v5/go)](https://pkg.go.dev/github.com/pulumi/pulumi-tls/sdk/v5/go) 7 | [![License](https://img.shields.io/npm/l/%40pulumi%2Fpulumi.svg)](https://github.com/pulumi/pulumi-tls/blob/master/LICENSE) 8 | 9 | # TLS Resource Provider 10 | 11 | The TLS resource provider for Pulumi lets you create TLS keys and certificates in your cloud programs. To use 12 | this package, please [install the Pulumi CLI first](https://pulumi.io/). 13 | 14 | ## Installing 15 | 16 | This package is available in many languages in the standard packaging formats. 17 | 18 | ### Node.js (Java/TypeScript) 19 | 20 | To use from JavaScript or TypeScript in Node.js, install using either `npm`: 21 | 22 | $ npm install @pulumi/tls 23 | 24 | or `yarn`: 25 | 26 | $ yarn add @pulumi/tls 27 | 28 | ### Python 29 | 30 | To use from Python, install using `pip`: 31 | 32 | $ pip install pulumi_tls 33 | 34 | ### Go 35 | 36 | To use from Go, use `go get` to grab the latest version of the library 37 | 38 | $ go get github.com/pulumi/pulumi-tls/sdk/v5 39 | 40 | ### .NET 41 | 42 | To use from .NET, install using `dotnet add package`: 43 | 44 | $ dotnet add package Pulumi.Tls 45 | 46 | ## Concepts 47 | 48 | The `@pulumi/tls` package provides a strongly-typed means to build cloud applications that create 49 | and interact closely with TLS resources. 50 | 51 | ## Reference 52 | 53 | 54 | For further information, please visit [the TLS provider docs](https://www.pulumi.com/docs/intro/cloud-providers/tls) or for detailed reference documentation, please visit [the API docs](https://www.pulumi.com/docs/reference/pkg/tls). 55 | -------------------------------------------------------------------------------- /devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "yarn@latest", 4 | "pulumictl@latest", 5 | "go@1.21.", 6 | "nodejs@20.", 7 | "python3@3.11.8", 8 | "dotnet-sdk@8.0.", 9 | "gradle_7@7.6", 10 | "curl@8" 11 | ], 12 | "shell": { 13 | "init_hook": [ 14 | "export PATH=\"$(pwd)/bin/:$PATH\"" 15 | ], 16 | "scripts": { 17 | "test": [ 18 | "echo \"Error: no test specified\" && exit 1" 19 | ] 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /devbox.lock: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /examples/examples_dotnet_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016-2017, Pulumi Corporation. All rights reserved. 2 | //go:build dotnet || all 3 | // +build dotnet all 4 | 5 | package examples 6 | 7 | import ( 8 | "path" 9 | "testing" 10 | 11 | "github.com/pulumi/pulumi/pkg/v3/testing/integration" 12 | ) 13 | 14 | func TestAccPrivateKeyCSharp(t *testing.T) { 15 | test := getCsharpBaseOptions(t). 16 | With(integration.ProgramTestOptions{ 17 | Dir: path.Join(getCwd(t), "private-key", "dotnet"), 18 | }) 19 | 20 | integration.ProgramTest(t, &test) 21 | } 22 | 23 | func getCsharpBaseOptions(t *testing.T) integration.ProgramTestOptions { 24 | base := getBaseOptions() 25 | baseCsharp := base.With(integration.ProgramTestOptions{ 26 | Dependencies: []string{ 27 | "Pulumi.Tls", 28 | }, 29 | }) 30 | 31 | return baseCsharp 32 | } 33 | -------------------------------------------------------------------------------- /examples/examples_go_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016-2017, Pulumi Corporation. All rights reserved. 2 | //go:build go || all 3 | // +build go all 4 | 5 | package examples 6 | 7 | import ( 8 | "fmt" 9 | "github.com/stretchr/testify/require" 10 | "os" 11 | "path" 12 | "path/filepath" 13 | "testing" 14 | 15 | "github.com/pulumi/pulumi/pkg/v3/testing/integration" 16 | ) 17 | 18 | func TestAccPrivateKeyGo(t *testing.T) { 19 | test := getGoBaseOptions(t). 20 | With(integration.ProgramTestOptions{ 21 | Dir: path.Join(getCwd(t), "private-key", "go"), 22 | }) 23 | 24 | integration.ProgramTest(t, &test) 25 | } 26 | 27 | func TestAccSelfSignedCertGoForcesNewResource(t *testing.T) { 28 | test := getGoBaseOptions(t). 29 | With(integration.ProgramTestOptions{ 30 | Dir: path.Join(getCwd(t), "self-signed-cert", "go"), 31 | ExpectRefreshChanges: true, 32 | }) 33 | 34 | integration.ProgramTest(t, &test) 35 | } 36 | 37 | func getGoBaseOptions(t *testing.T) integration.ProgramTestOptions { 38 | base := getBaseOptions() 39 | goDepRoot := os.Getenv("PULUMI_GO_DEP_ROOT") 40 | if goDepRoot == "" { 41 | var err error 42 | goDepRoot, err = filepath.Abs("../..") 43 | require.NoError(t, err) 44 | } 45 | baseGo := base.With(integration.ProgramTestOptions{ 46 | Dependencies: []string{ 47 | "github.com/pulumi/pulumi-tls/sdk/v5", 48 | }, 49 | Env: []string{ 50 | fmt.Sprintf("PULUMI_GO_DEP_ROOT=%s", goDepRoot), 51 | }, 52 | }) 53 | 54 | return baseGo 55 | } 56 | -------------------------------------------------------------------------------- /examples/examples_nodejs_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016-2017, Pulumi Corporation. All rights reserved. 2 | //go:build nodejs || all 3 | // +build nodejs all 4 | 5 | package examples 6 | 7 | import ( 8 | "path" 9 | "testing" 10 | 11 | "github.com/pulumi/pulumi/pkg/v3/testing/integration" 12 | ) 13 | 14 | func TestAccPrivateKeyTs(t *testing.T) { 15 | test := getJSBaseOptions(t). 16 | With(integration.ProgramTestOptions{ 17 | Dir: path.Join(getCwd(t), "private-key", "ts"), 18 | }) 19 | 20 | integration.ProgramTest(t, &test) 21 | } 22 | 23 | func TestAccSelfSignedCert(t *testing.T) { 24 | test := getJSBaseOptions(t). 25 | With(integration.ProgramTestOptions{ 26 | Dir: path.Join(getCwd(t), "self-signed-cert", "ts"), 27 | }) 28 | 29 | integration.ProgramTest(t, &test) 30 | } 31 | 32 | func TestProviderUpgrade(t *testing.T) { 33 | testProviderUpgrade(t, "provider-update/ts") 34 | } 35 | 36 | func getJSBaseOptions(t *testing.T) integration.ProgramTestOptions { 37 | base := getBaseOptions() 38 | baseJS := base.With(integration.ProgramTestOptions{ 39 | Dependencies: []string{ 40 | "@pulumi/tls", 41 | }, 42 | }) 43 | 44 | return baseJS 45 | } 46 | -------------------------------------------------------------------------------- /examples/examples_py_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016-2017, Pulumi Corporation. All rights reserved. 2 | //go:build python || all 3 | // +build python all 4 | 5 | package examples 6 | 7 | import ( 8 | "path" 9 | "path/filepath" 10 | "testing" 11 | 12 | "github.com/pulumi/pulumi/pkg/v3/testing/integration" 13 | ) 14 | 15 | func TestAccPrivateKeyPy(t *testing.T) { 16 | test := getPythonBaseOptions(t). 17 | With(integration.ProgramTestOptions{ 18 | Dir: path.Join(getCwd(t), "private-key", "py"), 19 | }) 20 | 21 | integration.ProgramTest(t, &test) 22 | } 23 | 24 | func getPythonBaseOptions(t *testing.T) integration.ProgramTestOptions { 25 | base := getBaseOptions() 26 | basePython := base.With(integration.ProgramTestOptions{ 27 | Dependencies: []string{ 28 | filepath.Join("..", "sdk", "python", "bin"), 29 | }, 30 | }) 31 | 32 | return basePython 33 | } 34 | -------------------------------------------------------------------------------- /examples/examples_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016-2017, Pulumi Corporation. All rights reserved. 2 | 3 | package examples 4 | 5 | import ( 6 | "os" 7 | "path/filepath" 8 | "testing" 9 | 10 | "github.com/pulumi/providertest" 11 | "github.com/pulumi/providertest/optproviderupgrade" 12 | "github.com/pulumi/providertest/pulumitest" 13 | "github.com/pulumi/providertest/pulumitest/assertpreview" 14 | "github.com/pulumi/providertest/pulumitest/opttest" 15 | "github.com/pulumi/pulumi/pkg/v3/testing/integration" 16 | "github.com/stretchr/testify/require" 17 | ) 18 | 19 | func getCwd(t *testing.T) string { 20 | cwd, err := os.Getwd() 21 | if err != nil { 22 | t.FailNow() 23 | } 24 | 25 | return cwd 26 | } 27 | 28 | func getBaseOptions() integration.ProgramTestOptions { 29 | return integration.ProgramTestOptions{ 30 | ExpectRefreshChanges: true, 31 | SkipRefresh: true, 32 | Quick: true, 33 | RunUpdateTest: false, 34 | } 35 | } 36 | 37 | const ( 38 | providerName = "tls" 39 | baselineVersion = "5.0.0" 40 | ) 41 | 42 | func testProviderUpgrade(t *testing.T, dir string, opts ...opttest.Option) { 43 | cwd, err := os.Getwd() 44 | require.NoError(t, err) 45 | options := []opttest.Option{ 46 | opttest.DownloadProviderVersion(providerName, baselineVersion), 47 | opttest.LocalProviderPath(providerName, filepath.Join(cwd, "..", "bin")), 48 | } 49 | options = append(options, opts...) 50 | pt := pulumitest.NewPulumiTest(t, dir, options...) 51 | result := providertest.PreviewProviderUpgrade( 52 | t, 53 | pt, 54 | providerName, 55 | baselineVersion, 56 | optproviderupgrade.DisableAttach()) 57 | assertpreview.HasNoReplacements(t, result) 58 | } -------------------------------------------------------------------------------- /examples/examples_yaml_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016-2023, Pulumi Corporation. All rights reserved. 2 | //go:build yaml || all 3 | // +build yaml all 4 | 5 | package examples 6 | 7 | import ( 8 | "path/filepath" 9 | "strings" 10 | "testing" 11 | 12 | "github.com/stretchr/testify/assert" 13 | 14 | "github.com/pulumi/pulumi/pkg/v3/testing/integration" 15 | ) 16 | 17 | func TestAccGetCert(t *testing.T) { 18 | test := getBaseOptions().With(integration.ProgramTestOptions{ 19 | Dir: filepath.Join(getCwd(t), "get-cert", "yaml"), 20 | ExtraRuntimeValidation: validateExpectedVsActual, 21 | }) 22 | integration.ProgramTest(t, &test) 23 | } 24 | 25 | // Stacks may define tests inline by a simple convention of providing 26 | // ${test}__expect and ${test}__actual pairs. For example: 27 | // 28 | // outputs: 29 | // test1__expect: 1 30 | // test1__actual: ${res1.out} 31 | // 32 | // This function interpretes these outputs to actual tests. 33 | func validateExpectedVsActual(t *testing.T, stack integration.RuntimeValidationStackInfo) { 34 | expects := map[string]interface{}{} 35 | actuals := map[string]interface{}{} 36 | for n, output := range stack.Outputs { 37 | if strings.HasSuffix(n, "__actual") { 38 | actuals[strings.TrimSuffix(n, "__actual")] = output 39 | } 40 | if strings.HasSuffix(n, "__expect") { 41 | expects[strings.TrimSuffix(n, "__expect")] = output 42 | } 43 | } 44 | for k := range expects { 45 | k := k 46 | t.Run(k, func(t *testing.T) { 47 | assert.Equal(t, expects[k], actuals[k]) 48 | }) 49 | } 50 | } 51 | 52 | 53 | func TestSelfSignedKeyUpgrade(t *testing.T) { 54 | testProviderUpgrade(t, "self-signed-cert/yaml") 55 | } -------------------------------------------------------------------------------- /examples/get-cert/yaml/Pulumi.yaml: -------------------------------------------------------------------------------- 1 | name: test-get-cert 2 | runtime: yaml 3 | description: Testing getCertificate data source 4 | outputs: 5 | test_serial__expect: "CN=Amazon Root CA 1,O=Amazon,C=US" 6 | test_serial__actual: ${exampleCertResult.certificates[0].issuer} 7 | 8 | resources: {} 9 | variables: 10 | exampleCertResult: 11 | fn::invoke: 12 | function: tls:index/getCertificate:getCertificate 13 | arguments: 14 | content: | 15 | -----BEGIN CERTIFICATE----- 16 | MIIESTCCAzGgAwIBAgITBn+UV4WH6Kx33rJTMlu8mYtWDTANBgkqhkiG9w0BAQsF 17 | ADA5MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6 18 | b24gUm9vdCBDQSAxMB4XDTE1MTAyMjAwMDAwMFoXDTI1MTAxOTAwMDAwMFowRjEL 19 | MAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEVMBMGA1UECxMMU2VydmVyIENB 20 | IDFCMQ8wDQYDVQQDEwZBbWF6b24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK 21 | AoIBAQDCThZn3c68asg3Wuw6MLAd5tES6BIoSMzoKcG5blPVo+sDORrMd4f2AbnZ 22 | cMzPa43j4wNxhplty6aUKk4T1qe9BOwKFjwK6zmxxLVYo7bHViXsPlJ6qOMpFge5 23 | blDP+18x+B26A0piiQOuPkfyDyeR4xQghfj66Yo19V+emU3nazfvpFA+ROz6WoVm 24 | B5x+F2pV8xeKNR7u6azDdU5YVX1TawprmxRC1+WsAYmz6qP+z8ArDITC2FMVy2fw 25 | 0IjKOtEXc/VfmtTFch5+AfGYMGMqqvJ6LcXiAhqG5TI+Dr0RtM88k+8XUBCeQ8IG 26 | KuANaL7TiItKZYxK1MMuTJtV9IblAgMBAAGjggE7MIIBNzASBgNVHRMBAf8ECDAG 27 | AQH/AgEAMA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUWaRmBlKge5WSPKOUByeW 28 | dFv5PdAwHwYDVR0jBBgwFoAUhBjMhTTsvAyUlC4IWZzHshBOCggwewYIKwYBBQUH 29 | AQEEbzBtMC8GCCsGAQUFBzABhiNodHRwOi8vb2NzcC5yb290Y2ExLmFtYXpvbnRy 30 | dXN0LmNvbTA6BggrBgEFBQcwAoYuaHR0cDovL2NydC5yb290Y2ExLmFtYXpvbnRy 31 | dXN0LmNvbS9yb290Y2ExLmNlcjA/BgNVHR8EODA2MDSgMqAwhi5odHRwOi8vY3Js 32 | LnJvb3RjYTEuYW1hem9udHJ1c3QuY29tL3Jvb3RjYTEuY3JsMBMGA1UdIAQMMAow 33 | CAYGZ4EMAQIBMA0GCSqGSIb3DQEBCwUAA4IBAQCFkr41u3nPo4FCHOTjY3NTOVI1 34 | 59Gt/a6ZiqyJEi+752+a1U5y6iAwYfmXss2lJwJFqMp2PphKg5625kXg8kP2CN5t 35 | 6G7bMQcT8C8xDZNtYTd7WPD8UZiRKAJPBXa30/AbwuZe0GaFEQ8ugcYQgSn+IGBI 36 | 8/LwhBNTZTUVEWuCUUBVV18YtbAiPq3yXqMB48Oz+ctBWuZSkbvkNodPLamkB2g1 37 | upRyzQ7qDn1X8nn8N8V7YJ6y68AtkHcNSRAnpTitxBKjtKPISLMVCx7i4hncxHZS 38 | yLyKQXhw2W2Xs0qLeC1etA+jTGDK4UfLeC0SF7FSi8o5LL21L8IzApar2pR/ 39 | -----END CERTIFICATE----- 40 | -------------------------------------------------------------------------------- /examples/private-key/dotnet/MyStack.cs: -------------------------------------------------------------------------------- 1 | using Pulumi; 2 | using Pulumi.Tls; 3 | 4 | class MyStack : Stack 5 | { 6 | public MyStack() 7 | { 8 | var key = new PrivateKey("my-private-key", new PrivateKeyArgs{ 9 | Algorithm = "ECDSA", 10 | EcdsaCurve = "P384", 11 | }); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/private-key/dotnet/Program.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Pulumi; 3 | 4 | class Program 5 | { 6 | static Task Main() => Deployment.RunAsync(); 7 | } 8 | -------------------------------------------------------------------------------- /examples/private-key/dotnet/Pulumi.yaml: -------------------------------------------------------------------------------- 1 | name: private-key-tls-dotnet 2 | runtime: dotnet 3 | description: A simple example of generating a TLS private key. 4 | -------------------------------------------------------------------------------- /examples/private-key/dotnet/dotnet.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net8.0 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/private-key/go/Pulumi.yaml: -------------------------------------------------------------------------------- 1 | name: go 2 | runtime: go 3 | description: A minimal Go Pulumi program 4 | -------------------------------------------------------------------------------- /examples/private-key/go/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/pulumi/pulumi-tls/sdk/v5/go/tls" 5 | "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 6 | ) 7 | 8 | func main() { 9 | pulumi.Run(func(ctx *pulumi.Context) error { 10 | 11 | _, err := tls.NewPrivateKey(ctx, "private-key", &tls.PrivateKeyArgs{ 12 | Algorithm: pulumi.String("RSA"), 13 | }) 14 | 15 | if err != nil { 16 | return err 17 | } 18 | return nil 19 | }) 20 | } 21 | -------------------------------------------------------------------------------- /examples/private-key/py/.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | venv/ 3 | -------------------------------------------------------------------------------- /examples/private-key/py/Pulumi.yaml: -------------------------------------------------------------------------------- 1 | name: private-key-tls-py 2 | runtime: 3 | name: python 4 | options: 5 | virtualenv: venv 6 | description: A simple example of generating a TLS private key. 7 | 8 | -------------------------------------------------------------------------------- /examples/private-key/py/__main__.py: -------------------------------------------------------------------------------- 1 | """A Python Pulumi program""" 2 | 3 | import pulumi_tls as tls 4 | 5 | key = tls.PrivateKey("my-private-key", 6 | algorithm="ECDSA", 7 | ecdsa_curve="P384" 8 | ) 9 | -------------------------------------------------------------------------------- /examples/private-key/py/requirements.txt: -------------------------------------------------------------------------------- 1 | pulumi>=3.0.0,<4.0.0 2 | -------------------------------------------------------------------------------- /examples/private-key/ts/Pulumi.yaml: -------------------------------------------------------------------------------- 1 | name: private-key-tls-ts 2 | runtime: nodejs 3 | description: A simple example of generating a TLS private key. 4 | -------------------------------------------------------------------------------- /examples/private-key/ts/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2016-2018, Pulumi Corporation. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import * as tls from "@pulumi/tls"; 16 | 17 | export const key = new tls.PrivateKey("my-private-key", { 18 | algorithm: "ECDSA", 19 | ecdsaCurve: "P384", 20 | }); 21 | 22 | export const thumbprint = key.publicKeyFingerprintMd5; 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/private-key/ts/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "simple", 3 | "version": "0.0.1", 4 | "license": "Apache-2.0", 5 | "main": "bin/index.js", 6 | "typings": "bin/index.d.ts", 7 | "scripts": { 8 | "build": "tsc" 9 | }, 10 | "dependencies": { 11 | "@pulumi/pulumi": "^3.0.0" 12 | }, 13 | "devDependencies": { 14 | "@types/node": "^8.0.27", 15 | "typescript": "^3.0.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /examples/private-key/ts/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "outDir": "bin", 4 | "target": "es6", 5 | "lib": [ 6 | "es6" 7 | ], 8 | "module": "commonjs", 9 | "moduleResolution": "node", 10 | "sourceMap": true, 11 | "experimentalDecorators": true, 12 | "pretty": true, 13 | "noFallthroughCasesInSwitch": true, 14 | "noImplicitAny": true, 15 | "noImplicitReturns": true, 16 | "forceConsistentCasingInFileNames": true, 17 | "strictNullChecks": true 18 | }, 19 | "files": [ 20 | "index.ts" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /examples/provider-update/ts/Pulumi.yaml: -------------------------------------------------------------------------------- 1 | name: provider-update 2 | runtime: nodejs 3 | description: This stack helps testing provider upgrades and is not a proper example. 4 | -------------------------------------------------------------------------------- /examples/provider-update/ts/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2016-2023, Pulumi Corporation. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import * as tls from "@pulumi/tls"; 16 | 17 | export const key = new tls.PrivateKey("my-private-key", { 18 | algorithm: "ECDSA", 19 | ecdsaCurve: "P384", 20 | }); 21 | 22 | export const ssCert = new tls.SelfSignedCert("ssoCert", { 23 | allowedUses: ["cert_signing"], 24 | privateKeyPem: key.privateKeyPem, 25 | subject: { 26 | commonName: `api.example.com`, 27 | }, 28 | validityPeriodHours: (365*24), 29 | }) 30 | -------------------------------------------------------------------------------- /examples/provider-update/ts/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "providerupdate", 3 | "version": "0.0.1", 4 | "license": "Apache-2.0", 5 | "main": "index.ts", 6 | "typings": "bin/index.d.ts", 7 | "scripts": { 8 | "build": "tsc" 9 | }, 10 | "dependencies": { 11 | "@pulumi/pulumi": "^3.0.0", 12 | "@pulumi/tls": "v5.0.0-alpha.0" 13 | }, 14 | "devDependencies": { 15 | "@types/node": "^8.0.27", 16 | "typescript": "^3.0.0" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /examples/provider-update/ts/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "outDir": "bin", 4 | "target": "es6", 5 | "lib": [ 6 | "es6" 7 | ], 8 | "module": "commonjs", 9 | "moduleResolution": "node", 10 | "sourceMap": true, 11 | "experimentalDecorators": true, 12 | "pretty": true, 13 | "noFallthroughCasesInSwitch": true, 14 | "noImplicitAny": true, 15 | "noImplicitReturns": true, 16 | "forceConsistentCasingInFileNames": true, 17 | "strictNullChecks": true 18 | }, 19 | "files": [ 20 | "index.ts" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /examples/self-signed-cert/go/Pulumi.yaml: -------------------------------------------------------------------------------- 1 | name: self-signed-cert-go 2 | runtime: go 3 | description: A simple example of generating a TLS private key. 4 | -------------------------------------------------------------------------------- /examples/self-signed-cert/go/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/pulumi/pulumi-tls/sdk/v5/go/tls" 5 | "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 6 | ) 7 | 8 | func main() { 9 | pulumi.Run(func(ctx *pulumi.Context) error { 10 | caKey, err := tls.NewPrivateKey(ctx, "ca-key", &tls.PrivateKeyArgs{ 11 | Algorithm: pulumi.String("RSA").ToStringOutput(), 12 | RsaBits: pulumi.Int(2048).ToIntPtrOutput(), 13 | }) 14 | 15 | if err != nil { 16 | return err 17 | } 18 | 19 | caRoot, err := tls.NewSelfSignedCert(ctx, "self-signed", &tls.SelfSignedCertArgs{ 20 | PrivateKeyPem: caKey.PrivateKeyPem, 21 | 22 | ValidityPeriodHours: pulumi.Int(87600).ToIntOutput(), 23 | IsCaCertificate: pulumi.Bool(true).ToBoolPtrOutput(), 24 | AllowedUses: pulumi.ToStringArray([]string{"cert_signing"}).ToStringArrayOutput(), 25 | 26 | Subject: tls.SelfSignedCertSubjectArgs{ 27 | CommonName: pulumi.String("CustomizeDiff repro").ToStringPtrOutput(), 28 | Organization: pulumi.String("Pulumi").ToStringPtrOutput(), 29 | }, 30 | }) 31 | 32 | if err != nil { 33 | return err 34 | } 35 | 36 | certKey, err := tls.NewPrivateKey(ctx, "cert-key", &tls.PrivateKeyArgs{ 37 | Algorithm: pulumi.String("RSA").ToStringOutput(), 38 | RsaBits: pulumi.Int(2048).ToIntPtrOutput(), 39 | }) 40 | 41 | if err != nil { 42 | return err 43 | } 44 | 45 | localCertReq, err := tls.NewCertRequest(ctx, "local", &tls.CertRequestArgs{ 46 | PrivateKeyPem: certKey.PrivateKeyPem, 47 | 48 | Subject: tls.CertRequestSubjectArgs{ 49 | CommonName: pulumi.String("sometest.pulumi.com").ToStringPtrOutput(), 50 | Organization: pulumi.String("Pulumi").ToStringPtrOutput(), 51 | }, 52 | }) 53 | if err != nil { 54 | return err 55 | } 56 | 57 | localCert, err := tls.NewLocallySignedCert(ctx, "local", &tls.LocallySignedCertArgs{ 58 | CertRequestPem: localCertReq.CertRequestPem, 59 | 60 | CaPrivateKeyPem: caKey.PrivateKeyPem, 61 | CaCertPem: caRoot.CertPem, 62 | 63 | ValidityPeriodHours: pulumi.Int(2).ToIntOutput(), 64 | EarlyRenewalHours: pulumi.Int(3).ToIntOutput(), 65 | AllowedUses: pulumi.ToStringArray([]string{"server_auth"}), 66 | }) 67 | 68 | if err != nil { 69 | return err 70 | } 71 | 72 | ctx.Export("cert-id", localCert.ID()) 73 | 74 | return nil 75 | }) 76 | } 77 | -------------------------------------------------------------------------------- /examples/self-signed-cert/ts/Pulumi.yaml: -------------------------------------------------------------------------------- 1 | name: self-signed-cert-ts 2 | runtime: nodejs 3 | description: A simple example of generating a TLS private key. 4 | -------------------------------------------------------------------------------- /examples/self-signed-cert/ts/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2016-2018, Pulumi Corporation. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import * as tls from "@pulumi/tls"; 16 | 17 | const ssoPrivateKey = new tls.PrivateKey("ssoPrivateKey", { algorithm: "RSA", rsaBits: 2048 }) 18 | 19 | new tls.SelfSignedCert("ssoCert", { 20 | allowedUses: ["cert_signing"], 21 | privateKeyPem: ssoPrivateKey.privateKeyPem, 22 | subject: { 23 | commonName: `api.example.com`, 24 | }, 25 | validityPeriodHours: (365*24), 26 | }) 27 | -------------------------------------------------------------------------------- /examples/self-signed-cert/ts/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "simple", 3 | "version": "0.0.1", 4 | "license": "Apache-2.0", 5 | "main": "bin/index.js", 6 | "typings": "bin/index.d.ts", 7 | "scripts": { 8 | "build": "tsc" 9 | }, 10 | "dependencies": { 11 | "@pulumi/pulumi": "^3.0.0" 12 | }, 13 | "devDependencies": { 14 | "@types/node": "^8.0.27", 15 | "typescript": "^3.0.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /examples/self-signed-cert/ts/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "outDir": "bin", 4 | "target": "es6", 5 | "lib": [ 6 | "es6" 7 | ], 8 | "module": "commonjs", 9 | "moduleResolution": "node", 10 | "sourceMap": true, 11 | "experimentalDecorators": true, 12 | "pretty": true, 13 | "noFallthroughCasesInSwitch": true, 14 | "noImplicitAny": true, 15 | "noImplicitReturns": true, 16 | "forceConsistentCasingInFileNames": true, 17 | "strictNullChecks": true 18 | }, 19 | "files": [ 20 | "index.ts" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /examples/self-signed-cert/yaml/Pulumi.yaml: -------------------------------------------------------------------------------- 1 | name: self-signed-key 2 | description: A minimal Pulumi YAML program 3 | runtime: yaml 4 | resources: 5 | cert: 6 | type: tls:SelfSignedCert 7 | name: ssoCert 8 | properties: 9 | privateKeyPem: 10 | fn::readFile: ./keypair.pem 11 | allowedUses: [] 12 | validityPeriodHours: 8760 13 | -------------------------------------------------------------------------------- /examples/self-signed-cert/yaml/keypair.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC8ixL7Rhc7RdYI 3 | y4YPI/x94aRRSykiIY408gOgq7JiOS/7VQj3KAxQL1cKcODbk96y294MBORKEnWt 4 | JuMBt3TnonTtXXff/pydbh+5MqdfX90BE5JYTVWdLsMlrQmbpbWz5BxzXsSQE/p8 5 | Aym+24Rc0MHEFiHWi/lJ+O1YtDC0dbUww9BZ9hNC3lQ25+agzveyvqlh8piRXscL 6 | V59LkRZHR+ABk4aA6mR1KdiX/1gVvcFIg3mrsDDgoGxxg7kidD5YGqgUfuqP4jeZ 7 | g3K3MZ1BqBR6IvL/U88x+I6pv9OfPJT9SroeMxzVTttUpbeWwCVdD9Pa+l8xyqyJ 8 | 4FXIgGz5AgMBAAECggEABI1JThr1kfmLU6JhqEFFIr8uxdFeJIjU6E/f+P7wMAyJ 9 | 2gp/mTz321Whp04NZbId5il//iakYgPsudT51c3ZfKnYlhSQiA5Bw6mLF0aDBMuf 10 | 3ntPG3XmT15K+WCPN7+YgcE/LRgtTKR8CSBH7Ge1fAqq5Op0xghFoozH/FrHhfHH 11 | bx+ZyIyDDaNU8X2fQNeG3uaDMdqvgVcop5BF1u3fhs1urOUp0WBPmGGrHIXX8g1q 12 | 6ucrBSn2BxJpkkfnQJ9wL5tMSOp7ObGtIQY/B6J3o7gRgnHfi+RYC/wRE0D8zupx 13 | ibCAN47OgN7rwl+5Ot/IOEj2G8gVeCOYLPquBIii4QKBgQDnQV375RNe1DdIvN8X 14 | 9STgtoQJGyzOomRmPm8P+maMmI+IRgz/+uwTl2n1eiL9DS0hHYN8u4ghWpGO3yuX 15 | aYKnhUu/ADpzVHZD3OOPBjU3tzSiJeQRpEUFxC/a7GdcuWT7mNRkcDcjcpkg7EGv 16 | 2V7VGuwkrI5eWHLylmiL1E+WIQKBgQDQt7jAAFwa6zb3eZIfKqVyvYC6ytfNrMa9 17 | xABIasXJHXcIXtZsSiXhRpWCb5y3ulZ479QyplLAlNX5fKKX98d9+OLFwavX9nFv 18 | 9fQTdQIQUPNujpvXqmWOfEZaOMuDOvSYxKowkemh8h+K+klK5fHhaYUXapydf2KW 19 | tCTAOT7L2QKBgFMfru2tUMIkW97cbQCKkH/pexpe10NLIfWSeY9vvU7KQ8WDEIcu 20 | pY8BPQgMp+j3xIIDvtCmA++hQ3Lsixm4xkr64dg898We1YfdLTqqy5REWTnzjsA8 21 | oMbK1zzE/v5YcZDyRV347Ajk11/7LD1OUAUf0UP5do85EdBa+idQ4G6hAoGAJQDd 22 | hVTK/47CEQABsvrZmE0WnIdH2VQPbCdqsWwUosJRjy9ZLpu6uYTNDvIAw+YKXKiQ 23 | Y2Zvd2srwG6jWPP571CHy+25LLGpjOL7IdP1yLTBY9Fuub6hALDxvB8jnaF/KfJ8 24 | Bd5ooGiPxRD4m4nG52LQ0MT6/UVPUk6f0WCUzIkCgYEAp7ypWNI63sDtMU1Xb8PV 25 | 9sVnIInWnMy9Ck89LAXBtvMjAJclRS1Wh9cwywvWb+nGwz4WzZt8xEeKzQkBT4Ov 26 | RL1333CtWJcw7u6m4NN8mmMoGyNGT+HLLJp+cCHPINF41KWTnIe+M72eVbanondk 27 | ulDfRCJ7y0LBnLi5H1hquuA= 28 | -----END PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /examples/testdata/recorded/TestProviderUpgrade/yaml/5.0.0/stack.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "deployment": { 4 | "manifest": { 5 | "time": "2025-03-04T16:10:04.532372+02:00", 6 | "magic": "314f350dd99c0299d94a7042323e86b6762195d4bd5f498ffaabc785d7cdc963", 7 | "version": "v3.153.1" 8 | }, 9 | "secrets_providers": { 10 | "type": "passphrase", 11 | "state": { 12 | "salt": "v1:/KwErG3OMeQ=:v1:l4V07V+Xg/HKgjIY:mDPj0AtzE+ycAanI/gvDQwAfUxs/bw==" 13 | } 14 | }, 15 | "resources": [ 16 | { 17 | "urn": "urn:pulumi:test::self-signed-key::pulumi:pulumi:Stack::self-signed-key-test", 18 | "custom": false, 19 | "type": "pulumi:pulumi:Stack", 20 | "created": "2025-03-04T14:10:04.473673Z", 21 | "modified": "2025-03-04T14:10:04.473673Z" 22 | }, 23 | { 24 | "urn": "urn:pulumi:test::self-signed-key::pulumi:providers:tls::default", 25 | "custom": true, 26 | "id": "6605e473-f6ed-47a6-9888-75eae9143777", 27 | "type": "pulumi:providers:tls", 28 | "created": "2025-03-04T14:10:04.523004Z", 29 | "modified": "2025-03-04T14:10:04.523004Z" 30 | }, 31 | { 32 | "urn": "urn:pulumi:test::self-signed-key::tls:index/selfSignedCert:SelfSignedCert::ssoCert", 33 | "custom": true, 34 | "id": "251633524552831154817811094671696735676", 35 | "type": "tls:index/selfSignedCert:SelfSignedCert", 36 | "inputs": { 37 | "allowedUses": [], 38 | "privateKeyPem": { 39 | "4dabf18193072939515e22adb298388d": "1b47061264138c4ac30d75fd1eb44270", 40 | "plaintext": "\"REDACTED BY PROVIDERTEST\"" 41 | }, 42 | "validityPeriodHours": 8760 43 | }, 44 | "outputs": { 45 | "allowedUses": [], 46 | "certPem": "-----BEGIN CERTIFICATE-----\nMIICmzCCAYOgAwIBAgIRAL1O2p9nODQ35zD5RnsWLbwwDQYJKoZIhvcNAQELBQAw\nADAeFw0yNTAzMDQxNDEwMDRaFw0yNjAzMDQxNDEwMDRaMAAwggEiMA0GCSqGSIb3\nDQEBAQUAA4IBDwAwggEKAoIBAQC8ixL7Rhc7RdYIy4YPI/x94aRRSykiIY408gOg\nq7JiOS/7VQj3KAxQL1cKcODbk96y294MBORKEnWtJuMBt3TnonTtXXff/pydbh+5\nMqdfX90BE5JYTVWdLsMlrQmbpbWz5BxzXsSQE/p8Aym+24Rc0MHEFiHWi/lJ+O1Y\ntDC0dbUww9BZ9hNC3lQ25+agzveyvqlh8piRXscLV59LkRZHR+ABk4aA6mR1KdiX\n/1gVvcFIg3mrsDDgoGxxg7kidD5YGqgUfuqP4jeZg3K3MZ1BqBR6IvL/U88x+I6p\nv9OfPJT9SroeMxzVTttUpbeWwCVdD9Pa+l8xyqyJ4FXIgGz5AgMBAAGjEDAOMAwG\nA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQELBQADggEBAFekQWhDxKGMFfaGAIXKnI6s\nZzWLdnNnNQTbmyLlmogTIR00YkqQX2V/AtPciZ6RYASdr/qnLRs2Hqp9lYzd9rGS\nXpIpaKO5syRMxYBDoC94OA2xMwNI8Dn/zMvVmKB/WYAqvRo8ck0FfIKnv8ZJhdPV\nOKkjpMsQkq1lrpfjWwEDjeNxheJxWp74/WwhTrHDSdBtVKzvo3sSULZ0RdoxcYZX\nW6iM+qvEg5Tgr1RYKa+Qi0d0n3nOSexqpczWiavVwclTrS84BgLlOrFLpO3ZvxpV\nc+yaorJT3syMnYokMoVMEd7AhqUBQoiSQKVx858sHEPCSWP+ULE3Uz81DBp6uo8=\n-----END CERTIFICATE-----\n", 47 | "earlyRenewalHours": 0, 48 | "id": "251633524552831154817811094671696735676", 49 | "isCaCertificate": false, 50 | "keyAlgorithm": "RSA", 51 | "privateKeyPem": { 52 | "4dabf18193072939515e22adb298388d": "1b47061264138c4ac30d75fd1eb44270", 53 | "plaintext": "\"REDACTED BY PROVIDERTEST\"" 54 | }, 55 | "readyForRenewal": false, 56 | "setAuthorityKeyId": false, 57 | "setSubjectKeyId": false, 58 | "validityEndTime": "2026-03-04T16:10:04.527628+02:00", 59 | "validityPeriodHours": 8760, 60 | "validityStartTime": "2025-03-04T16:10:04.527628+02:00" 61 | }, 62 | "parent": "urn:pulumi:test::self-signed-key::pulumi:pulumi:Stack::self-signed-key-test", 63 | "provider": "urn:pulumi:test::self-signed-key::pulumi:providers:tls::default::6605e473-f6ed-47a6-9888-75eae9143777", 64 | "propertyDependencies": { 65 | "allowedUses": [], 66 | "privateKeyPem": [], 67 | "validityPeriodHours": [] 68 | }, 69 | "additionalSecretOutputs": [ 70 | "privateKeyPem" 71 | ], 72 | "created": "2025-03-04T14:10:04.529695Z", 73 | "modified": "2025-03-04T14:10:04.529695Z" 74 | } 75 | ], 76 | "metadata": {} 77 | } 78 | } -------------------------------------------------------------------------------- /provider/cmd/pulumi-resource-tls/Pulumi.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pulumi/pulumi-tls/4bd0d18982a817c227556645e7b6f248c6109ae1/provider/cmd/pulumi-resource-tls/Pulumi.yaml -------------------------------------------------------------------------------- /provider/cmd/pulumi-resource-tls/generate.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016-2020, Pulumi Corporation. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | //go:build ignore 16 | 17 | package main 18 | 19 | import ( 20 | "encoding/json" 21 | "errors" 22 | "io/fs" 23 | "io/ioutil" 24 | "log" 25 | "os" 26 | 27 | "github.com/pulumi/pulumi/pkg/v3/codegen/schema" 28 | ) 29 | 30 | func main() { 31 | version, found := os.LookupEnv("VERSION") 32 | if !found { 33 | log.Fatal("version not found") 34 | } 35 | 36 | schemaContents, err := ioutil.ReadFile("./schema.json") 37 | if err != nil { 38 | log.Fatal(err) 39 | } 40 | 41 | var packageSpec schema.PackageSpec 42 | err = json.Unmarshal(schemaContents, &packageSpec) 43 | if err != nil { 44 | log.Fatalf("cannot deserialize schema: %v", err) 45 | } 46 | 47 | packageSpec.Version = version 48 | versionedContents, err := json.Marshal(packageSpec) 49 | if err != nil { 50 | log.Fatalf("cannot reserialize schema: %v", err) 51 | } 52 | 53 | // Clean up schema.go as it may be present & gitignored and tolerate an error if the file isn't present. 54 | err = os.Remove("./schema.go") 55 | if err != nil && !errors.Is(err, fs.ErrNotExist) { 56 | log.Fatal(err) 57 | } 58 | 59 | err = ioutil.WriteFile("./schema-embed.json", versionedContents, 0600) 60 | if err != nil { 61 | log.Fatal(err) 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /provider/cmd/pulumi-resource-tls/main.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016-2018, Pulumi Corporation. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | //go:generate go run ./generate.go 16 | 17 | package main 18 | 19 | import ( 20 | "context" 21 | 22 | _ "embed" 23 | 24 | "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/pf/tfbridge" 25 | 26 | tls "github.com/pulumi/pulumi-tls/provider/v5" 27 | ) 28 | 29 | //go:embed schema-embed.json 30 | var pulumiSchema []byte 31 | 32 | //go:embed bridge-metadata.json 33 | var bridgeMetadata []byte 34 | 35 | func main() { 36 | meta := tfbridge.ProviderMetadata{PackageSchema: pulumiSchema, BridgeMetadata: bridgeMetadata} 37 | tfbridge.Main(context.Background(), "tls", tls.Provider(), meta) 38 | } 39 | -------------------------------------------------------------------------------- /provider/cmd/pulumi-tfgen-tls/main.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016-2018, Pulumi Corporation. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package main 16 | 17 | import ( 18 | "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/pf/tfgen" 19 | 20 | tls "github.com/pulumi/pulumi-tls/provider/v5" 21 | ) 22 | 23 | func main() { 24 | tfgen.Main("tls", tls.Provider()) 25 | } 26 | -------------------------------------------------------------------------------- /provider/pkg/version/version.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016-2018, Pulumi Corporation. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package version 16 | 17 | // Version is initialized by the Go linker to contain the semver of this build. 18 | var Version string 19 | -------------------------------------------------------------------------------- /provider/provider_program_test.go: -------------------------------------------------------------------------------- 1 | //go:build !go && !nodejs && !python && !dotnet 2 | // +build !go,!nodejs,!python,!dotnet 3 | 4 | package tls 5 | 6 | import ( 7 | "os" 8 | "path/filepath" 9 | "testing" 10 | 11 | "github.com/stretchr/testify/require" 12 | 13 | "github.com/pulumi/providertest" 14 | "github.com/pulumi/providertest/optproviderupgrade" 15 | "github.com/pulumi/providertest/pulumitest" 16 | "github.com/pulumi/providertest/pulumitest/assertpreview" 17 | "github.com/pulumi/providertest/pulumitest/opttest" 18 | ) 19 | 20 | const providerName = "tls" 21 | const defaultBaselineVersion = "5.0.2" 22 | 23 | var programs = []string{ 24 | "test-programs/index_certrequest", 25 | "test-programs/index_privatekey", 26 | } 27 | 28 | func TestUpgradeCoverage(t *testing.T) { 29 | providertest.ReportUpgradeCoverage(t) 30 | } 31 | func testProviderUpgrade(t *testing.T, dir string) { 32 | if testing.Short() { 33 | t.Skipf("Skipping in testing.Short() mode, assuming this is a CI run without credentials") 34 | } 35 | cwd, err := os.Getwd() 36 | require.NoError(t, err) 37 | test := pulumitest.NewPulumiTest(t, dir, 38 | opttest.DownloadProviderVersion(providerName, defaultBaselineVersion), 39 | opttest.LocalProviderPath(providerName, filepath.Join(cwd, "..", "bin")), 40 | ) 41 | result := providertest.PreviewProviderUpgrade(t, test, providerName, defaultBaselineVersion, 42 | optproviderupgrade.DisableAttach()) 43 | assertpreview.HasNoReplacements(t, result) 44 | } 45 | 46 | func testProgram(t *testing.T, dir string) { 47 | if testing.Short() { 48 | t.Skipf("Skipping in testing.Short() mode, assuming this is a CI run without credentials") 49 | } 50 | cwd, err := os.Getwd() 51 | require.NoError(t, err) 52 | test := pulumitest.NewPulumiTest(t, dir, 53 | opttest.LocalProviderPath(providerName, filepath.Join(cwd, "..", "bin")), 54 | opttest.SkipInstall(), 55 | ) 56 | test.Up(t) 57 | } 58 | 59 | func TestPrograms(t *testing.T) { 60 | for _, p := range programs { 61 | t.Run(p, func(t *testing.T) { 62 | testProgram(t, p) 63 | }) 64 | } 65 | } 66 | 67 | func TestProgramsUpgrade(t *testing.T) { 68 | for _, p := range programs { 69 | t.Run(p, func(t *testing.T) { 70 | testProviderUpgrade(t, p) 71 | }) 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /provider/shim/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/hashicorp/terraform-provider-tls/shim 2 | 3 | go 1.23.7 4 | 5 | toolchain go1.23.8 6 | 7 | require ( 8 | github.com/hashicorp/terraform-plugin-framework v1.14.1 9 | github.com/hashicorp/terraform-provider-tls v1.2.1-0.20250423195406-eefba144662d 10 | ) 11 | 12 | require ( 13 | github.com/fatih/color v1.16.0 // indirect 14 | github.com/google/go-cmp v0.7.0 // indirect 15 | github.com/hashicorp/go-hclog v1.6.3 // indirect 16 | github.com/hashicorp/terraform-plugin-framework-validators v0.17.0 // indirect 17 | github.com/hashicorp/terraform-plugin-go v0.26.0 // indirect 18 | github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect 19 | github.com/mattn/go-colorable v0.1.13 // indirect 20 | github.com/mattn/go-isatty v0.0.20 // indirect 21 | github.com/mitchellh/go-testing-interface v1.14.1 // indirect 22 | github.com/stretchr/testify v1.8.3 // indirect 23 | github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect 24 | github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect 25 | golang.org/x/crypto v0.37.0 // indirect 26 | golang.org/x/net v0.39.0 // indirect 27 | golang.org/x/sys v0.32.0 // indirect 28 | golang.org/x/text v0.24.0 // indirect 29 | ) 30 | -------------------------------------------------------------------------------- /provider/shim/shim.go: -------------------------------------------------------------------------------- 1 | package shim 2 | 3 | import ( 4 | "github.com/hashicorp/terraform-plugin-framework/provider" 5 | tlsProvider "github.com/hashicorp/terraform-provider-tls/internal/provider" 6 | ) 7 | 8 | func NewProvider() provider.Provider { 9 | p := tlsProvider.New() 10 | return p 11 | } 12 | -------------------------------------------------------------------------------- /provider/test-programs/index_certrequest/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | /Pulumi.*.yaml 3 | -------------------------------------------------------------------------------- /provider/test-programs/index_certrequest/Pulumi.yaml: -------------------------------------------------------------------------------- 1 | name: index_certrequestrENOzEFrqIDU 2 | runtime: yaml 3 | description: "" 4 | config: 5 | pulumi:tags: 6 | value: 7 | pulumi:template: https://www.pulumi.com/ai/api/project/77240274-5e66-4e3f-a9e2-0861a946e7d4.zip 8 | resources: 9 | certRequest: 10 | properties: 11 | dnsNames: 12 | - example.com 13 | - www.example.com 14 | privateKeyPem: ${privateKey.privateKeyPem} 15 | subject: 16 | commonName: example.com 17 | type: tls:CertRequest 18 | privateKey: 19 | properties: 20 | algorithm: RSA 21 | type: tls:PrivateKey 22 | -------------------------------------------------------------------------------- /provider/test-programs/index_privatekey/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | /Pulumi.*.yaml 3 | -------------------------------------------------------------------------------- /provider/test-programs/index_privatekey/Pulumi.yaml: -------------------------------------------------------------------------------- 1 | name: index_privatekeyTaPFV5Tk3Klm 2 | runtime: yaml 3 | description: "" 4 | config: 5 | pulumi:tags: 6 | value: 7 | pulumi:template: https://www.pulumi.com/ai/api/project/b536a62c-82d6-4798-8bec-06aca4a73eac.zip 8 | resources: 9 | tls-private-key: 10 | properties: 11 | algorithm: RSA 12 | rsaBits: 2048 13 | type: tls:PrivateKey 14 | -------------------------------------------------------------------------------- /scripts/plugins.mk: -------------------------------------------------------------------------------- 1 | # Install Pulumi and plugins required at build time. 2 | install_plugins: .make/install_plugins 3 | .make/install_plugins: export PULUMI_HOME := $(WORKING_DIR)/.pulumi 4 | .make/install_plugins: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH) 5 | .make/install_plugins: .pulumi/bin/pulumi 6 | .pulumi/bin/pulumi plugin install resource std 1.6.2 7 | .pulumi/bin/pulumi plugin install converter terraform 1.0.16 8 | .pulumi/bin/pulumi plugin install resource aws 4.26.0 9 | @touch $@ 10 | .PHONY: install_plugins 11 | 12 | # Because some codegen depends on the version of the CLI used, we install a local CLI 13 | # version pinned to the same version as the provider `go.mod`. 14 | # 15 | # This logic compares the version of .pulumi/bin/pulumi already installed. If it matches 16 | # the desired version, we just print. Otherwise we (re)install pulumi at the desired 17 | # version. 18 | .pulumi/bin/pulumi: .pulumi/version 19 | @if [ -x .pulumi/bin/pulumi ] && [ "v$$(cat .pulumi/version)" = "$$(.pulumi/bin/pulumi version)" ]; then \ 20 | echo "pulumi/bin/pulumi version: v$$(cat .pulumi/version)"; \ 21 | touch $@; \ 22 | else \ 23 | curl -fsSL https://get.pulumi.com | \ 24 | HOME=$(WORKING_DIR) sh -s -- --version "$$(cat .pulumi/version)"; \ 25 | fi 26 | 27 | # Compute the version of Pulumi to use by inspecting the Go dependencies of the provider. 28 | .pulumi/version: provider/go.mod 29 | (cd provider && go list -f "{{slice .Version 1}}" -m github.com/pulumi/pulumi/pkg/v3) | tee $@ 30 | -------------------------------------------------------------------------------- /sdk/dotnet/Config/Config.cs: -------------------------------------------------------------------------------- 1 | // *** WARNING: this file was generated by pulumi-language-dotnet. *** 2 | // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | using System; 5 | using System.Collections.Immutable; 6 | 7 | namespace Pulumi.Tls 8 | { 9 | public static class Config 10 | { 11 | [global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "IDE1006", Justification = 12 | "Double underscore prefix used to avoid conflicts with variable names.")] 13 | private sealed class __Value 14 | { 15 | private readonly Func _getter; 16 | private T _value = default!; 17 | private bool _set; 18 | 19 | public __Value(Func getter) 20 | { 21 | _getter = getter; 22 | } 23 | 24 | public T Get() => _set ? _value : _getter(); 25 | 26 | public void Set(T value) 27 | { 28 | _value = value; 29 | _set = true; 30 | } 31 | } 32 | 33 | private static readonly global::Pulumi.Config __config = new global::Pulumi.Config("tls"); 34 | 35 | private static readonly __Value _proxy = new __Value(() => __config.GetObject("proxy")); 36 | /// 37 | /// Proxy used by resources and data sources that connect to external endpoints. 38 | /// 39 | public static Pulumi.Tls.Config.Types.Proxy? Proxy 40 | { 41 | get => _proxy.Get(); 42 | set => _proxy.Set(value); 43 | } 44 | 45 | public static class Types 46 | { 47 | 48 | public class Proxy 49 | { 50 | /// 51 | /// When `true` the provider will discover the proxy configuration from environment variables. This is based upon [`http.ProxyFromEnvironment`](https://pkg.go.dev/net/http#ProxyFromEnvironment) and it supports the same environment variables (default: `true`). 52 | /// 53 | public bool? FromEnv { get; set; } 54 | /// 55 | /// Password used for Basic authentication against the Proxy. 56 | /// 57 | public string? Password { get; set; } = null!; 58 | /// 59 | /// URL used to connect to the Proxy. Accepted schemes are: `http`, `https`, `socks5`. 60 | /// 61 | public string? Url { get; set; } = null!; 62 | /// 63 | /// Username (or Token) used for Basic authentication against the Proxy. 64 | /// 65 | public string? Username { get; set; } = null!; 66 | } 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /sdk/dotnet/Config/README.md: -------------------------------------------------------------------------------- 1 | A Pulumi package to create TLS resources in Pulumi programs. 2 | -------------------------------------------------------------------------------- /sdk/dotnet/Inputs/CertRequestSubjectArgs.cs: -------------------------------------------------------------------------------- 1 | // *** WARNING: this file was generated by pulumi-language-dotnet. *** 2 | // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Collections.Immutable; 7 | using System.Threading.Tasks; 8 | using Pulumi.Serialization; 9 | 10 | namespace Pulumi.Tls.Inputs 11 | { 12 | 13 | public sealed class CertRequestSubjectArgs : global::Pulumi.ResourceArgs 14 | { 15 | /// 16 | /// Distinguished name: `CN` 17 | /// 18 | [Input("commonName")] 19 | public Input? CommonName { get; set; } 20 | 21 | /// 22 | /// Distinguished name: `C` 23 | /// 24 | [Input("country")] 25 | public Input? Country { get; set; } 26 | 27 | /// 28 | /// ASN.1 Object Identifier (OID): `1.2.840.113549.1.9.1` 29 | /// 30 | [Input("emailAddress")] 31 | public Input? EmailAddress { get; set; } 32 | 33 | /// 34 | /// Distinguished name: `L` 35 | /// 36 | [Input("locality")] 37 | public Input? Locality { get; set; } 38 | 39 | /// 40 | /// Distinguished name: `O` 41 | /// 42 | [Input("organization")] 43 | public Input? Organization { get; set; } 44 | 45 | /// 46 | /// Distinguished name: `OU` 47 | /// 48 | [Input("organizationalUnit")] 49 | public Input? OrganizationalUnit { get; set; } 50 | 51 | /// 52 | /// Distinguished name: `PC` 53 | /// 54 | [Input("postalCode")] 55 | public Input? PostalCode { get; set; } 56 | 57 | /// 58 | /// Distinguished name: `ST` 59 | /// 60 | [Input("province")] 61 | public Input? Province { get; set; } 62 | 63 | /// 64 | /// Distinguished name: `SERIALNUMBER` 65 | /// 66 | [Input("serialNumber")] 67 | public Input? SerialNumber { get; set; } 68 | 69 | [Input("streetAddresses")] 70 | private InputList? _streetAddresses; 71 | 72 | /// 73 | /// Distinguished name: `STREET` 74 | /// 75 | public InputList StreetAddresses 76 | { 77 | get => _streetAddresses ?? (_streetAddresses = new InputList()); 78 | set => _streetAddresses = value; 79 | } 80 | 81 | public CertRequestSubjectArgs() 82 | { 83 | } 84 | public static new CertRequestSubjectArgs Empty => new CertRequestSubjectArgs(); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /sdk/dotnet/Inputs/CertRequestSubjectGetArgs.cs: -------------------------------------------------------------------------------- 1 | // *** WARNING: this file was generated by pulumi-language-dotnet. *** 2 | // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Collections.Immutable; 7 | using System.Threading.Tasks; 8 | using Pulumi.Serialization; 9 | 10 | namespace Pulumi.Tls.Inputs 11 | { 12 | 13 | public sealed class CertRequestSubjectGetArgs : global::Pulumi.ResourceArgs 14 | { 15 | /// 16 | /// Distinguished name: `CN` 17 | /// 18 | [Input("commonName")] 19 | public Input? CommonName { get; set; } 20 | 21 | /// 22 | /// Distinguished name: `C` 23 | /// 24 | [Input("country")] 25 | public Input? Country { get; set; } 26 | 27 | /// 28 | /// ASN.1 Object Identifier (OID): `1.2.840.113549.1.9.1` 29 | /// 30 | [Input("emailAddress")] 31 | public Input? EmailAddress { get; set; } 32 | 33 | /// 34 | /// Distinguished name: `L` 35 | /// 36 | [Input("locality")] 37 | public Input? Locality { get; set; } 38 | 39 | /// 40 | /// Distinguished name: `O` 41 | /// 42 | [Input("organization")] 43 | public Input? Organization { get; set; } 44 | 45 | /// 46 | /// Distinguished name: `OU` 47 | /// 48 | [Input("organizationalUnit")] 49 | public Input? OrganizationalUnit { get; set; } 50 | 51 | /// 52 | /// Distinguished name: `PC` 53 | /// 54 | [Input("postalCode")] 55 | public Input? PostalCode { get; set; } 56 | 57 | /// 58 | /// Distinguished name: `ST` 59 | /// 60 | [Input("province")] 61 | public Input? Province { get; set; } 62 | 63 | /// 64 | /// Distinguished name: `SERIALNUMBER` 65 | /// 66 | [Input("serialNumber")] 67 | public Input? SerialNumber { get; set; } 68 | 69 | [Input("streetAddresses")] 70 | private InputList? _streetAddresses; 71 | 72 | /// 73 | /// Distinguished name: `STREET` 74 | /// 75 | public InputList StreetAddresses 76 | { 77 | get => _streetAddresses ?? (_streetAddresses = new InputList()); 78 | set => _streetAddresses = value; 79 | } 80 | 81 | public CertRequestSubjectGetArgs() 82 | { 83 | } 84 | public static new CertRequestSubjectGetArgs Empty => new CertRequestSubjectGetArgs(); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /sdk/dotnet/Inputs/ProviderProxyArgs.cs: -------------------------------------------------------------------------------- 1 | // *** WARNING: this file was generated by pulumi-language-dotnet. *** 2 | // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Collections.Immutable; 7 | using System.Threading.Tasks; 8 | using Pulumi.Serialization; 9 | 10 | namespace Pulumi.Tls.Inputs 11 | { 12 | 13 | public sealed class ProviderProxyArgs : global::Pulumi.ResourceArgs 14 | { 15 | /// 16 | /// When `true` the provider will discover the proxy configuration from environment variables. This is based upon [`http.ProxyFromEnvironment`](https://pkg.go.dev/net/http#ProxyFromEnvironment) and it supports the same environment variables (default: `true`). 17 | /// 18 | [Input("fromEnv")] 19 | public Input? FromEnv { get; set; } 20 | 21 | [Input("password")] 22 | private Input? _password; 23 | 24 | /// 25 | /// Password used for Basic authentication against the Proxy. 26 | /// 27 | public Input? Password 28 | { 29 | get => _password; 30 | set 31 | { 32 | var emptySecret = Output.CreateSecret(0); 33 | _password = Output.Tuple?, int>(value, emptySecret).Apply(t => t.Item1); 34 | } 35 | } 36 | 37 | /// 38 | /// URL used to connect to the Proxy. Accepted schemes are: `http`, `https`, `socks5`. 39 | /// 40 | [Input("url")] 41 | public Input? Url { get; set; } 42 | 43 | /// 44 | /// Username (or Token) used for Basic authentication against the Proxy. 45 | /// 46 | [Input("username")] 47 | public Input? Username { get; set; } 48 | 49 | public ProviderProxyArgs() 50 | { 51 | } 52 | public static new ProviderProxyArgs Empty => new ProviderProxyArgs(); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /sdk/dotnet/Inputs/SelfSignedCertSubjectArgs.cs: -------------------------------------------------------------------------------- 1 | // *** WARNING: this file was generated by pulumi-language-dotnet. *** 2 | // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Collections.Immutable; 7 | using System.Threading.Tasks; 8 | using Pulumi.Serialization; 9 | 10 | namespace Pulumi.Tls.Inputs 11 | { 12 | 13 | public sealed class SelfSignedCertSubjectArgs : global::Pulumi.ResourceArgs 14 | { 15 | /// 16 | /// Distinguished name: `CN` 17 | /// 18 | [Input("commonName")] 19 | public Input? CommonName { get; set; } 20 | 21 | /// 22 | /// Distinguished name: `C` 23 | /// 24 | [Input("country")] 25 | public Input? Country { get; set; } 26 | 27 | /// 28 | /// ASN.1 Object Identifier (OID): `1.2.840.113549.1.9.1` 29 | /// 30 | [Input("emailAddress")] 31 | public Input? EmailAddress { get; set; } 32 | 33 | /// 34 | /// Distinguished name: `L` 35 | /// 36 | [Input("locality")] 37 | public Input? Locality { get; set; } 38 | 39 | /// 40 | /// Distinguished name: `O` 41 | /// 42 | [Input("organization")] 43 | public Input? Organization { get; set; } 44 | 45 | /// 46 | /// Distinguished name: `OU` 47 | /// 48 | [Input("organizationalUnit")] 49 | public Input? OrganizationalUnit { get; set; } 50 | 51 | /// 52 | /// Distinguished name: `PC` 53 | /// 54 | [Input("postalCode")] 55 | public Input? PostalCode { get; set; } 56 | 57 | /// 58 | /// Distinguished name: `ST` 59 | /// 60 | [Input("province")] 61 | public Input? Province { get; set; } 62 | 63 | /// 64 | /// Distinguished name: `SERIALNUMBER` 65 | /// 66 | [Input("serialNumber")] 67 | public Input? SerialNumber { get; set; } 68 | 69 | [Input("streetAddresses")] 70 | private InputList? _streetAddresses; 71 | 72 | /// 73 | /// Distinguished name: `STREET` 74 | /// 75 | public InputList StreetAddresses 76 | { 77 | get => _streetAddresses ?? (_streetAddresses = new InputList()); 78 | set => _streetAddresses = value; 79 | } 80 | 81 | public SelfSignedCertSubjectArgs() 82 | { 83 | } 84 | public static new SelfSignedCertSubjectArgs Empty => new SelfSignedCertSubjectArgs(); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /sdk/dotnet/Inputs/SelfSignedCertSubjectGetArgs.cs: -------------------------------------------------------------------------------- 1 | // *** WARNING: this file was generated by pulumi-language-dotnet. *** 2 | // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Collections.Immutable; 7 | using System.Threading.Tasks; 8 | using Pulumi.Serialization; 9 | 10 | namespace Pulumi.Tls.Inputs 11 | { 12 | 13 | public sealed class SelfSignedCertSubjectGetArgs : global::Pulumi.ResourceArgs 14 | { 15 | /// 16 | /// Distinguished name: `CN` 17 | /// 18 | [Input("commonName")] 19 | public Input? CommonName { get; set; } 20 | 21 | /// 22 | /// Distinguished name: `C` 23 | /// 24 | [Input("country")] 25 | public Input? Country { get; set; } 26 | 27 | /// 28 | /// ASN.1 Object Identifier (OID): `1.2.840.113549.1.9.1` 29 | /// 30 | [Input("emailAddress")] 31 | public Input? EmailAddress { get; set; } 32 | 33 | /// 34 | /// Distinguished name: `L` 35 | /// 36 | [Input("locality")] 37 | public Input? Locality { get; set; } 38 | 39 | /// 40 | /// Distinguished name: `O` 41 | /// 42 | [Input("organization")] 43 | public Input? Organization { get; set; } 44 | 45 | /// 46 | /// Distinguished name: `OU` 47 | /// 48 | [Input("organizationalUnit")] 49 | public Input? OrganizationalUnit { get; set; } 50 | 51 | /// 52 | /// Distinguished name: `PC` 53 | /// 54 | [Input("postalCode")] 55 | public Input? PostalCode { get; set; } 56 | 57 | /// 58 | /// Distinguished name: `ST` 59 | /// 60 | [Input("province")] 61 | public Input? Province { get; set; } 62 | 63 | /// 64 | /// Distinguished name: `SERIALNUMBER` 65 | /// 66 | [Input("serialNumber")] 67 | public Input? SerialNumber { get; set; } 68 | 69 | [Input("streetAddresses")] 70 | private InputList? _streetAddresses; 71 | 72 | /// 73 | /// Distinguished name: `STREET` 74 | /// 75 | public InputList StreetAddresses 76 | { 77 | get => _streetAddresses ?? (_streetAddresses = new InputList()); 78 | set => _streetAddresses = value; 79 | } 80 | 81 | public SelfSignedCertSubjectGetArgs() 82 | { 83 | } 84 | public static new SelfSignedCertSubjectGetArgs Empty => new SelfSignedCertSubjectGetArgs(); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /sdk/dotnet/Outputs/CertRequestSubject.cs: -------------------------------------------------------------------------------- 1 | // *** WARNING: this file was generated by pulumi-language-dotnet. *** 2 | // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Collections.Immutable; 7 | using System.Threading.Tasks; 8 | using Pulumi.Serialization; 9 | 10 | namespace Pulumi.Tls.Outputs 11 | { 12 | 13 | [OutputType] 14 | public sealed class CertRequestSubject 15 | { 16 | /// 17 | /// Distinguished name: `CN` 18 | /// 19 | public readonly string? CommonName; 20 | /// 21 | /// Distinguished name: `C` 22 | /// 23 | public readonly string? Country; 24 | /// 25 | /// ASN.1 Object Identifier (OID): `1.2.840.113549.1.9.1` 26 | /// 27 | public readonly string? EmailAddress; 28 | /// 29 | /// Distinguished name: `L` 30 | /// 31 | public readonly string? Locality; 32 | /// 33 | /// Distinguished name: `O` 34 | /// 35 | public readonly string? Organization; 36 | /// 37 | /// Distinguished name: `OU` 38 | /// 39 | public readonly string? OrganizationalUnit; 40 | /// 41 | /// Distinguished name: `PC` 42 | /// 43 | public readonly string? PostalCode; 44 | /// 45 | /// Distinguished name: `ST` 46 | /// 47 | public readonly string? Province; 48 | /// 49 | /// Distinguished name: `SERIALNUMBER` 50 | /// 51 | public readonly string? SerialNumber; 52 | /// 53 | /// Distinguished name: `STREET` 54 | /// 55 | public readonly ImmutableArray StreetAddresses; 56 | 57 | [OutputConstructor] 58 | private CertRequestSubject( 59 | string? commonName, 60 | 61 | string? country, 62 | 63 | string? emailAddress, 64 | 65 | string? locality, 66 | 67 | string? organization, 68 | 69 | string? organizationalUnit, 70 | 71 | string? postalCode, 72 | 73 | string? province, 74 | 75 | string? serialNumber, 76 | 77 | ImmutableArray streetAddresses) 78 | { 79 | CommonName = commonName; 80 | Country = country; 81 | EmailAddress = emailAddress; 82 | Locality = locality; 83 | Organization = organization; 84 | OrganizationalUnit = organizationalUnit; 85 | PostalCode = postalCode; 86 | Province = province; 87 | SerialNumber = serialNumber; 88 | StreetAddresses = streetAddresses; 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /sdk/dotnet/Outputs/GetCertificateCertificateResult.cs: -------------------------------------------------------------------------------- 1 | // *** WARNING: this file was generated by pulumi-language-dotnet. *** 2 | // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Collections.Immutable; 7 | using System.Threading.Tasks; 8 | using Pulumi.Serialization; 9 | 10 | namespace Pulumi.Tls.Outputs 11 | { 12 | 13 | [OutputType] 14 | public sealed class GetCertificateCertificateResult 15 | { 16 | /// 17 | /// Certificate data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format. **NOTE**: the [underlying](https://pkg.go.dev/encoding/pem#Encode) [libraries](https://pkg.go.dev/golang.org/x/crypto/ssh#MarshalAuthorizedKey) that generate this value append a `\n` at the end of the PEM. In case this disrupts your use case, we recommend using `trimspace()`. 18 | /// 19 | public readonly string CertPem; 20 | /// 21 | /// `true` if the certificate is of a CA (Certificate Authority). 22 | /// 23 | public readonly bool IsCa; 24 | /// 25 | /// Who verified and signed the certificate, roughly following [RFC2253](https://tools.ietf.org/html/rfc2253). 26 | /// 27 | public readonly string Issuer; 28 | /// 29 | /// The time until which the certificate is invalid, as an [RFC3339](https://tools.ietf.org/html/rfc3339) timestamp. 30 | /// 31 | public readonly string NotAfter; 32 | /// 33 | /// The time after which the certificate is valid, as an [RFC3339](https://tools.ietf.org/html/rfc3339) timestamp. 34 | /// 35 | public readonly string NotBefore; 36 | /// 37 | /// The key algorithm used to create the certificate. 38 | /// 39 | public readonly string PublicKeyAlgorithm; 40 | /// 41 | /// Number that uniquely identifies the certificate with the CA's system. 42 | /// The `format` function can be used to convert this *base 10* number into other bases, such as hex. 43 | /// 44 | public readonly string SerialNumber; 45 | /// 46 | /// The SHA1 fingerprint of the public key of the certificate. 47 | /// 48 | public readonly string Sha1Fingerprint; 49 | /// 50 | /// The algorithm used to sign the certificate. 51 | /// 52 | public readonly string SignatureAlgorithm; 53 | /// 54 | /// The entity the certificate belongs to, roughly following [RFC2253](https://tools.ietf.org/html/rfc2253). 55 | /// 56 | public readonly string Subject; 57 | /// 58 | /// The version the certificate is in. 59 | /// 60 | public readonly int Version; 61 | 62 | [OutputConstructor] 63 | private GetCertificateCertificateResult( 64 | string certPem, 65 | 66 | bool isCa, 67 | 68 | string issuer, 69 | 70 | string notAfter, 71 | 72 | string notBefore, 73 | 74 | string publicKeyAlgorithm, 75 | 76 | string serialNumber, 77 | 78 | string sha1Fingerprint, 79 | 80 | string signatureAlgorithm, 81 | 82 | string subject, 83 | 84 | int version) 85 | { 86 | CertPem = certPem; 87 | IsCa = isCa; 88 | Issuer = issuer; 89 | NotAfter = notAfter; 90 | NotBefore = notBefore; 91 | PublicKeyAlgorithm = publicKeyAlgorithm; 92 | SerialNumber = serialNumber; 93 | Sha1Fingerprint = sha1Fingerprint; 94 | SignatureAlgorithm = signatureAlgorithm; 95 | Subject = subject; 96 | Version = version; 97 | } 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /sdk/dotnet/Outputs/SelfSignedCertSubject.cs: -------------------------------------------------------------------------------- 1 | // *** WARNING: this file was generated by pulumi-language-dotnet. *** 2 | // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Collections.Immutable; 7 | using System.Threading.Tasks; 8 | using Pulumi.Serialization; 9 | 10 | namespace Pulumi.Tls.Outputs 11 | { 12 | 13 | [OutputType] 14 | public sealed class SelfSignedCertSubject 15 | { 16 | /// 17 | /// Distinguished name: `CN` 18 | /// 19 | public readonly string? CommonName; 20 | /// 21 | /// Distinguished name: `C` 22 | /// 23 | public readonly string? Country; 24 | /// 25 | /// ASN.1 Object Identifier (OID): `1.2.840.113549.1.9.1` 26 | /// 27 | public readonly string? EmailAddress; 28 | /// 29 | /// Distinguished name: `L` 30 | /// 31 | public readonly string? Locality; 32 | /// 33 | /// Distinguished name: `O` 34 | /// 35 | public readonly string? Organization; 36 | /// 37 | /// Distinguished name: `OU` 38 | /// 39 | public readonly string? OrganizationalUnit; 40 | /// 41 | /// Distinguished name: `PC` 42 | /// 43 | public readonly string? PostalCode; 44 | /// 45 | /// Distinguished name: `ST` 46 | /// 47 | public readonly string? Province; 48 | /// 49 | /// Distinguished name: `SERIALNUMBER` 50 | /// 51 | public readonly string? SerialNumber; 52 | /// 53 | /// Distinguished name: `STREET` 54 | /// 55 | public readonly ImmutableArray StreetAddresses; 56 | 57 | [OutputConstructor] 58 | private SelfSignedCertSubject( 59 | string? commonName, 60 | 61 | string? country, 62 | 63 | string? emailAddress, 64 | 65 | string? locality, 66 | 67 | string? organization, 68 | 69 | string? organizationalUnit, 70 | 71 | string? postalCode, 72 | 73 | string? province, 74 | 75 | string? serialNumber, 76 | 77 | ImmutableArray streetAddresses) 78 | { 79 | CommonName = commonName; 80 | Country = country; 81 | EmailAddress = emailAddress; 82 | Locality = locality; 83 | Organization = organization; 84 | OrganizationalUnit = organizationalUnit; 85 | PostalCode = postalCode; 86 | Province = province; 87 | SerialNumber = serialNumber; 88 | StreetAddresses = streetAddresses; 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /sdk/dotnet/Provider.cs: -------------------------------------------------------------------------------- 1 | // *** WARNING: this file was generated by pulumi-language-dotnet. *** 2 | // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Collections.Immutable; 7 | using System.Threading.Tasks; 8 | using Pulumi.Serialization; 9 | 10 | namespace Pulumi.Tls 11 | { 12 | /// 13 | /// The provider type for the tls package. By default, resources use package-wide configuration 14 | /// settings, however an explicit `Provider` instance may be created and passed during resource 15 | /// construction to achieve fine-grained programmatic control over provider settings. See the 16 | /// [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information. 17 | /// 18 | [TlsResourceType("pulumi:providers:tls")] 19 | public partial class Provider : global::Pulumi.ProviderResource 20 | { 21 | /// 22 | /// Create a Provider resource with the given unique name, arguments, and options. 23 | /// 24 | /// 25 | /// The unique name of the resource 26 | /// The arguments used to populate this resource's properties 27 | /// A bag of options that control this resource's behavior 28 | public Provider(string name, ProviderArgs? args = null, CustomResourceOptions? options = null) 29 | : base("tls", name, args ?? new ProviderArgs(), MakeResourceOptions(options, "")) 30 | { 31 | } 32 | 33 | private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) 34 | { 35 | var defaultOptions = new CustomResourceOptions 36 | { 37 | Version = Utilities.Version, 38 | }; 39 | var merged = CustomResourceOptions.Merge(defaultOptions, options); 40 | // Override the ID if one was specified for consistency with other language SDKs. 41 | merged.Id = id ?? merged.Id; 42 | return merged; 43 | } 44 | 45 | /// 46 | /// This function returns a Terraform config object with terraform-namecased keys,to be used with the Terraform Module Provider. 47 | /// 48 | public global::Pulumi.Output TerraformConfig() 49 | => global::Pulumi.Deployment.Instance.Call("pulumi:providers:tls/terraformConfig", CallArgs.Empty, this); 50 | } 51 | 52 | public sealed class ProviderArgs : global::Pulumi.ResourceArgs 53 | { 54 | /// 55 | /// Proxy used by resources and data sources that connect to external endpoints. 56 | /// 57 | [Input("proxy", json: true)] 58 | public Input? Proxy { get; set; } 59 | 60 | public ProviderArgs() 61 | { 62 | } 63 | public static new ProviderArgs Empty => new ProviderArgs(); 64 | } 65 | 66 | /// 67 | /// The results of the method. 68 | /// 69 | [OutputType] 70 | public sealed class ProviderTerraformConfigResult 71 | { 72 | public readonly ImmutableDictionary Result; 73 | 74 | [OutputConstructor] 75 | private ProviderTerraformConfigResult(ImmutableDictionary result) 76 | { 77 | Result = result; 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /sdk/dotnet/Pulumi.Tls.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | true 5 | Pulumi Corp. 6 | Pulumi Corp. 7 | A Pulumi package to create TLS resources in Pulumi programs. 8 | Apache-2.0 9 | https://pulumi.io 10 | https://github.com/pulumi/pulumi-tls 11 | logo.png 12 | 5.0.0-alpha.0+dev 13 | 14 | net6.0 15 | enable 16 | 17 | 18 | 19 | true 20 | 1701;1702;1591 21 | 22 | 23 | 24 | $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb 25 | true 26 | true 27 | 28 | 29 | 30 | true 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | True 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /sdk/dotnet/Pulumi.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pulumi/pulumi-tls/4bd0d18982a817c227556645e7b6f248c6109ae1/sdk/dotnet/Pulumi.yaml -------------------------------------------------------------------------------- /sdk/dotnet/README.md: -------------------------------------------------------------------------------- 1 | A Pulumi package to create TLS resources in Pulumi programs. 2 | -------------------------------------------------------------------------------- /sdk/dotnet/Utilities.cs: -------------------------------------------------------------------------------- 1 | // *** WARNING: this file was generated by pulumi-language-dotnet. *** 2 | // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | namespace Pulumi.Tls 5 | { 6 | static class Utilities 7 | { 8 | public static string? GetEnv(params string[] names) 9 | { 10 | foreach (var n in names) 11 | { 12 | var value = global::System.Environment.GetEnvironmentVariable(n); 13 | if (value != null) 14 | { 15 | return value; 16 | } 17 | } 18 | return null; 19 | } 20 | 21 | static string[] trueValues = { "1", "t", "T", "true", "TRUE", "True" }; 22 | static string[] falseValues = { "0", "f", "F", "false", "FALSE", "False" }; 23 | public static bool? GetEnvBoolean(params string[] names) 24 | { 25 | var s = GetEnv(names); 26 | if (s != null) 27 | { 28 | if (global::System.Array.IndexOf(trueValues, s) != -1) 29 | { 30 | return true; 31 | } 32 | if (global::System.Array.IndexOf(falseValues, s) != -1) 33 | { 34 | return false; 35 | } 36 | } 37 | return null; 38 | } 39 | 40 | public static int? GetEnvInt32(params string[] names) => int.TryParse(GetEnv(names), out int v) ? (int?)v : null; 41 | 42 | public static double? GetEnvDouble(params string[] names) => double.TryParse(GetEnv(names), out double v) ? (double?)v : null; 43 | 44 | [global::System.Obsolete("Please use WithDefaults instead")] 45 | public static global::Pulumi.InvokeOptions WithVersion(this global::Pulumi.InvokeOptions? options) 46 | { 47 | var dst = options ?? new global::Pulumi.InvokeOptions{}; 48 | dst.Version = options?.Version ?? Version; 49 | return dst; 50 | } 51 | 52 | public static global::Pulumi.InvokeOptions WithDefaults(this global::Pulumi.InvokeOptions? src) 53 | { 54 | var dst = src ?? new global::Pulumi.InvokeOptions{}; 55 | dst.Version = src?.Version ?? Version; 56 | return dst; 57 | } 58 | 59 | public static global::Pulumi.InvokeOutputOptions WithDefaults(this global::Pulumi.InvokeOutputOptions? src) 60 | { 61 | var dst = src ?? new global::Pulumi.InvokeOutputOptions{}; 62 | dst.Version = src?.Version ?? Version; 63 | return dst; 64 | } 65 | 66 | private readonly static string version; 67 | public static string Version => version; 68 | 69 | static Utilities() 70 | { 71 | var assembly = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(Utilities)).Assembly; 72 | using var stream = assembly.GetManifestResourceStream("Pulumi.Tls.version.txt"); 73 | using var reader = new global::System.IO.StreamReader(stream ?? throw new global::System.NotSupportedException("Missing embedded version.txt file")); 74 | version = reader.ReadToEnd().Trim(); 75 | var parts = version.Split("\n"); 76 | if (parts.Length == 2) 77 | { 78 | // The first part is the provider name. 79 | version = parts[1].Trim(); 80 | } 81 | } 82 | } 83 | 84 | internal sealed class TlsResourceTypeAttribute : global::Pulumi.ResourceTypeAttribute 85 | { 86 | public TlsResourceTypeAttribute(string type) : base(type, Utilities.Version) 87 | { 88 | } 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /sdk/dotnet/go.mod: -------------------------------------------------------------------------------- 1 | module fake_dotnet_module // Exclude this directory from Go tools 2 | 3 | go 1.17 4 | -------------------------------------------------------------------------------- /sdk/dotnet/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pulumi/pulumi-tls/4bd0d18982a817c227556645e7b6f248c6109ae1/sdk/dotnet/logo.png -------------------------------------------------------------------------------- /sdk/dotnet/pulumi-plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "resource": true, 3 | "name": "tls", 4 | "version": "5.0.0-alpha.0+dev" 5 | } 6 | -------------------------------------------------------------------------------- /sdk/go/Pulumi.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pulumi/pulumi-tls/4bd0d18982a817c227556645e7b6f248c6109ae1/sdk/go/Pulumi.yaml -------------------------------------------------------------------------------- /sdk/go/tls/config/config.go: -------------------------------------------------------------------------------- 1 | // Code generated by pulumi-language-go DO NOT EDIT. 2 | // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | package config 5 | 6 | import ( 7 | "github.com/pulumi/pulumi-tls/sdk/v5/go/tls/internal" 8 | "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 9 | "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" 10 | ) 11 | 12 | var _ = internal.GetEnvOrDefault 13 | 14 | // Proxy used by resources and data sources that connect to external endpoints. 15 | func GetProxy(ctx *pulumi.Context) string { 16 | return config.Get(ctx, "tls:proxy") 17 | } 18 | -------------------------------------------------------------------------------- /sdk/go/tls/config/pulumiTypes.go: -------------------------------------------------------------------------------- 1 | // Code generated by pulumi-language-go DO NOT EDIT. 2 | // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | package config 5 | 6 | import ( 7 | "context" 8 | "reflect" 9 | 10 | "github.com/pulumi/pulumi-tls/sdk/v5/go/tls/internal" 11 | "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 | ) 13 | 14 | var _ = internal.GetEnvOrDefault 15 | 16 | type Proxy struct { 17 | // When `true` the provider will discover the proxy configuration from environment variables. This is based upon [`http.ProxyFromEnvironment`](https://pkg.go.dev/net/http#ProxyFromEnvironment) and it supports the same environment variables (default: `true`). 18 | FromEnv *bool `pulumi:"fromEnv"` 19 | // Password used for Basic authentication against the Proxy. 20 | Password *string `pulumi:"password"` 21 | // URL used to connect to the Proxy. Accepted schemes are: `http`, `https`, `socks5`. 22 | Url *string `pulumi:"url"` 23 | // Username (or Token) used for Basic authentication against the Proxy. 24 | Username *string `pulumi:"username"` 25 | } 26 | 27 | // ProxyInput is an input type that accepts ProxyArgs and ProxyOutput values. 28 | // You can construct a concrete instance of `ProxyInput` via: 29 | // 30 | // ProxyArgs{...} 31 | type ProxyInput interface { 32 | pulumi.Input 33 | 34 | ToProxyOutput() ProxyOutput 35 | ToProxyOutputWithContext(context.Context) ProxyOutput 36 | } 37 | 38 | type ProxyArgs struct { 39 | // When `true` the provider will discover the proxy configuration from environment variables. This is based upon [`http.ProxyFromEnvironment`](https://pkg.go.dev/net/http#ProxyFromEnvironment) and it supports the same environment variables (default: `true`). 40 | FromEnv pulumi.BoolPtrInput `pulumi:"fromEnv"` 41 | // Password used for Basic authentication against the Proxy. 42 | Password pulumi.StringPtrInput `pulumi:"password"` 43 | // URL used to connect to the Proxy. Accepted schemes are: `http`, `https`, `socks5`. 44 | Url pulumi.StringPtrInput `pulumi:"url"` 45 | // Username (or Token) used for Basic authentication against the Proxy. 46 | Username pulumi.StringPtrInput `pulumi:"username"` 47 | } 48 | 49 | func (ProxyArgs) ElementType() reflect.Type { 50 | return reflect.TypeOf((*Proxy)(nil)).Elem() 51 | } 52 | 53 | func (i ProxyArgs) ToProxyOutput() ProxyOutput { 54 | return i.ToProxyOutputWithContext(context.Background()) 55 | } 56 | 57 | func (i ProxyArgs) ToProxyOutputWithContext(ctx context.Context) ProxyOutput { 58 | return pulumi.ToOutputWithContext(ctx, i).(ProxyOutput) 59 | } 60 | 61 | type ProxyOutput struct{ *pulumi.OutputState } 62 | 63 | func (ProxyOutput) ElementType() reflect.Type { 64 | return reflect.TypeOf((*Proxy)(nil)).Elem() 65 | } 66 | 67 | func (o ProxyOutput) ToProxyOutput() ProxyOutput { 68 | return o 69 | } 70 | 71 | func (o ProxyOutput) ToProxyOutputWithContext(ctx context.Context) ProxyOutput { 72 | return o 73 | } 74 | 75 | // When `true` the provider will discover the proxy configuration from environment variables. This is based upon [`http.ProxyFromEnvironment`](https://pkg.go.dev/net/http#ProxyFromEnvironment) and it supports the same environment variables (default: `true`). 76 | func (o ProxyOutput) FromEnv() pulumi.BoolPtrOutput { 77 | return o.ApplyT(func(v Proxy) *bool { return v.FromEnv }).(pulumi.BoolPtrOutput) 78 | } 79 | 80 | // Password used for Basic authentication against the Proxy. 81 | func (o ProxyOutput) Password() pulumi.StringPtrOutput { 82 | return o.ApplyT(func(v Proxy) *string { return v.Password }).(pulumi.StringPtrOutput) 83 | } 84 | 85 | // URL used to connect to the Proxy. Accepted schemes are: `http`, `https`, `socks5`. 86 | func (o ProxyOutput) Url() pulumi.StringPtrOutput { 87 | return o.ApplyT(func(v Proxy) *string { return v.Url }).(pulumi.StringPtrOutput) 88 | } 89 | 90 | // Username (or Token) used for Basic authentication against the Proxy. 91 | func (o ProxyOutput) Username() pulumi.StringPtrOutput { 92 | return o.ApplyT(func(v Proxy) *string { return v.Username }).(pulumi.StringPtrOutput) 93 | } 94 | 95 | func init() { 96 | pulumi.RegisterInputType(reflect.TypeOf((*ProxyInput)(nil)).Elem(), ProxyArgs{}) 97 | pulumi.RegisterOutputType(ProxyOutput{}) 98 | } 99 | -------------------------------------------------------------------------------- /sdk/go/tls/doc.go: -------------------------------------------------------------------------------- 1 | // A Pulumi package to create TLS resources in Pulumi programs. 2 | package tls 3 | -------------------------------------------------------------------------------- /sdk/go/tls/init.go: -------------------------------------------------------------------------------- 1 | // Code generated by pulumi-language-go DO NOT EDIT. 2 | // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | package tls 5 | 6 | import ( 7 | "fmt" 8 | 9 | "github.com/blang/semver" 10 | "github.com/pulumi/pulumi-tls/sdk/v5/go/tls/internal" 11 | "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 | ) 13 | 14 | type module struct { 15 | version semver.Version 16 | } 17 | 18 | func (m *module) Version() semver.Version { 19 | return m.version 20 | } 21 | 22 | func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) { 23 | switch typ { 24 | case "tls:index/certRequest:CertRequest": 25 | r = &CertRequest{} 26 | case "tls:index/locallySignedCert:LocallySignedCert": 27 | r = &LocallySignedCert{} 28 | case "tls:index/privateKey:PrivateKey": 29 | r = &PrivateKey{} 30 | case "tls:index/selfSignedCert:SelfSignedCert": 31 | r = &SelfSignedCert{} 32 | default: 33 | return nil, fmt.Errorf("unknown resource type: %s", typ) 34 | } 35 | 36 | err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn)) 37 | return 38 | } 39 | 40 | type pkg struct { 41 | version semver.Version 42 | } 43 | 44 | func (p *pkg) Version() semver.Version { 45 | return p.version 46 | } 47 | 48 | func (p *pkg) ConstructProvider(ctx *pulumi.Context, name, typ, urn string) (pulumi.ProviderResource, error) { 49 | if typ != "pulumi:providers:tls" { 50 | return nil, fmt.Errorf("unknown provider type: %s", typ) 51 | } 52 | 53 | r := &Provider{} 54 | err := ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn)) 55 | return r, err 56 | } 57 | 58 | func init() { 59 | version, err := internal.PkgVersion() 60 | if err != nil { 61 | version = semver.Version{Major: 1} 62 | } 63 | pulumi.RegisterResourceModule( 64 | "tls", 65 | "index/certRequest", 66 | &module{version}, 67 | ) 68 | pulumi.RegisterResourceModule( 69 | "tls", 70 | "index/locallySignedCert", 71 | &module{version}, 72 | ) 73 | pulumi.RegisterResourceModule( 74 | "tls", 75 | "index/privateKey", 76 | &module{version}, 77 | ) 78 | pulumi.RegisterResourceModule( 79 | "tls", 80 | "index/selfSignedCert", 81 | &module{version}, 82 | ) 83 | pulumi.RegisterResourcePackage( 84 | "tls", 85 | &pkg{version}, 86 | ) 87 | } 88 | -------------------------------------------------------------------------------- /sdk/go/tls/internal/pulumiVersion.go: -------------------------------------------------------------------------------- 1 | // Code generated by pulumi-language-go DO NOT EDIT. 2 | // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | package internal 5 | 6 | import ( 7 | "github.com/blang/semver" 8 | ) 9 | 10 | var SdkVersion semver.Version = semver.Version{} 11 | var pluginDownloadURL string = "" 12 | -------------------------------------------------------------------------------- /sdk/go/tls/provider.go: -------------------------------------------------------------------------------- 1 | // Code generated by pulumi-language-go DO NOT EDIT. 2 | // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | package tls 5 | 6 | import ( 7 | "context" 8 | "reflect" 9 | 10 | "github.com/pulumi/pulumi-tls/sdk/v5/go/tls/internal" 11 | "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 | ) 13 | 14 | // The provider type for the tls package. By default, resources use package-wide configuration 15 | // settings, however an explicit `Provider` instance may be created and passed during resource 16 | // construction to achieve fine-grained programmatic control over provider settings. See the 17 | // [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information. 18 | type Provider struct { 19 | pulumi.ProviderResourceState 20 | } 21 | 22 | // NewProvider registers a new resource with the given unique name, arguments, and options. 23 | func NewProvider(ctx *pulumi.Context, 24 | name string, args *ProviderArgs, opts ...pulumi.ResourceOption) (*Provider, error) { 25 | if args == nil { 26 | args = &ProviderArgs{} 27 | } 28 | 29 | opts = internal.PkgResourceDefaultOpts(opts) 30 | var resource Provider 31 | err := ctx.RegisterResource("pulumi:providers:tls", name, args, &resource, opts...) 32 | if err != nil { 33 | return nil, err 34 | } 35 | return &resource, nil 36 | } 37 | 38 | type providerArgs struct { 39 | // Proxy used by resources and data sources that connect to external endpoints. 40 | Proxy *ProviderProxy `pulumi:"proxy"` 41 | } 42 | 43 | // The set of arguments for constructing a Provider resource. 44 | type ProviderArgs struct { 45 | // Proxy used by resources and data sources that connect to external endpoints. 46 | Proxy ProviderProxyPtrInput 47 | } 48 | 49 | func (ProviderArgs) ElementType() reflect.Type { 50 | return reflect.TypeOf((*providerArgs)(nil)).Elem() 51 | } 52 | 53 | // This function returns a Terraform config object with terraform-namecased keys,to be used with the Terraform Module Provider. 54 | func (r *Provider) TerraformConfig(ctx *pulumi.Context) (ProviderTerraformConfigResultOutput, error) { 55 | out, err := ctx.Call("pulumi:providers:tls/terraformConfig", nil, ProviderTerraformConfigResultOutput{}, r) 56 | if err != nil { 57 | return ProviderTerraformConfigResultOutput{}, err 58 | } 59 | return out.(ProviderTerraformConfigResultOutput), nil 60 | } 61 | 62 | type ProviderTerraformConfigResult struct { 63 | Result map[string]interface{} `pulumi:"result"` 64 | } 65 | 66 | type ProviderTerraformConfigResultOutput struct{ *pulumi.OutputState } 67 | 68 | func (ProviderTerraformConfigResultOutput) ElementType() reflect.Type { 69 | return reflect.TypeOf((*ProviderTerraformConfigResult)(nil)).Elem() 70 | } 71 | 72 | func (o ProviderTerraformConfigResultOutput) Result() pulumi.MapOutput { 73 | return o.ApplyT(func(v ProviderTerraformConfigResult) map[string]interface{} { return v.Result }).(pulumi.MapOutput) 74 | } 75 | 76 | type ProviderInput interface { 77 | pulumi.Input 78 | 79 | ToProviderOutput() ProviderOutput 80 | ToProviderOutputWithContext(ctx context.Context) ProviderOutput 81 | } 82 | 83 | func (*Provider) ElementType() reflect.Type { 84 | return reflect.TypeOf((**Provider)(nil)).Elem() 85 | } 86 | 87 | func (i *Provider) ToProviderOutput() ProviderOutput { 88 | return i.ToProviderOutputWithContext(context.Background()) 89 | } 90 | 91 | func (i *Provider) ToProviderOutputWithContext(ctx context.Context) ProviderOutput { 92 | return pulumi.ToOutputWithContext(ctx, i).(ProviderOutput) 93 | } 94 | 95 | type ProviderOutput struct{ *pulumi.OutputState } 96 | 97 | func (ProviderOutput) ElementType() reflect.Type { 98 | return reflect.TypeOf((**Provider)(nil)).Elem() 99 | } 100 | 101 | func (o ProviderOutput) ToProviderOutput() ProviderOutput { 102 | return o 103 | } 104 | 105 | func (o ProviderOutput) ToProviderOutputWithContext(ctx context.Context) ProviderOutput { 106 | return o 107 | } 108 | 109 | func init() { 110 | pulumi.RegisterInputType(reflect.TypeOf((*ProviderInput)(nil)).Elem(), &Provider{}) 111 | pulumi.RegisterOutputType(ProviderOutput{}) 112 | pulumi.RegisterOutputType(ProviderTerraformConfigResultOutput{}) 113 | } 114 | -------------------------------------------------------------------------------- /sdk/go/tls/pulumi-plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "resource": true, 3 | "name": "tls", 4 | "version": "5.0.0-alpha.0+dev" 5 | } 6 | -------------------------------------------------------------------------------- /sdk/java/README.md: -------------------------------------------------------------------------------- 1 | A Pulumi package to create TLS resources in Pulumi programs. 2 | -------------------------------------------------------------------------------- /sdk/java/go.mod: -------------------------------------------------------------------------------- 1 | module fake_java_module // Exclude this directory from Go tools 2 | 3 | go 1.17 4 | -------------------------------------------------------------------------------- /sdk/java/settings.gradle: -------------------------------------------------------------------------------- 1 | // *** WARNING: this file was generated by pulumi-java-gen. *** 2 | // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | pluginManagement { 5 | repositories { 6 | maven { // The google mirror is less flaky than mavenCentral() 7 | url("https://maven-central.storage-download.googleapis.com/maven2/") 8 | } 9 | gradlePluginPortal() 10 | } 11 | } 12 | 13 | rootProject.name = "com.pulumi.tls" 14 | include("lib") 15 | -------------------------------------------------------------------------------- /sdk/java/src/main/java/com/pulumi/tls/Config.java: -------------------------------------------------------------------------------- 1 | // *** WARNING: this file was generated by pulumi-java-gen. *** 2 | // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | package com.pulumi.tls; 5 | 6 | import com.pulumi.core.internal.Codegen; 7 | import com.pulumi.tls.config.inputs.Proxy; 8 | import java.util.Optional; 9 | 10 | public final class Config { 11 | 12 | private static final com.pulumi.Config config = com.pulumi.Config.of("tls"); 13 | /** 14 | * Proxy used by resources and data sources that connect to external endpoints. 15 | * 16 | */ 17 | public Optional proxy() { 18 | return Codegen.objectProp("proxy", Proxy.class).config(config).get(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /sdk/java/src/main/java/com/pulumi/tls/Provider.java: -------------------------------------------------------------------------------- 1 | // *** WARNING: this file was generated by pulumi-java-gen. *** 2 | // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | package com.pulumi.tls; 5 | 6 | import com.pulumi.core.Output; 7 | import com.pulumi.core.annotations.ResourceType; 8 | import com.pulumi.core.internal.Codegen; 9 | import com.pulumi.tls.ProviderArgs; 10 | import com.pulumi.tls.Utilities; 11 | import javax.annotation.Nullable; 12 | 13 | /** 14 | * The provider type for the tls package. By default, resources use package-wide configuration 15 | * settings, however an explicit `Provider` instance may be created and passed during resource 16 | * construction to achieve fine-grained programmatic control over provider settings. See the 17 | * [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information. 18 | * 19 | */ 20 | @ResourceType(type="pulumi:providers:tls") 21 | public class Provider extends com.pulumi.resources.ProviderResource { 22 | /** 23 | * 24 | * @param name The _unique_ name of the resulting resource. 25 | */ 26 | public Provider(java.lang.String name) { 27 | this(name, ProviderArgs.Empty); 28 | } 29 | /** 30 | * 31 | * @param name The _unique_ name of the resulting resource. 32 | * @param args The arguments to use to populate this resource's properties. 33 | */ 34 | public Provider(java.lang.String name, @Nullable ProviderArgs args) { 35 | this(name, args, null); 36 | } 37 | /** 38 | * 39 | * @param name The _unique_ name of the resulting resource. 40 | * @param args The arguments to use to populate this resource's properties. 41 | * @param options A bag of options that control this resource's behavior. 42 | */ 43 | public Provider(java.lang.String name, @Nullable ProviderArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { 44 | super("tls", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); 45 | } 46 | 47 | private static ProviderArgs makeArgs(@Nullable ProviderArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { 48 | if (options != null && options.getUrn().isPresent()) { 49 | return null; 50 | } 51 | return args == null ? ProviderArgs.Empty : args; 52 | } 53 | 54 | private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { 55 | var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() 56 | .version(Utilities.getVersion()) 57 | .build(); 58 | return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /sdk/java/src/main/java/com/pulumi/tls/ProviderArgs.java: -------------------------------------------------------------------------------- 1 | // *** WARNING: this file was generated by pulumi-java-gen. *** 2 | // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | package com.pulumi.tls; 5 | 6 | import com.pulumi.core.Output; 7 | import com.pulumi.core.annotations.Import; 8 | import com.pulumi.tls.inputs.ProviderProxyArgs; 9 | import java.util.Objects; 10 | import java.util.Optional; 11 | import javax.annotation.Nullable; 12 | 13 | 14 | public final class ProviderArgs extends com.pulumi.resources.ResourceArgs { 15 | 16 | public static final ProviderArgs Empty = new ProviderArgs(); 17 | 18 | /** 19 | * Proxy used by resources and data sources that connect to external endpoints. 20 | * 21 | */ 22 | @Import(name="proxy", json=true) 23 | private @Nullable Output proxy; 24 | 25 | /** 26 | * @return Proxy used by resources and data sources that connect to external endpoints. 27 | * 28 | */ 29 | public Optional> proxy() { 30 | return Optional.ofNullable(this.proxy); 31 | } 32 | 33 | private ProviderArgs() {} 34 | 35 | private ProviderArgs(ProviderArgs $) { 36 | this.proxy = $.proxy; 37 | } 38 | 39 | public static Builder builder() { 40 | return new Builder(); 41 | } 42 | public static Builder builder(ProviderArgs defaults) { 43 | return new Builder(defaults); 44 | } 45 | 46 | public static final class Builder { 47 | private ProviderArgs $; 48 | 49 | public Builder() { 50 | $ = new ProviderArgs(); 51 | } 52 | 53 | public Builder(ProviderArgs defaults) { 54 | $ = new ProviderArgs(Objects.requireNonNull(defaults)); 55 | } 56 | 57 | /** 58 | * @param proxy Proxy used by resources and data sources that connect to external endpoints. 59 | * 60 | * @return builder 61 | * 62 | */ 63 | public Builder proxy(@Nullable Output proxy) { 64 | $.proxy = proxy; 65 | return this; 66 | } 67 | 68 | /** 69 | * @param proxy Proxy used by resources and data sources that connect to external endpoints. 70 | * 71 | * @return builder 72 | * 73 | */ 74 | public Builder proxy(ProviderProxyArgs proxy) { 75 | return proxy(Output.of(proxy)); 76 | } 77 | 78 | public ProviderArgs build() { 79 | return $; 80 | } 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /sdk/java/src/main/java/com/pulumi/tls/Utilities.java: -------------------------------------------------------------------------------- 1 | // *** WARNING: this file was generated by pulumi-java-gen. *** 2 | // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | package com.pulumi.tls; 5 | 6 | 7 | 8 | 9 | 10 | import java.io.BufferedReader; 11 | import java.io.InputStreamReader; 12 | import java.util.Optional; 13 | import java.util.stream.Collectors; 14 | import javax.annotation.Nullable; 15 | import com.pulumi.core.internal.Environment; 16 | import com.pulumi.deployment.InvokeOptions; 17 | import com.pulumi.deployment.InvokeOutputOptions; 18 | 19 | public class Utilities { 20 | 21 | public static Optional getEnv(java.lang.String... names) { 22 | for (var n : names) { 23 | var value = Environment.getEnvironmentVariable(n); 24 | if (value.isValue()) { 25 | return Optional.of(value.value()); 26 | } 27 | } 28 | return Optional.empty(); 29 | } 30 | 31 | public static Optional getEnvBoolean(java.lang.String... names) { 32 | for (var n : names) { 33 | var value = Environment.getBooleanEnvironmentVariable(n); 34 | if (value.isValue()) { 35 | return Optional.of(value.value()); 36 | } 37 | } 38 | return Optional.empty(); 39 | } 40 | 41 | public static Optional getEnvInteger(java.lang.String... names) { 42 | for (var n : names) { 43 | var value = Environment.getIntegerEnvironmentVariable(n); 44 | if (value.isValue()) { 45 | return Optional.of(value.value()); 46 | } 47 | } 48 | return Optional.empty(); 49 | } 50 | 51 | public static Optional getEnvDouble(java.lang.String... names) { 52 | for (var n : names) { 53 | var value = Environment.getDoubleEnvironmentVariable(n); 54 | if (value.isValue()) { 55 | return Optional.of(value.value()); 56 | } 57 | } 58 | return Optional.empty(); 59 | } 60 | 61 | public static InvokeOptions withVersion(@Nullable InvokeOptions options) { 62 | if (options != null && options.getVersion().isPresent()) { 63 | return options; 64 | } 65 | return new InvokeOptions( 66 | options == null ? null : options.getParent().orElse(null), 67 | options == null ? null : options.getProvider().orElse(null), 68 | getVersion() 69 | ); 70 | } 71 | 72 | public static InvokeOutputOptions withVersion(@Nullable InvokeOutputOptions options) { 73 | if (options != null && options.getVersion().isPresent()) { 74 | return options; 75 | } 76 | return new InvokeOutputOptions( 77 | options == null ? null : options.getParent().orElse(null), 78 | options == null ? null : options.getProvider().orElse(null), 79 | getVersion(), 80 | options == null ? null : options.getDependsOn() 81 | ); 82 | } 83 | 84 | private static final java.lang.String version; 85 | public static java.lang.String getVersion() { 86 | return version; 87 | } 88 | 89 | static { 90 | var resourceName = "com/pulumi/tls/version.txt"; 91 | var versionFile = Utilities.class.getClassLoader().getResourceAsStream(resourceName); 92 | if (versionFile == null) { 93 | throw new IllegalStateException( 94 | java.lang.String.format("expected resource '%s' on Classpath, not found", resourceName) 95 | ); 96 | } 97 | version = new BufferedReader(new InputStreamReader(versionFile)) 98 | .lines() 99 | .collect(Collectors.joining("\n")) 100 | .trim(); 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /sdk/java/src/main/java/com/pulumi/tls/config/inputs/Proxy.java: -------------------------------------------------------------------------------- 1 | // *** WARNING: this file was generated by pulumi-java-gen. *** 2 | // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | package com.pulumi.tls.config.inputs; 5 | 6 | import com.pulumi.core.annotations.CustomType; 7 | import java.lang.Boolean; 8 | import java.lang.String; 9 | import java.util.Objects; 10 | import java.util.Optional; 11 | import javax.annotation.Nullable; 12 | 13 | @CustomType 14 | public final class Proxy { 15 | /** 16 | * @return When `true` the provider will discover the proxy configuration from environment variables. This is based upon [`http.ProxyFromEnvironment`](https://pkg.go.dev/net/http#ProxyFromEnvironment) and it supports the same environment variables (default: `true`). 17 | * 18 | */ 19 | private @Nullable Boolean fromEnv; 20 | /** 21 | * @return Password used for Basic authentication against the Proxy. 22 | * 23 | */ 24 | private @Nullable String password; 25 | /** 26 | * @return URL used to connect to the Proxy. Accepted schemes are: `http`, `https`, `socks5`. 27 | * 28 | */ 29 | private @Nullable String url; 30 | /** 31 | * @return Username (or Token) used for Basic authentication against the Proxy. 32 | * 33 | */ 34 | private @Nullable String username; 35 | 36 | private Proxy() {} 37 | /** 38 | * @return When `true` the provider will discover the proxy configuration from environment variables. This is based upon [`http.ProxyFromEnvironment`](https://pkg.go.dev/net/http#ProxyFromEnvironment) and it supports the same environment variables (default: `true`). 39 | * 40 | */ 41 | public Optional fromEnv() { 42 | return Optional.ofNullable(this.fromEnv); 43 | } 44 | /** 45 | * @return Password used for Basic authentication against the Proxy. 46 | * 47 | */ 48 | public Optional password() { 49 | return Optional.ofNullable(this.password); 50 | } 51 | /** 52 | * @return URL used to connect to the Proxy. Accepted schemes are: `http`, `https`, `socks5`. 53 | * 54 | */ 55 | public Optional url() { 56 | return Optional.ofNullable(this.url); 57 | } 58 | /** 59 | * @return Username (or Token) used for Basic authentication against the Proxy. 60 | * 61 | */ 62 | public Optional username() { 63 | return Optional.ofNullable(this.username); 64 | } 65 | 66 | public static Builder builder() { 67 | return new Builder(); 68 | } 69 | 70 | public static Builder builder(Proxy defaults) { 71 | return new Builder(defaults); 72 | } 73 | @CustomType.Builder 74 | public static final class Builder { 75 | private @Nullable Boolean fromEnv; 76 | private @Nullable String password; 77 | private @Nullable String url; 78 | private @Nullable String username; 79 | public Builder() {} 80 | public Builder(Proxy defaults) { 81 | Objects.requireNonNull(defaults); 82 | this.fromEnv = defaults.fromEnv; 83 | this.password = defaults.password; 84 | this.url = defaults.url; 85 | this.username = defaults.username; 86 | } 87 | 88 | @CustomType.Setter 89 | public Builder fromEnv(@Nullable Boolean fromEnv) { 90 | 91 | this.fromEnv = fromEnv; 92 | return this; 93 | } 94 | @CustomType.Setter 95 | public Builder password(@Nullable String password) { 96 | 97 | this.password = password; 98 | return this; 99 | } 100 | @CustomType.Setter 101 | public Builder url(@Nullable String url) { 102 | 103 | this.url = url; 104 | return this; 105 | } 106 | @CustomType.Setter 107 | public Builder username(@Nullable String username) { 108 | 109 | this.username = username; 110 | return this; 111 | } 112 | public Proxy build() { 113 | final var _resultValue = new Proxy(); 114 | _resultValue.fromEnv = fromEnv; 115 | _resultValue.password = password; 116 | _resultValue.url = url; 117 | _resultValue.username = username; 118 | return _resultValue; 119 | } 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /sdk/java/src/main/java/com/pulumi/tls/inputs/GetCertificatePlainArgs.java: -------------------------------------------------------------------------------- 1 | // *** WARNING: this file was generated by pulumi-java-gen. *** 2 | // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | package com.pulumi.tls.inputs; 5 | 6 | import com.pulumi.core.annotations.Import; 7 | import java.lang.Boolean; 8 | import java.lang.String; 9 | import java.util.Objects; 10 | import java.util.Optional; 11 | import javax.annotation.Nullable; 12 | 13 | 14 | public final class GetCertificatePlainArgs extends com.pulumi.resources.InvokeArgs { 15 | 16 | public static final GetCertificatePlainArgs Empty = new GetCertificatePlainArgs(); 17 | 18 | /** 19 | * The content of the certificate in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format. Cannot be used with `url`. 20 | * 21 | */ 22 | @Import(name="content") 23 | private @Nullable String content; 24 | 25 | /** 26 | * @return The content of the certificate in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format. Cannot be used with `url`. 27 | * 28 | */ 29 | public Optional content() { 30 | return Optional.ofNullable(this.content); 31 | } 32 | 33 | /** 34 | * The URL of the website to get the certificates from. Cannot be used with `content`. 35 | * 36 | */ 37 | @Import(name="url") 38 | private @Nullable String url; 39 | 40 | /** 41 | * @return The URL of the website to get the certificates from. Cannot be used with `content`. 42 | * 43 | */ 44 | public Optional url() { 45 | return Optional.ofNullable(this.url); 46 | } 47 | 48 | /** 49 | * Whether to verify the certificate chain while parsing it or not (default: `true`). Cannot be used with `content`. 50 | * 51 | */ 52 | @Import(name="verifyChain") 53 | private @Nullable Boolean verifyChain; 54 | 55 | /** 56 | * @return Whether to verify the certificate chain while parsing it or not (default: `true`). Cannot be used with `content`. 57 | * 58 | */ 59 | public Optional verifyChain() { 60 | return Optional.ofNullable(this.verifyChain); 61 | } 62 | 63 | private GetCertificatePlainArgs() {} 64 | 65 | private GetCertificatePlainArgs(GetCertificatePlainArgs $) { 66 | this.content = $.content; 67 | this.url = $.url; 68 | this.verifyChain = $.verifyChain; 69 | } 70 | 71 | public static Builder builder() { 72 | return new Builder(); 73 | } 74 | public static Builder builder(GetCertificatePlainArgs defaults) { 75 | return new Builder(defaults); 76 | } 77 | 78 | public static final class Builder { 79 | private GetCertificatePlainArgs $; 80 | 81 | public Builder() { 82 | $ = new GetCertificatePlainArgs(); 83 | } 84 | 85 | public Builder(GetCertificatePlainArgs defaults) { 86 | $ = new GetCertificatePlainArgs(Objects.requireNonNull(defaults)); 87 | } 88 | 89 | /** 90 | * @param content The content of the certificate in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format. Cannot be used with `url`. 91 | * 92 | * @return builder 93 | * 94 | */ 95 | public Builder content(@Nullable String content) { 96 | $.content = content; 97 | return this; 98 | } 99 | 100 | /** 101 | * @param url The URL of the website to get the certificates from. Cannot be used with `content`. 102 | * 103 | * @return builder 104 | * 105 | */ 106 | public Builder url(@Nullable String url) { 107 | $.url = url; 108 | return this; 109 | } 110 | 111 | /** 112 | * @param verifyChain Whether to verify the certificate chain while parsing it or not (default: `true`). Cannot be used with `content`. 113 | * 114 | * @return builder 115 | * 116 | */ 117 | public Builder verifyChain(@Nullable Boolean verifyChain) { 118 | $.verifyChain = verifyChain; 119 | return this; 120 | } 121 | 122 | public GetCertificatePlainArgs build() { 123 | return $; 124 | } 125 | } 126 | 127 | } 128 | -------------------------------------------------------------------------------- /sdk/java/src/main/java/com/pulumi/tls/inputs/GetPublicKeyPlainArgs.java: -------------------------------------------------------------------------------- 1 | // *** WARNING: this file was generated by pulumi-java-gen. *** 2 | // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | package com.pulumi.tls.inputs; 5 | 6 | import com.pulumi.core.annotations.Import; 7 | import java.lang.String; 8 | import java.util.Objects; 9 | import java.util.Optional; 10 | import javax.annotation.Nullable; 11 | 12 | 13 | public final class GetPublicKeyPlainArgs extends com.pulumi.resources.InvokeArgs { 14 | 15 | public static final GetPublicKeyPlainArgs Empty = new GetPublicKeyPlainArgs(); 16 | 17 | /** 18 | * The private key (in [OpenSSH PEM (RFC 4716)](https://datatracker.ietf.org/doc/html/rfc4716) format) to extract the public key from. This is *mutually exclusive* with `private_key_pem`. Currently-supported algorithms for keys are: `RSA`, `ECDSA`, `ED25519`. 19 | * 20 | */ 21 | @Import(name="privateKeyOpenssh") 22 | private @Nullable String privateKeyOpenssh; 23 | 24 | /** 25 | * @return The private key (in [OpenSSH PEM (RFC 4716)](https://datatracker.ietf.org/doc/html/rfc4716) format) to extract the public key from. This is *mutually exclusive* with `private_key_pem`. Currently-supported algorithms for keys are: `RSA`, `ECDSA`, `ED25519`. 26 | * 27 | */ 28 | public Optional privateKeyOpenssh() { 29 | return Optional.ofNullable(this.privateKeyOpenssh); 30 | } 31 | 32 | /** 33 | * The private key (in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format) to extract the public key from. This is *mutually exclusive* with `private_key_openssh`. Currently-supported algorithms for keys are: `RSA`, `ECDSA`, `ED25519`. 34 | * 35 | */ 36 | @Import(name="privateKeyPem") 37 | private @Nullable String privateKeyPem; 38 | 39 | /** 40 | * @return The private key (in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format) to extract the public key from. This is *mutually exclusive* with `private_key_openssh`. Currently-supported algorithms for keys are: `RSA`, `ECDSA`, `ED25519`. 41 | * 42 | */ 43 | public Optional privateKeyPem() { 44 | return Optional.ofNullable(this.privateKeyPem); 45 | } 46 | 47 | private GetPublicKeyPlainArgs() {} 48 | 49 | private GetPublicKeyPlainArgs(GetPublicKeyPlainArgs $) { 50 | this.privateKeyOpenssh = $.privateKeyOpenssh; 51 | this.privateKeyPem = $.privateKeyPem; 52 | } 53 | 54 | public static Builder builder() { 55 | return new Builder(); 56 | } 57 | public static Builder builder(GetPublicKeyPlainArgs defaults) { 58 | return new Builder(defaults); 59 | } 60 | 61 | public static final class Builder { 62 | private GetPublicKeyPlainArgs $; 63 | 64 | public Builder() { 65 | $ = new GetPublicKeyPlainArgs(); 66 | } 67 | 68 | public Builder(GetPublicKeyPlainArgs defaults) { 69 | $ = new GetPublicKeyPlainArgs(Objects.requireNonNull(defaults)); 70 | } 71 | 72 | /** 73 | * @param privateKeyOpenssh The private key (in [OpenSSH PEM (RFC 4716)](https://datatracker.ietf.org/doc/html/rfc4716) format) to extract the public key from. This is *mutually exclusive* with `private_key_pem`. Currently-supported algorithms for keys are: `RSA`, `ECDSA`, `ED25519`. 74 | * 75 | * @return builder 76 | * 77 | */ 78 | public Builder privateKeyOpenssh(@Nullable String privateKeyOpenssh) { 79 | $.privateKeyOpenssh = privateKeyOpenssh; 80 | return this; 81 | } 82 | 83 | /** 84 | * @param privateKeyPem The private key (in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format) to extract the public key from. This is *mutually exclusive* with `private_key_openssh`. Currently-supported algorithms for keys are: `RSA`, `ECDSA`, `ED25519`. 85 | * 86 | * @return builder 87 | * 88 | */ 89 | public Builder privateKeyPem(@Nullable String privateKeyPem) { 90 | $.privateKeyPem = privateKeyPem; 91 | return this; 92 | } 93 | 94 | public GetPublicKeyPlainArgs build() { 95 | return $; 96 | } 97 | } 98 | 99 | } 100 | -------------------------------------------------------------------------------- /sdk/nodejs/Pulumi.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pulumi/pulumi-tls/4bd0d18982a817c227556645e7b6f248c6109ae1/sdk/nodejs/Pulumi.yaml -------------------------------------------------------------------------------- /sdk/nodejs/README.md: -------------------------------------------------------------------------------- 1 | > This provider is a derived work of the [Terraform Provider](https://github.com/hashicorp/terraform-provider-tls) 2 | > distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature, 3 | > first check the [`pulumi-tls` repo](https://github.com/pulumi/pulumi-tls/issues); however, if that doesn't turn up anything, 4 | > please consult the source [`terraform-provider-tls` repo](https://github.com/hashicorp/terraform-provider-tls/issues). 5 | -------------------------------------------------------------------------------- /sdk/nodejs/config/index.ts: -------------------------------------------------------------------------------- 1 | // *** WARNING: this file was generated by pulumi-language-nodejs. *** 2 | // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | // Export members: 5 | export * from "./vars"; 6 | -------------------------------------------------------------------------------- /sdk/nodejs/config/vars.ts: -------------------------------------------------------------------------------- 1 | // *** WARNING: this file was generated by pulumi-language-nodejs. *** 2 | // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | import * as pulumi from "@pulumi/pulumi"; 5 | import * as inputs from "../types/input"; 6 | import * as outputs from "../types/output"; 7 | import * as utilities from "../utilities"; 8 | 9 | declare var exports: any; 10 | const __config = new pulumi.Config("tls"); 11 | 12 | /** 13 | * Proxy used by resources and data sources that connect to external endpoints. 14 | */ 15 | export declare const proxy: outputs.config.Proxy | undefined; 16 | Object.defineProperty(exports, "proxy", { 17 | get() { 18 | return __config.getObject("proxy"); 19 | }, 20 | enumerable: true, 21 | }); 22 | 23 | -------------------------------------------------------------------------------- /sdk/nodejs/getCertificate.ts: -------------------------------------------------------------------------------- 1 | // *** WARNING: this file was generated by pulumi-language-nodejs. *** 2 | // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | import * as pulumi from "@pulumi/pulumi"; 5 | import * as inputs from "./types/input"; 6 | import * as outputs from "./types/output"; 7 | import * as utilities from "./utilities"; 8 | 9 | export function getCertificate(args?: GetCertificateArgs, opts?: pulumi.InvokeOptions): Promise { 10 | args = args || {}; 11 | opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); 12 | return pulumi.runtime.invoke("tls:index/getCertificate:getCertificate", { 13 | "content": args.content, 14 | "url": args.url, 15 | "verifyChain": args.verifyChain, 16 | }, opts); 17 | } 18 | 19 | /** 20 | * A collection of arguments for invoking getCertificate. 21 | */ 22 | export interface GetCertificateArgs { 23 | /** 24 | * The content of the certificate in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format. Cannot be used with `url`. 25 | */ 26 | content?: string; 27 | /** 28 | * The URL of the website to get the certificates from. Cannot be used with `content`. 29 | */ 30 | url?: string; 31 | /** 32 | * Whether to verify the certificate chain while parsing it or not (default: `true`). Cannot be used with `content`. 33 | */ 34 | verifyChain?: boolean; 35 | } 36 | 37 | /** 38 | * A collection of values returned by getCertificate. 39 | */ 40 | export interface GetCertificateResult { 41 | /** 42 | * The certificates protecting the site, with the root of the chain first. 43 | */ 44 | readonly certificates: outputs.GetCertificateCertificate[]; 45 | /** 46 | * The content of the certificate in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format. Cannot be used with `url`. 47 | */ 48 | readonly content?: string; 49 | /** 50 | * Unique identifier of this data source: hashing of the certificates in the chain. 51 | */ 52 | readonly id: string; 53 | /** 54 | * The URL of the website to get the certificates from. Cannot be used with `content`. 55 | */ 56 | readonly url?: string; 57 | /** 58 | * Whether to verify the certificate chain while parsing it or not (default: `true`). Cannot be used with `content`. 59 | */ 60 | readonly verifyChain?: boolean; 61 | } 62 | export function getCertificateOutput(args?: GetCertificateOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output { 63 | args = args || {}; 64 | opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); 65 | return pulumi.runtime.invokeOutput("tls:index/getCertificate:getCertificate", { 66 | "content": args.content, 67 | "url": args.url, 68 | "verifyChain": args.verifyChain, 69 | }, opts); 70 | } 71 | 72 | /** 73 | * A collection of arguments for invoking getCertificate. 74 | */ 75 | export interface GetCertificateOutputArgs { 76 | /** 77 | * The content of the certificate in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format. Cannot be used with `url`. 78 | */ 79 | content?: pulumi.Input; 80 | /** 81 | * The URL of the website to get the certificates from. Cannot be used with `content`. 82 | */ 83 | url?: pulumi.Input; 84 | /** 85 | * Whether to verify the certificate chain while parsing it or not (default: `true`). Cannot be used with `content`. 86 | */ 87 | verifyChain?: pulumi.Input; 88 | } 89 | -------------------------------------------------------------------------------- /sdk/nodejs/go.mod: -------------------------------------------------------------------------------- 1 | module fake_nodejs_module // Exclude this directory from Go tools 2 | 3 | go 1.17 4 | -------------------------------------------------------------------------------- /sdk/nodejs/index.ts: -------------------------------------------------------------------------------- 1 | // *** WARNING: this file was generated by pulumi-language-nodejs. *** 2 | // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | import * as pulumi from "@pulumi/pulumi"; 5 | import * as utilities from "./utilities"; 6 | 7 | // Export members: 8 | export { CertRequestArgs, CertRequestState } from "./certRequest"; 9 | export type CertRequest = import("./certRequest").CertRequest; 10 | export const CertRequest: typeof import("./certRequest").CertRequest = null as any; 11 | utilities.lazyLoad(exports, ["CertRequest"], () => require("./certRequest")); 12 | 13 | export { GetCertificateArgs, GetCertificateResult, GetCertificateOutputArgs } from "./getCertificate"; 14 | export const getCertificate: typeof import("./getCertificate").getCertificate = null as any; 15 | export const getCertificateOutput: typeof import("./getCertificate").getCertificateOutput = null as any; 16 | utilities.lazyLoad(exports, ["getCertificate","getCertificateOutput"], () => require("./getCertificate")); 17 | 18 | export { GetPublicKeyArgs, GetPublicKeyResult, GetPublicKeyOutputArgs } from "./getPublicKey"; 19 | export const getPublicKey: typeof import("./getPublicKey").getPublicKey = null as any; 20 | export const getPublicKeyOutput: typeof import("./getPublicKey").getPublicKeyOutput = null as any; 21 | utilities.lazyLoad(exports, ["getPublicKey","getPublicKeyOutput"], () => require("./getPublicKey")); 22 | 23 | export { LocallySignedCertArgs, LocallySignedCertState } from "./locallySignedCert"; 24 | export type LocallySignedCert = import("./locallySignedCert").LocallySignedCert; 25 | export const LocallySignedCert: typeof import("./locallySignedCert").LocallySignedCert = null as any; 26 | utilities.lazyLoad(exports, ["LocallySignedCert"], () => require("./locallySignedCert")); 27 | 28 | export { PrivateKeyArgs, PrivateKeyState } from "./privateKey"; 29 | export type PrivateKey = import("./privateKey").PrivateKey; 30 | export const PrivateKey: typeof import("./privateKey").PrivateKey = null as any; 31 | utilities.lazyLoad(exports, ["PrivateKey"], () => require("./privateKey")); 32 | 33 | export * from "./provider"; 34 | import { Provider } from "./provider"; 35 | 36 | export { SelfSignedCertArgs, SelfSignedCertState } from "./selfSignedCert"; 37 | export type SelfSignedCert = import("./selfSignedCert").SelfSignedCert; 38 | export const SelfSignedCert: typeof import("./selfSignedCert").SelfSignedCert = null as any; 39 | utilities.lazyLoad(exports, ["SelfSignedCert"], () => require("./selfSignedCert")); 40 | 41 | 42 | // Export sub-modules: 43 | import * as config from "./config"; 44 | import * as types from "./types"; 45 | 46 | export { 47 | config, 48 | types, 49 | }; 50 | 51 | const _module = { 52 | version: utilities.getVersion(), 53 | construct: (name: string, type: string, urn: string): pulumi.Resource => { 54 | switch (type) { 55 | case "tls:index/certRequest:CertRequest": 56 | return new CertRequest(name, undefined, { urn }) 57 | case "tls:index/locallySignedCert:LocallySignedCert": 58 | return new LocallySignedCert(name, undefined, { urn }) 59 | case "tls:index/privateKey:PrivateKey": 60 | return new PrivateKey(name, undefined, { urn }) 61 | case "tls:index/selfSignedCert:SelfSignedCert": 62 | return new SelfSignedCert(name, undefined, { urn }) 63 | default: 64 | throw new Error(`unknown resource type ${type}`); 65 | } 66 | }, 67 | }; 68 | pulumi.runtime.registerResourceModule("tls", "index/certRequest", _module) 69 | pulumi.runtime.registerResourceModule("tls", "index/locallySignedCert", _module) 70 | pulumi.runtime.registerResourceModule("tls", "index/privateKey", _module) 71 | pulumi.runtime.registerResourceModule("tls", "index/selfSignedCert", _module) 72 | pulumi.runtime.registerResourcePackage("tls", { 73 | version: utilities.getVersion(), 74 | constructProvider: (name: string, type: string, urn: string): pulumi.ProviderResource => { 75 | if (type !== "pulumi:providers:tls") { 76 | throw new Error(`unknown provider type ${type}`); 77 | } 78 | return new Provider(name, undefined, { urn }); 79 | }, 80 | }); 81 | -------------------------------------------------------------------------------- /sdk/nodejs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@pulumi/tls", 3 | "version": "5.0.0-alpha.0+dev", 4 | "description": "A Pulumi package to create TLS resources in Pulumi programs.", 5 | "keywords": [ 6 | "pulumi", 7 | "tls" 8 | ], 9 | "homepage": "https://pulumi.io", 10 | "repository": "https://github.com/pulumi/pulumi-tls", 11 | "license": "Apache-2.0", 12 | "scripts": { 13 | "build": "tsc" 14 | }, 15 | "dependencies": { 16 | "@pulumi/pulumi": "^3.142.0" 17 | }, 18 | "devDependencies": { 19 | "@types/node": "^10.0.0", 20 | "typescript": "^4.3.5" 21 | }, 22 | "pulumi": { 23 | "resource": true, 24 | "name": "tls", 25 | "version": "5.0.0-alpha.0+dev" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /sdk/nodejs/provider.ts: -------------------------------------------------------------------------------- 1 | // *** WARNING: this file was generated by pulumi-language-nodejs. *** 2 | // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | import * as pulumi from "@pulumi/pulumi"; 5 | import * as inputs from "./types/input"; 6 | import * as outputs from "./types/output"; 7 | import * as utilities from "./utilities"; 8 | 9 | /** 10 | * The provider type for the tls package. By default, resources use package-wide configuration 11 | * settings, however an explicit `Provider` instance may be created and passed during resource 12 | * construction to achieve fine-grained programmatic control over provider settings. See the 13 | * [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information. 14 | */ 15 | export class Provider extends pulumi.ProviderResource { 16 | /** @internal */ 17 | public static readonly __pulumiType = 'tls'; 18 | 19 | /** 20 | * Returns true if the given object is an instance of Provider. This is designed to work even 21 | * when multiple copies of the Pulumi SDK have been loaded into the same process. 22 | */ 23 | public static isInstance(obj: any): obj is Provider { 24 | if (obj === undefined || obj === null) { 25 | return false; 26 | } 27 | return obj['__pulumiType'] === "pulumi:providers:" + Provider.__pulumiType; 28 | } 29 | 30 | 31 | /** 32 | * Create a Provider resource with the given unique name, arguments, and options. 33 | * 34 | * @param name The _unique_ name of the resource. 35 | * @param args The arguments to use to populate this resource's properties. 36 | * @param opts A bag of options that control this resource's behavior. 37 | */ 38 | constructor(name: string, args?: ProviderArgs, opts?: pulumi.ResourceOptions) { 39 | let resourceInputs: pulumi.Inputs = {}; 40 | opts = opts || {}; 41 | { 42 | resourceInputs["proxy"] = pulumi.output(args ? args.proxy : undefined).apply(JSON.stringify); 43 | } 44 | opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); 45 | super(Provider.__pulumiType, name, resourceInputs, opts); 46 | } 47 | 48 | /** 49 | * This function returns a Terraform config object with terraform-namecased keys,to be used with the Terraform Module Provider. 50 | */ 51 | terraformConfig(): pulumi.Output { 52 | return pulumi.runtime.call("pulumi:providers:tls/terraformConfig", { 53 | "__self__": this, 54 | }, this); 55 | } 56 | } 57 | 58 | /** 59 | * The set of arguments for constructing a Provider resource. 60 | */ 61 | export interface ProviderArgs { 62 | /** 63 | * Proxy used by resources and data sources that connect to external endpoints. 64 | */ 65 | proxy?: pulumi.Input; 66 | } 67 | 68 | export namespace Provider { 69 | /** 70 | * The results of the Provider.terraformConfig method. 71 | */ 72 | export interface TerraformConfigResult { 73 | readonly result: {[key: string]: any}; 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /sdk/nodejs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "outDir": "bin", 4 | "target": "es2016", 5 | "module": "commonjs", 6 | "moduleResolution": "node", 7 | "declaration": true, 8 | "sourceMap": true, 9 | "stripInternal": true, 10 | "experimentalDecorators": true, 11 | "noFallthroughCasesInSwitch": true, 12 | "forceConsistentCasingInFileNames": true, 13 | "strict": true 14 | }, 15 | "files": [ 16 | "certRequest.ts", 17 | "config/index.ts", 18 | "config/vars.ts", 19 | "getCertificate.ts", 20 | "getPublicKey.ts", 21 | "index.ts", 22 | "locallySignedCert.ts", 23 | "privateKey.ts", 24 | "provider.ts", 25 | "selfSignedCert.ts", 26 | "types/index.ts", 27 | "types/input.ts", 28 | "types/output.ts", 29 | "utilities.ts" 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /sdk/nodejs/types/index.ts: -------------------------------------------------------------------------------- 1 | // *** WARNING: this file was generated by pulumi-language-nodejs. *** 2 | // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | import * as utilities from "../utilities"; 5 | 6 | // Export sub-modules: 7 | import * as input from "./input"; 8 | import * as output from "./output"; 9 | 10 | export { 11 | input, 12 | output, 13 | }; 14 | -------------------------------------------------------------------------------- /sdk/nodejs/types/input.ts: -------------------------------------------------------------------------------- 1 | // *** WARNING: this file was generated by pulumi-language-nodejs. *** 2 | // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | import * as pulumi from "@pulumi/pulumi"; 5 | import * as inputs from "../types/input"; 6 | import * as outputs from "../types/output"; 7 | 8 | export interface CertRequestSubject { 9 | /** 10 | * Distinguished name: `CN` 11 | */ 12 | commonName?: pulumi.Input; 13 | /** 14 | * Distinguished name: `C` 15 | */ 16 | country?: pulumi.Input; 17 | /** 18 | * ASN.1 Object Identifier (OID): `1.2.840.113549.1.9.1` 19 | */ 20 | emailAddress?: pulumi.Input; 21 | /** 22 | * Distinguished name: `L` 23 | */ 24 | locality?: pulumi.Input; 25 | /** 26 | * Distinguished name: `O` 27 | */ 28 | organization?: pulumi.Input; 29 | /** 30 | * Distinguished name: `OU` 31 | */ 32 | organizationalUnit?: pulumi.Input; 33 | /** 34 | * Distinguished name: `PC` 35 | */ 36 | postalCode?: pulumi.Input; 37 | /** 38 | * Distinguished name: `ST` 39 | */ 40 | province?: pulumi.Input; 41 | /** 42 | * Distinguished name: `SERIALNUMBER` 43 | */ 44 | serialNumber?: pulumi.Input; 45 | /** 46 | * Distinguished name: `STREET` 47 | */ 48 | streetAddresses?: pulumi.Input[]>; 49 | } 50 | 51 | export interface ProviderProxy { 52 | /** 53 | * When `true` the provider will discover the proxy configuration from environment variables. This is based upon [`http.ProxyFromEnvironment`](https://pkg.go.dev/net/http#ProxyFromEnvironment) and it supports the same environment variables (default: `true`). 54 | */ 55 | fromEnv?: pulumi.Input; 56 | /** 57 | * Password used for Basic authentication against the Proxy. 58 | */ 59 | password?: pulumi.Input; 60 | /** 61 | * URL used to connect to the Proxy. Accepted schemes are: `http`, `https`, `socks5`. 62 | */ 63 | url?: pulumi.Input; 64 | /** 65 | * Username (or Token) used for Basic authentication against the Proxy. 66 | */ 67 | username?: pulumi.Input; 68 | } 69 | 70 | export interface SelfSignedCertSubject { 71 | /** 72 | * Distinguished name: `CN` 73 | */ 74 | commonName?: pulumi.Input; 75 | /** 76 | * Distinguished name: `C` 77 | */ 78 | country?: pulumi.Input; 79 | /** 80 | * ASN.1 Object Identifier (OID): `1.2.840.113549.1.9.1` 81 | */ 82 | emailAddress?: pulumi.Input; 83 | /** 84 | * Distinguished name: `L` 85 | */ 86 | locality?: pulumi.Input; 87 | /** 88 | * Distinguished name: `O` 89 | */ 90 | organization?: pulumi.Input; 91 | /** 92 | * Distinguished name: `OU` 93 | */ 94 | organizationalUnit?: pulumi.Input; 95 | /** 96 | * Distinguished name: `PC` 97 | */ 98 | postalCode?: pulumi.Input; 99 | /** 100 | * Distinguished name: `ST` 101 | */ 102 | province?: pulumi.Input; 103 | /** 104 | * Distinguished name: `SERIALNUMBER` 105 | */ 106 | serialNumber?: pulumi.Input; 107 | /** 108 | * Distinguished name: `STREET` 109 | */ 110 | streetAddresses?: pulumi.Input[]>; 111 | } 112 | export namespace config { 113 | } 114 | -------------------------------------------------------------------------------- /sdk/nodejs/utilities.ts: -------------------------------------------------------------------------------- 1 | // *** WARNING: this file was generated by pulumi-language-nodejs. *** 2 | // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 | 4 | 5 | import * as runtime from "@pulumi/pulumi/runtime"; 6 | import * as pulumi from "@pulumi/pulumi"; 7 | 8 | export function getEnv(...vars: string[]): string | undefined { 9 | for (const v of vars) { 10 | const value = process.env[v]; 11 | if (value) { 12 | return value; 13 | } 14 | } 15 | return undefined; 16 | } 17 | 18 | export function getEnvBoolean(...vars: string[]): boolean | undefined { 19 | const s = getEnv(...vars); 20 | if (s !== undefined) { 21 | // NOTE: these values are taken from https://golang.org/src/strconv/atob.go?s=351:391#L1, which is what 22 | // Terraform uses internally when parsing boolean values. 23 | if (["1", "t", "T", "true", "TRUE", "True"].find(v => v === s) !== undefined) { 24 | return true; 25 | } 26 | if (["0", "f", "F", "false", "FALSE", "False"].find(v => v === s) !== undefined) { 27 | return false; 28 | } 29 | } 30 | return undefined; 31 | } 32 | 33 | export function getEnvNumber(...vars: string[]): number | undefined { 34 | const s = getEnv(...vars); 35 | if (s !== undefined) { 36 | const f = parseFloat(s); 37 | if (!isNaN(f)) { 38 | return f; 39 | } 40 | } 41 | return undefined; 42 | } 43 | 44 | export function getVersion(): string { 45 | let version = require('./package.json').version; 46 | // Node allows for the version to be prefixed by a "v", while semver doesn't. 47 | // If there is a v, strip it off. 48 | if (version.indexOf('v') === 0) { 49 | version = version.slice(1); 50 | } 51 | return version; 52 | } 53 | 54 | /** @internal */ 55 | export function resourceOptsDefaults(): any { 56 | return { version: getVersion() }; 57 | } 58 | 59 | /** @internal */ 60 | export function lazyLoad(exports: any, props: string[], loadModule: any) { 61 | for (let property of props) { 62 | Object.defineProperty(exports, property, { 63 | enumerable: true, 64 | get: function() { 65 | return loadModule()[property]; 66 | }, 67 | }); 68 | } 69 | } 70 | 71 | /** @internal */ 72 | export async function callAsync( 73 | tok: string, 74 | props: pulumi.Inputs, 75 | res?: pulumi.Resource, 76 | opts?: {property?: string}, 77 | ): Promise { 78 | const o: any = runtime.call(tok, props, res); 79 | const value = await o.promise(true /*withUnknowns*/); 80 | const isKnown = await o.isKnown; 81 | const isSecret = await o.isSecret; 82 | const problem: string|undefined = 83 | !isKnown ? "an unknown value" 84 | : isSecret ? "a secret value" 85 | : undefined; 86 | // Ingoring o.resources silently. They are typically non-empty, r.f() calls include r as a dependency. 87 | if (problem) { 88 | throw new Error(`Plain resource method "${tok}" incorrectly returned ${problem}. ` + 89 | "This is an error in the provider, please report this to the provider developer."); 90 | } 91 | // Extract a single property if requested. 92 | if (opts && opts.property) { 93 | return value[opts.property]; 94 | } 95 | return value; 96 | } 97 | -------------------------------------------------------------------------------- /sdk/python/Pulumi.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pulumi/pulumi-tls/4bd0d18982a817c227556645e7b6f248c6109ae1/sdk/python/Pulumi.yaml -------------------------------------------------------------------------------- /sdk/python/README.md: -------------------------------------------------------------------------------- 1 | [![Actions Status](https://github.com/pulumi/pulumi-tls/workflows/master/badge.svg)](https://github.com/pulumi/pulumi-tls/actions) 2 | [![Slack](http://www.pulumi.com/images/docs/badges/slack.svg)](https://slack.pulumi.com) 3 | [![NPM version](https://badge.fury.io/js/%40pulumi%2Ftls.svg)](https://www.npmjs.com/package/@pulumi/tls) 4 | [![Python version](https://badge.fury.io/py/pulumi-tls.svg)](https://pypi.org/project/pulumi-tls) 5 | [![NuGet version](https://badge.fury.io/nu/pulumi.tls.svg)](https://badge.fury.io/nu/pulumi.tls) 6 | [![PkgGoDev](https://pkg.go.dev/badge/github.com/pulumi/pulumi-tls/sdk/v5/go)](https://pkg.go.dev/github.com/pulumi/pulumi-tls/sdk/v5/go) 7 | [![License](https://img.shields.io/npm/l/%40pulumi%2Fpulumi.svg)](https://github.com/pulumi/pulumi-tls/blob/master/LICENSE) 8 | 9 | # TLS Resource Provider 10 | 11 | The TLS resource provider for Pulumi lets you create TLS keys and certificates in your cloud programs. To use 12 | this package, please [install the Pulumi CLI first](https://pulumi.io/). 13 | 14 | ## Installing 15 | 16 | This package is available in many languages in the standard packaging formats. 17 | 18 | ### Node.js (Java/TypeScript) 19 | 20 | To use from JavaScript or TypeScript in Node.js, install using either `npm`: 21 | 22 | $ npm install @pulumi/tls 23 | 24 | or `yarn`: 25 | 26 | $ yarn add @pulumi/tls 27 | 28 | ### Python 29 | 30 | To use from Python, install using `pip`: 31 | 32 | $ pip install pulumi_tls 33 | 34 | ### Go 35 | 36 | To use from Go, use `go get` to grab the latest version of the library 37 | 38 | $ go get github.com/pulumi/pulumi-tls/sdk/v5 39 | 40 | ### .NET 41 | 42 | To use from .NET, install using `dotnet add package`: 43 | 44 | $ dotnet add package Pulumi.Tls 45 | 46 | ## Concepts 47 | 48 | The `@pulumi/tls` package provides a strongly-typed means to build cloud applications that create 49 | and interact closely with TLS resources. 50 | 51 | ## Reference 52 | 53 | 54 | For further information, please visit [the TLS provider docs](https://www.pulumi.com/docs/intro/cloud-providers/tls) or for detailed reference documentation, please visit [the API docs](https://www.pulumi.com/docs/reference/pkg/tls). 55 | -------------------------------------------------------------------------------- /sdk/python/go.mod: -------------------------------------------------------------------------------- 1 | module fake_python_module // Exclude this directory from Go tools 2 | 3 | go 1.17 4 | -------------------------------------------------------------------------------- /sdk/python/pulumi_tls/README.md: -------------------------------------------------------------------------------- 1 | > This provider is a derived work of the [Terraform Provider](https://github.com/hashicorp/terraform-provider-tls) 2 | > distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature, 3 | > first check the [`pulumi-tls` repo](https://github.com/pulumi/pulumi-tls/issues); however, if that doesn't turn up anything, 4 | > please consult the source [`terraform-provider-tls` repo](https://github.com/hashicorp/terraform-provider-tls/issues). -------------------------------------------------------------------------------- /sdk/python/pulumi_tls/__init__.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | # *** WARNING: this file was generated by pulumi-language-python. *** 3 | # *** Do not edit by hand unless you're certain you know what you are doing! *** 4 | 5 | import builtins 6 | from . import _utilities 7 | import typing 8 | # Export this package's modules as members: 9 | from .cert_request import * 10 | from .get_certificate import * 11 | from .get_public_key import * 12 | from .locally_signed_cert import * 13 | from .private_key import * 14 | from .provider import * 15 | from .self_signed_cert import * 16 | from ._inputs import * 17 | from . import outputs 18 | 19 | # Make subpackages available: 20 | if typing.TYPE_CHECKING: 21 | import pulumi_tls.config as __config 22 | config = __config 23 | else: 24 | config = _utilities.lazy_import('pulumi_tls.config') 25 | 26 | _utilities.register( 27 | resource_modules=""" 28 | [ 29 | { 30 | "pkg": "tls", 31 | "mod": "index/certRequest", 32 | "fqn": "pulumi_tls", 33 | "classes": { 34 | "tls:index/certRequest:CertRequest": "CertRequest" 35 | } 36 | }, 37 | { 38 | "pkg": "tls", 39 | "mod": "index/locallySignedCert", 40 | "fqn": "pulumi_tls", 41 | "classes": { 42 | "tls:index/locallySignedCert:LocallySignedCert": "LocallySignedCert" 43 | } 44 | }, 45 | { 46 | "pkg": "tls", 47 | "mod": "index/privateKey", 48 | "fqn": "pulumi_tls", 49 | "classes": { 50 | "tls:index/privateKey:PrivateKey": "PrivateKey" 51 | } 52 | }, 53 | { 54 | "pkg": "tls", 55 | "mod": "index/selfSignedCert", 56 | "fqn": "pulumi_tls", 57 | "classes": { 58 | "tls:index/selfSignedCert:SelfSignedCert": "SelfSignedCert" 59 | } 60 | } 61 | ] 62 | """, 63 | resource_packages=""" 64 | [ 65 | { 66 | "pkg": "tls", 67 | "token": "pulumi:providers:tls", 68 | "fqn": "pulumi_tls", 69 | "class": "Provider" 70 | } 71 | ] 72 | """ 73 | ) 74 | -------------------------------------------------------------------------------- /sdk/python/pulumi_tls/config/__init__.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | # *** WARNING: this file was generated by pulumi-language-python. *** 3 | # *** Do not edit by hand unless you're certain you know what you are doing! *** 4 | 5 | import builtins 6 | import sys 7 | from .vars import _ExportableConfig 8 | 9 | sys.modules[__name__].__class__ = _ExportableConfig 10 | -------------------------------------------------------------------------------- /sdk/python/pulumi_tls/config/__init__.pyi: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | # *** WARNING: this file was generated by pulumi-language-python. *** 3 | # *** Do not edit by hand unless you're certain you know what you are doing! *** 4 | 5 | import builtins 6 | import copy 7 | import warnings 8 | import sys 9 | import pulumi 10 | import pulumi.runtime 11 | from typing import Any, Mapping, Optional, Sequence, Union, overload 12 | if sys.version_info >= (3, 11): 13 | from typing import NotRequired, TypedDict, TypeAlias 14 | else: 15 | from typing_extensions import NotRequired, TypedDict, TypeAlias 16 | from .. import _utilities 17 | from . import outputs 18 | 19 | proxy: Optional[str] 20 | """ 21 | Proxy used by resources and data sources that connect to external endpoints. 22 | """ 23 | 24 | -------------------------------------------------------------------------------- /sdk/python/pulumi_tls/config/outputs.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | # *** WARNING: this file was generated by pulumi-language-python. *** 3 | # *** Do not edit by hand unless you're certain you know what you are doing! *** 4 | 5 | import builtins 6 | import copy 7 | import warnings 8 | import sys 9 | import pulumi 10 | import pulumi.runtime 11 | from typing import Any, Mapping, Optional, Sequence, Union, overload 12 | if sys.version_info >= (3, 11): 13 | from typing import NotRequired, TypedDict, TypeAlias 14 | else: 15 | from typing_extensions import NotRequired, TypedDict, TypeAlias 16 | from .. import _utilities 17 | 18 | __all__ = [ 19 | 'Proxy', 20 | ] 21 | 22 | @pulumi.output_type 23 | class Proxy(dict): 24 | def __init__(__self__, *, 25 | from_env: Optional[builtins.bool] = None, 26 | password: Optional[builtins.str] = None, 27 | url: Optional[builtins.str] = None, 28 | username: Optional[builtins.str] = None): 29 | """ 30 | :param builtins.bool from_env: When `true` the provider will discover the proxy configuration from environment variables. This is based upon [`http.ProxyFromEnvironment`](https://pkg.go.dev/net/http#ProxyFromEnvironment) and it supports the same environment variables (default: `true`). 31 | :param builtins.str password: Password used for Basic authentication against the Proxy. 32 | :param builtins.str url: URL used to connect to the Proxy. Accepted schemes are: `http`, `https`, `socks5`. 33 | :param builtins.str username: Username (or Token) used for Basic authentication against the Proxy. 34 | """ 35 | if from_env is not None: 36 | pulumi.set(__self__, "from_env", from_env) 37 | if password is not None: 38 | pulumi.set(__self__, "password", password) 39 | if url is not None: 40 | pulumi.set(__self__, "url", url) 41 | if username is not None: 42 | pulumi.set(__self__, "username", username) 43 | 44 | @property 45 | @pulumi.getter(name="fromEnv") 46 | def from_env(self) -> Optional[builtins.bool]: 47 | """ 48 | When `true` the provider will discover the proxy configuration from environment variables. This is based upon [`http.ProxyFromEnvironment`](https://pkg.go.dev/net/http#ProxyFromEnvironment) and it supports the same environment variables (default: `true`). 49 | """ 50 | return pulumi.get(self, "from_env") 51 | 52 | @property 53 | @pulumi.getter 54 | def password(self) -> Optional[builtins.str]: 55 | """ 56 | Password used for Basic authentication against the Proxy. 57 | """ 58 | return pulumi.get(self, "password") 59 | 60 | @property 61 | @pulumi.getter 62 | def url(self) -> Optional[builtins.str]: 63 | """ 64 | URL used to connect to the Proxy. Accepted schemes are: `http`, `https`, `socks5`. 65 | """ 66 | return pulumi.get(self, "url") 67 | 68 | @property 69 | @pulumi.getter 70 | def username(self) -> Optional[builtins.str]: 71 | """ 72 | Username (or Token) used for Basic authentication against the Proxy. 73 | """ 74 | return pulumi.get(self, "username") 75 | 76 | 77 | -------------------------------------------------------------------------------- /sdk/python/pulumi_tls/config/vars.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | # *** WARNING: this file was generated by pulumi-language-python. *** 3 | # *** Do not edit by hand unless you're certain you know what you are doing! *** 4 | 5 | import builtins 6 | import copy 7 | import warnings 8 | import sys 9 | import pulumi 10 | import pulumi.runtime 11 | from typing import Any, Mapping, Optional, Sequence, Union, overload 12 | if sys.version_info >= (3, 11): 13 | from typing import NotRequired, TypedDict, TypeAlias 14 | else: 15 | from typing_extensions import NotRequired, TypedDict, TypeAlias 16 | from .. import _utilities 17 | from . import outputs 18 | 19 | import types 20 | 21 | __config__ = pulumi.Config('tls') 22 | 23 | 24 | class _ExportableConfig(types.ModuleType): 25 | @property 26 | def proxy(self) -> Optional[str]: 27 | """ 28 | Proxy used by resources and data sources that connect to external endpoints. 29 | """ 30 | return __config__.get('proxy') 31 | 32 | -------------------------------------------------------------------------------- /sdk/python/pulumi_tls/pulumi-plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "resource": true, 3 | "name": "tls", 4 | "version": "5.0.0-alpha.0+dev" 5 | } 6 | -------------------------------------------------------------------------------- /sdk/python/pulumi_tls/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pulumi/pulumi-tls/4bd0d18982a817c227556645e7b6f248c6109ae1/sdk/python/pulumi_tls/py.typed -------------------------------------------------------------------------------- /sdk/python/pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "pulumi_tls" 3 | description = "A Pulumi package to create TLS resources in Pulumi programs." 4 | dependencies = ["parver>=0.2.1", "pulumi>=3.165.0,<4.0.0", "semver>=2.8.1", "typing-extensions>=4.11,<5; python_version < \"3.11\""] 5 | keywords = ["pulumi", "tls"] 6 | readme = "README.md" 7 | requires-python = ">=3.9" 8 | version = "5.0.0a0+dev" 9 | [project.license] 10 | text = "Apache-2.0" 11 | [project.urls] 12 | Homepage = "https://pulumi.io" 13 | Repository = "https://github.com/pulumi/pulumi-tls" 14 | 15 | [build-system] 16 | requires = ["setuptools>=61.0"] 17 | build-backend = "setuptools.build_meta" 18 | 19 | [tool] 20 | [tool.setuptools] 21 | [tool.setuptools.package-data] 22 | pulumi_tls = ["py.typed", "pulumi-plugin.json"] 23 | --------------------------------------------------------------------------------