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

Bugfix: Populate missing name/id attributes in apstra_datacenter_system data source #364

Merged
merged 1 commit into from
Sep 27, 2023

Conversation

chrismarget-j
Copy link
Collaborator

@chrismarget-j chrismarget-j commented Sep 26, 2023

The apstra_datacenter_system takes either name or id as input and populates system details in an object called attributes.

The attributes object has both name and id inside.

Prior to this PR, nothing was populating the top-level (input) name or id other than the user. One of those two fields (whichever the user didn't use) would always be Null when the data source returned.

This PR ensures that the top-level name and id fields are both always populated making it safe for the user to refer to data.apstra_datacenter_system.<name>.id, rather than data.apstra_datacenter_system.<name>.attributes.id

Also, the ReadFromApi() method has been renamed AttributesFromApi() to make it clear that only the attributes object is being populated.

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.

2 participants