diff --git a/.pulumi-java-gen.version b/.pulumi-java-gen.version index 07feb82..47d04a5 100644 --- a/.pulumi-java-gen.version +++ b/.pulumi-java-gen.version @@ -1 +1 @@ -0.17.0 \ No newline at end of file +0.18.0 \ No newline at end of file diff --git a/examples/go.mod b/examples/go.mod index 23ae5be..606b785 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -2,7 +2,7 @@ module github.com/pulumi/pulumi-splunk/examples go 1.21 -require github.com/pulumi/pulumi/pkg/v3 v3.140.0 +require github.com/pulumi/pulumi/pkg/v3 v3.142.0 require ( cloud.google.com/go v0.112.1 // indirect @@ -123,7 +123,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect github.com/pulumi/esc v0.10.0 // indirect - github.com/pulumi/pulumi/sdk/v3 v3.140.0 // indirect + github.com/pulumi/pulumi/sdk/v3 v3.142.0 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/ryanuber/go-glob v1.0.0 // indirect diff --git a/examples/go.sum b/examples/go.sum index e2374cd..304740d 100644 --- a/examples/go.sum +++ b/examples/go.sum @@ -339,10 +339,10 @@ github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435 github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= github.com/pulumi/esc v0.10.0 h1:jzBKzkLVW0mePeanDRfqSQoCJ5yrkux0jIwAkUxpRKE= github.com/pulumi/esc v0.10.0/go.mod h1:2Bfa+FWj/xl8CKqRTWbWgDX0SOD4opdQgvYSURTGK2c= -github.com/pulumi/pulumi/pkg/v3 v3.140.0 h1:/bvHa19HY/6qHWvuAOVII8qr72MDGGczBWlPYlPo3j0= -github.com/pulumi/pulumi/pkg/v3 v3.140.0/go.mod h1:rcTtSyisd7BzZTugNk/s9zlYgX9S0S10+pha3Tko6yM= -github.com/pulumi/pulumi/sdk/v3 v3.140.0 h1:+Z/RBvdYg7tBNkBwk4p/FzlV7niBT3TbLAICq/Y0LDU= -github.com/pulumi/pulumi/sdk/v3 v3.140.0/go.mod h1:PvKsX88co8XuwuPdzolMvew5lZV+4JmZfkeSjj7A6dI= +github.com/pulumi/pulumi/pkg/v3 v3.142.0 h1:UE8TFyXrlxvPrATpd3Kl3En34KrFIFWOxxNAodywPNU= +github.com/pulumi/pulumi/pkg/v3 v3.142.0/go.mod h1:3k6WwRIT7veiDnk3Yo2NtqEYX+4dgLCrMIFvEOnjQqI= +github.com/pulumi/pulumi/sdk/v3 v3.142.0 h1:SmcVddGuvwAh3g3XUVQQ5gVRQUKH1yZ6iETpDNHIHlw= +github.com/pulumi/pulumi/sdk/v3 v3.142.0/go.mod h1:PvKsX88co8XuwuPdzolMvew5lZV+4JmZfkeSjj7A6dI= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= diff --git a/provider/cmd/pulumi-resource-minio/schema.json b/provider/cmd/pulumi-resource-minio/schema.json index b39983d..b8fded6 100644 --- a/provider/cmd/pulumi-resource-minio/schema.json +++ b/provider/cmd/pulumi-resource-minio/schema.json @@ -1271,7 +1271,7 @@ } }, "minio:index/s3Object:S3Object": { - "description": "## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as minio from \"@pulumi/minio\";\n\nconst stateTerraformS3 = new minio.S3Bucket(\"state_terraform_s3\", {\n bucket: \"state-terraform-s3\",\n acl: \"public\",\n});\nconst txtFile = new minio.S3Object(\"txt_file\", {\n bucketName: stateTerraformS3.bucket,\n objectName: \"text.txt\",\n content: \"Lorem ipsum dolor sit amet.\",\n contentType: \"text/plain\",\n}, {\n dependsOn: [stateTerraformS3],\n});\nexport const minioId = txtFile.id;\n```\n```python\nimport pulumi\nimport pulumi_minio as minio\n\nstate_terraform_s3 = minio.S3Bucket(\"state_terraform_s3\",\n bucket=\"state-terraform-s3\",\n acl=\"public\")\ntxt_file = minio.S3Object(\"txt_file\",\n bucket_name=state_terraform_s3.bucket,\n object_name=\"text.txt\",\n content=\"Lorem ipsum dolor sit amet.\",\n content_type=\"text/plain\",\n opts = pulumi.ResourceOptions(depends_on=[state_terraform_s3]))\npulumi.export(\"minioId\", txt_file.id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Minio = Pulumi.Minio;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var stateTerraformS3 = new Minio.S3Bucket(\"state_terraform_s3\", new()\n {\n Bucket = \"state-terraform-s3\",\n Acl = \"public\",\n });\n\n var txtFile = new Minio.S3Object(\"txt_file\", new()\n {\n BucketName = stateTerraformS3.Bucket,\n ObjectName = \"text.txt\",\n Content = \"Lorem ipsum dolor sit amet.\",\n ContentType = \"text/plain\",\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n stateTerraformS3,\n },\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"minioId\"] = txtFile.Id,\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-minio/sdk/go/minio\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tstateTerraformS3, err := minio.NewS3Bucket(ctx, \"state_terraform_s3\", \u0026minio.S3BucketArgs{\n\t\t\tBucket: pulumi.String(\"state-terraform-s3\"),\n\t\t\tAcl: pulumi.String(\"public\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttxtFile, err := minio.NewS3Object(ctx, \"txt_file\", \u0026minio.S3ObjectArgs{\n\t\t\tBucketName: stateTerraformS3.Bucket,\n\t\t\tObjectName: pulumi.String(\"text.txt\"),\n\t\t\tContent: pulumi.String(\"Lorem ipsum dolor sit amet.\"),\n\t\t\tContentType: pulumi.String(\"text/plain\"),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\tstateTerraformS3,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"minioId\", txtFile.ID())\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.minio.S3Bucket;\nimport com.pulumi.minio.S3BucketArgs;\nimport com.pulumi.minio.S3Object;\nimport com.pulumi.minio.S3ObjectArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var stateTerraformS3 = new S3Bucket(\"stateTerraformS3\", S3BucketArgs.builder()\n .bucket(\"state-terraform-s3\")\n .acl(\"public\")\n .build());\n\n var txtFile = new S3Object(\"txtFile\", S3ObjectArgs.builder()\n .bucketName(stateTerraformS3.bucket())\n .objectName(\"text.txt\")\n .content(\"Lorem ipsum dolor sit amet.\")\n .contentType(\"text/plain\")\n .build(), CustomResourceOptions.builder()\n .dependsOn(stateTerraformS3)\n .build());\n\n ctx.export(\"minioId\", txtFile.id());\n }\n}\n```\n```yaml\nresources:\n stateTerraformS3:\n type: minio:S3Bucket\n name: state_terraform_s3\n properties:\n bucket: state-terraform-s3\n acl: public\n txtFile:\n type: minio:S3Object\n name: txt_file\n properties:\n bucketName: ${stateTerraformS3.bucket}\n objectName: text.txt\n content: Lorem ipsum dolor sit amet.\n contentType: text/plain\n options:\n dependson:\n - ${stateTerraformS3}\noutputs:\n minioId: ${txtFile.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as minio from \"@pulumi/minio\";\n\nconst stateTerraformS3 = new minio.S3Bucket(\"state_terraform_s3\", {\n bucket: \"state-terraform-s3\",\n acl: \"public\",\n});\nconst txtFile = new minio.S3Object(\"txt_file\", {\n bucketName: stateTerraformS3.bucket,\n objectName: \"text.txt\",\n content: \"Lorem ipsum dolor sit amet.\",\n contentType: \"text/plain\",\n}, {\n dependsOn: [stateTerraformS3],\n});\nexport const minioId = txtFile.id;\n```\n```python\nimport pulumi\nimport pulumi_minio as minio\n\nstate_terraform_s3 = minio.S3Bucket(\"state_terraform_s3\",\n bucket=\"state-terraform-s3\",\n acl=\"public\")\ntxt_file = minio.S3Object(\"txt_file\",\n bucket_name=state_terraform_s3.bucket,\n object_name=\"text.txt\",\n content=\"Lorem ipsum dolor sit amet.\",\n content_type=\"text/plain\",\n opts = pulumi.ResourceOptions(depends_on=[state_terraform_s3]))\npulumi.export(\"minioId\", txt_file.id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Minio = Pulumi.Minio;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var stateTerraformS3 = new Minio.S3Bucket(\"state_terraform_s3\", new()\n {\n Bucket = \"state-terraform-s3\",\n Acl = \"public\",\n });\n\n var txtFile = new Minio.S3Object(\"txt_file\", new()\n {\n BucketName = stateTerraformS3.Bucket,\n ObjectName = \"text.txt\",\n Content = \"Lorem ipsum dolor sit amet.\",\n ContentType = \"text/plain\",\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n stateTerraformS3,\n },\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"minioId\"] = txtFile.Id,\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-minio/sdk/go/minio\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tstateTerraformS3, err := minio.NewS3Bucket(ctx, \"state_terraform_s3\", \u0026minio.S3BucketArgs{\n\t\t\tBucket: pulumi.String(\"state-terraform-s3\"),\n\t\t\tAcl: pulumi.String(\"public\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttxtFile, err := minio.NewS3Object(ctx, \"txt_file\", \u0026minio.S3ObjectArgs{\n\t\t\tBucketName: stateTerraformS3.Bucket,\n\t\t\tObjectName: pulumi.String(\"text.txt\"),\n\t\t\tContent: pulumi.String(\"Lorem ipsum dolor sit amet.\"),\n\t\t\tContentType: pulumi.String(\"text/plain\"),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\tstateTerraformS3,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"minioId\", txtFile.ID())\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.minio.S3Bucket;\nimport com.pulumi.minio.S3BucketArgs;\nimport com.pulumi.minio.S3Object;\nimport com.pulumi.minio.S3ObjectArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var stateTerraformS3 = new S3Bucket(\"stateTerraformS3\", S3BucketArgs.builder()\n .bucket(\"state-terraform-s3\")\n .acl(\"public\")\n .build());\n\n var txtFile = new S3Object(\"txtFile\", S3ObjectArgs.builder()\n .bucketName(stateTerraformS3.bucket())\n .objectName(\"text.txt\")\n .content(\"Lorem ipsum dolor sit amet.\")\n .contentType(\"text/plain\")\n .build(), CustomResourceOptions.builder()\n .dependsOn(stateTerraformS3)\n .build());\n\n ctx.export(\"minioId\", txtFile.id());\n }\n}\n```\n```yaml\nresources:\n stateTerraformS3:\n type: minio:S3Bucket\n name: state_terraform_s3\n properties:\n bucket: state-terraform-s3\n acl: public\n txtFile:\n type: minio:S3Object\n name: txt_file\n properties:\n bucketName: ${stateTerraformS3.bucket}\n objectName: text.txt\n content: Lorem ipsum dolor sit amet.\n contentType: text/plain\n options:\n dependsOn:\n - ${stateTerraformS3}\noutputs:\n minioId: ${txtFile.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { "bucketName": { "type": "string" @@ -1373,7 +1373,7 @@ }, "functions": { "minio:index/getIamPolicyDocument:getIamPolicyDocument": { - "description": "## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as minio from \"@pulumi/minio\";\n\nconst example = minio.getIamPolicyDocument({\n statements: [\n {\n sid: \"1\",\n actions: [\n \"s3:ListAllMyBuckets\",\n \"s3:GetBucketLocation\",\n ],\n resources: [\"arn:aws:s3:::*\"],\n },\n {\n actions: [\"s3:ListBucket\"],\n resources: [\"arn:aws:s3:::state-terraform-s3\"],\n conditions: [{\n test: \"StringLike\",\n variable: \"s3:prefix\",\n values: [\n \"\",\n \"home/\",\n ],\n }],\n },\n {\n actions: [\"s3:PutObject\"],\n resources: [\n \"arn:aws:s3:::state-terraform-s3\",\n \"arn:aws:s3:::state-terraform-s3/*\",\n ],\n },\n ],\n});\nconst testPolicy = new minio.IamPolicy(\"test_policy\", {\n name: \"state-terraform-s3\",\n policy: example.then(example =\u003e example.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_minio as minio\n\nexample = minio.get_iam_policy_document(statements=[\n {\n \"sid\": \"1\",\n \"actions\": [\n \"s3:ListAllMyBuckets\",\n \"s3:GetBucketLocation\",\n ],\n \"resources\": [\"arn:aws:s3:::*\"],\n },\n {\n \"actions\": [\"s3:ListBucket\"],\n \"resources\": [\"arn:aws:s3:::state-terraform-s3\"],\n \"conditions\": [{\n \"test\": \"StringLike\",\n \"variable\": \"s3:prefix\",\n \"values\": [\n \"\",\n \"home/\",\n ],\n }],\n },\n {\n \"actions\": [\"s3:PutObject\"],\n \"resources\": [\n \"arn:aws:s3:::state-terraform-s3\",\n \"arn:aws:s3:::state-terraform-s3/*\",\n ],\n },\n])\ntest_policy = minio.IamPolicy(\"test_policy\",\n name=\"state-terraform-s3\",\n policy=example.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Minio = Pulumi.Minio;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Minio.GetIamPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Minio.Inputs.GetIamPolicyDocumentStatementInputArgs\n {\n Sid = \"1\",\n Actions = new[]\n {\n \"s3:ListAllMyBuckets\",\n \"s3:GetBucketLocation\",\n },\n Resources = new[]\n {\n \"arn:aws:s3:::*\",\n },\n },\n new Minio.Inputs.GetIamPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"s3:ListBucket\",\n },\n Resources = new[]\n {\n \"arn:aws:s3:::state-terraform-s3\",\n },\n Conditions = new[]\n {\n new Minio.Inputs.GetIamPolicyDocumentStatementConditionInputArgs\n {\n Test = \"StringLike\",\n Variable = \"s3:prefix\",\n Values = new[]\n {\n \"\",\n \"home/\",\n },\n },\n },\n },\n new Minio.Inputs.GetIamPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"s3:PutObject\",\n },\n Resources = new[]\n {\n \"arn:aws:s3:::state-terraform-s3\",\n \"arn:aws:s3:::state-terraform-s3/*\",\n },\n },\n },\n });\n\n var testPolicy = new Minio.IamPolicy(\"test_policy\", new()\n {\n Name = \"state-terraform-s3\",\n Policy = example.Apply(getIamPolicyDocumentResult =\u003e getIamPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-minio/sdk/go/minio\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := minio.GetIamPolicyDocument(ctx, \u0026minio.GetIamPolicyDocumentArgs{\n\t\t\tStatements: []minio.GetIamPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tSid: pulumi.StringRef(\"1\"),\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"s3:ListAllMyBuckets\",\n\t\t\t\t\t\t\"s3:GetBucketLocation\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"arn:aws:s3:::*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"s3:ListBucket\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"arn:aws:s3:::state-terraform-s3\",\n\t\t\t\t\t},\n\t\t\t\t\tConditions: []minio.GetIamPolicyDocumentStatementCondition{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tTest: \"StringLike\",\n\t\t\t\t\t\t\tVariable: \"s3:prefix\",\n\t\t\t\t\t\t\tValues: []string{\n\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t\"home/\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"s3:PutObject\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"arn:aws:s3:::state-terraform-s3\",\n\t\t\t\t\t\t\"arn:aws:s3:::state-terraform-s3/*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = minio.NewIamPolicy(ctx, \"test_policy\", \u0026minio.IamPolicyArgs{\n\t\t\tName: pulumi.String(\"state-terraform-s3\"),\n\t\t\tPolicy: pulumi.String(example.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.minio.MinioFunctions;\nimport com.pulumi.minio.inputs.GetIamPolicyDocumentArgs;\nimport com.pulumi.minio.IamPolicy;\nimport com.pulumi.minio.IamPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = MinioFunctions.getIamPolicyDocument(GetIamPolicyDocumentArgs.builder()\n .statements( \n GetIamPolicyDocumentStatementArgs.builder()\n .sid(\"1\")\n .actions( \n \"s3:ListAllMyBuckets\",\n \"s3:GetBucketLocation\")\n .resources(\"arn:aws:s3:::*\")\n .build(),\n GetIamPolicyDocumentStatementArgs.builder()\n .actions(\"s3:ListBucket\")\n .resources(\"arn:aws:s3:::state-terraform-s3\")\n .conditions(GetIamPolicyDocumentStatementConditionArgs.builder()\n .test(\"StringLike\")\n .variable(\"s3:prefix\")\n .values( \n \"\",\n \"home/\")\n .build())\n .build(),\n GetIamPolicyDocumentStatementArgs.builder()\n .actions(\"s3:PutObject\")\n .resources( \n \"arn:aws:s3:::state-terraform-s3\",\n \"arn:aws:s3:::state-terraform-s3/*\")\n .build())\n .build());\n\n var testPolicy = new IamPolicy(\"testPolicy\", IamPolicyArgs.builder()\n .name(\"state-terraform-s3\")\n .policy(example.applyValue(getIamPolicyDocumentResult -\u003e getIamPolicyDocumentResult.json()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n testPolicy:\n type: minio:IamPolicy\n name: test_policy\n properties:\n name: state-terraform-s3\n policy: ${example.json}\nvariables:\n example:\n fn::invoke:\n Function: minio:getIamPolicyDocument\n Arguments:\n statements:\n - sid: '1'\n actions:\n - s3:ListAllMyBuckets\n - s3:GetBucketLocation\n resources:\n - arn:aws:s3:::*\n - actions:\n - s3:ListBucket\n resources:\n - arn:aws:s3:::state-terraform-s3\n conditions:\n - test: StringLike\n variable: s3:prefix\n values:\n -\n - home/\n - actions:\n - s3:PutObject\n resources:\n - arn:aws:s3:::state-terraform-s3\n - arn:aws:s3:::state-terraform-s3/*\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as minio from \"@pulumi/minio\";\n\nconst example = minio.getIamPolicyDocument({\n statements: [\n {\n sid: \"1\",\n actions: [\n \"s3:ListAllMyBuckets\",\n \"s3:GetBucketLocation\",\n ],\n resources: [\"arn:aws:s3:::*\"],\n },\n {\n actions: [\"s3:ListBucket\"],\n resources: [\"arn:aws:s3:::state-terraform-s3\"],\n conditions: [{\n test: \"StringLike\",\n variable: \"s3:prefix\",\n values: [\n \"\",\n \"home/\",\n ],\n }],\n },\n {\n actions: [\"s3:PutObject\"],\n resources: [\n \"arn:aws:s3:::state-terraform-s3\",\n \"arn:aws:s3:::state-terraform-s3/*\",\n ],\n },\n ],\n});\nconst testPolicy = new minio.IamPolicy(\"test_policy\", {\n name: \"state-terraform-s3\",\n policy: example.then(example =\u003e example.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_minio as minio\n\nexample = minio.get_iam_policy_document(statements=[\n {\n \"sid\": \"1\",\n \"actions\": [\n \"s3:ListAllMyBuckets\",\n \"s3:GetBucketLocation\",\n ],\n \"resources\": [\"arn:aws:s3:::*\"],\n },\n {\n \"actions\": [\"s3:ListBucket\"],\n \"resources\": [\"arn:aws:s3:::state-terraform-s3\"],\n \"conditions\": [{\n \"test\": \"StringLike\",\n \"variable\": \"s3:prefix\",\n \"values\": [\n \"\",\n \"home/\",\n ],\n }],\n },\n {\n \"actions\": [\"s3:PutObject\"],\n \"resources\": [\n \"arn:aws:s3:::state-terraform-s3\",\n \"arn:aws:s3:::state-terraform-s3/*\",\n ],\n },\n])\ntest_policy = minio.IamPolicy(\"test_policy\",\n name=\"state-terraform-s3\",\n policy=example.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Minio = Pulumi.Minio;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Minio.GetIamPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Minio.Inputs.GetIamPolicyDocumentStatementInputArgs\n {\n Sid = \"1\",\n Actions = new[]\n {\n \"s3:ListAllMyBuckets\",\n \"s3:GetBucketLocation\",\n },\n Resources = new[]\n {\n \"arn:aws:s3:::*\",\n },\n },\n new Minio.Inputs.GetIamPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"s3:ListBucket\",\n },\n Resources = new[]\n {\n \"arn:aws:s3:::state-terraform-s3\",\n },\n Conditions = new[]\n {\n new Minio.Inputs.GetIamPolicyDocumentStatementConditionInputArgs\n {\n Test = \"StringLike\",\n Variable = \"s3:prefix\",\n Values = new[]\n {\n \"\",\n \"home/\",\n },\n },\n },\n },\n new Minio.Inputs.GetIamPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"s3:PutObject\",\n },\n Resources = new[]\n {\n \"arn:aws:s3:::state-terraform-s3\",\n \"arn:aws:s3:::state-terraform-s3/*\",\n },\n },\n },\n });\n\n var testPolicy = new Minio.IamPolicy(\"test_policy\", new()\n {\n Name = \"state-terraform-s3\",\n Policy = example.Apply(getIamPolicyDocumentResult =\u003e getIamPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-minio/sdk/go/minio\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := minio.GetIamPolicyDocument(ctx, \u0026minio.GetIamPolicyDocumentArgs{\n\t\t\tStatements: []minio.GetIamPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tSid: pulumi.StringRef(\"1\"),\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"s3:ListAllMyBuckets\",\n\t\t\t\t\t\t\"s3:GetBucketLocation\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"arn:aws:s3:::*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"s3:ListBucket\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"arn:aws:s3:::state-terraform-s3\",\n\t\t\t\t\t},\n\t\t\t\t\tConditions: []minio.GetIamPolicyDocumentStatementCondition{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tTest: \"StringLike\",\n\t\t\t\t\t\t\tVariable: \"s3:prefix\",\n\t\t\t\t\t\t\tValues: []string{\n\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t\"home/\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"s3:PutObject\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"arn:aws:s3:::state-terraform-s3\",\n\t\t\t\t\t\t\"arn:aws:s3:::state-terraform-s3/*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = minio.NewIamPolicy(ctx, \"test_policy\", \u0026minio.IamPolicyArgs{\n\t\t\tName: pulumi.String(\"state-terraform-s3\"),\n\t\t\tPolicy: pulumi.String(example.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.minio.MinioFunctions;\nimport com.pulumi.minio.inputs.GetIamPolicyDocumentArgs;\nimport com.pulumi.minio.IamPolicy;\nimport com.pulumi.minio.IamPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = MinioFunctions.getIamPolicyDocument(GetIamPolicyDocumentArgs.builder()\n .statements( \n GetIamPolicyDocumentStatementArgs.builder()\n .sid(\"1\")\n .actions( \n \"s3:ListAllMyBuckets\",\n \"s3:GetBucketLocation\")\n .resources(\"arn:aws:s3:::*\")\n .build(),\n GetIamPolicyDocumentStatementArgs.builder()\n .actions(\"s3:ListBucket\")\n .resources(\"arn:aws:s3:::state-terraform-s3\")\n .conditions(GetIamPolicyDocumentStatementConditionArgs.builder()\n .test(\"StringLike\")\n .variable(\"s3:prefix\")\n .values( \n \"\",\n \"home/\")\n .build())\n .build(),\n GetIamPolicyDocumentStatementArgs.builder()\n .actions(\"s3:PutObject\")\n .resources( \n \"arn:aws:s3:::state-terraform-s3\",\n \"arn:aws:s3:::state-terraform-s3/*\")\n .build())\n .build());\n\n var testPolicy = new IamPolicy(\"testPolicy\", IamPolicyArgs.builder()\n .name(\"state-terraform-s3\")\n .policy(example.applyValue(getIamPolicyDocumentResult -\u003e getIamPolicyDocumentResult.json()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n testPolicy:\n type: minio:IamPolicy\n name: test_policy\n properties:\n name: state-terraform-s3\n policy: ${example.json}\nvariables:\n example:\n fn::invoke:\n function: minio:getIamPolicyDocument\n arguments:\n statements:\n - sid: '1'\n actions:\n - s3:ListAllMyBuckets\n - s3:GetBucketLocation\n resources:\n - arn:aws:s3:::*\n - actions:\n - s3:ListBucket\n resources:\n - arn:aws:s3:::state-terraform-s3\n conditions:\n - test: StringLike\n variable: s3:prefix\n values:\n - \"\"\n - home/\n - actions:\n - s3:PutObject\n resources:\n - arn:aws:s3:::state-terraform-s3\n - arn:aws:s3:::state-terraform-s3/*\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getIamPolicyDocument.\n", "properties": { diff --git a/provider/go.mod b/provider/go.mod index a2bfe6e..8262d7b 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -8,7 +8,7 @@ replace github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/pulumi/terraf require ( github.com/aminueza/terraform-provider-minio v1.20.1 - github.com/pulumi/pulumi-terraform-bridge/v3 v3.96.0 + github.com/pulumi/pulumi-terraform-bridge/v3 v3.97.0 ) require ( @@ -138,10 +138,10 @@ require ( github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect github.com/pulumi/esc v0.10.0 // indirect github.com/pulumi/inflector v0.1.1 // indirect - github.com/pulumi/pulumi-java/pkg v0.17.0 // indirect - github.com/pulumi/pulumi-yaml v1.11.2 // indirect - github.com/pulumi/pulumi/pkg/v3 v3.140.0 // indirect - github.com/pulumi/pulumi/sdk/v3 v3.140.0 // indirect + github.com/pulumi/pulumi-java/pkg v0.18.0 // indirect + github.com/pulumi/pulumi-yaml v1.12.0 // indirect + github.com/pulumi/pulumi/pkg/v3 v3.142.0 // indirect + github.com/pulumi/pulumi/sdk/v3 v3.142.0 // indirect github.com/pulumi/schema-tools v0.1.2 // indirect github.com/pulumi/terraform-diff-reader v0.0.2 // indirect github.com/rivo/uniseg v0.4.4 // indirect diff --git a/provider/go.sum b/provider/go.sum index 45b01bf..f323db9 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -1919,16 +1919,16 @@ github.com/pulumi/inflector v0.1.1 h1:dvlxlWtXwOJTUUtcYDvwnl6Mpg33prhK+7mzeF+Sob github.com/pulumi/inflector v0.1.1/go.mod h1:HUFCjcPTz96YtTuUlwG3i3EZG4WlniBvR9bd+iJxCUY= github.com/pulumi/providertest v0.1.3 h1:GpNKRy/haNjRHiUA9bi4diU4Op2zf3axYXbga5AepHg= github.com/pulumi/providertest v0.1.3/go.mod h1:GcsqEGgSngwaNOD+kICJPIUQlnA911fGBU8HDlJvVL0= -github.com/pulumi/pulumi-java/pkg v0.17.0 h1:KmaVLrVmlkzShOfaJNJDlckorbFm8dM/C7L4hj6LX8U= -github.com/pulumi/pulumi-java/pkg v0.17.0/go.mod h1:ji4U4H7t81X4aaE88D9+z5CmKH/QoLwQi9N1iGl+2KQ= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.96.0 h1:uJB3tM1j+9SKeXLCAx3DBVHsYk4ddXNrVoiqpgXal2Q= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.96.0/go.mod h1:WnOTAfdtm5+kW3rIU0rLhxFSEHtJIMf19FdOU6NFXG0= -github.com/pulumi/pulumi-yaml v1.11.2 h1:MU7TTNbruGCSgNHhaBygjIbLWm3WSbd1q98GpMIgQzE= -github.com/pulumi/pulumi-yaml v1.11.2/go.mod h1:RdXRBupRGGAD1kbYNG1V1h6pyFnXisvQsl0AANvVjGI= -github.com/pulumi/pulumi/pkg/v3 v3.140.0 h1:/bvHa19HY/6qHWvuAOVII8qr72MDGGczBWlPYlPo3j0= -github.com/pulumi/pulumi/pkg/v3 v3.140.0/go.mod h1:rcTtSyisd7BzZTugNk/s9zlYgX9S0S10+pha3Tko6yM= -github.com/pulumi/pulumi/sdk/v3 v3.140.0 h1:+Z/RBvdYg7tBNkBwk4p/FzlV7niBT3TbLAICq/Y0LDU= -github.com/pulumi/pulumi/sdk/v3 v3.140.0/go.mod h1:PvKsX88co8XuwuPdzolMvew5lZV+4JmZfkeSjj7A6dI= +github.com/pulumi/pulumi-java/pkg v0.18.0 h1:3PApc5YegH69n6oubB63mqI97pF+oQywWr7ii4082Mw= +github.com/pulumi/pulumi-java/pkg v0.18.0/go.mod h1:YKYYFEb3Jvzf/dDJo0xOeEkIfBAMkkkdhXulauvEjmc= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.97.0 h1:/Y/9hffZp2CFUfInVbv/9rWnZETiiOgKju1Ua512Ke8= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.97.0/go.mod h1:B/Auryr+yVUkLOMzgpFe7HLwKAtXc6YJwpAXfNGyLPk= +github.com/pulumi/pulumi-yaml v1.12.0 h1:ThJP+EBqeJyCnS6w6/PwcEFOT5o112qv0lObhefmFCk= +github.com/pulumi/pulumi-yaml v1.12.0/go.mod h1:EhZd1XDfuLa15O51qVVE16U6r8ldK9mLIBclqWCX27Y= +github.com/pulumi/pulumi/pkg/v3 v3.142.0 h1:UE8TFyXrlxvPrATpd3Kl3En34KrFIFWOxxNAodywPNU= +github.com/pulumi/pulumi/pkg/v3 v3.142.0/go.mod h1:3k6WwRIT7veiDnk3Yo2NtqEYX+4dgLCrMIFvEOnjQqI= +github.com/pulumi/pulumi/sdk/v3 v3.142.0 h1:SmcVddGuvwAh3g3XUVQQ5gVRQUKH1yZ6iETpDNHIHlw= +github.com/pulumi/pulumi/sdk/v3 v3.142.0/go.mod h1:PvKsX88co8XuwuPdzolMvew5lZV+4JmZfkeSjj7A6dI= github.com/pulumi/schema-tools v0.1.2 h1:Fd9xvUjgck4NA+7/jSk7InqCUT4Kj940+EcnbQKpfZo= github.com/pulumi/schema-tools v0.1.2/go.mod h1:62lgj52Tzq11eqWTIaKd+EVyYAu5dEcDJxMhTjvMO/k= github.com/pulumi/terraform-diff-reader v0.0.2 h1:kTE4nEXU3/SYXESvAIem+wyHMI3abqkI3OhJ0G04LLI= diff --git a/sdk/go.mod b/sdk/go.mod index af57bda..1412af1 100644 --- a/sdk/go.mod +++ b/sdk/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/blang/semver v3.5.1+incompatible - github.com/pulumi/pulumi/sdk/v3 v3.140.0 + github.com/pulumi/pulumi/sdk/v3 v3.142.0 ) require ( diff --git a/sdk/go.sum b/sdk/go.sum index 7fb5b07..129c0aa 100644 --- a/sdk/go.sum +++ b/sdk/go.sum @@ -150,8 +150,8 @@ github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435 github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= github.com/pulumi/esc v0.9.1 h1:HH5eEv8sgyxSpY5a8yePyqFXzA8cvBvapfH8457+mIs= github.com/pulumi/esc v0.9.1/go.mod h1:oEJ6bOsjYlQUpjf70GiX+CXn3VBmpwFDxUTlmtUN84c= -github.com/pulumi/pulumi/sdk/v3 v3.140.0 h1:+Z/RBvdYg7tBNkBwk4p/FzlV7niBT3TbLAICq/Y0LDU= -github.com/pulumi/pulumi/sdk/v3 v3.140.0/go.mod h1:PvKsX88co8XuwuPdzolMvew5lZV+4JmZfkeSjj7A6dI= +github.com/pulumi/pulumi/sdk/v3 v3.142.0 h1:SmcVddGuvwAh3g3XUVQQ5gVRQUKH1yZ6iETpDNHIHlw= +github.com/pulumi/pulumi/sdk/v3 v3.142.0/go.mod h1:PvKsX88co8XuwuPdzolMvew5lZV+4JmZfkeSjj7A6dI= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= diff --git a/sdk/java/build.gradle b/sdk/java/build.gradle index c829adc..934330e 100644 --- a/sdk/java/build.gradle +++ b/sdk/java/build.gradle @@ -5,7 +5,7 @@ plugins { id("signing") id("java-library") id("maven-publish") - id("io.github.gradle-nexus.publish-plugin") version "1.1.0" + id("io.github.gradle-nexus.publish-plugin") version "2.0.0" } group = "com.pulumi" @@ -44,7 +44,7 @@ repositories { dependencies { implementation("com.google.code.findbugs:jsr305:3.0.2") implementation("com.google.code.gson:gson:2.8.9") - implementation("com.pulumi:pulumi:0.17.0") + implementation("com.pulumi:pulumi:0.18.0") } task sourcesJar(type: Jar) { diff --git a/sdk/nodejs/getIamPolicyDocument.ts b/sdk/nodejs/getIamPolicyDocument.ts index 7e6cf07..090151d 100644 --- a/sdk/nodejs/getIamPolicyDocument.ts +++ b/sdk/nodejs/getIamPolicyDocument.ts @@ -132,7 +132,7 @@ export interface GetIamPolicyDocumentResult { * }); * ``` */ -export function getIamPolicyDocumentOutput(args?: GetIamPolicyDocumentOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { +export function getIamPolicyDocumentOutput(args?: GetIamPolicyDocumentOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("minio:index/getIamPolicyDocument:getIamPolicyDocument", { diff --git a/sdk/python/pulumi_minio/get_iam_policy_document.py b/sdk/python/pulumi_minio/get_iam_policy_document.py index c74c4f1..43b8612 100644 --- a/sdk/python/pulumi_minio/get_iam_policy_document.py +++ b/sdk/python/pulumi_minio/get_iam_policy_document.py @@ -174,7 +174,7 @@ def get_iam_policy_document_output(override_json: Optional[pulumi.Input[Optional source_json: Optional[pulumi.Input[Optional[str]]] = None, statements: Optional[pulumi.Input[Optional[Sequence[Union['GetIamPolicyDocumentStatementArgs', 'GetIamPolicyDocumentStatementArgsDict']]]]] = None, version: Optional[pulumi.Input[Optional[str]]] = None, - opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetIamPolicyDocumentResult]: + opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetIamPolicyDocumentResult]: """ ## Example Usage @@ -222,7 +222,7 @@ def get_iam_policy_document_output(override_json: Optional[pulumi.Input[Optional __args__['sourceJson'] = source_json __args__['statements'] = statements __args__['version'] = version - opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) + opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts) __ret__ = pulumi.runtime.invoke_output('minio:index/getIamPolicyDocument:getIamPolicyDocument', __args__, opts=opts, typ=GetIamPolicyDocumentResult) return __ret__.apply(lambda __response__: GetIamPolicyDocumentResult( id=pulumi.get(__response__, 'id'),