Skip to content

Commit 7a04a5b

Browse files
authored
Dataplex-DataProduct: Adding icon support for DataProduct (#18001)
1 parent c9f1dd2 commit 7a04a5b

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

mmv1/products/dataplex/DataProduct.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,14 @@ properties:
122122
- name: description
123123
type: String
124124
description: Description of the data product.
125+
- name: icon
126+
type: String
127+
description: |
128+
Base64 encoded image representing the data product. Max Size: 3.0MiB
129+
Expected image dimensions are 512x512 pixels, however the API only
130+
performs validation on size of the encoded data.
131+
Note: For byte fields, the content of the fields are base64-encoded (which
132+
increases the size of the data by 33-36%) when using JSON on the wire.
125133
- name: ownerEmails
126134
type: Array
127135
item_type:

mmv1/third_party/terraform/services/dataplex/resource_dataplex_data_product_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ func TestAccDataplexDataProduct_update(t *testing.T) {
2323
{
2424
// STEP 1: Initial Creation
2525
Config: testAccDataplexDataProduct_basic(context),
26+
Check: resource.ComposeTestCheckFunc(
27+
resource.TestCheckResourceAttr("google_dataplex_data_product.example", "icon", "c29tZSBkYXRh"),
28+
),
2629
},
2730
{
2831
ResourceName: "google_dataplex_data_product.example",
@@ -42,6 +45,9 @@ func TestAccDataplexDataProduct_update(t *testing.T) {
4245
plancheck.ExpectResourceAction("google_dataplex_data_product.example", plancheck.ResourceActionUpdate),
4346
},
4447
},
48+
Check: resource.ComposeTestCheckFunc(
49+
resource.TestCheckResourceAttr("google_dataplex_data_product.example", "icon", "dXBkYXRlZCBkYXRh"),
50+
),
4551
},
4652
{
4753
ResourceName: "google_dataplex_data_product.example",
@@ -64,6 +70,7 @@ resource "google_dataplex_data_product" "example" {
6470
data_product_id = "%{data_product_id}"
6571
display_name = "initial display name"
6672
owner_emails = ["terraform-test@google.com"]
73+
icon = "c29tZSBkYXRh"
6774
}
6875
`, context)
6976
}
@@ -76,6 +83,7 @@ resource "google_dataplex_data_product" "example" {
7683
display_name = "updated display name"
7784
description = "updated description"
7885
owner_emails = ["updated-owner@google.com"]
86+
icon = "dXBkYXRlZCBkYXRh"
7987
8088
labels = {
8189
env = "test"

0 commit comments

Comments
 (0)