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

feat: accept entity names as inputs for several resources #194

Merged
merged 5 commits into from
Jun 28, 2024

Conversation

spacegospod
Copy link
Contributor

@spacegospod spacegospod commented Jun 21, 2024

Summary of Pull Request

Accepting entity identifiers as inputs is convenient when these entities are managed by Terraform but not so much when they are created externally.

I'm modifying the resource schemas for hosts, clusters and edge clusters so that they accept network pool names, domain names and compute cluster names respectively in addition to their IDs.

Setting values for both attributes at the same time is not allowed and will result in an explicit error.

Type of Pull Request

  • This is a bug fix.
  • This is an enhancement or feature.
  • This is a code style/formatting update.
  • This is a documentation update.
  • This is a refactoring update.
  • This is a chore update
  • This is something else.
    Please describe:

Related to Existing Issues

Closes #91
Closes #191
Closes #193

Test and Documentation Coverage

Since this change introduces new API calls I've added additional test cases or modified existing ones where appropriate
TestAccResourceVcfClusterCreate -> modified to use domain name. There are other tests for this resource that still use the ID.
TestAccResourceEdgeCluster_basic -> new test that uses the new attribute for compute cluster name. This one doubles as a test for the minimum set of inputs for this resource.
TestAccResourceVcfHost_networkPoolName -> new test

For bug fixes or features:

  • Tests have been completed.
  • Documentation has been added/updated.

Breaking Changes?

  • Yes, there are breaking changes.
  • No, there are no breaking changes.

Copy link
Contributor

@dimitarproynov dimitarproynov left a comment

Choose a reason for hiding this comment

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

Stellar!

Copy link
Contributor

@tenthirtyam tenthirtyam left a comment

Choose a reason for hiding this comment

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

Looos good! I'll swish and merge for you today and apply the desired conventional commits structure.

@tenthirtyam tenthirtyam changed the title Accept entity names as inputs for several resources feat: accept entity names as inputs for several resources Jun 28, 2024
@tenthirtyam tenthirtyam merged commit 926cdd9 into main Jun 28, 2024
10 checks passed
@tenthirtyam tenthirtyam deleted the feature/name-vs-id branch June 28, 2024 16:08
@vmware vmware locked as resolved and limited conversation to collaborators Jun 29, 2024
@tenthirtyam tenthirtyam removed the needs-review Needs Review label Jul 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Documentation provider Provider
Projects
None yet
3 participants