Skip to content

Commit

Permalink
Specify s3Bucket.quota as a "number" (instead of a "integer") (#450)
Browse files Browse the repository at this point in the history
`quota` should be a u64 since it describes bytes sizes.

The Pulumi schema doesn't support u64 (or i64), so we are converting to
a float64, which should get us at least 2^52 bits of precision while
minimizing the breaking change (int -> float) for our users.

Fixes #449
  • Loading branch information
iwahbe committed Aug 8, 2024
1 parent ab80964 commit 38bedae
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 67 deletions.
6 changes: 3 additions & 3 deletions provider/cmd/pulumi-resource-minio/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@
"type": "boolean"
},
"quota": {
"type": "integer"
"type": "number"
}
},
"required": [
Expand All @@ -1062,7 +1062,7 @@
"type": "boolean"
},
"quota": {
"type": "integer"
"type": "number"
}
},
"stateInputs": {
Expand Down Expand Up @@ -1092,7 +1092,7 @@
"type": "boolean"
},
"quota": {
"type": "integer"
"type": "number"
}
},
"type": "object"
Expand Down
35 changes: 24 additions & 11 deletions provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,30 @@ func Provider() tfbridge.ProviderInfo {

// Create a Pulumi provider mapping
prov := tfbridge.ProviderInfo{
P: p,
Name: "minio",
Description: "A Pulumi package for creating and managing minio cloud resources.",
Keywords: []string{"pulumi", "minio"},
License: "Apache-2.0",
Homepage: "https://pulumi.io",
Repository: "https://github.com/pulumi/pulumi-minio",
GitHubOrg: "aminueza",
Config: map[string]*tfbridge.SchemaInfo{},
Version: version.Version,
P: p,
Name: "minio",
Description: "A Pulumi package for creating and managing minio cloud resources.",
Keywords: []string{"pulumi", "minio"},
License: "Apache-2.0",
Homepage: "https://pulumi.io",
Repository: "https://github.com/pulumi/pulumi-minio",
GitHubOrg: "aminueza",
Config: map[string]*tfbridge.SchemaInfo{},
Version: version.Version,
MetadataInfo: tfbridge.NewProviderMetadata(metadata),

Resources: map[string]*tfbridge.ResourceInfo{
"minio_s3_bucket": {Fields: map[string]*tfbridge.SchemaInfo{
// quota should be a u64 since it describes bytes sizes.
//
// The Pulumi schema doesn't support u64 (or i64), so we
// are converting to a float64, which should get us at
// least 2^52 bits of precision while minimizing the
// breaking change (int -> float) for our users.
"quota": {Type: "number"},
}},
},

JavaScript: &tfbridge.JavaScriptInfo{
Dependencies: map[string]string{
"@pulumi/pulumi": "^3.0.0",
Expand Down Expand Up @@ -92,7 +106,6 @@ func Provider() tfbridge.ProviderInfo {
"Pulumi": "3.*",
},
},
MetadataInfo: tfbridge.NewProviderMetadata(metadata),
}

prov.MustComputeTokens(tokens.SingleModule("minio_", mainMod,
Expand Down
6 changes: 3 additions & 3 deletions sdk/dotnet/S3Bucket.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 26 additions & 26 deletions sdk/go/minio/s3bucket.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions sdk/java/src/main/java/com/pulumi/minio/S3Bucket.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions sdk/java/src/main/java/com/pulumi/minio/S3BucketArgs.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions sdk/python/pulumi_minio/s3_bucket.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 38bedae

Please sign in to comment.