Skip to content

feat: added google_artifact_registry_rule #16769

Open
ramonvermeulen wants to merge 5 commits intoGoogleCloudPlatform:mainfrom
ramonvermeulen:f/26050-artifact-registry-rules
Open

feat: added google_artifact_registry_rule #16769
ramonvermeulen wants to merge 5 commits intoGoogleCloudPlatform:mainfrom
ramonvermeulen:f/26050-artifact-registry-rules

Conversation

@ramonvermeulen
Copy link
Copy Markdown
Contributor

@ramonvermeulen ramonvermeulen commented Mar 19, 2026

Closes hashicorp/terraform-provider-google#26050

Tests

╰─❮ make testacc TEST=./google/services/artifactregistry TESTARGS='-run=TestAccArtifactRegistryRule_artifactRegistryRule'                                                                                                                                                    ─╯
sh -c "'/Users/ramon/go/src/github.com/hashicorp/terraform-provider-google/scripts/gofmtcheck.sh'"
==> Checking that code complies with gofmt requirements...
go vet
TF_ACC_REFRESH_AFTER_APPLY=1 TF_ACC=1 TF_SCHEMA_PANIC_ON_ERROR=1 go test ./google/services/artifactregistry -v -run=TestAccArtifactRegistryRule_artifactRegistryRule -timeout 240m -ldflags="-X=github.com/hashicorp/terraform-provider-google/version.ProviderVersion=acc"
=== RUN   TestAccArtifactRegistryRule_artifactRegistryRuleBasicExample
=== PAUSE TestAccArtifactRegistryRule_artifactRegistryRuleBasicExample
=== RUN   TestAccArtifactRegistryRule_artifactRegistryRuleFullExample
=== PAUSE TestAccArtifactRegistryRule_artifactRegistryRuleFullExample
=== RUN   TestAccArtifactRegistryRule_artifactRegistryRuleFull_update
=== PAUSE TestAccArtifactRegistryRule_artifactRegistryRuleFull_update
=== CONT  TestAccArtifactRegistryRule_artifactRegistryRuleBasicExample
=== CONT  TestAccArtifactRegistryRule_artifactRegistryRuleFull_update
=== CONT  TestAccArtifactRegistryRule_artifactRegistryRuleFullExample
--- PASS: TestAccArtifactRegistryRule_artifactRegistryRuleBasicExample (14.85s)
--- PASS: TestAccArtifactRegistryRule_artifactRegistryRuleFullExample (14.87s)
--- PASS: TestAccArtifactRegistryRule_artifactRegistryRuleFull_update (23.15s)
PASS
ok      github.com/hashicorp/terraform-provider-google/google/services/artifactregistry (cached)
`google_artifact_registry_rule`

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Mar 19, 2026
@ramonvermeulen ramonvermeulen changed the title feat: add boilerplate for google_artifact_registry_rule feat: added google_artifact_registry_rule Mar 22, 2026
@ramonvermeulen ramonvermeulen marked this pull request as ready for review March 22, 2026 08:46
@github-actions
Copy link
Copy Markdown

Googlers: For automatic test runs see go/terraform-auto-test-runs.

@malhotrasagar2212, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@modular-magician modular-magician added service/artifactregistry and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Mar 23, 2026
@modular-magician
Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 6 files changed, 1230 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 6 files changed, 1230 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 210 insertions(+))
Open in Cloud Shell: Diff ( 8 files changed, 242 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_artifact_registry_rule (4 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_artifact_registry_rule" "primary" {
  condition {
    location = # value needed
  }
}

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 49
Passed tests: 39
Skipped tests: 7
Affected tests: 3

Click here to see the affected service packages
  • artifactregistry

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccArtifactRegistryRule_artifactRegistryRuleBasicExample
  • TestAccArtifactRegistryRule_artifactRegistryRuleFullExample
  • TestAccArtifactRegistryRule_artifactRegistryRuleFull_update

Get to know how VCR tests work

@modular-magician
Copy link
Copy Markdown
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccArtifactRegistryRule_artifactRegistryRuleBasicExample [Debug log]
TestAccArtifactRegistryRule_artifactRegistryRuleFullExample [Debug log]
TestAccArtifactRegistryRule_artifactRegistryRuleFull_update [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

@github-actions
Copy link
Copy Markdown

@malhotrasagar2212 This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

@github-actions
Copy link
Copy Markdown

@GoogleCloudPlatform/terraform-team @malhotrasagar2212 This PR has been waiting for review for 1 week. Please take a look! Use the label disable-review-reminders to disable these notifications.

Copy link
Copy Markdown
Collaborator

@malhotrasagar2212 malhotrasagar2212 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ramonvermeulen, Thanks for the PR. Please have a look at the Missing Test Report for the condition.location field.
#16769 (comment)

Comment thread mmv1/products/artifactregistry/Rule.yaml Outdated
@ramonvermeulen ramonvermeulen force-pushed the f/26050-artifact-registry-rules branch from 95ab709 to 41fcac5 Compare April 8, 2026 18:24
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Apr 8, 2026
@ramonvermeulen
Copy link
Copy Markdown
Contributor Author

@malhotrasagar2212

Thanks for reviewing! I just updated the test case and added the correct documentation url.

Tests locally:

TF_ACC_REFRESH_AFTER_APPLY=1 TF_ACC=1 TF_SCHEMA_PANIC_ON_ERROR=1 go test ./google/services/artifactregistry -v -run=TestAccArtifactRegistryRule_artifactRegistryRule -timeout 240m -ldflags="-X=github.com/hashicorp/terraform-provider-google/version.ProviderVersion=acc"
=== RUN   TestAccArtifactRegistryRule_artifactRegistryRuleBasicExample
=== PAUSE TestAccArtifactRegistryRule_artifactRegistryRuleBasicExample
=== RUN   TestAccArtifactRegistryRule_artifactRegistryRuleFullExample
=== PAUSE TestAccArtifactRegistryRule_artifactRegistryRuleFullExample
=== RUN   TestAccArtifactRegistryRule_artifactRegistryRuleFull_update
=== PAUSE TestAccArtifactRegistryRule_artifactRegistryRuleFull_update
=== CONT  TestAccArtifactRegistryRule_artifactRegistryRuleBasicExample
=== CONT  TestAccArtifactRegistryRule_artifactRegistryRuleFull_update
=== CONT  TestAccArtifactRegistryRule_artifactRegistryRuleFullExample
--- PASS: TestAccArtifactRegistryRule_artifactRegistryRuleBasicExample (21.29s)
--- PASS: TestAccArtifactRegistryRule_artifactRegistryRuleFullExample (21.29s)
--- PASS: TestAccArtifactRegistryRule_artifactRegistryRuleFull_update (37.03s)
PASS
ok      github.com/hashicorp/terraform-provider-google/google/services/artifactregistry 38.661s

@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Apr 9, 2026
@modular-magician
Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 6 files changed, 1384 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 6 files changed, 1384 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 210 insertions(+))
Open in Cloud Shell: Diff ( 8 files changed, 243 insertions(+))

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 49
Passed tests: 37
Skipped tests: 7
Affected tests: 5

Click here to see the affected service packages
  • artifactregistry

Action taken

Found 5 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccArtifactRegistryRepository_artifactRegistryRepositoryCleanupExample
  • TestAccArtifactRegistryRepository_cleanup
  • TestAccArtifactRegistryRule_artifactRegistryRuleBasicExample
  • TestAccArtifactRegistryRule_artifactRegistryRuleFullExample
  • TestAccArtifactRegistryRule_artifactRegistryRuleFull_update

Get to know how VCR tests work

@modular-magician
Copy link
Copy Markdown
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccArtifactRegistryRule_artifactRegistryRuleBasicExample [Debug log]
TestAccArtifactRegistryRule_artifactRegistryRuleFullExample [Debug log]
TestAccArtifactRegistryRule_artifactRegistryRuleFull_update [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccArtifactRegistryRepository_artifactRegistryRepositoryCleanupExample [Error message] [Debug log]
TestAccArtifactRegistryRepository_cleanup [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@github-actions
Copy link
Copy Markdown

@malhotrasagar2212 This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

@github-actions
Copy link
Copy Markdown

@GoogleCloudPlatform/terraform-team @malhotrasagar2212 This PR has been waiting for review for 1 week. Please take a look! Use the label disable-review-reminders to disable these notifications.

Copy link
Copy Markdown
Collaborator

@malhotrasagar2212 malhotrasagar2212 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ramonvermeulen Please look into the failing tests. Thanks.

@ramonvermeulen
Copy link
Copy Markdown
Contributor Author

@ramonvermeulen Please look into the failing tests. Thanks.

I don't have access to the logs, also wondering how this test is affected by my changes. Can try to run the same test locally to see if it fails as well, or if it is only in VCR.

@ramonvermeulen ramonvermeulen force-pushed the f/26050-artifact-registry-rules branch from 20d5d4a to 8a02def Compare April 17, 2026 07:21
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Apr 17, 2026
@ramonvermeulen
Copy link
Copy Markdown
Contributor Author

@malhotrasagar2212 Only rebased, test runs fine locally:

╰─❯ make testacc TEST=./google/services/artifactregistry TESTARGS='-run=TestAccArtifactRegistryRule_'                                                                                                   ─╯
sh -c "'/Users/ramon/go/src/github.com/hashicorp/terraform-provider-google/scripts/gofmtcheck.sh'"
==> Checking that code complies with gofmt requirements...
go vet
TF_ACC_REFRESH_AFTER_APPLY=1 TF_ACC=1 TF_SCHEMA_PANIC_ON_ERROR=1 go test ./google/services/artifactregistry -v -run=TestAccArtifactRegistryRule_ -timeout 240m -ldflags="-X=github.com/hashicorp/terraform-provider-google/version.ProviderVersion=acc"
=== RUN   TestAccArtifactRegistryRule_artifactRegistryRuleBasicExample
=== PAUSE TestAccArtifactRegistryRule_artifactRegistryRuleBasicExample
=== RUN   TestAccArtifactRegistryRule_artifactRegistryRuleFullExample
=== PAUSE TestAccArtifactRegistryRule_artifactRegistryRuleFullExample
=== RUN   TestAccArtifactRegistryRule_artifactRegistryRuleFull_update
=== PAUSE TestAccArtifactRegistryRule_artifactRegistryRuleFull_update
=== CONT  TestAccArtifactRegistryRule_artifactRegistryRuleBasicExample
=== CONT  TestAccArtifactRegistryRule_artifactRegistryRuleFull_update
=== CONT  TestAccArtifactRegistryRule_artifactRegistryRuleFullExample
--- PASS: TestAccArtifactRegistryRule_artifactRegistryRuleFullExample (18.20s)
--- PASS: TestAccArtifactRegistryRule_artifactRegistryRuleBasicExample (27.73s)
--- PASS: TestAccArtifactRegistryRule_artifactRegistryRuleFull_update (32.91s)
PASS
ok      github.com/hashicorp/terraform-provider-google/google/services/artifactregistry 33.813s
╰─❯ make testacc TEST=./google/services/artifactregistry TESTARGS='-run=TestAccArtifactRegistryRepository_artifactRegistryRepositoryCleanupExample'                                                     ─╯
sh -c "'/Users/ramon/go/src/github.com/hashicorp/terraform-provider-google/scripts/gofmtcheck.sh'"
==> Checking that code complies with gofmt requirements...
go vet
TF_ACC_REFRESH_AFTER_APPLY=1 TF_ACC=1 TF_SCHEMA_PANIC_ON_ERROR=1 go test ./google/services/artifactregistry -v -run=TestAccArtifactRegistryRepository_artifactRegistryRepositoryCleanupExample -timeout 240m -ldflags="-X=github.com/hashicorp/terraform-provider-google/version.ProviderVersion=acc"
=== RUN   TestAccArtifactRegistryRepository_artifactRegistryRepositoryCleanupExample
=== PAUSE TestAccArtifactRegistryRepository_artifactRegistryRepositoryCleanupExample
=== CONT  TestAccArtifactRegistryRepository_artifactRegistryRepositoryCleanupExample
--- PASS: TestAccArtifactRegistryRepository_artifactRegistryRepositoryCleanupExample (13.05s)
PASS
ok      github.com/hashicorp/terraform-provider-google/google/services/artifactregistry 13.931s

@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Apr 21, 2026
@modular-magician
Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 5 files changed, 1432 insertions(+))
google-beta provider: Diff ( 5 files changed, 1432 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 210 insertions(+))
Open in Cloud Shell: Diff ( 8 files changed, 243 insertions(+))

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 50
Passed tests: 43
Skipped tests: 7
Affected tests: 0

Click here to see the affected service packages
  • artifactregistry

🟢 All tests passed!

View the build log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Artifact Registry rules

3 participants