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

provider/aws: Add support for aws_lightsail_static_ip #13175

Merged
merged 1 commit into from
Mar 30, 2017

Conversation

radeksimko
Copy link
Member

@radeksimko radeksimko commented Mar 29, 2017

Related: #10447

I'll submit aws_lightsail_static_ip_attachment too and that should hopefully allow us to close the mentioned issue and satisfy Lightsail users for a while.

There's a potential for a few more resources based on the current API, but I'd close that issue anyway, otherwise it will have no end. People can always submit PRs for those if they wish.

  • aws_lightsail_domain_entry
  • aws_lightsail_public_port

Test plan

make testacc TEST=./builtin/providers/aws TESTARGS='-run=AWSLightsailStaticIp'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/29 21:23:40 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=AWSLightsailStaticIp -timeout 120m
=== RUN   TestAccAWSLightsailStaticIp_basic
--- PASS: TestAccAWSLightsailStaticIp_basic (19.12s)
=== RUN   TestAccAWSLightsailStaticIp_disappears
--- PASS: TestAccAWSLightsailStaticIp_disappears (13.50s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	32.662s

Copy link
Contributor

@stack72 stack72 left a comment

Choose a reason for hiding this comment

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

@radeksimko LGTM pending 1 small question :)


name := d.Get("name").(string)
log.Printf("[INFO] Deleting Lightsail Static IP: %q", name)
out, err := conn.ReleaseStaticIp(&lightsail.ReleaseStaticIpInput{
Copy link
Contributor

Choose a reason for hiding this comment

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

If the static IP is in use by an instance, will this release API call work? Or will it fail?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good question, I just tested this situation and the releasing just succeeded. Admittedly I'd expect and like it to fail (and implement something like force_destroy (bool) to override it), but there isn't much we can do about this as that's how the API works.

Copy link
Contributor

Choose a reason for hiding this comment

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

In that case, LGTM :)

@radeksimko radeksimko merged commit 7d8a6f8 into master Mar 30, 2017
@radeksimko radeksimko deleted the f-lightsail-static-ip branch March 30, 2017 13:59
@radeksimko radeksimko mentioned this pull request Mar 31, 2017
@ghost
Copy link

ghost commented Apr 14, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants