Skip to content

[Datasource] [Resource] Standardize Arg_CloudInstanceID argument across all data source and resource #238

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

Closed
wants to merge 1 commit into from

Conversation

ismirlia
Copy link
Collaborator

@ismirlia ismirlia commented May 16, 2025

There were a couple of data sources that did not have the validation.NoZeroValues check that is required, and force new was added to the resources. The resources need force new on this argument because a user could accidentally update that field and think it does something when in reality it just messes up the state. Data sources don't need the value because data sources don't do updates.

--- PASS: TestAccIBMPIKey_basic (11.26s)
PASS

@ismirlia ismirlia requested a review from Alexander-Kita May 16, 2025 17:56
@ismirlia ismirlia changed the title Standardize Arg_CloudInstanceID argument across all data source and resource [Datasource] [Resource] Standardize Arg_CloudInstanceID argument across all data source and resource May 16, 2025
@Alexander-Kita
Copy link
Collaborator

I do not think ForceNew needs to be specified on datasources, we should look into that

@ismirlia
Copy link
Collaborator Author

ok, so after playing around with it makes sense to only have it in the resources. In the resources you could accidentally update the pi_cloud_instance_id and think that does something. It doesn't technically break anything or at least it doesn't in network resource because the argument for pi_cloud_instance_id is only used in creation and not in update or reading. It just messes up the state if you are relying on that value, so adding force new to pi_cloud_instance_id in that case will force you to recreate the resource in another workspace which is the correct behavior if you are changing that.

…esource

There were a couple of data sources that did not have the
validation.NoZeroValues check that is required, and force new
was added to the resources. The resources need force new on
this argument because a user could accidentally update that
field and think it does something when in reality it just
messes up the state. Data sources don't need the value
because data sources don't do updates.
@ismirlia ismirlia force-pushed the force-new-cloud-instance-id branch from 4934717 to 8d105ff Compare May 16, 2025 20:02
@ismirlia
Copy link
Collaborator Author

Opened IBM-Cloud#6249, closing this one

@ismirlia ismirlia closed this May 19, 2025
@yussufsh yussufsh deleted the force-new-cloud-instance-id branch June 19, 2025 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants