Skip to content

Commit 381810a

Browse files
Upgrade to dcl v1.72.0 (#11580) (#8097)
[upstream:1209495e43fe5c24eef8c0b5d78b92cd505dcb19] Signed-off-by: Modular Magician <[email protected]>
1 parent c729140 commit 381810a

7 files changed

+148
-15
lines changed

.changelog/11580.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
assuredworkload: added field `partner_service_billing_account` to `google_assured_workloads_workload`
3+
```

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.21
44

55
require (
66
cloud.google.com/go/bigtable v1.30.0
7-
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.71.0
7+
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.72.0
88
github.com/apparentlymart/go-cidr v1.1.0
99
github.com/davecgh/go-spew v1.1.1
1010
github.com/dnaeon/go-vcr v1.0.1

go.sum

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ cloud.google.com/go/monitoring v1.20.4/go.mod h1:v7F/UcLRw15EX7xq565N7Ae5tnYEE28
2222
dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
2323
dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
2424
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
25-
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.71.0 h1:vRKCLiR3faPmXAoqSdwXLv28/kygggzaKXzgdm6GXhg=
26-
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.71.0/go.mod h1:pL2Qt5HT+x6xrTd806oMiM3awW6kNIXB/iiuClz6m6k=
25+
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.72.0 h1:VodSRLhOrb8hhRbPre275EreP4vTiaejdBcvd2MCtX4=
26+
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.72.0/go.mod h1:pL2Qt5HT+x6xrTd806oMiM3awW6kNIXB/iiuClz6m6k=
2727
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
2828
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
2929
github.com/ProtonMail/go-crypto v1.1.0-alpha.2 h1:bkyFVUP+ROOARdgCiJzNQo2V2kiB97LyUpzH9P6Hrlg=
@@ -439,4 +439,4 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
439439
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
440440
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
441441
rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE=
442-
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
442+
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=

google-beta/services/assuredworkloads/resource_assured_workloads_workload.go

+17-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func ResourceAssuredWorkloadsWorkload() *schema.Resource {
6060
Type: schema.TypeString,
6161
Required: true,
6262
ForceNew: true,
63-
Description: "Required. Immutable. Compliance Regime associated with this workload. Possible values: COMPLIANCE_REGIME_UNSPECIFIED, IL4, CJIS, FEDRAMP_HIGH, FEDRAMP_MODERATE, US_REGIONAL_ACCESS, HIPAA, HITRUST, EU_REGIONS_AND_SUPPORT, CA_REGIONS_AND_SUPPORT, ITAR, AU_REGIONS_AND_US_SUPPORT, ASSURED_WORKLOADS_FOR_PARTNERS, ISR_REGIONS, ISR_REGIONS_AND_SUPPORT, CA_PROTECTED_B, IL5, IL2, JP_REGIONS_AND_SUPPORT",
63+
Description: "Required. Immutable. Compliance Regime associated with this workload. Possible values: COMPLIANCE_REGIME_UNSPECIFIED, IL4, CJIS, FEDRAMP_HIGH, FEDRAMP_MODERATE, US_REGIONAL_ACCESS, HIPAA, HITRUST, EU_REGIONS_AND_SUPPORT, CA_REGIONS_AND_SUPPORT, ITAR, AU_REGIONS_AND_US_SUPPORT, ASSURED_WORKLOADS_FOR_PARTNERS, ISR_REGIONS, ISR_REGIONS_AND_SUPPORT, CA_PROTECTED_B, IL5, IL2, JP_REGIONS_AND_SUPPORT, KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS, REGIONAL_CONTROLS",
6464
},
6565

6666
"display_name": {
@@ -119,7 +119,7 @@ func ResourceAssuredWorkloadsWorkload() *schema.Resource {
119119
Type: schema.TypeString,
120120
Optional: true,
121121
ForceNew: true,
122-
Description: "Optional. Partner regime associated with this workload. Possible values: PARTNER_UNSPECIFIED, LOCAL_CONTROLS_BY_S3NS, SOVEREIGN_CONTROLS_BY_T_SYSTEMS, SOVEREIGN_CONTROLS_BY_SIA_MINSAIT, SOVEREIGN_CONTROLS_BY_PSN",
122+
Description: "Optional. Partner regime associated with this workload. Possible values: PARTNER_UNSPECIFIED, LOCAL_CONTROLS_BY_S3NS, SOVEREIGN_CONTROLS_BY_T_SYSTEMS, SOVEREIGN_CONTROLS_BY_SIA_MINSAIT, SOVEREIGN_CONTROLS_BY_PSN, SOVEREIGN_CONTROLS_BY_CNTXT, SOVEREIGN_CONTROLS_BY_CNTXT_NO_EKM",
123123
},
124124

125125
"partner_permissions": {
@@ -131,6 +131,13 @@ func ResourceAssuredWorkloadsWorkload() *schema.Resource {
131131
Elem: AssuredWorkloadsWorkloadPartnerPermissionsSchema(),
132132
},
133133

134+
"partner_services_billing_account": {
135+
Type: schema.TypeString,
136+
Optional: true,
137+
ForceNew: true,
138+
Description: "Optional. Input only. Billing account necessary for purchasing services from Sovereign Partners. This field is required for creating SIA/PSN/CNTXT partner workloads. The caller should have 'billing.resourceAssociations.create' IAM permission on this billing-account. The format of this string is billingAccounts/AAAAAA-BBBBBB-CCCCCC.",
139+
},
140+
134141
"provisioned_resources_parent": {
135142
Type: schema.TypeString,
136143
Optional: true,
@@ -392,6 +399,7 @@ func resourceAssuredWorkloadsWorkloadCreate(d *schema.ResourceData, meta interfa
392399
KmsSettings: expandAssuredWorkloadsWorkloadKmsSettings(d.Get("kms_settings")),
393400
Partner: assuredworkloads.WorkloadPartnerEnumRef(d.Get("partner").(string)),
394401
PartnerPermissions: expandAssuredWorkloadsWorkloadPartnerPermissions(d.Get("partner_permissions")),
402+
PartnerServicesBillingAccount: dcl.String(d.Get("partner_services_billing_account").(string)),
395403
ProvisionedResourcesParent: dcl.String(d.Get("provisioned_resources_parent").(string)),
396404
ResourceSettings: expandAssuredWorkloadsWorkloadResourceSettingsArray(d.Get("resource_settings")),
397405
ViolationNotificationsEnabled: dcl.Bool(d.Get("violation_notifications_enabled").(bool)),
@@ -459,6 +467,7 @@ func resourceAssuredWorkloadsWorkloadRead(d *schema.ResourceData, meta interface
459467
KmsSettings: expandAssuredWorkloadsWorkloadKmsSettings(d.Get("kms_settings")),
460468
Partner: assuredworkloads.WorkloadPartnerEnumRef(d.Get("partner").(string)),
461469
PartnerPermissions: expandAssuredWorkloadsWorkloadPartnerPermissions(d.Get("partner_permissions")),
470+
PartnerServicesBillingAccount: dcl.String(d.Get("partner_services_billing_account").(string)),
462471
ProvisionedResourcesParent: dcl.String(d.Get("provisioned_resources_parent").(string)),
463472
ResourceSettings: expandAssuredWorkloadsWorkloadResourceSettingsArray(d.Get("resource_settings")),
464473
ViolationNotificationsEnabled: dcl.Bool(d.Get("violation_notifications_enabled").(bool)),
@@ -517,6 +526,9 @@ func resourceAssuredWorkloadsWorkloadRead(d *schema.ResourceData, meta interface
517526
if err = d.Set("partner_permissions", flattenAssuredWorkloadsWorkloadPartnerPermissions(res.PartnerPermissions)); err != nil {
518527
return fmt.Errorf("error setting partner_permissions in state: %s", err)
519528
}
529+
if err = d.Set("partner_services_billing_account", res.PartnerServicesBillingAccount); err != nil {
530+
return fmt.Errorf("error setting partner_services_billing_account in state: %s", err)
531+
}
520532
if err = d.Set("provisioned_resources_parent", res.ProvisionedResourcesParent); err != nil {
521533
return fmt.Errorf("error setting provisioned_resources_parent in state: %s", err)
522534
}
@@ -573,6 +585,7 @@ func resourceAssuredWorkloadsWorkloadUpdate(d *schema.ResourceData, meta interfa
573585
KmsSettings: expandAssuredWorkloadsWorkloadKmsSettings(d.Get("kms_settings")),
574586
Partner: assuredworkloads.WorkloadPartnerEnumRef(d.Get("partner").(string)),
575587
PartnerPermissions: expandAssuredWorkloadsWorkloadPartnerPermissions(d.Get("partner_permissions")),
588+
PartnerServicesBillingAccount: dcl.String(d.Get("partner_services_billing_account").(string)),
576589
ProvisionedResourcesParent: dcl.String(d.Get("provisioned_resources_parent").(string)),
577590
ResourceSettings: expandAssuredWorkloadsWorkloadResourceSettingsArray(d.Get("resource_settings")),
578591
ViolationNotificationsEnabled: dcl.Bool(d.Get("violation_notifications_enabled").(bool)),
@@ -590,6 +603,7 @@ func resourceAssuredWorkloadsWorkloadUpdate(d *schema.ResourceData, meta interfa
590603
KmsSettings: expandAssuredWorkloadsWorkloadKmsSettings(tpgdclresource.OldValue(d.GetChange("kms_settings"))),
591604
Partner: assuredworkloads.WorkloadPartnerEnumRef(tpgdclresource.OldValue(d.GetChange("partner")).(string)),
592605
PartnerPermissions: expandAssuredWorkloadsWorkloadPartnerPermissions(tpgdclresource.OldValue(d.GetChange("partner_permissions"))),
606+
PartnerServicesBillingAccount: dcl.String(tpgdclresource.OldValue(d.GetChange("partner_services_billing_account")).(string)),
593607
ProvisionedResourcesParent: dcl.String(tpgdclresource.OldValue(d.GetChange("provisioned_resources_parent")).(string)),
594608
ResourceSettings: expandAssuredWorkloadsWorkloadResourceSettingsArray(tpgdclresource.OldValue(d.GetChange("resource_settings"))),
595609
ViolationNotificationsEnabled: dcl.Bool(tpgdclresource.OldValue(d.GetChange("violation_notifications_enabled")).(bool)),
@@ -643,6 +657,7 @@ func resourceAssuredWorkloadsWorkloadDelete(d *schema.ResourceData, meta interfa
643657
KmsSettings: expandAssuredWorkloadsWorkloadKmsSettings(d.Get("kms_settings")),
644658
Partner: assuredworkloads.WorkloadPartnerEnumRef(d.Get("partner").(string)),
645659
PartnerPermissions: expandAssuredWorkloadsWorkloadPartnerPermissions(d.Get("partner_permissions")),
660+
PartnerServicesBillingAccount: dcl.String(d.Get("partner_services_billing_account").(string)),
646661
ProvisionedResourcesParent: dcl.String(d.Get("provisioned_resources_parent").(string)),
647662
ResourceSettings: expandAssuredWorkloadsWorkloadResourceSettingsArray(d.Get("resource_settings")),
648663
ViolationNotificationsEnabled: dcl.Bool(d.Get("violation_notifications_enabled").(bool)),

google-beta/services/assuredworkloads/resource_assured_workloads_workload_generated_test.go

+75-5
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func TestAccAssuredWorkloadsWorkload_SovereignControlsWorkload(t *testing.T) {
5555
ResourceName: "google_assured_workloads_workload.primary",
5656
ImportState: true,
5757
ImportStateVerify: true,
58-
ImportStateVerifyIgnore: []string{"billing_account", "kms_settings", "resource_settings", "provisioned_resources_parent", "labels", "terraform_labels"},
58+
ImportStateVerifyIgnore: []string{"billing_account", "kms_settings", "resource_settings", "provisioned_resources_parent", "partner_services_billing_account", "labels", "terraform_labels"},
5959
},
6060
{
6161
Config: testAccAssuredWorkloadsWorkload_SovereignControlsWorkloadUpdate0(context),
@@ -64,7 +64,34 @@ func TestAccAssuredWorkloadsWorkload_SovereignControlsWorkload(t *testing.T) {
6464
ResourceName: "google_assured_workloads_workload.primary",
6565
ImportState: true,
6666
ImportStateVerify: true,
67-
ImportStateVerifyIgnore: []string{"billing_account", "kms_settings", "resource_settings", "provisioned_resources_parent", "labels", "terraform_labels"},
67+
ImportStateVerifyIgnore: []string{"billing_account", "kms_settings", "resource_settings", "provisioned_resources_parent", "partner_services_billing_account", "labels", "terraform_labels"},
68+
},
69+
},
70+
})
71+
}
72+
func TestAccAssuredWorkloadsWorkload_SplitBillingPartnerWorkload(t *testing.T) {
73+
t.Parallel()
74+
75+
context := map[string]interface{}{
76+
"billing_acct": envvar.GetTestBillingAccountFromEnv(t),
77+
"org_id": envvar.GetTestOrgFromEnv(t),
78+
"random_suffix": acctest.RandString(t, 10),
79+
}
80+
81+
acctest.VcrTest(t, resource.TestCase{
82+
PreCheck: func() { acctest.AccTestPreCheck(t) },
83+
84+
ProtoV5ProviderFactories: acctest.ProtoV5ProviderBetaFactories(t),
85+
CheckDestroy: testAccCheckAssuredWorkloadsWorkloadDestroyProducer(t),
86+
Steps: []resource.TestStep{
87+
{
88+
Config: testAccAssuredWorkloadsWorkload_SplitBillingPartnerWorkload(context),
89+
},
90+
{
91+
ResourceName: "google_assured_workloads_workload.primary",
92+
ImportState: true,
93+
ImportStateVerify: true,
94+
ImportStateVerifyIgnore: []string{"billing_account", "kms_settings", "resource_settings", "provisioned_resources_parent", "partner_services_billing_account", "labels", "terraform_labels"},
6895
},
6996
},
7097
})
@@ -91,7 +118,7 @@ func TestAccAssuredWorkloadsWorkload_BasicHandWritten(t *testing.T) {
91118
ResourceName: "google_assured_workloads_workload.primary",
92119
ImportState: true,
93120
ImportStateVerify: true,
94-
ImportStateVerifyIgnore: []string{"billing_account", "kms_settings", "resource_settings", "provisioned_resources_parent", "labels", "terraform_labels"},
121+
ImportStateVerifyIgnore: []string{"billing_account", "kms_settings", "resource_settings", "provisioned_resources_parent", "partner_services_billing_account", "labels", "terraform_labels"},
95122
},
96123
{
97124
Config: testAccAssuredWorkloadsWorkload_BasicHandWrittenUpdate0(context),
@@ -100,7 +127,7 @@ func TestAccAssuredWorkloadsWorkload_BasicHandWritten(t *testing.T) {
100127
ResourceName: "google_assured_workloads_workload.primary",
101128
ImportState: true,
102129
ImportStateVerify: true,
103-
ImportStateVerifyIgnore: []string{"billing_account", "kms_settings", "resource_settings", "provisioned_resources_parent", "labels", "terraform_labels"},
130+
ImportStateVerifyIgnore: []string{"billing_account", "kms_settings", "resource_settings", "provisioned_resources_parent", "partner_services_billing_account", "labels", "terraform_labels"},
104131
},
105132
},
106133
})
@@ -127,7 +154,7 @@ func TestAccAssuredWorkloadsWorkload_FullHandWritten(t *testing.T) {
127154
ResourceName: "google_assured_workloads_workload.primary",
128155
ImportState: true,
129156
ImportStateVerify: true,
130-
ImportStateVerifyIgnore: []string{"billing_account", "kms_settings", "resource_settings", "provisioned_resources_parent", "labels", "terraform_labels"},
157+
ImportStateVerifyIgnore: []string{"billing_account", "kms_settings", "resource_settings", "provisioned_resources_parent", "partner_services_billing_account", "labels", "terraform_labels"},
131158
},
132159
},
133160
})
@@ -188,6 +215,48 @@ resource "google_assured_workloads_workload" "primary" {
188215
`, context)
189216
}
190217

