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

Deprecated ibm_resource_access_tag and replaced it with ibm_iam_access_tag. Fixed 5566 too. #5567

Merged
merged 9 commits into from
Sep 11, 2024

Conversation

luiof
Copy link
Contributor

@luiof luiof commented Aug 21, 2024

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates OR Closes #5566
Relates OR Closes #5522

This PR addresses #5522 and #5566

The ibm_resource_access_tag terraform resource has been deprecated and replaced with the ibm_iam_access_tag terraform resource. We just renamed it with the new name following the decision here: #5522 (comment)

With this PR we fixed the #5566 too.
Reworked the tests in order to use a resource that requires less time to be provisioned.

Output from acceptance testing:

Test about the fix in the ibm_resource_tag terraform resource about #5566

make testacc TEST=./ibm/service/globaltagging TESTARGS='-run=TestAccResourceTag_Basic -count=1'
=== RUN   TestAccResourceTag_Basic
--- PASS: TestAccResourceTag_Basic (76.64s)
PASS
ok      github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/globaltagging   78.420s

make testacc TEST=./ibm/service/globaltagging TESTARGS='-run=TestAccResourceTag_Wait -count=1'
=== RUN   TestAccResourceTag_Wait
--- PASS: TestAccResourceTag_Wait (70.54s)
PASS
ok      github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/globaltagging   72.340s

make testacc TEST=./ibm/service/globaltagging TESTARGS='-run=TestAccResourceTag_replace_Basic -count=1'
=== RUN   TestAccResourceTag_replace_Basic
--- PASS: TestAccResourceTag_replace_Basic (76.12s)
PASS
ok      github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/globaltagging   77.636s
...

Test about the ibm_iam_access_tag terraform resource:

make testacc TEST=./ibm/service/globaltagging TESTARGS='-run=TestAccIamAccessTag_Basic -count=1''
=== RUN   TestAccIamAccessTag_Basic
--- PASS: TestAccIamAccessTag_Basic (30.05s)
PASS
ok      github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/globaltagging   31.540s

make testacc TEST=./ibm/service/globaltagging  TESTARGS='-run=TestAccIamAccessTag_Usage -count=1'
=== RUN   TestAccIamAccessTag_Usage
--- PASS: TestAccIamAccessTag_Usage (101.26s)
PASS
ok      github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/globaltagging   102.753s

We used the -count=1 flag to avoid the usage of the case.

website/docs/r/iam_access_tag.html.markdown Outdated Show resolved Hide resolved
website/docs/r/iam_access_tag.html.markdown Outdated Show resolved Hide resolved
website/docs/r/iam_access_tag.html.markdown Show resolved Hide resolved

func ResourceIBMIamAccessTag() *schema.Resource {
return &schema.Resource{
Create: resourceIBMIamAccessTagCreate,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The changes have been pushed. Can you re-check? Thank you

ibm/service/globaltagging/resource_ibm_iam_access_tag.go Outdated Show resolved Hide resolved
if len(errMap) > 0 {
output, err := json.MarshalIndent(errMap, "", " ")
log.Printf("err is %s", err)
return fmt.Errorf("[ERROR] Error while creating access tag(%s) : %s", tagName, string(output))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you upgrade the error logging mechanism as per new error framework
communicated recently Terraform slack channels
https://ibm-cloudplatform.slack.com/archives/C53NF5MB4/p1722606201652699

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The changes have been pushed. Can you re-check? Thank you

@@ -45,7 +45,7 @@ Review the argument references that you can specify for your resource.

- `resource_id` - (Required, String) The CRN of the resource on which the tags is be attached.
- `resource_type` - (Optional, String) The resource type on which the tags should be attached.
- `tag_type` - (Optional, String) Type of the tag. Supported values are: `user`, `service`, or `access`. The default value is user.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why was servicetag type removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We decided to remove the service tag due to the fact that the service tag is used in IBM internally only and only a little set of users can use it. So it should not be exposed in the documentation.

@luiof
Copy link
Contributor Author

luiof commented Sep 9, 2024

All the above changes have been addresses.
Tests:

make testacc TEST=./ibm/service/globaltagging TESTARGS='-run=TestAccIamAccessTag_Basic -count=1'

=== RUN   TestAccIamAccessTag_Basic
--- PASS: TestAccIamAccessTag_Basic (31.34s)
PASS
ok      github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/globaltagging   32.992s
make testacc TEST=./ibm/service/globaltagging  TESTARGS='-run=TestAccIamAccessTag_Usage -count=1'
=== RUN   TestAccIamAccessTag_Usage
--- PASS: TestAccIamAccessTag_Usage (111.97s)
PASS
ok      github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/globaltagging   113.586s

@hkantare hkantare merged commit 52fab34 into IBM-Cloud:master Sep 11, 2024
1 check passed
srikant-sahu pushed a commit to srikant-sahu/terraform-provider-ibm that referenced this pull request Sep 24, 2024
…s_tag. Fixed 5566 too. (IBM-Cloud#5567)

* Deprecated ibm_resource_access_tag in favor of ibm_iam_access_tag

* changes

* Fix

* Changed resource to speed up tests

* fix

* PR changes

* PR changes
Ramya-c4 pushed a commit to Ramya-c4/terraform-provider-ibm that referenced this pull request Sep 26, 2024
…s_tag. Fixed 5566 too. (IBM-Cloud#5567)

* Deprecated ibm_resource_access_tag in favor of ibm_iam_access_tag

* changes

* Fix

* Changed resource to speed up tests

* fix

* PR changes

* PR changes
Ramya-c4 pushed a commit to Ramya-c4/terraform-provider-ibm that referenced this pull request Sep 27, 2024
…s_tag. Fixed 5566 too. (IBM-Cloud#5567)

* Deprecated ibm_resource_access_tag in favor of ibm_iam_access_tag

* changes

* Fix

* Changed resource to speed up tests

* fix

* PR changes

* PR changes

SM New error formatting + crypto_key label name changes (IBM-Cloud#5562)

* SC addition

* SC addition

* SC addition

* update function updated

* SC unit tests added

* SC unit tests added

* d

* tests fixes

* tests fixes

* update sdk

* .secrets.baseline update

* .secrets.baseline update

* .secrets.baseline update

* Update sm_service_credentials_secret_metadata.html.markdown

* bugs fixes

* bugs fixes

* bugs fixes

* docs bugs fixes

* preferred_chain added for public cert lets encrypt configuration

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* preferred chain docs update

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* fix public cert bug

* update docs

* reordering bug in alt_names

* name regex fix in docs

* imported cert bug fix

* crypto_key addition

* crypto_key addition

* crypto_key addition

* crypto_key addition

* rejections fixes

* rejections fixes

* rejections fixes

* rejections fixes

* rejections fixes

* test label name changed

* test label name changed

* error formating update

* go sdk version update

---------

Co-authored-by: Yonathan-Yellin <[email protected]>
Co-authored-by: Avi Ribchinsky <[email protected]>
Co-authored-by: Tatyana <[email protected]>
Co-authored-by: Idan Adar <[email protected]>

Deprecating alias and bindings APIs and schema items (IBM-Cloud#5612)

* Deprecating alias and bindings APIs and schema items

Signed-off-by: arshabbir <[email protected]>

* Deprecating alias and bindings APIs and schema items

---------

Signed-off-by: arshabbir <[email protected]>

Add region parameter to logs-routing resources and data sources (IBM-Cloud#5634)

* Added region parameter to logs-routing resources and data sources

Signed-off-by: Ian Reyes <[email protected]>

* Fixed examples for logs-routing resources

---------

Signed-off-by: Ian Reyes <[email protected]>
Co-authored-by: Ian Reyes <[email protected]>

update(cloud-databases): Make Service Endpoints Required and send warning when public endpoints are in use (IBM-Cloud#5402)

Added support for reserved ip patch resource (IBM-Cloud#5603)

* Added support for ibm_is_subnet_reserved_ip_patch resource

* updated the name to optional

* Update is_subnet_reserved_ip_patch.html.markdown

fix(is_share): added empty check and moved source_share_crn outside (IBM-Cloud#5632)

discourage use of ibm_container_bind_service (IBM-Cloud#5588)

* discourage use of ibm_container_bind_service

Signed-off-by: Bence Vidosits <[email protected]>

* fix link

---------

Signed-off-by: Bence Vidosits <[email protected]>
Co-authored-by: Bence Vidosits <[email protected]>

updated resources, data source and documentation for Slack Direct destination support

Add test bucket endpoints (IBM-Cloud#5636)

* add changes for test bucket endpoints

* update code

---------

Co-authored-by: Deeksha Sharma <[email protected]>

Add support for Code Engine functions (IBM-Cloud#5596)

* Add support for Code Engine functions

* update .secrets.baseline

* remove unnecessary check

Fix the 5635 - The ibm_resource_tag now checks the response in the api tags calls (IBM-Cloud#5641)

* Deprecated ibm_resource_access_tag in favor of ibm_iam_access_tag

* changes

* Fix

* Changed resource to speed up tests

* fix

* PR changes

* PR changes

---------

---------
Ramya-c4 added a commit to Ramya-c4/terraform-provider-ibm that referenced this pull request Sep 27, 2024
Deprecated ibm_resource_access_tag and replaced it with ibm_iam_access_tag. Fixed 5566 too. (IBM-Cloud#5567)

* Deprecated ibm_resource_access_tag in favor of ibm_iam_access_tag

* changes

* Fix

* Changed resource to speed up tests

* fix

* PR changes

* PR changes

SM New error formatting + crypto_key label name changes (IBM-Cloud#5562)

* SC addition

* SC addition

* SC addition

* update function updated

* SC unit tests added

* SC unit tests added

* d

* tests fixes

* tests fixes

* update sdk

* .secrets.baseline update

* .secrets.baseline update

* .secrets.baseline update

* Update sm_service_credentials_secret_metadata.html.markdown

* bugs fixes

* bugs fixes

* bugs fixes

* docs bugs fixes

* preferred_chain added for public cert lets encrypt configuration

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* preferred chain docs update

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* fix public cert bug

* update docs

* reordering bug in alt_names

* name regex fix in docs

* imported cert bug fix

* crypto_key addition

* crypto_key addition

* crypto_key addition

* crypto_key addition

* rejections fixes

* rejections fixes

* rejections fixes

* rejections fixes

* rejections fixes

* test label name changed

* test label name changed

* error formating update

* go sdk version update

---------

Co-authored-by: Yonathan-Yellin <[email protected]>
Co-authored-by: Avi Ribchinsky <[email protected]>
Co-authored-by: Tatyana <[email protected]>
Co-authored-by: Idan Adar <[email protected]>

Deprecating alias and bindings APIs and schema items (IBM-Cloud#5612)

* Deprecating alias and bindings APIs and schema items

Signed-off-by: arshabbir <[email protected]>

* Deprecating alias and bindings APIs and schema items

---------

Signed-off-by: arshabbir <[email protected]>

Add region parameter to logs-routing resources and data sources (IBM-Cloud#5634)

* Added region parameter to logs-routing resources and data sources

Signed-off-by: Ian Reyes <[email protected]>

* Fixed examples for logs-routing resources

---------

Signed-off-by: Ian Reyes <[email protected]>
Co-authored-by: Ian Reyes <[email protected]>

update(cloud-databases): Make Service Endpoints Required and send warning when public endpoints are in use (IBM-Cloud#5402)

Added support for reserved ip patch resource (IBM-Cloud#5603)

* Added support for ibm_is_subnet_reserved_ip_patch resource

* updated the name to optional

* Update is_subnet_reserved_ip_patch.html.markdown

fix(is_share): added empty check and moved source_share_crn outside (IBM-Cloud#5632)

discourage use of ibm_container_bind_service (IBM-Cloud#5588)

* discourage use of ibm_container_bind_service

Signed-off-by: Bence Vidosits <[email protected]>

* fix link

---------

Signed-off-by: Bence Vidosits <[email protected]>
Co-authored-by: Bence Vidosits <[email protected]>

updated resources, data source and documentation for Slack Direct destination support

Add test bucket endpoints (IBM-Cloud#5636)

* add changes for test bucket endpoints

* update code

---------

Co-authored-by: Deeksha Sharma <[email protected]>

Add support for Code Engine functions (IBM-Cloud#5596)

* Add support for Code Engine functions

* update .secrets.baseline

* remove unnecessary check

Fix the 5635 - The ibm_resource_tag now checks the response in the api tags calls (IBM-Cloud#5641)

* Deprecated ibm_resource_access_tag in favor of ibm_iam_access_tag

* changes

* Fix

* Changed resource to speed up tests

* fix

* PR changes

* PR changes

---------

---------

Deprecating alias and bindings APIs and schema items (IBM-Cloud#5612)

---------

IAM Policy Assignment: S2S Policy Assignments ET and AG (IBM-Cloud#5624)

* IAM Policy Assignment: S2S Policy Assignments ET and AG

Signed-off-by: Alluri-Varma <[email protected]>

* resolving CVE's for EPAP

* IAM Policy Assignment: S2S Policy Assignments ET and AG

* IAM Policy Assignment: S2S Policy Assignments ET and AG

* IAM Policy Assignment: S2S Policy Assignments ET and AG

* IAM Policy Assignment: S2S Policy Assignments ET and AG

* IAM Policy Assignment: S2S Policy Assignments ET and AG

* IAM Policy Assignment: S2S Policy Assignments ET and AG

* IAM Policy Assignment: S2S Policy Assignments ET and AG

---------

Signed-off-by: Alluri-Varma <[email protected]>
Co-authored-by: Alluri-Varma <[email protected]>

migrattion of vpc-go-sdk to 0.58.0 (IBM-Cloud#5652)

* migration of vpc-go-sdk to 0.58.0

* make fmt changes
Ramya-c4 added a commit to Ramya-c4/terraform-provider-ibm that referenced this pull request Sep 27, 2024
Deprecated ibm_resource_access_tag and replaced it with ibm_iam_access_tag. Fixed 5566 too. (IBM-Cloud#5567)

* Deprecated ibm_resource_access_tag in favor of ibm_iam_access_tag

* changes

* Fix

* Changed resource to speed up tests

* fix

* PR changes

* PR changes

SM New error formatting + crypto_key label name changes (IBM-Cloud#5562)

* SC addition

* SC addition

* SC addition

* update function updated

* SC unit tests added

* SC unit tests added

* d

* tests fixes

* tests fixes

* update sdk

* .secrets.baseline update

* .secrets.baseline update

* .secrets.baseline update

* Update sm_service_credentials_secret_metadata.html.markdown

* bugs fixes

* bugs fixes

* bugs fixes

* docs bugs fixes

* preferred_chain added for public cert lets encrypt configuration

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* preferred chain docs update

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* fix public cert bug

* update docs

* reordering bug in alt_names

* name regex fix in docs

* imported cert bug fix

* crypto_key addition

* crypto_key addition

* crypto_key addition

* crypto_key addition

* rejections fixes

* rejections fixes

* rejections fixes

* rejections fixes

* rejections fixes

* test label name changed

* test label name changed

* error formating update

* go sdk version update

---------

Co-authored-by: Yonathan-Yellin <[email protected]>
Co-authored-by: Avi Ribchinsky <[email protected]>
Co-authored-by: Tatyana <[email protected]>
Co-authored-by: Idan Adar <[email protected]>

Deprecating alias and bindings APIs and schema items (IBM-Cloud#5612)

* Deprecating alias and bindings APIs and schema items

Signed-off-by: arshabbir <[email protected]>

* Deprecating alias and bindings APIs and schema items

---------

Signed-off-by: arshabbir <[email protected]>

Add region parameter to logs-routing resources and data sources (IBM-Cloud#5634)

* Added region parameter to logs-routing resources and data sources

Signed-off-by: Ian Reyes <[email protected]>

* Fixed examples for logs-routing resources

---------

Signed-off-by: Ian Reyes <[email protected]>
Co-authored-by: Ian Reyes <[email protected]>

update(cloud-databases): Make Service Endpoints Required and send warning when public endpoints are in use (IBM-Cloud#5402)

Added support for reserved ip patch resource (IBM-Cloud#5603)

* Added support for ibm_is_subnet_reserved_ip_patch resource

* updated the name to optional

* Update is_subnet_reserved_ip_patch.html.markdown

fix(is_share): added empty check and moved source_share_crn outside (IBM-Cloud#5632)

discourage use of ibm_container_bind_service (IBM-Cloud#5588)

* discourage use of ibm_container_bind_service

Signed-off-by: Bence Vidosits <[email protected]>

* fix link

---------

Signed-off-by: Bence Vidosits <[email protected]>
Co-authored-by: Bence Vidosits <[email protected]>

updated resources, data source and documentation for Slack Direct destination support

Add test bucket endpoints (IBM-Cloud#5636)

* add changes for test bucket endpoints

* update code

---------

Co-authored-by: Deeksha Sharma <[email protected]>

Add support for Code Engine functions (IBM-Cloud#5596)

* Add support for Code Engine functions

* update .secrets.baseline

* remove unnecessary check

Fix the 5635 - The ibm_resource_tag now checks the response in the api tags calls (IBM-Cloud#5641)

* Deprecated ibm_resource_access_tag in favor of ibm_iam_access_tag

* changes

* Fix

* Changed resource to speed up tests

* fix

* PR changes

* PR changes

---------

---------

Deprecating alias and bindings APIs and schema items (IBM-Cloud#5612)

---------

IAM Policy Assignment: S2S Policy Assignments ET and AG (IBM-Cloud#5624)

* IAM Policy Assignment: S2S Policy Assignments ET and AG

Signed-off-by: Alluri-Varma <[email protected]>

* resolving CVE's for EPAP

* IAM Policy Assignment: S2S Policy Assignments ET and AG

* IAM Policy Assignment: S2S Policy Assignments ET and AG

* IAM Policy Assignment: S2S Policy Assignments ET and AG

* IAM Policy Assignment: S2S Policy Assignments ET and AG

* IAM Policy Assignment: S2S Policy Assignments ET and AG

* IAM Policy Assignment: S2S Policy Assignments ET and AG

* IAM Policy Assignment: S2S Policy Assignments ET and AG

---------

Signed-off-by: Alluri-Varma <[email protected]>
Co-authored-by: Alluri-Varma <[email protected]>

migrattion of vpc-go-sdk to 0.58.0 (IBM-Cloud#5652)

* migration of vpc-go-sdk to 0.58.0

* make fmt changes

IAM Policy Assignment: S2S Policy Assignments ET and AG (IBM-Cloud#5624)

* IAM Policy Assignment: S2S Policy Assignments ET and AG

Signed-off-by: Alluri-Varma <[email protected]>

* resolving CVE's for EPAP

* IAM Policy Assignment: S2S Policy Assignments ET and AG

* IAM Policy Assignment: S2S Policy Assignments ET and AG

* IAM Policy Assignment: S2S Policy Assignments ET and AG

* IAM Policy Assignment: S2S Policy Assignments ET and AG

* IAM Policy Assignment: S2S Policy Assignments ET and AG

* IAM Policy Assignment: S2S Policy Assignments ET and AG

* IAM Policy Assignment: S2S Policy Assignments ET and AG

---------

Signed-off-by: Alluri-Varma <[email protected]>
Co-authored-by: Alluri-Varma <[email protected]>

migrattion of vpc-go-sdk to 0.58.0 (IBM-Cloud#5652)

* migration of vpc-go-sdk to 0.58.0

* make fmt 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
3 participants