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: securitygroup name_prefix #4167

Merged
merged 1 commit into from
Dec 9, 2015

Conversation

stack72
Copy link
Contributor

@stack72 stack72 commented Dec 4, 2015

Fixes #4152

Adding the ability to generate a securitygroup name-prefix

make testacc TEST=./builtin/providers/aws TESTARGS='-run=AWSSecurityGroup_' 2>~/tf.log
go generate ./...
TF_ACC=1 go test ./builtin/providers/aws -v -run=AWSSecurityGroup_ -timeout 90m
=== RUN   TestAccAWSSecurityGroup_namePrefix
--- PASS: TestAccAWSSecurityGroup_namePrefix (2.22s)

value := v.(string)
if len(value) > 100 {
errors = append(errors, fmt.Errorf(
"%q cannot be longer than 100 characters, name is limited to 255", k))
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 error message is confusing, since we don't specify what 255 actually is. Some people will figure it out, but I don't think it adds anything. The API says the limit is 255 characters as well, so I'm not sure why we error if the length is over 100 (unless I'm misunderstanding something about Go's len function)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm just trying a punt in the dark and using a 100 character limit for the name_prefix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@catsby ^^

Copy link
Contributor

Choose a reason for hiding this comment

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

ah, I see, the 255 is the combination of the two, my bad 😆

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@catsby anything you want done with this? or can it be merged?

@catsby
Copy link
Contributor

catsby commented Dec 4, 2015

1 note on the error message, otherwise it looks good

@catsby catsby added enhancement waiting-response An issue/pull request is waiting for a response from the community provider/aws labels Dec 4, 2015
@jen20 jen20 removed the waiting-response An issue/pull request is waiting for a response from the community label Dec 8, 2015
@catsby
Copy link
Contributor

catsby commented Dec 9, 2015

Sorry for the hold up, this looks good!

catsby added a commit that referenced this pull request Dec 9, 2015
@catsby catsby merged commit 9cc5e52 into hashicorp:master Dec 9, 2015
@ghost
Copy link

ghost commented Apr 29, 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 29, 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.

Request: add name_prefix to AWS Security Groups
4 participants