Skip to content

[v18] tfgen: support including top-level access list scope field - #69614

Open
kimlisa wants to merge 1 commit into
branch/v18from
bot/backport-69337-branch/v18
Open

[v18] tfgen: support including top-level access list scope field#69614
kimlisa wants to merge 1 commit into
branch/v18from
bot/backport-69337-branch/v18

Conversation

@kimlisa

@kimlisa kimlisa commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Backport #69337 to branch/v18

@kimlisa kimlisa added the no-changelog Indicates that a PR does not require a changelog entry label Aug 12, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f6cef063fa

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread lib/tfgen/tfgen.go
if scope != nil && !opts.fieldsToOmit["scope"] {
tokens := valueToTokens(fieldPath{"scope"}, scope.Value, opts, false /* emitZeroVal */)
if tokens != nil {
resourceBlock.Body().SetAttributeRaw("scope", tokens)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Qualify scoped access-list-member parents

When tfgen is given a scoped access_list_member whose Spec.AccessList is a bare list name (the new test constructs this exact case), this line emits scope, but the generated HCL still leaves spec.access_list bare. The access-list service treats any non-empty member scope as requiring spec.access_list to be scope-qualified (ParentListOf in lib/accesslists/scopequalifiedname.go:142-149 calls ParseScopeQualifiedName), so Terraform apply fails before creating the member; either qualify the parent (/scope::name) when emitting scoped members or reject/normalize this input.

Useful? React with 👍 / 👎.

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

Labels

backport no-changelog Indicates that a PR does not require a changelog entry size/sm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant