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

tests/provider: Fix hardcoded ARN (Route53) #15746

Merged
merged 1 commit into from
Oct 22, 2020
Merged

Conversation

YakDriver
Copy link
Member

@YakDriver YakDriver commented Oct 20, 2020

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

Relates #15662

Release note for CHANGELOG:

NONE

Output from acceptance testing (GovCloud):

--- FAIL: TestAccAWSRoute53QueryLog_basic (0.42s)

***Failure is preexisting & unrelated, tracked in separate issue #15737.

Output from acceptance testing (commercial):

--- PASS: TestAccAWSRoute53QueryLog_basic (55.03s)

@YakDriver YakDriver requested a review from a team October 20, 2020 17:25
@ghost ghost added size/XS Managed by automation to categorize the size of a PR. service/route53 Issues and PRs that pertain to the route53 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Oct 20, 2020
@YakDriver YakDriver added the partition/aws-us-gov Pertains to the aws-us-gov partition. label Oct 20, 2020
@bill-rich
Copy link
Contributor

I'm getting the following when I run the test:

    resource_aws_route53_query_log_test.go:84: Step 1/2 error: After applying this test step, the plan was not empty.
        stdout:
        
        
        An execution plan has been generated and is shown below.
        Resource actions are indicated with the following symbols:
         <= read (data resources)
        
        Terraform will perform the following actions:
        
          # data.aws_iam_policy_document.test will be read during apply
          # (config refers to values not yet known)
         <= data "aws_iam_policy_document" "test"  {
                id      = "1584671853"
                json    = jsonencode(
                    {
                        Statement = [
                            {
                                Action    = [
                                    "logs:PutLogEvents",
                                    "logs:CreateLogStream",
                                ]
                                Effect    = "Allow"
                                Principal = {
                                    Service = "route53.amazonaws.com"
                                }
                                Resource  = "arn:aws:logs:*:*:log-group:/aws/route53/*"
                                Sid       = ""
                            },
                        ]
                        Version   = "2012-10-17"
                    }
                )
                version = "2012-10-17"
        
                statement {
                    actions       = [
                        "logs:CreateLogStream",
                        "logs:PutLogEvents",
                    ]
                    effect        = "Allow"
                    not_actions   = []
                    not_resources = []
                    resources     = [
                        "arn:aws:logs:*:*:log-group:/aws/route53/*",
                    ]
        
                    principals {
                        identifiers = [
                            "route53.amazonaws.com",
                        ]
                        type        = "Service"
                    }
                }
            }
        
        Plan: 0 to add, 0 to change, 0 to destroy.
--- FAIL: TestAccAWSRoute53QueryLog_basic (48.92s)

@YakDriver YakDriver force-pushed the t-gov-hardarn-route53 branch from 23de860 to 6477a26 Compare October 21, 2020 21:54
@YakDriver
Copy link
Member Author

YakDriver commented Oct 21, 2020

@bill-rich That's very strange. I've ran it 4 times, before and after a rebase, 2X in commercial and 2X in commercial alternate, and it always succeeds. I'm also running it in team city to make sure. I wonder if you caught it while a sweep was running?

Commercial alternate:

--- PASS: TestAccAWSRoute53QueryLog_basic (43.86s)
--- PASS: TestAccAWSRoute53QueryLog_basic (42.91s)

Commercial:

--- PASS: TestAccAWSRoute53QueryLog_basic (42.36s)
--- PASS: TestAccAWSRoute53QueryLog_basic (44.31s)

TeamCity (commercial alternate):

--- PASS: TestAccAWSRoute53QueryLog_basic (53.89s)

@bill-rich
Copy link
Contributor

@YakDriver That is really strange. Its still happening for me, but it must be something on my end. Thanks for checking it on TC also. I got a pass there also. I'll try and figure out what strangeness I have that is causing it.

@YakDriver YakDriver added this to the v3.12.0 milestone Oct 22, 2020
@YakDriver YakDriver merged commit 79af2c2 into master Oct 22, 2020
@YakDriver YakDriver deleted the t-gov-hardarn-route53 branch October 22, 2020 18:21
@ghost
Copy link

ghost commented Oct 22, 2020

This has been released in version 3.12.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 for triage. Thanks!

@ghost
Copy link

ghost commented Nov 22, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Nov 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
partition/aws-us-gov Pertains to the aws-us-gov partition. service/route53 Issues and PRs that pertain to the route53 service. size/XS 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.

2 participants