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(lb): add lb beta resource #278

Merged
merged 7 commits into from
Oct 17, 2019
Merged

feat(lb): add lb beta resource #278

merged 7 commits into from
Oct 17, 2019

Conversation

jerome-quere
Copy link
Contributor

No description provided.

@@ -192,3 +195,40 @@ func TestGetRandomName(t *testing.T) {
name := getRandomName("test")
assert.True(t, strings.HasPrefix(name, "tf-test-"))
}

var IPv4Regexp = regexp.MustCompile("([0-9]{1,3}.){3}[0-9]{1,3}")
Copy link
Contributor

Choose a reason for hiding this comment

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

}

func testCheckResourceAttrUUID(name string, key string) resource.TestCheckFunc {
return testCheckResourceAttrRegex(name, key, UUIDRegex)
Copy link
Contributor

Choose a reason for hiding this comment

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

Optional: true,
Description: "Array of tags to associate with the load-balancer",
},
"ips": {
Copy link
Contributor

Choose a reason for hiding this comment

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

how do we add an IP?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IP is computed for now when the will allow IP previsioning before we will have a instance style attach/detach paradigm. As this will break soon i remove list for now


func resourceScalewayLbLbBeta() *schema.Resource {
return &schema.Resource{
Create: resourceScalewayLbLbBetaCreate,
Copy link
Contributor

Choose a reason for hiding this comment

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

Duplicate LbLb in the name (same for Read, Update and Delete)

website/docs/r/lb_lb_beta.html.markdown Outdated Show resolved Hide resolved
},
SchemaVersion: 0,
Timeouts: &schema.ResourceTimeout{
Create: &BaremetalServerResourceTimeout,
Copy link
Contributor

Choose a reason for hiding this comment

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

LbResourceTimeout

scaleway/resource_lb_lb_beta.go Outdated Show resolved Hide resolved
scaleway/provider.go Outdated Show resolved Hide resolved
scaleway/resource_lb_lb_beta.go Outdated Show resolved Hide resolved
}

if d.HasChange("name") || d.HasChange("tags") {

Copy link
Contributor

Choose a reason for hiding this comment

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

remove newline

err = lbAPI.DeleteLb(&lb.DeleteLbRequest{
Region: region,
LbID: ID,
// This parameter will probably be breaking change when ip pre reservation will exist.
Copy link
Contributor

Choose a reason for hiding this comment

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

IP

website/docs/r/lb_lb_beta.html.markdown Outdated Show resolved Hide resolved
Copy link
Contributor

@QuentinBrosse QuentinBrosse left a comment

Choose a reason for hiding this comment

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

LGTM

},
"ip_id": {
Type: schema.TypeString,
Computed: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

  • Need a Description

},
"ip_address": {
Type: schema.TypeString,
Computed: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

  • Need a Description

Copy link
Contributor

@kindermoumoute kindermoumoute left a comment

Choose a reason for hiding this comment

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

LGTM

@ghost ghost added dependencies size/XXL and removed size/XL labels Oct 17, 2019
@jerome-quere jerome-quere merged commit f8d9602 into scaleway:master Oct 17, 2019
@QuentinBrosse QuentinBrosse mentioned this pull request Oct 21, 2019
17 tasks
@jerome-quere
Copy link
Contributor Author

Linked to #294

@jerome-quere jerome-quere deleted the lb branch November 19, 2019 10:33
@remyleone remyleone added the load-balancer Load-balancer issues, bugs and feature requests label Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies documentation load-balancer Load-balancer issues, bugs and feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants