1. Packages
  2. Minio Provider
  3. API Docs
  4. IamGroupPolicy
MinIO v0.16.3 published on Wednesday, Feb 12, 2025 by Pulumi

minio.IamGroupPolicy

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as minio from "@pulumi/minio";

const developer = new minio.IamGroup("developer", {name: "developer"});
const testPolicy = new minio.IamGroupPolicy("test_policy", {
    name: "state-terraform-s3",
    group: developer.id,
    policy: `{
  "Version":"2012-10-17",
  "Statement": [
    {
      "Sid":"ListAllBucket",
      "Effect": "Allow",
      "Action": ["s3:PutObject"],
      "Principal":"*",
      "Resource": "arn:aws:s3:::state-terraform-s3/*"
    }
  ]
}
`,
});
export const minioName = developerMinioIamGroupMembership.id;
export const minioPolicy = developerMinioIamGroupMembership.policy;
export const minioGroup = developerMinioIamGroupMembership.group;
Copy
import pulumi
import pulumi_minio as minio

developer = minio.IamGroup("developer", name="developer")
test_policy = minio.IamGroupPolicy("test_policy",
    name="state-terraform-s3",
    group=developer.id,
    policy="""{
  "Version":"2012-10-17",
  "Statement": [
    {
      "Sid":"ListAllBucket",
      "Effect": "Allow",
      "Action": ["s3:PutObject"],
      "Principal":"*",
      "Resource": "arn:aws:s3:::state-terraform-s3/*"
    }
  ]
}
""")
pulumi.export("minioName", developer_minio_iam_group_membership["id"])
pulumi.export("minioPolicy", developer_minio_iam_group_membership["policy"])
pulumi.export("minioGroup", developer_minio_iam_group_membership["group"])
Copy
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 {
		developer, err := minio.NewIamGroup(ctx, "developer", &minio.IamGroupArgs{
			Name: pulumi.String("developer"),
		})
		if err != nil {
			return err
		}
		_, err = minio.NewIamGroupPolicy(ctx, "test_policy", &minio.IamGroupPolicyArgs{
			Name:  pulumi.String("state-terraform-s3"),
			Group: developer.ID(),
			Policy: pulumi.String(`{
  "Version":"2012-10-17",
  "Statement": [
    {
      "Sid":"ListAllBucket",
      "Effect": "Allow",
      "Action": ["s3:PutObject"],
      "Principal":"*",
      "Resource": "arn:aws:s3:::state-terraform-s3/*"
    }
  ]
}
`),
		})
		if err != nil {
			return err
		}
		ctx.Export("minioName", developerMinioIamGroupMembership.Id)
		ctx.Export("minioPolicy", developerMinioIamGroupMembership.Policy)
		ctx.Export("minioGroup", developerMinioIamGroupMembership.Group)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Minio = Pulumi.Minio;

return await Deployment.RunAsync(() => 
{
    var developer = new Minio.IamGroup("developer", new()
    {
        Name = "developer",
    });

    var testPolicy = new Minio.IamGroupPolicy("test_policy", new()
    {
        Name = "state-terraform-s3",
        Group = developer.Id,
        Policy = @"{
  ""Version"":""2012-10-17"",
  ""Statement"": [
    {
      ""Sid"":""ListAllBucket"",
      ""Effect"": ""Allow"",
      ""Action"": [""s3:PutObject""],
      ""Principal"":""*"",
      ""Resource"": ""arn:aws:s3:::state-terraform-s3/*""
    }
  ]
}
",
    });

    return new Dictionary<string, object?>
    {
        ["minioName"] = developerMinioIamGroupMembership.Id,
        ["minioPolicy"] = developerMinioIamGroupMembership.Policy,
        ["minioGroup"] = developerMinioIamGroupMembership.Group,
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.minio.IamGroup;
import com.pulumi.minio.IamGroupArgs;
import com.pulumi.minio.IamGroupPolicy;
import com.pulumi.minio.IamGroupPolicyArgs;
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 developer = new IamGroup("developer", IamGroupArgs.builder()
            .name("developer")
            .build());

        var testPolicy = new IamGroupPolicy("testPolicy", IamGroupPolicyArgs.builder()
            .name("state-terraform-s3")
            .group(developer.id())
            .policy("""
{
  "Version":"2012-10-17",
  "Statement": [
    {
      "Sid":"ListAllBucket",
      "Effect": "Allow",
      "Action": ["s3:PutObject"],
      "Principal":"*",
      "Resource": "arn:aws:s3:::state-terraform-s3/*"
    }
  ]
}
            """)
            .build());

        ctx.export("minioName", developerMinioIamGroupMembership.id());
        ctx.export("minioPolicy", developerMinioIamGroupMembership.policy());
        ctx.export("minioGroup", developerMinioIamGroupMembership.group());
    }
}
Copy
resources:
  developer:
    type: minio:IamGroup
    properties:
      name: developer
  testPolicy:
    type: minio:IamGroupPolicy
    name: test_policy
    properties:
      name: state-terraform-s3
      group: ${developer.id}
      policy: |
        {
          "Version":"2012-10-17",
          "Statement": [
            {
              "Sid":"ListAllBucket",
              "Effect": "Allow",
              "Action": ["s3:PutObject"],
              "Principal":"*",
              "Resource": "arn:aws:s3:::state-terraform-s3/*"
            }
          ]
        }        
outputs:
  minioName: ${developerMinioIamGroupMembership.id}
  minioPolicy: ${developerMinioIamGroupMembership.policy}
  minioGroup: ${developerMinioIamGroupMembership.group}
Copy

Create IamGroupPolicy Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new IamGroupPolicy(name: string, args: IamGroupPolicyArgs, opts?: CustomResourceOptions);
@overload
def IamGroupPolicy(resource_name: str,
                   args: IamGroupPolicyArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def IamGroupPolicy(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   group: Optional[str] = None,
                   policy: Optional[str] = None,
                   name: Optional[str] = None,
                   name_prefix: Optional[str] = None)
func NewIamGroupPolicy(ctx *Context, name string, args IamGroupPolicyArgs, opts ...ResourceOption) (*IamGroupPolicy, error)
public IamGroupPolicy(string name, IamGroupPolicyArgs args, CustomResourceOptions? opts = null)
public IamGroupPolicy(String name, IamGroupPolicyArgs args)
public IamGroupPolicy(String name, IamGroupPolicyArgs args, CustomResourceOptions options)
type: minio:IamGroupPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. IamGroupPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. IamGroupPolicyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. IamGroupPolicyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. IamGroupPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. IamGroupPolicyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var iamGroupPolicyResource = new Minio.IamGroupPolicy("iamGroupPolicyResource", new()
{
    Group = "string",
    Policy = "string",
    Name = "string",
    NamePrefix = "string",
});
Copy
example, err := minio.NewIamGroupPolicy(ctx, "iamGroupPolicyResource", &minio.IamGroupPolicyArgs{
	Group:      pulumi.String("string"),
	Policy:     pulumi.String("string"),
	Name:       pulumi.String("string"),
	NamePrefix: pulumi.String("string"),
})
Copy
var iamGroupPolicyResource = new IamGroupPolicy("iamGroupPolicyResource", IamGroupPolicyArgs.builder()
    .group("string")
    .policy("string")
    .name("string")
    .namePrefix("string")
    .build());
Copy
iam_group_policy_resource = minio.IamGroupPolicy("iamGroupPolicyResource",
    group="string",
    policy="string",
    name="string",
    name_prefix="string")
Copy
const iamGroupPolicyResource = new minio.IamGroupPolicy("iamGroupPolicyResource", {
    group: "string",
    policy: "string",
    name: "string",
    namePrefix: "string",
});
Copy
type: minio:IamGroupPolicy
properties:
    group: string
    name: string
    namePrefix: string
    policy: string
Copy

IamGroupPolicy Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The IamGroupPolicy resource accepts the following input properties:

Group
This property is required.
Changes to this property will trigger replacement.
string
Policy This property is required. string
Name Changes to this property will trigger replacement. string
NamePrefix Changes to this property will trigger replacement. string
Group
This property is required.
Changes to this property will trigger replacement.
string
Policy This property is required. string
Name Changes to this property will trigger replacement. string
NamePrefix Changes to this property will trigger replacement. string
group
This property is required.
Changes to this property will trigger replacement.
String
policy This property is required. String
name Changes to this property will trigger replacement. String
namePrefix Changes to this property will trigger replacement. String
group
This property is required.
Changes to this property will trigger replacement.
string
policy This property is required. string
name Changes to this property will trigger replacement. string
namePrefix Changes to this property will trigger replacement. string
group
This property is required.
Changes to this property will trigger replacement.
str
policy This property is required. str
name Changes to this property will trigger replacement. str
name_prefix Changes to this property will trigger replacement. str
group
This property is required.
Changes to this property will trigger replacement.
String
policy This property is required. String
name Changes to this property will trigger replacement. String
namePrefix Changes to this property will trigger replacement. String

Outputs

All input properties are implicitly available as output properties. Additionally, the IamGroupPolicy resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing IamGroupPolicy Resource

Get an existing IamGroupPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: IamGroupPolicyState, opts?: CustomResourceOptions): IamGroupPolicy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        group: Optional[str] = None,
        name: Optional[str] = None,
        name_prefix: Optional[str] = None,
        policy: Optional[str] = None) -> IamGroupPolicy
func GetIamGroupPolicy(ctx *Context, name string, id IDInput, state *IamGroupPolicyState, opts ...ResourceOption) (*IamGroupPolicy, error)
public static IamGroupPolicy Get(string name, Input<string> id, IamGroupPolicyState? state, CustomResourceOptions? opts = null)
public static IamGroupPolicy get(String name, Output<String> id, IamGroupPolicyState state, CustomResourceOptions options)
resources:  _:    type: minio:IamGroupPolicy    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Group Changes to this property will trigger replacement. string
Name Changes to this property will trigger replacement. string
NamePrefix Changes to this property will trigger replacement. string
Policy string
Group Changes to this property will trigger replacement. string
Name Changes to this property will trigger replacement. string
NamePrefix Changes to this property will trigger replacement. string
Policy string
group Changes to this property will trigger replacement. String
name Changes to this property will trigger replacement. String
namePrefix Changes to this property will trigger replacement. String
policy String
group Changes to this property will trigger replacement. string
name Changes to this property will trigger replacement. string
namePrefix Changes to this property will trigger replacement. string
policy string
group Changes to this property will trigger replacement. str
name Changes to this property will trigger replacement. str
name_prefix Changes to this property will trigger replacement. str
policy str
group Changes to this property will trigger replacement. String
name Changes to this property will trigger replacement. String
namePrefix Changes to this property will trigger replacement. String
policy String

Package Details

Repository
MinIO pulumi/pulumi-minio
License
Apache-2.0
Notes
This Pulumi package is based on the minio Terraform Provider.