1. Packages
  2. Control Plane (cpln)
  3. Installation & Configuration
Control Plane v0.0.25 published on Wednesday, May 15, 2024 by pulumiverse

Control Plane (cpln): Installation & Configuration

cpln logo
Control Plane v0.0.25 published on Wednesday, May 15, 2024 by pulumiverse

    Installation

    The Pulumi Control Plane (cpln) provider is available as a package in all Pulumi languages:

    Setup

    To provision resources with the Pulumi Control Plane (cpln) provider, you need to authenticate with one of the available options.

    1. CLI
      • Install the CLI and execute the command cpln login. After a successful login, the Pulumi provider will use the default profile to authenticate. To use a different profile, set the profile variable when initializing the provider or set the CPLN_PROFILE environment variable.
    2. Token
      • The token variable can be set when initializing the provider or by setting the CPLN_TOKEN environment variable.
      • The value of token can be either:
        • The output of running the command cpln profile token PROFILE_NAME, or
        • In the case of a Service Account, the value of one of it’s keys
    3. Refresh Token
      • The refreshToken variable is used when the provider is required to create an org or update the authConfig property using the Org resource. The refreshToken variable can be set when initializing the provider or by setting the CPLN_REFRESH_TOKEN environment variable.
      • When creating an org, the refreshToken must belong to a user that has the org_creator role for the associated account.
      • When updating the org authConfig property, the refreshToken must belong to a user that was authenticated using SAML.
      • The refreshToken can be obtained by following these steps:
        • Using the CLI, authenticate with a user account by executing cpln login.
        • Browser to the path ~/.config/cpln/profiles. This path will contain JSON files corresponding to the name of the profile (i.e., default.json).
        • The contents of the JSON file will contain a key named refreshToken. Use the value of this key for the refreshToken variable.

    To perform automated tasks using Pulumi, the preferred method is to use a Service Account and one of it’s keys as the token value.

    Configuration Options

    Use pulumi config set cpln:<option>.

    OptionRequired/OptionalDescription
    orgRequiredThe Control Plane org that this provider will perform actions against. Can be specified with the CPLN_ORG environment variable.
    endpointOptionalThe Control Plane Data Service API endpoint. Default is: https://api.cpln.io. Can be specified with the CPLN_ENDPOINT environment variable.
    profileOptionalThe user/service account profile that this provider will use to authenticate to the data service. Can be specified with the CPLN_PROFILE environment variable.
    tokenOptionalA generated token that can be used to authenticate to the data service API. Can be specified with the CPLN_TOKEN environment variable
    refreshTokenOptionalA generated token that can be used to authenticate to the data service API. Can be specified with the CPLN_REFRESH_TOKEN environment variable. Used when the provider is required to create an org or update the authConfig property.
    cpln logo
    Control Plane v0.0.25 published on Wednesday, May 15, 2024 by pulumiverse