Skip to content
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

Add creation_timestamp field to google_compute_instance and template resources #11955

Merged

Conversation

karolgorc
Copy link
Contributor

@karolgorc karolgorc commented Oct 9, 2024

closes hashicorp/terraform-provider-google#15663

  • added field creation_timestamp to
    • google_compute_instance
    • google_compute_instance_template
    • google_compute_region_instance_template
  • added data source support (templates didn't need a change because they use the Read function from the resource)
  • added doc changes

This is an output only field. Please LMK if you want it tested somehow.

Release Note Template for Downstream PRs (will be copied)

compute: added `creation_timestamp` field to `google_compute_instance`, `google_compute_instance_template`, `google_compute_region_instance_template`

@github-actions github-actions bot requested a review from hao-nan-li October 9, 2024 10:24
Copy link

github-actions bot commented Oct 9, 2024

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

@hao-nan-li, 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 awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests service/compute-instances and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels Oct 9, 2024
@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 ( 10 files changed, 44 insertions(+))
google-beta provider: Diff ( 10 files changed, 44 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1026
Passed tests: 952
Skipped tests: 74
Affected tests: 0

Click here to see the affected service packages
  • compute

🟢 All tests passed!

View the build log

Copy link
Contributor

@hao-nan-li hao-nan-li left a comment

Choose a reason for hiding this comment

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

Could you add this field to an existing test? Thanks

@github-actions github-actions bot requested a review from hao-nan-li October 14, 2024 08:21
@modular-magician modular-magician added awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels Oct 14, 2024
@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 ( 13 files changed, 47 insertions(+))
google-beta provider: Diff ( 13 files changed, 47 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1028
Passed tests: 954
Skipped tests: 74
Affected tests: 0

Click here to see the affected service packages
  • compute

🟢 All tests passed!

View the build log

@hao-nan-li
Copy link
Contributor

I'm not sure if this field is tested. Add it to any existing test should be fine.

@karolgorc
Copy link
Contributor Author

karolgorc commented Oct 17, 2024

It's an output only field. You cannot do anything else than read it. Which is done here

resource.TestCheckResourceAttrSet("google_compute_instance_template.foobar", "creation_timestamp"),

I cannot really put a creation_timestamp = X in the test because it's Computed: true only. Same as self_link, etc. All we want to check basically is if it's set on instance creation because it cannot do anything else than take a value returned by the API

Copy link

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

@hao-nan-li hao-nan-li merged commit dcc3ee0 into GoogleCloudPlatform:main Oct 17, 2024
11 checks passed
varshatumburu pushed a commit to varshatumburu/magic-modules that referenced this pull request Oct 19, 2024
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Oct 23, 2024
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Oct 24, 2024
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Nov 5, 2024
akshat-jindal-nit pushed a commit to akshat-jindal-nit/magic-modules that referenced this pull request Nov 18, 2024
amanMahendroo pushed a commit to amanMahendroo/magic-modules that referenced this pull request Dec 17, 2024
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.

Return creation_timestamp on compute instances and templates
3 participants