Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: prevent unnecessary updates when cpu_options is unset#4806

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@edersonbrilhante
Copy link
Contributor

@edersonbrilhanteedersonbrilhante commentedOct 3, 2025
edited
Loading

This PR will replace:

cpu_options {core_count=var.cpu_options!=null? var.cpu_options.core_count:nullthreads_per_core=var.cpu_options!=null? var.cpu_options.threads_per_core:null}

with:

dynamic"cpu_options" {for_each=var.cpu_options!=null? [var.cpu_options]: []content {core_count=try(cpu_options.value.core_count,null)threads_per_core=try(cpu_options.value.threads_per_core,null)  }}

This way, ifcpu_options is not set, Terraform willnot force a resource update every time.

This issue was introduced in PR#4789

image

npalm and kirschem-fernride reacted with thumbs up emoji
Copy link
Contributor

CopilotAI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue where Terraform would force unnecessary resource updates by replacing a staticcpu_options block with a dynamic one that only creates the block whencpu_options is actually set.

  • Replaces staticcpu_options block with dynamic block to prevent forced updates
  • Uses conditionalfor_each to only create the block whenvar.cpu_options is not null
  • Updates field access to usecpu_options.value syntax within the dynamic block

Tip: Customize your code reviews with copilot-instructions.md.Create the file orlearn how to get started.

Copy link
Member

@npalmnpalm left a comment

Choose a reason for hiding this comment

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

@npalmnpalm merged commit8a1cd6f intogithub-aws-runners:mainOct 4, 2025
40 checks passed
npalm pushed a commit that referenced this pull requestOct 4, 2025
🤖 I have created a release *beep* *boop*---##[6.8.1](v6.8.0...v6.8.1)(2025-10-04)### Bug Fixes* prevent unnecessary updates when cpu_options is unset([#4806](#4806))([8a1cd6f](8a1cd6f))@edersonbrilhante---This PR was generated with [ReleasePlease](https://github.com/googleapis/release-please). See[documentation](https://github.com/googleapis/release-please#release-please).Co-authored-by: runners-releaser[bot] <194412594+runners-releaser[bot]@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

@npalmnpalmnpalm approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@edersonbrilhante@npalm

[8]ページ先頭

©2009-2025 Movatter.jp