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(vrack): add resource ovh_vrack_dedicated_cloud_datacenter #908

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

Conversation

dlaweb
Copy link

@dlaweb dlaweb commented Mar 14, 2025

Description

Add resource ovh_vrack_dedicated_cloud_datacenter

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (improve existing resource(s) or datasource(s))
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A: make testacc TESTARGS="-run TestAccVrackDedicatedCloudDatacenter_basic"

Test Configuration:

  • Terraform version: terraform version: Terraform vx.y.z
  • Existing HCL configuration you used:
resource "ovh_vrack_dedicated_cloud_datacenter" "vrack-dedicatedCloudDatacenter" {
    service_name              = "<vRack service name>"
    datacenter                   = "<Dedicated Cloud Datacenter service name>"
}

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or issues
  • I have added acceptance tests that prove my fix is effective or that my feature works
  • New and existing acceptance tests pass locally with my changes
  • I ran succesfully go mod vendor if I added or modify go.mod file

@dlaweb dlaweb force-pushed the add-vrack-dedicatedCloudDatacenter branch 2 times, most recently from 0e8944e to 5e4a66d Compare March 19, 2025 07:59
@dlaweb dlaweb marked this pull request as ready for review March 19, 2025 07:59
@dlaweb dlaweb requested a review from a team as a code owner March 19, 2025 07:59
@dlaweb dlaweb force-pushed the add-vrack-dedicatedCloudDatacenter branch from 5e4a66d to bc10dad Compare March 21, 2025 11:05
resource "ovh_vrack_dedicated_cloud_datacenter" "vrack-dedicatedCloudDatacenter" {
service_name = "<vRack service name>"
datacenter = "<Dedicated Cloud Datacenter service name>"
target_service_name = "<vRack target service name>"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
target_service_name = "<vRack target service name>"
target_service_name = "<vRack target service name>"

Move a Dedicated Cloud Datacenter to a vrack.

## Example Usage

Copy link
Contributor

Choose a reason for hiding this comment

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

you should mention before this example that the resource cannot be created and needs to be imported first. I know the information is already in the ## Import section, but a paragraph starting with ~> would be more visible.

return nil
}

func TestAccVrackDedicatedCloudDatacenter_basic(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure this test works ? I think ImportState and other import-related configs are missing from your test step since resource cannot be created

return
}

resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root("service_name"), splits[0])...)
Copy link
Contributor

Choose a reason for hiding this comment

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

can be removed

Description: "Your dedicatedCloud name",
MarkdownDescription: "Your dedicatedCloud name",
},
"vrack": schema.StringAttribute{
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this field is useless now, it can be removed

},
"target_service_name": schema.StringAttribute{
CustomType: ovhtypes.TfStringType{},
Optional: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Optional: true,
Computed: true,

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