Minio Provider
Installation
The minio provider is available as a package in all Pulumi languages:
- JavaScript/TypeScript:
@pulumi/minio
- Python:
pulumi-minio
- Go:
github.com/pulumi/pulumi-minio/sdk/go/minio
- .NET:
Pulumi.Minio
- Java:
com.pulumi/minio
Overview
This is a pulumi provider plugin for managing Minio S3 buckets and IAM users.
Example Provider Configuration
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: nodejs
config:
minio:minioApiVersion:
value: '...'
minio:minioPassword:
value: '...'
minio:minioRegion:
value: '...'
minio:minioServer:
value: '...'
minio:minioSsl:
value: '...'
minio:minioUser:
value: '...'
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: python
config:
minio:minioApiVersion:
value: '...'
minio:minioPassword:
value: '...'
minio:minioRegion:
value: '...'
minio:minioServer:
value: '...'
minio:minioSsl:
value: '...'
minio:minioUser:
value: '...'
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: dotnet
config:
minio:minioApiVersion:
value: '...'
minio:minioPassword:
value: '...'
minio:minioRegion:
value: '...'
minio:minioServer:
value: '...'
minio:minioSsl:
value: '...'
minio:minioUser:
value: '...'
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: go
config:
minio:minioApiVersion:
value: '...'
minio:minioPassword:
value: '...'
minio:minioRegion:
value: '...'
minio:minioServer:
value: '...'
minio:minioSsl:
value: '...'
minio:minioUser:
value: '...'
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: yaml
config:
minio:minioApiVersion:
value: '...'
minio:minioPassword:
value: '...'
minio:minioRegion:
value: '...'
minio:minioServer:
value: '...'
minio:minioSsl:
value: '...'
minio:minioUser:
value: '...'
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: java
config:
minio:minioApiVersion:
value: '...'
minio:minioPassword:
value: '...'
minio:minioRegion:
value: '...'
minio:minioServer:
value: '...'
minio:minioSsl:
value: '...'
minio:minioUser:
value: '...'
Authentication
The Minio provider offers the following methods of providing credentials for authentication, in this order, and explained below:
- Static API key
- Environment variables
Static API Key
Static credentials can be provided by adding the minio-server
, minioUser
and minioPassword
variables in-line in the
Minio provider block:
Usage:
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: nodejs
config:
minio:minioPassword:
value: '...'
minio:minioServer:
value: '...'
minio:minioUser:
value: '...'
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: python
config:
minio:minioPassword:
value: '...'
minio:minioServer:
value: '...'
minio:minioUser:
value: '...'
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: dotnet
config:
minio:minioPassword:
value: '...'
minio:minioServer:
value: '...'
minio:minioUser:
value: '...'
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: go
config:
minio:minioPassword:
value: '...'
minio:minioServer:
value: '...'
minio:minioUser:
value: '...'
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: yaml
config:
minio:minioPassword:
value: '...'
minio:minioServer:
value: '...'
minio:minioUser:
value: '...'
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: java
config:
minio:minioPassword:
value: '...'
minio:minioServer:
value: '...'
minio:minioUser:
value: '...'
Environment variables
You can provide your configuration via the environment variables representing your minio credentials:
$ export MINIO_ENDPOINT="http://myendpoint"
$ export MINIO_USER="244tefewg"
$ export MINIO_PASSWORD="xgwgwqqwv"
When using this method, you may omit the
minio provider
block entirely:
import * as pulumi from "@pulumi/pulumi";
import * as minio from "@pulumi/minio";
const statePulumiS3 = new minio.S3Bucket("state_pulumi_s3", {});
import pulumi
import pulumi_minio as minio
state_pulumi_s3 = minio.S3Bucket("state_pulumi_s3")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Minio = Pulumi.Minio;
return await Deployment.RunAsync(() =>
{
var statePulumiS3 = new Minio.S3Bucket("state_pulumi_s3");
});
package main
import (
"github.com/pulumi/pulumi-minio/sdk/go/minio"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := minio.NewS3Bucket(ctx, "state_pulumi_s3", nil)
if err != nil {
return err
}
return nil
})
}
resources:
statePulumiS3:
type: minio:S3Bucket
name: state_pulumi_s3
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.minio.S3Bucket;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var statePulumiS3 = new S3Bucket("statePulumiS3");
}
}
Configuration Reference
The following configuration inputs are supported in the provider
block:
minioServer
- (Required) Minio Host and Port. It must be provided, but it can also be sourced from theMINIO_ENDPOINT
environment variableminioUser
- (Required) Minio User. It must be provided, but it can also be sourced from theMINIO_USER
environment variableminioPassword
- (Required) Minio Password. It must be provided, but it can also be sourced from theMINIO_PASSWORD
environment variableminioRegion
- (Optional) Minio Region (default: us-east-1
).minioApiVersion
- (Optional) Minio API Version (type: string, options:v2
orv4
, default:v4
).minioSsl
- (Optional) Minio SSL enabled (default:false
). It can also be sourced from theMINIO_ENABLE_HTTPS
environment variable