MinIO v0.15.2 published on Friday, Feb 23, 2024 by Pulumi
minio.IamGroupPolicy
Explore with Pulumi AI
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Minio = Pulumi.Minio;
return await Deployment.RunAsync(() =>
{
var developer = new Minio.IamGroup("developer");
var testPolicy = new Minio.IamGroupPolicy("testPolicy", new()
{
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"] = minio_iam_group_membership.Developer.Id,
["minioPolicy"] = minio_iam_group_membership.Developer.Policy,
["minioGroup"] = minio_iam_group_membership.Developer.Group,
};
});
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", nil)
if err != nil {
return err
}
_, err = minio.NewIamGroupPolicy(ctx, "testPolicy", &minio.IamGroupPolicyArgs{
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", minio_iam_group_membership.Developer.Id)
ctx.Export("minioPolicy", minio_iam_group_membership.Developer.Policy)
ctx.Export("minioGroup", minio_iam_group_membership.Developer.Group)
return nil
})
}
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.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");
var testPolicy = new IamGroupPolicy("testPolicy", IamGroupPolicyArgs.builder()
.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", minio_iam_group_membership.developer().id());
ctx.export("minioPolicy", minio_iam_group_membership.developer().policy());
ctx.export("minioGroup", minio_iam_group_membership.developer().group());
}
}
import pulumi
import pulumi_minio as minio
developer = minio.IamGroup("developer")
test_policy = minio.IamGroupPolicy("testPolicy",
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", minio_iam_group_membership["developer"]["id"])
pulumi.export("minioPolicy", minio_iam_group_membership["developer"]["policy"])
pulumi.export("minioGroup", minio_iam_group_membership["developer"]["group"])
import * as pulumi from "@pulumi/pulumi";
import * as minio from "@pulumi/minio";
const developer = new minio.IamGroup("developer", {});
const testPolicy = new minio.IamGroupPolicy("testPolicy", {
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 = minio_iam_group_membership.developer.id;
export const minioPolicy = minio_iam_group_membership.developer.policy;
export const minioGroup = minio_iam_group_membership.developer.group;
resources:
developer:
type: minio:IamGroup
testPolicy:
type: minio:IamGroupPolicy
properties:
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: ${minio_iam_group_membership.developer.id}
minioPolicy: ${minio_iam_group_membership.developer.policy}
minioGroup: ${minio_iam_group_membership.developer.group}
Create IamGroupPolicy Resource
new IamGroupPolicy(name: string, args: IamGroupPolicyArgs, opts?: CustomResourceOptions);
@overload
def IamGroupPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
group: Optional[str] = None,
name: Optional[str] = None,
name_prefix: Optional[str] = None,
policy: Optional[str] = None)
@overload
def IamGroupPolicy(resource_name: str,
args: IamGroupPolicyArgs,
opts: Optional[ResourceOptions] = 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.
- name string
- The unique name of the resource.
- args IamGroupPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args IamGroupPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IamGroupPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IamGroupPolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
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
The IamGroupPolicy resource accepts the following input properties:
- Group string
- Policy string
- Name string
- Name
Prefix string
- Group string
- Policy string
- Name string
- Name
Prefix string
- group String
- policy String
- name String
- name
Prefix String
- group string
- policy string
- name string
- name
Prefix string
- group str
- policy str
- name str
- name_
prefix str
- group String
- policy String
- name String
- name
Prefix 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)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Group string
- Name string
- Name
Prefix string - Policy string
- Group string
- Name string
- Name
Prefix string - Policy string
- group String
- name String
- name
Prefix String - policy String
- group string
- name string
- name
Prefix string - policy string
- group str
- name str
- name_
prefix str - policy str
- group String
- name String
- name
Prefix 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.