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

[Bug]: "aws_api_gateway_integration" keeps reporting 'connection_type = "INTERNET"' change for MOCK integrations #29090

Closed
mkielar opened this issue Jan 25, 2023 · 6 comments
Labels
bug Addresses a defect in current functionality. service/apigateway Issues and PRs that pertain to the apigateway service.

Comments

@mkielar
Copy link
Contributor

mkielar commented Jan 25, 2023

Terraform Core Version

1.3.1

AWS Provider Version

4.51.0

Affected Resource(s)

  • aws_api_gateway_integration

Expected Behavior

Terraform should not continously show MOCK type integrations as subject to change.

Actual Behavior

Regardless of which configuration option (see below) we use for the resource, terraform plan always shows this bit:

  # module.[REDACTED].module.api_gateway_private[0].module.dummy_resource.aws_api_gateway_integration.this will be updated in-place
  ~ resource "aws_api_gateway_integration" "this" {
      + connection_type      = "INTERNET"
        id                   = "agi-[REDACTED]-ANY"
        # (10 unchanged attributes hidden)
    }

Relevant Error/Panic Output Snippet

N/A

Terraform Configuration Files

Initially, we had this:

resource "aws_api_gateway_integration" "this" {
  rest_api_id = var.api_gateway_id
  resource_id = aws_api_gateway_resource.this.id
  http_method = aws_api_gateway_method.this.http_method

  type            = "MOCK"
}

Later, we changed it to this:

resource "aws_api_gateway_integration" "this" {
  rest_api_id = var.api_gateway_id
  resource_id = aws_api_gateway_resource.this.id
  http_method = aws_api_gateway_method.this.http_method

  type            = "MOCK"
  connection_type = "INTERNET"
}

In both cases, the output of terraform plan is the same - it shows the change on the connection_type attribute.

Steps to Reproduce

  1. Define aws_api_gateway_integration resource with MOCK type and no connection_type in HCL.
  2. Run terraform apply
  3. Run terraform plan and observe it wants to set connection_type to INTERNET
  4. Modify HCL to explicitely set connection_type to INTERNET, and run terraform apply
  5. Run terraform plan again and observe it still wants to set connection_type to INTERNET

Debug Output

N/A

Panic Output

N/A

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@mkielar mkielar added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Jan 25, 2023
@github-actions github-actions bot added the service/apigateway Issues and PRs that pertain to the apigateway service. label Jan 25, 2023
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@mkielar
Copy link
Contributor Author

mkielar commented Jan 25, 2023

OK, this may be the same as #28997, but the type used there is different.

@olhrabar
Copy link

olhrabar commented Jan 25, 2023

Have the same issue:

  ~ resource "aws_api_gateway_integration" "test" {
      + connection_type         = "INTERNET"
        id                      = "agi-test-test-test-test"
        # (13 unchanged attributes hidden)
    }

@starrago-illuminateed
Copy link

Same issue here:

~ resource "aws_api_gateway_integration" "test-auth-method-integration" {
+ connection_type = "INTERNET"
id = "agi-test-test-GET"
# (12 unchanged attributes hidden)
}

@justinretzolk
Copy link
Member

Hey y'all 👋 This was fixed with #29016, which will go out with version 4.52.0 later today. Given that, we'll go ahead and close this issue out. If you have issues after upgrading, please do open a new issue to let us know.

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/apigateway Issues and PRs that pertain to the apigateway service.
Projects
None yet
Development

No branches or pull requests

4 participants