218+
func testAccAssuredWorkloadsWorkload_SplitBillingPartnerWorkload(context map[string]interface{}) string {
219+
return acctest.Nprintf(`
220+
resource "google_assured_workloads_workload" "primary" {
221+
compliance_regime = "ASSURED_WORKLOADS_FOR_PARTNERS"
222+
display_name = "tf-test-display%{random_suffix}"
223+
location = "europe-west8"
224+
organization = "%{org_id}"
225+
billing_account = "billingAccounts/%{billing_acct}"
226+
partner = "SOVEREIGN_CONTROLS_BY_PSN"
227+
228+
partner_permissions {
229+
assured_workloads_monitoring = true
230+
data_logs_viewer = true
231+
service_access_approver = true
232+
}
233+
234+
partner_services_billing_account = "billingAccounts/01BF3F-2C6DE5-30C607"
235+
236+
resource_settings {
237+
resource_type = "CONSUMER_FOLDER"
238+
}
239+
240+
resource_settings {
241+
resource_type = "ENCRYPTION_KEYS_PROJECT"
242+
}
243+
244+
resource_settings {
245+
resource_id = "tf-test-ring%{random_suffix}"
246+
resource_type = "KEYRING"
247+
}
248+
249+
violation_notifications_enabled = true
250+
251+
labels = {
252+
label-one = "value-one"
253+
}
254+
provider = google-beta
255+
}
256+
257+
`, context)
258+
}
259+
191260
func testAccAssuredWorkloadsWorkload_BasicHandWritten(context map[string]interface{}) string {
192261
return acctest.Nprintf(`
193262
resource "google_assured_workloads_workload" "primary" {
@@ -291,6 +360,7 @@ func testAccCheckAssuredWorkloadsWorkloadDestroyProducer(t *testing.T) func(s *t
291360
BillingAccount: dcl.String(rs.Primary.Attributes["billing_account"]),
292361
EnableSovereignControls: dcl.Bool(rs.Primary.Attributes["enable_sovereign_controls"] == "true"),
293362
Partner: assuredworkloads.WorkloadPartnerEnumRef(rs.Primary.Attributes["partner"]),
363+
PartnerServicesBillingAccount: dcl.String(rs.Primary.Attributes["partner_services_billing_account"]),
294364
ProvisionedResourcesParent: dcl.String(rs.Primary.Attributes["provisioned_resources_parent"]),
295365
ViolationNotificationsEnabled: dcl.Bool(rs.Primary.Attributes["violation_notifications_enabled"] == "true"),
296366
CreateTime: dcl.StringOrNil(rs.Primary.Attributes["create_time"]),

google-beta/services/gkehub/resource_gke_hub_feature_membership.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ func GkeHubFeatureMembershipConfigmanagementHierarchyControllerSchema() *schema.
345345
"enabled": {
346346
Type: schema.TypeBool,
347347
Optional: true,
348-
Description: "Whether Hierarchy Controller is enabled in this cluster.",
348+
Description: "**DEPRECATED** Configuring Hierarchy Controller through the configmanagement feature is no longer recommended. Use https://github.com/kubernetes-sigs/hierarchical-namespaces instead.",
349349
},
350350
},
351351
}

0 commit comments

Comments
 (0)