Skip to content

Commit

Permalink
Fix naming of resource policies in tests to be sweepable (#7412) (#13933
Browse files Browse the repository at this point in the history
)

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Mar 7, 2023
1 parent 90238ff commit 4237c97
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .changelog/7412.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
10 changes: 5 additions & 5 deletions google/resource_compute_resource_policy_generated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func TestAccComputeResourcePolicy_resourcePolicyBasicExample(t *testing.T) {
func testAccComputeResourcePolicy_resourcePolicyBasicExample(context map[string]interface{}) string {
return Nprintf(`
resource "google_compute_resource_policy" "foo" {
name = "policy%{random_suffix}"
name = "tf-test-gce-policy%{random_suffix}"
region = "us-central1"
snapshot_schedule_policy {
schedule {
Expand Down Expand Up @@ -93,7 +93,7 @@ func TestAccComputeResourcePolicy_resourcePolicyFullExample(t *testing.T) {
func testAccComputeResourcePolicy_resourcePolicyFullExample(context map[string]interface{}) string {
return Nprintf(`
resource "google_compute_resource_policy" "bar" {
name = "policy%{random_suffix}"
name = "tf-test-gce-policy%{random_suffix}"
region = "us-central1"
snapshot_schedule_policy {
schedule {
Expand Down Expand Up @@ -146,7 +146,7 @@ func TestAccComputeResourcePolicy_resourcePolicyPlacementPolicyExample(t *testin
func testAccComputeResourcePolicy_resourcePolicyPlacementPolicyExample(context map[string]interface{}) string {
return Nprintf(`
resource "google_compute_resource_policy" "baz" {
name = "policy%{random_suffix}"
name = "tf-test-gce-policy%{random_suffix}"
region = "us-central1"
group_placement_policy {
vm_count = 2
Expand Down Expand Up @@ -184,7 +184,7 @@ func TestAccComputeResourcePolicy_resourcePolicyInstanceSchedulePolicyExample(t
func testAccComputeResourcePolicy_resourcePolicyInstanceSchedulePolicyExample(context map[string]interface{}) string {
return Nprintf(`
resource "google_compute_resource_policy" "hourly" {
name = "policy%{random_suffix}"
name = "tf-test-gce-policy%{random_suffix}"
region = "us-central1"
description = "Start and stop instances"
instance_schedule_policy {
Expand Down Expand Up @@ -228,7 +228,7 @@ func TestAccComputeResourcePolicy_resourcePolicySnapshotScheduleChainNameExample
func testAccComputeResourcePolicy_resourcePolicySnapshotScheduleChainNameExample(context map[string]interface{}) string {
return Nprintf(`
resource "google_compute_resource_policy" "hourly" {
name = "policy%{random_suffix}"
name = "tf-test-gce-policy%{random_suffix}"
region = "us-central1"
description = "chain name snapshot"
snapshot_schedule_policy {
Expand Down
12 changes: 6 additions & 6 deletions website/docs/r/compute_resource_policy.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ A policy that can be attached to a resource to specify or schedule actions on th

```hcl
resource "google_compute_resource_policy" "foo" {
name = "policy"
name = "gce-policy"
region = "us-central1"
snapshot_schedule_policy {
schedule {
Expand All @@ -55,7 +55,7 @@ resource "google_compute_resource_policy" "foo" {

```hcl
resource "google_compute_resource_policy" "bar" {
name = "policy"
name = "gce-policy"
region = "us-central1"
snapshot_schedule_policy {
schedule {
Expand Down Expand Up @@ -88,7 +88,7 @@ resource "google_compute_resource_policy" "bar" {

```hcl
resource "google_compute_resource_policy" "baz" {
name = "policy"
name = "gce-policy"
region = "us-central1"
group_placement_policy {
vm_count = 2
Expand All @@ -106,7 +106,7 @@ resource "google_compute_resource_policy" "baz" {

```hcl
resource "google_compute_resource_policy" "baz" {
name = "policy"
name = "gce-policy"
region = "us-central1"
provider = google-beta
group_placement_policy {
Expand All @@ -126,7 +126,7 @@ resource "google_compute_resource_policy" "baz" {

```hcl
resource "google_compute_resource_policy" "hourly" {
name = "policy"
name = "gce-policy"
region = "us-central1"
description = "Start and stop instances"
instance_schedule_policy {
Expand All @@ -150,7 +150,7 @@ resource "google_compute_resource_policy" "hourly" {

```hcl
resource "google_compute_resource_policy" "hourly" {
name = "policy"
name = "gce-policy"
region = "us-central1"
description = "chain name snapshot"
snapshot_schedule_policy {
Expand Down

0 comments on commit 4237c97

Please sign in to comment.