Skip to content

Setting destructive annotation to false, using paths for string concat#143

Merged
gautambaghel merged 7 commits intomainfrom
fix/path-annotation-fix
Aug 20, 2025
Merged

Setting destructive annotation to false, using paths for string concat#143
gautambaghel merged 7 commits intomainfrom
fix/path-annotation-fix

Conversation

@gautambaghel
Copy link
Member

@gautambaghel gautambaghel commented Aug 19, 2025

PCI review checklist

  • I have documented a clear reason for, and description of, the change I am making.

  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.

  • If applicable, I've documented the impact of any changes to security controls.

    Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.

@gautambaghel gautambaghel requested a review from a team as a code owner August 19, 2025 04:00
@gautambaghel gautambaghel requested a review from Copilot August 19, 2025 04:01
Copy link
Contributor

Copilot AI 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 adds the WithDestructiveHintAnnotation(false) to multiple Terraform tools and replaces fmt.Sprintf with path.Join for URL construction to improve path concatenation.

  • Adds non-destructive annotations to all read-only Terraform tools to explicitly mark them as safe operations
  • Replaces string formatting with proper path joining for URL construction in resource files

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
pkg/tools/search_providers.go Adds destructive hint annotation set to false
pkg/tools/search_policies.go Adds destructive hint annotation set to false
pkg/tools/search_modules.go Adds destructive hint annotation set to false
pkg/tools/list_terraform_projects.go Adds destructive hint annotation set to false
pkg/tools/list_terraform_orgs.go Adds destructive hint annotation set to false
pkg/tools/get_provider_details.go Adds destructive hint annotation set to false
pkg/tools/get_policy_details.go Adds destructive hint annotation set to false
pkg/tools/get_module_details.go Adds destructive hint annotation set to false
pkg/tools/get_latest_provider_version.go Adds destructive hint annotation set to false
pkg/tools/get_latest_module_version.go Adds destructive hint annotation set to false
pkg/resources/resources.go Replaces fmt.Sprintf with path.Join for URL construction
pkg/resources/resource_templates.go Replaces fmt.Sprintf with path.Join for URL construction

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

kartheek-hc
kartheek-hc previously approved these changes Aug 20, 2025
kartheek-hc
kartheek-hc previously approved these changes Aug 20, 2025
@gautambaghel gautambaghel merged commit ae341b1 into main Aug 20, 2025
32 checks passed
@gautambaghel gautambaghel deleted the fix/path-annotation-fix branch August 20, 2025 19:01
@github-actions
Copy link

Reminder to the contributor that merged this PR: if your changes have added important functionality or fixed a relevant bug, open a follow-up PR to update CHANGELOG.md with a note on your changes.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants