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

Ec2host outpostarn #25464

Merged
merged 9 commits into from
Jun 18, 2022
Merged

Ec2host outpostarn #25464

merged 9 commits into from
Jun 18, 2022

Conversation

silvaalbert
Copy link
Contributor

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #25410

Output from acceptance testing:

$ make testacc TESTS='TestAccHost_outpost' PKG=ec2 TESTARGS=-short                    2 ✘  16s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccHost_outpost' -short -timeout 180m
=== RUN   TestAccHost_outpost
=== PAUSE TestAccHost_outpost
=== CONT  TestAccHost_outpost
--- PASS: TestAccHost_outpost (20.36s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	22.960s



$ make testacc TESTS='TestAccEC2HostDataSource_outpost' PKG=ec2 TESTARGS=-short         ✔  17s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccEC2HostDataSource_outpost' -short -timeout 180m
=== RUN   TestAccEC2HostDataSource_outpost
=== PAUSE TestAccEC2HostDataSource_outpost
=== CONT  TestAccEC2HostDataSource_outpost
--- PASS: TestAccEC2HostDataSource_outpost (16.52s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	18.959s

...

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. documentation Introduces or discusses updates to documentation. service/ec2 Issues and PRs that pertain to the ec2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/L Managed by automation to categorize the size of a PR. labels Jun 18, 2022
@github-actions github-actions bot added size/M Managed by automation to categorize the size of a PR. and removed size/L Managed by automation to categorize the size of a PR. labels Jun 18, 2022
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome @silvaalbert 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Jun 18, 2022
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

% make testacc TESTARGS='-run=TestAccEC2Host' PKG=ec2 ACCTEST_PARALLELISM=1
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 1  -run=TestAccEC2Host -timeout 180m
=== RUN   TestAccEC2HostDataSource_basic
=== PAUSE TestAccEC2HostDataSource_basic
=== RUN   TestAccEC2HostDataSource_filter
=== PAUSE TestAccEC2HostDataSource_filter
=== RUN   TestAccEC2Host_basic
=== PAUSE TestAccEC2Host_basic
=== RUN   TestAccEC2Host_disappears
=== PAUSE TestAccEC2Host_disappears
=== RUN   TestAccEC2Host_instanceFamily
=== PAUSE TestAccEC2Host_instanceFamily
=== RUN   TestAccEC2Host_tags
=== PAUSE TestAccEC2Host_tags
=== RUN   TestAccEC2Host_outpost
=== PAUSE TestAccEC2Host_outpost
=== CONT  TestAccEC2HostDataSource_basic
--- PASS: TestAccEC2HostDataSource_basic (15.85s)
=== CONT  TestAccEC2Host_instanceFamily
    ec2_host_test.go:78: Step 1/3 error: Error running apply: exit status 1
        
        Error: error allocating EC2 Host: HostLimitExceeded: The number of Dedicated hosts you've requested (1) would bring your total up to 1 for the specified group of instance types (c5). This exceeds your current limit of 2. If you've recently released Dedicated hosts, it may take some time for them to stop counting towards your limit. Try allocating your hosts again after a few minutes. Please visit http://aws.amazon.com/contact-us/ec2-request to request an adjustment to this limit.
        	status code: 400, request id: b9849a64-be9e-4642-a5e3-f3addc89bbef
        
          with aws_ec2_host.test,
          on terraform_plugin_test.tf line 11, in resource "aws_ec2_host" "test":
          11: resource "aws_ec2_host" "test" {
        
--- FAIL: TestAccEC2Host_instanceFamily (6.48s)
=== CONT  TestAccEC2Host_outpost
    acctest.go:1308: skipping since no Outposts found
--- SKIP: TestAccEC2Host_outpost (0.58s)
=== CONT  TestAccEC2Host_tags
--- PASS: TestAccEC2Host_tags (38.21s)
=== CONT  TestAccEC2Host_basic
--- PASS: TestAccEC2Host_basic (15.17s)
=== CONT  TestAccEC2Host_disappears
    ec2_host_test.go:55: Step 1/1 error: Error running apply: exit status 1
        
        Error: error allocating EC2 Host: HostLimitExceeded: The number of Dedicated hosts you've requested (1) would bring your total up to 3 for the specified group of instance types (a1). This exceeds your current limit of 2. If you've recently released Dedicated hosts, it may take some time for them to stop counting towards your limit. Try allocating your hosts again after a few minutes. Please visit http://aws.amazon.com/contact-us/ec2-request to request an adjustment to this limit.
        	status code: 400, request id: 70f57415-a5a7-464c-a642-4acc772f3c0d
        
          with aws_ec2_host.test,
          on terraform_plugin_test.tf line 11, in resource "aws_ec2_host" "test":
          11: resource "aws_ec2_host" "test" {
        
--- FAIL: TestAccEC2Host_disappears (5.65s)
=== CONT  TestAccEC2HostDataSource_filter
    ec2_host_data_source_test.go:50: Step 1/1 error: Error running apply: exit status 1
        
        Error: error allocating EC2 Host: HostLimitExceeded: The number of Dedicated hosts you've requested (1) would bring your total up to 3 for the specified group of instance types (a1). This exceeds your current limit of 2. If you've recently released Dedicated hosts, it may take some time for them to stop counting towards your limit. Try allocating your hosts again after a few minutes. Please visit http://aws.amazon.com/contact-us/ec2-request to request an adjustment to this limit.
        	status code: 400, request id: d939ded7-e812-4c7a-babf-70d3ecccbe30
        
          with aws_ec2_host.test,
          on terraform_plugin_test.tf line 11, in resource "aws_ec2_host" "test":
          11: resource "aws_ec2_host" "test" {
        
--- FAIL: TestAccEC2HostDataSource_filter (5.62s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	91.595s
FAIL
make: *** [testacc] Error 1

Failures are unrelated to this change.

@ewbankkit
Copy link
Contributor

% make semall
==> Running Semgrep checks locally (must have semgrep installed)...
Scanning 3982 files with 37 go rules.
  100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████|3982/3982 tasks

Some files were skipped or only partially analyzed.
  Scan was limited to files tracked by git.
  Scan skipped: 1613 files matching .semgrepignore patterns
  For a full list of skipped files, run semgrep with the --verbose flag.

Ran 37 rules on 3982 files: 0 findings.
If Semgrep missed a finding, please send us feedback to let us know!
  $ semgrep shouldafound --help

A new version of Semgrep is available. See https://semgrep.dev/docs/upgrading
Scanning 957 files with 199 go rules.
  100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████|957/957 tasks

Some files were skipped or only partially analyzed.
  Scan was limited to files tracked by git.
  Scan skipped: 1613 files matching .semgrepignore patterns
  For a full list of skipped files, run semgrep with the --verbose flag.

Ran 199 rules on 957 files: 0 findings.
If Semgrep missed a finding, please send us feedback to let us know!
  $ semgrep shouldafound --help

A new version of Semgrep is available. See https://semgrep.dev/docs/upgrading
Scanning 1078 files with 197 go rules.
  100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████|1078/1078 tasks

Some files were skipped or only partially analyzed.
  Scan was limited to files tracked by git.
  Scan skipped: 1613 files matching .semgrepignore patterns
  For a full list of skipped files, run semgrep with the --verbose flag.

Ran 198 rules on 1078 files: 0 findings.
If Semgrep missed a finding, please send us feedback to let us know!
  $ semgrep shouldafound --help

A new version of Semgrep is available. See https://semgrep.dev/docs/upgrading
Scanning 779 files with 194 go rules.
  100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████|779/779 tasks

Some files were skipped or only partially analyzed.
  Scan was limited to files tracked by git.
  Scan skipped: 1613 files matching .semgrepignore patterns
  For a full list of skipped files, run semgrep with the --verbose flag.

Ran 198 rules on 779 files: 0 findings.
If Semgrep missed a finding, please send us feedback to let us know!
  $ semgrep shouldafound --help

A new version of Semgrep is available. See https://semgrep.dev/docs/upgrading
Scanning 1104 files with 198 go rules.
  100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████|1104/1104 tasks

Some files were skipped or only partially analyzed.
  Scan was limited to files tracked by git.
  Scan skipped: 1613 files matching .semgrepignore patterns
  For a full list of skipped files, run semgrep with the --verbose flag.

Ran 198 rules on 1104 files: 0 findings.
If Semgrep missed a finding, please send us feedback to let us know!
  $ semgrep shouldafound --help

A new version of Semgrep is available. See https://semgrep.dev/docs/upgrading

@ewbankkit
Copy link
Contributor

@silvaalbert Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 171e75f into hashicorp:main Jun 18, 2022
@github-actions github-actions bot added this to the v4.20.0 milestone Jun 18, 2022
@github-actions
Copy link

This functionality has been released in v4.20.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 24, 2022
@justinretzolk justinretzolk added the partner Contribution from a partner. label May 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. partner Contribution from a partner. service/ec2 Issues and PRs that pertain to the ec2 service. size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add outpost_arn to aws_ec2_host resource/data lookup
4 participants