Skip to content

Conversation

iamar7
Copy link
Member

@iamar7 iamar7 commented Aug 21, 2025

Description

Issue - 15360

Release required?

  • No release
  • Patch release (x.x.X)
  • Minor release (x.X.x)
  • Major release (X.x.x)
Release notes content

Run the pipeline

If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.

Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:

/run pipeline

Checklist for reviewers

  • If relevant, a test for the change is included or updated with this PR.
  • If relevant, documentation for the change is included or updated with this PR.

For mergers

  • Use a conventional commit message to set the release level. Follow the guidelines.
  • Include information that users need to know about the PR in the commit message. The commit message becomes part of the GitHub release notes.
  • Use the Squash and merge option.

@iamar7
Copy link
Member Author

iamar7 commented Aug 21, 2025

/run pipeline

@iamar7
Copy link
Member Author

iamar7 commented Aug 21, 2025

/run pipeline

@iamar7
Copy link
Member Author

iamar7 commented Aug 21, 2025

This is an expected failure

=== NAME  TestRunUpgradeExample
    terraform.go:237: 
        	Error Trace:	/go/pkg/mod/github.com/terraform-ibm-modules/[email protected]/testhelper/terraform.go:237
        	            				/go/pkg/mod/github.com/terraform-ibm-modules/[email protected]/testhelper/tests.go:541
        	            				/__w/terraform-ibm-trusted-profile/terraform-ibm-trusted-profile/tests/pr_test.go:54
        	Error:      	Should be false
        	Test:       	TestRunUpgradeExample
        	Messages:   	Resource(s) identified to be destroyed 
        	            	Name: policy
        	            	Address: module.trusted_profile.ibm_iam_trusted_profile_policy.policy["tp-comp-upg-jg4-profile-0"]
        	            	Actions: [delete create]
        	            	DIFF:
        	            	  Before: 
        	            		{"iam_id":null,"id":"Profile-3584382e-dcfb-4ff1-89b0-7af31ec3d6bf/96212307-94eb-4ebb-a88d-77d138771936","profile_id":"Profile-3584382e-dcfb-4ff1-89b0-7af31ec3d6bf","resources":"SECURE_VALUE_HIDDEN_HASH:-e6c2ca3a1d510fae35dbb2c86c16575859c9ded66880dceb2a35ac32","transaction_id":"8d988a9e20204e23b497e7a158080b1d"}
        	            	  After: 
        	            		{"iam_id":"Profile-3584382e-dcfb-4ff1-89b0-7af31ec3d6bf","profile_id":null,"resources":"SECURE_VALUE_HIDDEN_HASH:-aec4abd6bb7867623079779ca663551ebca861c80ba4648f962f7927"}

@iamar7
Copy link
Member Author

iamar7 commented Aug 21, 2025

/run pipeline

@iamar7
Copy link
Member Author

iamar7 commented Aug 28, 2025

=== NAME  TestRunCompleteExample
    terraform.go:237: 
        	Error Trace:	/go/pkg/mod/github.com/terraform-ibm-modules/[email protected]/testhelper/terraform.go:237
        	            				/go/pkg/mod/github.com/terraform-ibm-modules/[email protected]/testhelper/tests.go:593
        	            				/__w/terraform-ibm-trusted-profile/terraform-ibm-trusted-profile/tests/pr_test.go:44
        	Error:      	Should be false
        	Test:       	TestRunCompleteExample
        	Messages:   	Resource(s) identified to be destroyed 
        	            	Name: policy
        	            	Address: module.trusted_profile.ibm_iam_trusted_profile_policy.policy["tp-complete-7pm-profile-0"]
        	            	Actions: [delete create]
        	            	DIFF:
        	            	  Before: 
        	            		{"id":"Profile-87cc7e4c-bebc-4e27-bbb3-cb1383f27c33/cf0c1b2e-6788-4a89-bd40-3c4be1d9be7b","profile_id":"Profile-87cc7e4c-bebc-4e27-bbb3-cb1383f27c33","resources":"SECURE_VALUE_HIDDEN_HASH:-c601aebbd0549481cfc7e4799cace03c51b6ecb24a6a61894905780d","transaction_id":"19b25a25c0744b82ab7712247d49af77"}
        	            	  After: 
        	            		{"profile_id":null,"resources":"SECURE_VALUE_HIDDEN_HASH:-8797d61dcc0ef16f62ca7df33da77978e26377656b4393d02bb47d9d"}
        	            	
        	            	Change Detail:
        	            	{
        	            	  "actions": [
        	            	    "delete",
        	            	    "create"
        	            	  ],
        	            	  "after": {
        	            	    "account_management": false,
        	            	    "description": null,
        	            	    "iam_id": "Profile-87cc7e4c-bebc-4e27-bbb3-cb1383f27c33",
        	            	    "pattern": null,
        	            	    "profile_id": null,
        	            	    "resource_attributes": "SECURE_VALUE_HIDDEN_HASH:-a8ad0776174dfd40c5e4accd9165ff9aaf670b6cce1426ab1e93052a",
        	            	    "resource_tags": "SECURE_VALUE_HIDDEN_HASH:-ec318140a2f655ba080799d673eed3f35cbbb47af0b18354c39d0210",
        	            	    "resources": "SECURE_VALUE_HIDDEN_HASH:-17fe80de1434ff0aa9857a4ecb5e8c79cbc7dce26a2f6269051307f1",
        	            	    "roles": "SECURE_VALUE_HIDDEN_HASH:-e87aa980389b8098685bf5bb82f603a6ded27d9aa7b5a78014507e90",
        	            	    "rule_conditions": "SECURE_VALUE_HIDDEN_HASH:-470f3cc7eed2f0d780e0238b2b68c5870d9f2c1de3c8f92b5a335d93",
        	            	    "rule_operator": null,
        	            	    "tags": null
        	            	  },
        	            	  "after_sensitive": {
        	            	    "resource_attributes": [],
        	            	    "resource_tags": [],
        	            	    "resources": [
        	            	      {}
        	            	    ],
        	            	    "roles": [
        	            	      false
        	            	    ],
        	            	    "rule_conditions": []
        	            	  },
        	            	  "after_unknown": {
        	            	    "id": true,
        	            	    "resource_attributes": [],
        	            	    "resource_tags": [],
        	            	    "resources": [
        	            	      {}
        	            	    ],
        	            	    "roles": [
        	            	      false
        	            	    ],
        	            	    "rule_conditions": [],
        	            	    "transaction_id": true
        	            	  },
        	            	  "before": {
        	            	    "account_management": false,
        	            	    "description": null,
        	            	    "iam_id": "Profile-87cc7e4c-bebc-4e27-bbb3-cb1383f27c33",
        	            	    "id": "Profile-87cc7e4c-bebc-4e27-bbb3-cb1383f27c33/cf0c1b2e-6788-4a89-bd40-3c4be1d9be7b",
        	            	    "pattern": null,
        	            	    "profile_id": "Profile-87cc7e4c-bebc-4e27-bbb3-cb1383f27c33",
        	            	    "resource_attributes": "SECURE_VALUE_HIDDEN_HASH:-8625e58cd94edf6b05f63c7d4532d062a2e64ee124694a50f18c476e",
        	            	    "resource_tags": "SECURE_VALUE_HIDDEN_HASH:-da39d043dfcbb666ac91b9764e370b6f5901a72da9b5a3a1eb5726f9",
        	            	    "resources": "SECURE_VALUE_HIDDEN_HASH:-a0bf9924e8cfec60cd20a418757b6359de5a6473670c7fa69c78a83c",
        	            	    "roles": "SECURE_VALUE_HIDDEN_HASH:-f105c7bd7974223b86d585dbde11116cb274d5d732af300103e2ca25",
        	            	    "rule_conditions": "SECURE_VALUE_HIDDEN_HASH:-6cf33ba38aec961d1bbe978ed3c8e7b481509c968c26933073242ec0",
        	            	    "rule_operator": null,
        	            	    "tags": null,
        	            	    "transaction_id": "19b25a25c0744b82ab7712247d49af77"
        	            	  },
        	            	  "before_sensitive": {
        	            	    "resource_attributes": [],
        	            	    "resource_tags": [],
        	            	    "resources": [
        	            	      {
        	            	        "attributes": {}
        	            	      }
        	            	    ],
        	            	    "roles": [
        	            	      false
        	            	    ],
        	            	    "rule_conditions": []
        	            	  },
        	            	  "replace_paths": [
        	            	    [
        	            	      "profile_id"
        	            	    ]
        	            	  ]
        	            	}
    terraform.go:237: 

