Skip to content

Add StateReason to NCC Spoke #13666

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

amanMahendroo
Copy link
Contributor

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

networkconnectivity: added `state_reason` field to `spoke` resource

@github-actions github-actions bot requested a review from ScottSuarez April 14, 2025 09:39
Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer to run. Googlers: see go/terraform-auto-test-runs to set up automatic test runs.

@ScottSuarez, 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
Copy link
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 ( 3 files changed, 19 insertions(+))
google-beta provider: Diff ( 3 files changed, 19 insertions(+))

Missing doc report (experimental)

The following resources have fields missing in documents.

  • google_network_connectivity_spoke
    • Expected Document Path: /website/docs/r/network_connectivity_spoke.html.markdown
    • Fields: [state_reason]

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 36
Passed tests: 35
Skipped tests: 1
Affected tests: 0

Click here to see the affected service packages
  • networkconnectivity

🟢 All tests passed!

View the build log

@modular-magician
Copy link
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 ( 3 files changed, 19 insertions(+))
google-beta provider: Diff ( 3 files changed, 19 insertions(+))

Missing doc report (experimental)

The following resources have fields missing in documents.

  • google_network_connectivity_spoke
    • Expected Document Path: /website/docs/r/network_connectivity_spoke.html.markdown
    • Fields: [state_reason]

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 37
Passed tests: 36
Skipped tests: 1
Affected tests: 0

Click here to see the affected service packages
  • networkconnectivity

🟢 All tests passed!

View the build log

@shuyama1
Copy link
Member

rerun missing doc detector
/gcbrun

@modular-magician
Copy link
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 ( 3 files changed, 19 insertions(+))
google-beta provider: Diff ( 3 files changed, 19 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 37
Passed tests: 36
Skipped tests: 1
Affected tests: 0

Click here to see the affected service packages
  • networkconnectivity

🟢 All tests passed!

View the build log

@ScottSuarez
Copy link
Contributor

Could you add a test for this field or add it to an existing test? If not, why not?

@amanMahendroo
Copy link
Contributor Author

@ScottSuarez This is an output only field which is populated by a different API that isn't supported on Terraform and as such can't be added in a create or update test. The StateReason array would otherwise remain empty unless we use this API. I can't think of a reasonable test for this field since its only purpose is to be read by user in a Get request (other than asserting that it's an empty array upon resource creation, but I don't know of a way to do that in a test).

@@ -329,3 +329,9 @@ properties:
- 'CREATING'
- 'ACTIVE'
- 'DELETING'
- name: 'stateReason'
Copy link
Contributor

@ScottSuarez ScottSuarez Apr 16, 2025

Choose a reason for hiding this comment

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

The public API documentation suggests that stateReason does not exist.

Perhaps reason is what you are looking for?

@ScottSuarez
Copy link
Contributor

@ScottSuarez This is an output only field which is populated by a different API that isn't supported on Terraform and as such can't be added in a create or update test. The StateReason array would otherwise remain empty unless we use this API. I can't think of a reasonable test for this field since its only purpose is to be read by user in a Get request (other than asserting that it's an empty array upon resource creation, but I don't know of a way to do that in a test).

I see, I think I am okay with this, but have issue with how we are using vs what is documented publicly on the docs. Given that we have no tests I would still like some form of validation that this field works. Local testing or instructions on how to verify functionality.

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.

4 participants