Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WillReplaceOnChanges for Storage Blob #3532

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions provider/cmd/pulumi-resource-azure-native/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -715441,19 +715441,23 @@
},
"accountName": {
"type": "string",
"description": "Specifies the storage account in which to create the storage container."
"description": "Specifies the storage account in which to create the storage container.",
"willReplaceOnChanges": true
},
"blobName": {
"type": "string",
"description": "The name of the storage blob. Must be unique within the storage container the blob is located. If this property is not specified it will be set to the name of the resource."
"description": "The name of the storage blob. Must be unique within the storage container the blob is located. If this property is not specified it will be set to the name of the resource.",
"willReplaceOnChanges": true
},
"containerName": {
"type": "string",
"description": "The name of the storage container in which this blob should be created."
"description": "The name of the storage container in which this blob should be created.",
"willReplaceOnChanges": true
},
"contentMd5": {
"type": "string",
"description": "The MD5 sum of the blob contents. Cannot be defined if blob type is Append."
"description": "The MD5 sum of the blob contents. Cannot be defined if blob type is Append.",
"willReplaceOnChanges": true
},
"contentType": {
"type": "string",
Expand All @@ -715468,16 +715472,19 @@
},
"resourceGroupName": {
"type": "string",
"description": "The name of the resource group within the user's subscription."
"description": "The name of the resource group within the user's subscription.",
"willReplaceOnChanges": true
},
"source": {
"$ref": "pulumi.json#/Asset",
"description": "An asset to copy to the blob contents. This field cannot be specified for Append blobs."
"description": "An asset to copy to the blob contents. This field cannot be specified for Append blobs.",
"willReplaceOnChanges": true
},
"type": {
"$ref": "#/types/azure-native:storage:BlobType",
"description": "The type of the storage blob to be created. Defaults to 'Block'.",
"default": "Block"
"default": "Block",
"willReplaceOnChanges": true
}
},
"requiredInputs": [
Expand Down
14 changes: 7 additions & 7 deletions provider/pkg/gen/__snapshots__/gen_vnet_test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -130706,7 +130706,7 @@
Language: {},
Secret: false,
ReplaceOnChanges: false,
WillReplaceOnChanges: false,
WillReplaceOnChanges: true,
},
"blobName": {
TypeSpec: schema.TypeSpec{
Expand All @@ -130726,7 +130726,7 @@
Language: {},
Secret: false,
ReplaceOnChanges: false,
WillReplaceOnChanges: false,
WillReplaceOnChanges: true,
},
"containerName": {
TypeSpec: schema.TypeSpec{
Expand All @@ -130746,7 +130746,7 @@
Language: {},
Secret: false,
ReplaceOnChanges: false,
WillReplaceOnChanges: false,
WillReplaceOnChanges: true,
},
"contentMd5": {
TypeSpec: schema.TypeSpec{
Expand All @@ -130766,7 +130766,7 @@
Language: {},
Secret: false,
ReplaceOnChanges: false,
WillReplaceOnChanges: false,
WillReplaceOnChanges: true,
},
"contentType": {
TypeSpec: schema.TypeSpec{
Expand Down Expand Up @@ -130834,7 +130834,7 @@
Language: {},
Secret: false,
ReplaceOnChanges: false,
WillReplaceOnChanges: false,
WillReplaceOnChanges: true,
},
"source": {
TypeSpec: schema.TypeSpec{
Expand All @@ -130854,7 +130854,7 @@
Language: {},
Secret: false,
ReplaceOnChanges: false,
WillReplaceOnChanges: false,
WillReplaceOnChanges: true,
},
"type": {
TypeSpec: schema.TypeSpec{
Expand All @@ -130874,7 +130874,7 @@
Language: {},
Secret: false,
ReplaceOnChanges: false,
WillReplaceOnChanges: false,
WillReplaceOnChanges: true,
},
},
RequiredInputs: {"resourceGroupName", "accountName", "containerName"},
Expand Down
37 changes: 22 additions & 15 deletions provider/pkg/resources/customresources/custom_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,20 +318,24 @@ func newBlob(env *azure.Environment, accountsClient *storage.AccountsClient) *Cu
TypeSpec: schema.TypeSpec{Ref: "#/types/azure-native:storage:BlobAccessTier"},
},
accountName: {
Description: "Specifies the storage account in which to create the storage container.",
TypeSpec: schema.TypeSpec{Type: "string"},
Description: "Specifies the storage account in which to create the storage container.",
TypeSpec: schema.TypeSpec{Type: "string"},
WillReplaceOnChanges: true,
},
blobName: {
Description: "The name of the storage blob. Must be unique within the storage container the blob is located. If this property is not specified it will be set to the name of the resource.",
TypeSpec: schema.TypeSpec{Type: "string"},
Description: "The name of the storage blob. Must be unique within the storage container the blob is located. If this property is not specified it will be set to the name of the resource.",
TypeSpec: schema.TypeSpec{Type: "string"},
WillReplaceOnChanges: true,
},
containerName: {
Description: "The name of the storage container in which this blob should be created.",
TypeSpec: schema.TypeSpec{Type: "string"},
Description: "The name of the storage container in which this blob should be created.",
TypeSpec: schema.TypeSpec{Type: "string"},
WillReplaceOnChanges: true,
},
contentMd5: {
Description: "The MD5 sum of the blob contents. Cannot be defined if blob type is Append.",
TypeSpec: schema.TypeSpec{Type: "string"},
Description: "The MD5 sum of the blob contents. Cannot be defined if blob type is Append.",
TypeSpec: schema.TypeSpec{Type: "string"},
WillReplaceOnChanges: true,
},
contentType: {
Description: "The content type of the storage blob. Defaults to `application/octet-stream`.",
Expand All @@ -342,17 +346,20 @@ func newBlob(env *azure.Environment, accountsClient *storage.AccountsClient) *Cu
TypeSpec: schema.TypeSpec{Type: "object", AdditionalProperties: &schema.TypeSpec{Type: "string"}},
},
resourceGroupName: {
Description: "The name of the resource group within the user's subscription.",
TypeSpec: schema.TypeSpec{Type: "string"},
Description: "The name of the resource group within the user's subscription.",
TypeSpec: schema.TypeSpec{Type: "string"},
WillReplaceOnChanges: true,
},
source: {
Description: "An asset to copy to the blob contents. This field cannot be specified for Append blobs.",
TypeSpec: schema.TypeSpec{Ref: "pulumi.json#/Asset"},
Description: "An asset to copy to the blob contents. This field cannot be specified for Append blobs.",
TypeSpec: schema.TypeSpec{Ref: "pulumi.json#/Asset"},
WillReplaceOnChanges: true,
},
typeProp: {
Description: "The type of the storage blob to be created. Defaults to 'Block'.",
TypeSpec: schema.TypeSpec{Ref: "#/types/azure-native:storage:BlobType"},
Default: "Block",
Description: "The type of the storage blob to be created. Defaults to 'Block'.",
TypeSpec: schema.TypeSpec{Ref: "#/types/azure-native:storage:BlobType"},
Default: "Block",
WillReplaceOnChanges: true,
},
},
RequiredInputs: []string{resourceGroupName, accountName, containerName},
Expand Down
Loading