main.tf Outdated
for_each = local.policy_map

profile_id = ibm_iam_trusted_profile.profile.profile_id
iam_id = ibm_iam_trusted_profile.profile.profile_id
Copy link

@anthonylecarrer anthonylecarrer Aug 29, 2025

Choose a reason for hiding this comment

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

@iamar7 @ocofaigh Following IBM Documentation in terraform registry profile_id is not an attribute of ibm_iam_trusted_profile resource 😄 ... What about profile_id attribute on ibm_iam_trusted_profile if ibm_iam_trusted_profile_policy resource change the profile_id by iam_id ....

https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/iam_trusted_profile

@iamar7 iamar7 self-assigned this Sep 4, 2025
@iamar7
Copy link
Member Author

iamar7 commented Sep 4, 2025

/run pipeline

@iamar7
Copy link
Member Author

iamar7 commented Sep 4, 2025

Failing with this

golangci-lint.............................................................Failed
- hook id: golangci-lint
- exit code: 2

level=info msg="golangci-lint has version 2.3.1 built with go1.24.5 from 5256574b on 2025-08-02T21:24:45Z"
level=info msg="[config_reader] Config search paths: [./ /__w/terraform-ibm-trusted-profile/terraform-ibm-trusted-profile/tests /__w/terraform-ibm-trusted-profile/terraform-ibm-trusted-profile /__w/terraform-ibm-trusted-profile /__w / /github/home]"
level=info msg="[config_reader] Module name \"github.com/terraform-ibm-modules/terraform-ibm-trusted-profile\""
level=info msg="maxprocs: Leaving GOMAXPROCS=4: CPU quota undefined"
level=info msg="[goenv] Read go env for 2.747591ms: map[string]string{\"GOCACHE\":\"/github/home/.cache/go-build\", \"GOROOT\":\"/usr/local/go\"}"
level=info msg="[lintersdb] Active 5 linters: [errcheck govet ineffassign staticcheck unused]"
level=debug msg="[loader] Built loader args are [./...]"
level=debug msg="[loader] starting GOROOT= GOPATH=/go GO111MODULE=off GOPROXY= *** go list -e -f {{context.ReleaseTags}} -- unsafe"
level=debug msg="[loader] starting GOROOT= GOPATH=/go GO111MODULE= GOPROXY= *** go list -f \"{{context.GOARCH}} {{context.Compiler}}\" -- unsafe"
level=debug msg="[loader] 3.22224ms for GOROOT= GOPATH=/go GO111MODULE=off GOPROXY= *** go list -e -f {{context.ReleaseTags}} -- unsafe"
level=debug msg="[loader] starting GOROOT= GOPATH=/go GO111MODULE= GOPROXY= *** go list -e -json=Name,ImportPath,Error,Dir,GoFiles,IgnoredGoFiles,IgnoredOtherFiles,CFiles,CgoFiles,CXXFiles,MFiles,HFiles,FFiles,SFiles,SwigFiles,SwigCXXFiles,SysoFiles,TestGoFiles,XTestGoFiles,CompiledGoFiles,Export,DepOnly,Imports,ImportMap,TestImports,XTestImports,Module -compiled=true -test=true -export=true -deps=true -find=false -pgo=off -- ./..."
level=debug msg="[loader] 17.316922ms for GOROOT= GOPATH=/go GO111MODULE= GOPROXY= *** go list -f \"{{context.GOARCH}} {{context.Compiler}}\" -- unsafe"
level=debug msg="[loader] 43.660824254s for GOROOT= GOPATH=/go GO111MODULE= GOPROXY= *** go list -e -json=Name,ImportPath,Error,Dir,GoFiles,IgnoredGoFiles,IgnoredOtherFiles,CFiles,CgoFiles,CXXFiles,MFiles,HFiles,FFiles,SFiles,SwigFiles,SwigCXXFiles,SysoFiles,TestGoFiles,XTestGoFiles,CompiledGoFiles,Export,DepOnly,Imports,ImportMap,TestImports,XTestImports,Module -compiled=true -test=true -export=true -deps=true -find=false -pgo=off -- ./..."
level=debug msg="[loader] loaded 3 pkgs"
level=debug msg="[loader] Loaded pkg #0: ID=github.com/terraform-ibm-modules/terraform-ibm-trusted-profile GoFiles=[] CompiledGoFiles=[] Syntax=[]"
level=debug msg="[loader] Loaded pkg #1: ID=github.com/terraform-ibm-modules/terraform-ibm-trusted-profile [github.com/terraform-ibm-modules/terraform-ibm-trusted-profile.test] GoFiles=[/__w/terraform-ibm-trusted-profile/terraform-ibm-trusted-profile/tests/other_test.go /__w/terraform-ibm-trusted-profile/terraform-ibm-trusted-profile/tests/pr_test.go] CompiledGoFiles=[/__w/terraform-ibm-trusted-profile/terraform-ibm-trusted-profile/tests/other_test.go /__w/terraform-ibm-trusted-profile/terraform-ibm-trusted-profile/tests/pr_test.go] Syntax=[]"
level=debug msg="[loader] Loaded pkg #2: ID=github.com/terraform-ibm-modules/terraform-ibm-trusted-profile.test GoFiles=[/github/home/.cache/go-build/01/01b6222e31a6fa6bbfa5ccc31a0bcaa6891cbbe51975218269174609d9948f8f-d] CompiledGoFiles=[/github/home/.cache/go-build/01/01b6222e31a6fa6bbfa5ccc31a0bcaa6891cbbe51975218269174609d9948f8f-d] Syntax=[]"
level=debug msg="[loader] skip pkg ID=github.com/terraform-ibm-modules/terraform-ibm-trusted-profile.test"
level=info msg="[loader] Go packages loading at mode 8767 (compiled_files|files|deps|exports_file|imports|name|types_sizes) took 43.687773079s"
level=debug msg="[loader] package with tests: map[string]bool{\"github.com/terraform-ibm-modules/terraform-ibm-trusted-profile\":true}"
level=debug msg="[loader] skip pkg ID=github.com/terraform-ibm-modules/terraform-ibm-trusted-profile because we load it with test package"
level=info msg="[runner/filename_unadjuster] Pre-built 0 adjustments in 263.163µs"
panic: file requires newer Go version go1.25 (application built with go1.24) [recovered]
	panic: file requires newer Go version go1.25 (application built with go1.24)

goroutine 5361 [running]:
go/types.(*Checker).handleBailout(0xc00b95a960, 0xc0105e9a20)
	go/types/check.go:434 +0x88
panic({0x13dd700?, 0xc0105d1800?})
	runtime/panic.go:792 +0x132
github.com/golangci/golangci-lint/v2/pkg/goanalysis.(*loadingPackage).convertError(0xc002991c80, {0x1b6da20?, 0xc0105df500})
	github.com/golangci/golangci-lint/v2/pkg/goanalysis/runner_loadingpackage.go:473 +0x726
github.com/golangci/golangci-lint/v2/pkg/goanalysis.(*loadingPackage).loadFromSource.func2({0x1b6da20?, 0xc0105df500?})
	github.com/golangci/golangci-lint/v2/pkg/goanalysis/runner_loadingpackage.go:201 +0x37
go/types.(*Checker).handleError(0xc00b95a960, 0x0, {0x1b6e8a0, 0xc0105dbce0}, 0x97, {0xc013df69b0, 0x45}, 0x0)
	go/types/errors.go:221 +0x44a
go/types.(*error_).report(0xc0105e97c0)
	go/types/errors.go:148 +0x2cc
go/types.(*Checker).errorf(0xc00038ee40?, {0x1b6e8a0, 0xc0105dbce0}, 0x6?, {0x173f056?, 0xc0105e9858?}, {0xc0105e98c8?, 0xe?, 0xf?})
	go/types/errors.go:243 +0x14b
go/types.(*Checker).initFiles(0xc00b95a960, {0xc00f566f00, 0x6, 0xc0105e9980?})
	go/types/check.go:410 +0x79f
go/types.(*Checker).checkFiles(0xc00b95a960, {0xc00f566f00?, 0x6edd1b?, 0x1530740?})
	go/types/check.go:483 +0x18a
go/types.(*Checker).Files(0x1489d00?, {0xc00f566f00?, 0xc0105aaae0?, 0x5?})
	go/types/check.go:452 +0x75
github.com/golangci/golangci-lint/v2/pkg/goanalysis.(*loadingPackage).loadFromSource(0xc002991c80, 0x2)
	github.com/golangci/golangci-lint/v2/pkg/goanalysis/runner_loadingpackage.go:207 +0x731
github.com/golangci/golangci-lint/v2/pkg/goanalysis.(*loadingPackage).loadImportedPackageWithFacts(0xc002991c80, 0x2)
	github.com/golangci/golangci-lint/v2/pkg/goanalysis/runner_loadingpackage.go:367 +0x3f6
github.com/golangci/golangci-lint/v2/pkg/goanalysis.(*loadingPackage).loadWithFacts(0x456e89?, 0xc000076808?)
	github.com/golangci/golangci-lint/v2/pkg/goanalysis/runner_loadingpackage.go:312 +0x128
github.com/golangci/golangci-lint/v2/pkg/goanalysis.(*loadingPackage).analyze(0xc002991c80, {0x1b7dde8, 0xc0028fe320}, 0xc002958770, 0x2, 0xc0029127e0)
	github.com/golangci/golangci-lint/v2/pkg/goanalysis/runner_loadingpackage.go:80 +0x115
github.com/golangci/golangci-lint/v2/pkg/goanalysis.(*loadingPackage).analyzeRecursive.func1()
	github.com/golangci/golangci-lint/v2/pkg/goanalysis/runner_loadingpackage.go:61 +0x20e
sync.(*Once).doSlow(0x0?, 0xc002e72738?)
	sync/once.go:78 +0xab
sync.(*Once).Do(...)
	sync/once.go:69
github.com/golangci/golangci-lint/v2/pkg/goanalysis.(*loadingPackage).analyzeRecursive(0x0?, {0x1b7dde8?, 0xc0028fe320?}, 0x0?, 0x0?, 0xc002e727d0?)
	github.com/golangci/golangci-lint/v2/pkg/goanalysis/runner_loadingpackage.go:45 +0x59
github.com/golangci/golangci-lint/v2/pkg/goanalysis.(*loadingPackage).analyzeRecursive.func1.1(0x0?)
	github.com/golangci/golangci-lint/v2/pkg/goanalysis/runner_loadingpackage.go:53 +0x30
created by github.com/golangci/golangci-lint/v2/pkg/goanalysis.(*loadingPackage).analyzeRecursive.func1 in goroutine 4716
	github.com/golangci/golangci-lint/v2/pkg/goanalysis/runner_loadingpackage.go:52 +0xd4

@iamar7
Copy link
Member Author

iamar7 commented Sep 4, 2025

/run pipeline

Copy link
Contributor

@ocofaigh ocofaigh left a comment

Choose a reason for hiding this comment

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

@iamar7 Did you reach out to IAM provider team looking for guidance on how to migrate to the new property without a breaking change? We need to find out a way to prevent this destroy:

Address: module.trusted_profile.ibm_iam_trusted_profile_policy.policy["tp-complete-7pm-profile-0"]
        	            	Actions: [delete create]

I do not approve with the skipping of this upgrade test without a migration path to prevent destroy

@ocofaigh
Copy link
Contributor

ocofaigh commented Sep 9, 2025

The provider team have confirmed they are going to release a patch release that would prevent this being a breaking change.

Copy link
Contributor

@ocofaigh ocofaigh left a comment

Choose a reason for hiding this comment

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

Latest provider should have this fix - can we try?

@iamar7
Copy link
Member Author

iamar7 commented Oct 13, 2025

Latest provider should have this fix - can we try?

As per this comment, for trusted profile provider is yet to raise a PR.

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.

3 participants