-
Notifications
You must be signed in to change notification settings - Fork 671
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
Conversation
|
||
func ResourceIBMIamAccessTag() *schema.Resource { | ||
return &schema.Resource{ | ||
Create: resourceIBMIamAccessTagCreate, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you upgrade the resource to use Context
https://pkg.go.dev/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema#CreateContextFunc
There was a problem hiding this comment.
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
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)) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was service
tag type removed
There was a problem hiding this comment.
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.
All the above changes have been addresses.
|
…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
…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
…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 --------- ---------
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
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
Community Note
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 theibm_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 #5566Test about the
ibm_iam_access_tag
terraform resource:We used the
-count=1
flag to avoid the usage of the case.