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;
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"])
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
})
}
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,
};
});
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());
}
}
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}
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 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.
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",
});
example, err := minio.NewIamGroupPolicy(ctx, "iamGroupPolicyResource", &minio.IamGroupPolicyArgs{
Group: pulumi.String("string"),
Policy: pulumi.String("string"),
Name: pulumi.String("string"),
NamePrefix: pulumi.String("string"),
})
var iamGroupPolicyResource = new IamGroupPolicy("iamGroupPolicyResource", IamGroupPolicyArgs.builder()
.group("string")
.policy("string")
.name("string")
.namePrefix("string")
.build());
iam_group_policy_resource = minio.IamGroupPolicy("iamGroupPolicyResource",
group="string",
policy="string",
name="string",
name_prefix="string")
const iamGroupPolicyResource = new minio.IamGroupPolicy("iamGroupPolicyResource", {
group: "string",
policy: "string",
name: "string",
namePrefix: "string",
});
type: minio:IamGroupPolicy
properties:
group: string
name: string
namePrefix: string
policy: string
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 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.