Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

add ocm_cluster_rosa_classic data source to get cluster id/name, stat… #78

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vamsinm
Copy link

@vamsinm vamsinm commented Jan 27, 2023

add ocm_cluster_rosa_classic data source to get cluster id/name, state and version of existing cluster

@bardielle
Copy link
Collaborator

@vamsinm this should be covered as part of terraform import command...

@vamsinm
Copy link
Author

vamsinm commented Feb 8, 2023

@bardielle can you please elaborate? it does not make sense to run import command in to terraform state just to be able to lookup. any reservations why we can not have data source?

"name": {
Description: "Name of the cluster.",
Type: types.StringType,
Computed: true,
Copy link
Collaborator

Choose a reason for hiding this comment

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

it should be also an optional attribute

"id": {
Description: "Unique identifier of the cluster.",
Type: types.StringType,
Computed: true,
Copy link
Collaborator

Choose a reason for hiding this comment

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

it should be also an optional attribute

return
}

func (s *ClusterRosaClassicDataSource) Read(ctx context.Context, request tfsdk.ReadDataSourceRequest,
Copy link
Collaborator

Choose a reason for hiding this comment

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

All clusters have those attributes right? Any reason to call it RosaClassic?

Also, this is confusing I think something like ClusterStateDataSource might be more appropriate.
What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@vamsinm, please open the PR in the new repository - https://github.com/terraform-redhat/terraform-provider-ocm
This repository soon would be archived

@bardielle
Copy link
Collaborator

@vamsinm This repository is deprecated, please open the same PR in the new repository - https://github.com/terraform-redhat/terraform-provider-ocm

@bardielle bardielle closed this Feb 22, 2023
@bardielle bardielle reopened this Feb 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants