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/resource/aws_imagebuilder_image_pipeline: Schedule Expression Test Failures #17396

Closed
bflad opened this issue Feb 2, 2021 · 11 comments · Fixed by #17666
Closed

tests/resource/aws_imagebuilder_image_pipeline: Schedule Expression Test Failures #17396

bflad opened this issue Feb 2, 2021 · 11 comments · Fixed by #17666
Assignees
Labels
service/imagebuilder Issues and PRs that pertain to the imagebuilder service. technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Milestone

Comments

@bflad
Copy link
Contributor

bflad commented Feb 2, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue 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 issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

The two aws_imagebuilder_image_pipeline resource acceptance tests that configure schedule expressions are currently failing:

=== CONT  TestAccAwsImageBuilderImagePipeline_Schedule_PipelineExecutionStartCondition
resource_aws_imagebuilder_image_pipeline_test.go:378: Step 1/3 error: Error running apply:
Error: error creating Image Builder Image Pipeline: InvalidParameterValueException: The value supplied for parameter 'schedule.scheduleExpression' is not valid. Invalid schedule expression. Details: Invalid CRON expression: error at position 9, details: Unexpected end of expression.
--- FAIL: TestAccAwsImageBuilderImagePipeline_Schedule_PipelineExecutionStartCondition (47.57s)

=== CONT  TestAccAwsImageBuilderImagePipeline_Schedule_ScheduleExpression
resource_aws_imagebuilder_image_pipeline_test.go:412: Step 1/3 error: Error running apply:
Error: error creating Image Builder Image Pipeline: InvalidParameterValueException: The value supplied for parameter 'schedule.scheduleExpression' is not valid. Invalid schedule expression. Details: Invalid CRON expression: error at position 9, details: Unexpected end of expression.
--- FAIL: TestAccAwsImageBuilderImagePipeline_Schedule_ScheduleExpression (43.82s)

The configuration needs to be updated, but at first glance the cron expressions that previously worked fine do match the AWS documentation.

Affected Resource(s)

  • aws_imagebuilder_image_pipeline

References

@bflad bflad added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. technical-debt Addresses areas of the codebase that need refactoring or redesign. service/imagebuilder Issues and PRs that pertain to the imagebuilder service. labels Feb 2, 2021
@bflad bflad added this to the Roadmap milestone Feb 2, 2021
@bflad bflad self-assigned this Feb 2, 2021
bflad added a commit that referenced this issue Feb 2, 2021
…ameterValueException

Reference: #17390

The Image Builder service in AWS Commercial is now performing additional validation on Distribution Configuration creation, presumably due to the launch of container distribution support:

```
=== CONT  TestAccAwsImageBuilderDistributionConfigurationDataSource_Arn
data_source_aws_imagebuilder_distribution_configuration_test.go:16: Step 1/1 error: Error running apply:
Error: error creating Image Builder Distribution Configuration: InvalidParameterValueException: The value supplied for parameter 'distributions[0]' is not valid. One or more outputs should be provided for each region in a distribution configuration.
--- FAIL: TestAccAwsImageBuilderDistributionConfigurationDataSource_Arn (8.02s)

=== CONT  TestAccAwsImageBuilderDistributionConfiguration_basic
resource_aws_imagebuilder_distribution_configuration_test.go:80: Step 1/2 error: Error running apply:
Error: error creating Image Builder Distribution Configuration: InvalidParameterValueException: The value supplied for parameter 'distributions[0]' is not valid. One or more outputs should be provided for each region in a distribution configuration.
--- FAIL: TestAccAwsImageBuilderDistributionConfiguration_basic (29.55s)

=== CONT  TestAccAwsImageBuilderDistributionConfiguration_disappears
resource_aws_imagebuilder_distribution_configuration_test.go:110: Step 1/1 error: Error running apply:
Error: error creating Image Builder Distribution Configuration: InvalidParameterValueException: The value supplied for parameter 'distributions[0]' is not valid. One or more outputs should be provided for each region in a distribution configuration.
--- FAIL: TestAccAwsImageBuilderDistributionConfiguration_disappears (32.72s)

=== CONT  TestAccAwsImageBuilderDistributionConfiguration_Description
resource_aws_imagebuilder_distribution_configuration_test.go:131: Step 1/3 error: Error running apply:
Error: error creating Image Builder Distribution Configuration: InvalidParameterValueException: The value supplied for parameter 'distributions[0]' is not valid. One or more outputs should be provided for each region in a distribution configuration.
--- FAIL: TestAccAwsImageBuilderDistributionConfiguration_Description (33.09s)

=== CONT  TestAccAwsImageBuilderDistributionConfiguration_Distribution
resource_aws_imagebuilder_distribution_configuration_test.go:164: Step 1/2 error: Error running apply:
Error: error creating Image Builder Distribution Configuration: InvalidParameterValueException: The value supplied for parameter 'distributions[0]' is not valid. One or more outputs should be provided for each region in a distribution configuration.
--- FAIL: TestAccAwsImageBuilderDistributionConfiguration_Distribution (44.85s)

=== CONT  TestAccAwsImageBuilderDistributionConfiguration_Tags
resource_aws_imagebuilder_distribution_configuration_test.go:487: Step 1/4 error: Error running apply:
Error: error creating Image Builder Distribution Configuration: InvalidParameterValueException: The value supplied for parameter 'distributions[0]' is not valid. One or more outputs should be provided for each region in a distribution configuration.
--- FAIL: TestAccAwsImageBuilderDistributionConfiguration_Tags (33.09s)

=== CONT  TestAccAwsImageBuilderImagePipeline_DistributionConfigurationArn
resource_aws_imagebuilder_image_pipeline_test.go:178: Step 1/3 error: Error running apply:
Error: error creating Image Builder Distribution Configuration: InvalidParameterValueException: The value supplied for parameter 'distributions[0]' is not valid. One or more outputs should be provided for each region in a distribution configuration.
--- FAIL: TestAccAwsImageBuilderImagePipeline_DistributionConfigurationArn (48.35s)

=== CONT  TestAccAwsImageBuilderImage_DistributionConfigurationArn
resource_aws_imagebuilder_image_test.go:146: Step 1/2 error: Error running apply:
Error: error creating Image Builder Distribution Configuration: InvalidParameterValueException: The value supplied for parameter 'distributions[0]' is not valid. One or more outputs should be provided for each region in a distribution configuration.
--- FAIL: TestAccAwsImageBuilderImage_DistributionConfigurationArn (54.05s)
```

The test configurations are updated to include limited AMI distribution configuration so testing can pass without adding container distribution support.

Output from acceptance testing in AWS Commercial:

```
--- FAIL: TestAccAwsImageBuilderImagePipeline_Schedule_PipelineExecutionStartCondition (37.70s) # #17396
--- FAIL: TestAccAwsImageBuilderImagePipeline_Schedule_ScheduleExpression (34.62s) # #17396
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_basic (30.84s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Description (51.76s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_disappears (27.33s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution (30.73s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_AmiTags (60.25s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_Description (47.60s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_KmsKeyId (66.08s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_LaunchPermission_UserGroups (48.36s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_LaunchPermission_UserIds (63.06s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_Name (72.42s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_TargetAccountIds (73.19s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_LicenseConfigurationArns (69.33s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Tags (92.68s)

--- PASS: TestAccAwsImageBuilderDistributionConfigurationDataSource_Arn (35.66s)

--- PASS: TestAccAwsImageBuilderImage_basic (1449.31s)
--- PASS: TestAccAwsImageBuilderImage_disappears (1449.08s)
--- PASS: TestAccAwsImageBuilderImage_DistributionConfigurationArn (1829.34s)
--- PASS: TestAccAwsImageBuilderImage_EnhancedImageMetadataEnabled (1207.33s)
--- PASS: TestAccAwsImageBuilderImage_ImageTestsConfiguration_ImageTestsEnabled (1095.28s)
--- PASS: TestAccAwsImageBuilderImage_ImageTestsConfiguration_TimeoutMinutes (1222.96s)
--- PASS: TestAccAwsImageBuilderImage_Tags (1661.80s)

--- PASS: TestAccAwsImageBuilderImagePipeline_basic (65.25s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Description (96.68s)
--- PASS: TestAccAwsImageBuilderImagePipeline_disappears (60.46s)
--- PASS: TestAccAwsImageBuilderImagePipeline_DistributionConfigurationArn (112.52s)
--- PASS: TestAccAwsImageBuilderImagePipeline_EnhancedImageMetadataEnabled (95.24s)
--- PASS: TestAccAwsImageBuilderImagePipeline_ImageRecipeArn (96.45s)
--- PASS: TestAccAwsImageBuilderImagePipeline_ImageTestsConfiguration_ImageTestsEnabled (88.54s)
--- PASS: TestAccAwsImageBuilderImagePipeline_ImageTestsConfiguration_TimeoutMinutes (107.57s)
--- PASS: TestAccAwsImageBuilderImagePipeline_InfrastructureConfigurationArn (100.25s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Status (96.04s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Tags (121.74s)
```

Output from acceptance testing in AWS GovCloud (US):

```
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_basic (30.27s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Description (72.88s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_disappears (37.27s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution (51.44s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_AmiTags (50.52s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_Description (57.29s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_KmsKeyId (72.36s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_LaunchPermission_UserGroups (43.11s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_LaunchPermission_UserIds (76.37s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_Name (48.78s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_TargetAccountIds (54.17s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_LicenseConfigurationArns (81.88s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Tags (82.35s)

--- PASS: TestAccAwsImageBuilderDistributionConfigurationDataSource_Arn (41.36s)

--- PASS: TestAccAwsImageBuilderImage_basic (1481.43s)
--- PASS: TestAccAwsImageBuilderImage_disappears (1354.00s)
--- PASS: TestAccAwsImageBuilderImage_DistributionConfigurationArn (1731.97s)
--- PASS: TestAccAwsImageBuilderImage_EnhancedImageMetadataEnabled (976.74s)
--- PASS: TestAccAwsImageBuilderImage_ImageTestsConfiguration_ImageTestsEnabled (976.18s)
--- PASS: TestAccAwsImageBuilderImage_ImageTestsConfiguration_TimeoutMinutes (1472.80s)
--- PASS: TestAccAwsImageBuilderImage_Tags (1287.54s)

--- PASS: TestAccAwsImageBuilderImagePipeline_basic (63.98s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Description (107.93s)
--- PASS: TestAccAwsImageBuilderImagePipeline_disappears (61.53s)
--- PASS: TestAccAwsImageBuilderImagePipeline_DistributionConfigurationArn (108.80s)
--- PASS: TestAccAwsImageBuilderImagePipeline_EnhancedImageMetadataEnabled (106.06s)
--- PASS: TestAccAwsImageBuilderImagePipeline_ImageRecipeArn (65.08s)
--- PASS: TestAccAwsImageBuilderImagePipeline_ImageTestsConfiguration_ImageTestsEnabled (65.10s)
--- PASS: TestAccAwsImageBuilderImagePipeline_ImageTestsConfiguration_TimeoutMinutes (64.33s)
--- PASS: TestAccAwsImageBuilderImagePipeline_InfrastructureConfigurationArn (107.98s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Schedule_PipelineExecutionStartCondition (63.33s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Schedule_ScheduleExpression (105.97s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Status (100.15s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Tags (129.05s)
```
@anGie44
Copy link
Contributor

anGie44 commented Feb 3, 2021

idk if it was luck but plugging in the first AWS doc example cron(0 10 * * *) seemed to work 😅

bflad added a commit that referenced this issue Feb 3, 2021
…ameterValueException (#17409)

Reference: #17390

The Image Builder service in AWS Commercial is now performing additional validation on Distribution Configuration creation, presumably due to the launch of container distribution support:

```
=== CONT  TestAccAwsImageBuilderDistributionConfigurationDataSource_Arn
data_source_aws_imagebuilder_distribution_configuration_test.go:16: Step 1/1 error: Error running apply:
Error: error creating Image Builder Distribution Configuration: InvalidParameterValueException: The value supplied for parameter 'distributions[0]' is not valid. One or more outputs should be provided for each region in a distribution configuration.
--- FAIL: TestAccAwsImageBuilderDistributionConfigurationDataSource_Arn (8.02s)

=== CONT  TestAccAwsImageBuilderDistributionConfiguration_basic
resource_aws_imagebuilder_distribution_configuration_test.go:80: Step 1/2 error: Error running apply:
Error: error creating Image Builder Distribution Configuration: InvalidParameterValueException: The value supplied for parameter 'distributions[0]' is not valid. One or more outputs should be provided for each region in a distribution configuration.
--- FAIL: TestAccAwsImageBuilderDistributionConfiguration_basic (29.55s)

=== CONT  TestAccAwsImageBuilderDistributionConfiguration_disappears
resource_aws_imagebuilder_distribution_configuration_test.go:110: Step 1/1 error: Error running apply:
Error: error creating Image Builder Distribution Configuration: InvalidParameterValueException: The value supplied for parameter 'distributions[0]' is not valid. One or more outputs should be provided for each region in a distribution configuration.
--- FAIL: TestAccAwsImageBuilderDistributionConfiguration_disappears (32.72s)

=== CONT  TestAccAwsImageBuilderDistributionConfiguration_Description
resource_aws_imagebuilder_distribution_configuration_test.go:131: Step 1/3 error: Error running apply:
Error: error creating Image Builder Distribution Configuration: InvalidParameterValueException: The value supplied for parameter 'distributions[0]' is not valid. One or more outputs should be provided for each region in a distribution configuration.
--- FAIL: TestAccAwsImageBuilderDistributionConfiguration_Description (33.09s)

=== CONT  TestAccAwsImageBuilderDistributionConfiguration_Distribution
resource_aws_imagebuilder_distribution_configuration_test.go:164: Step 1/2 error: Error running apply:
Error: error creating Image Builder Distribution Configuration: InvalidParameterValueException: The value supplied for parameter 'distributions[0]' is not valid. One or more outputs should be provided for each region in a distribution configuration.
--- FAIL: TestAccAwsImageBuilderDistributionConfiguration_Distribution (44.85s)

=== CONT  TestAccAwsImageBuilderDistributionConfiguration_Tags
resource_aws_imagebuilder_distribution_configuration_test.go:487: Step 1/4 error: Error running apply:
Error: error creating Image Builder Distribution Configuration: InvalidParameterValueException: The value supplied for parameter 'distributions[0]' is not valid. One or more outputs should be provided for each region in a distribution configuration.
--- FAIL: TestAccAwsImageBuilderDistributionConfiguration_Tags (33.09s)

=== CONT  TestAccAwsImageBuilderImagePipeline_DistributionConfigurationArn
resource_aws_imagebuilder_image_pipeline_test.go:178: Step 1/3 error: Error running apply:
Error: error creating Image Builder Distribution Configuration: InvalidParameterValueException: The value supplied for parameter 'distributions[0]' is not valid. One or more outputs should be provided for each region in a distribution configuration.
--- FAIL: TestAccAwsImageBuilderImagePipeline_DistributionConfigurationArn (48.35s)

=== CONT  TestAccAwsImageBuilderImage_DistributionConfigurationArn
resource_aws_imagebuilder_image_test.go:146: Step 1/2 error: Error running apply:
Error: error creating Image Builder Distribution Configuration: InvalidParameterValueException: The value supplied for parameter 'distributions[0]' is not valid. One or more outputs should be provided for each region in a distribution configuration.
--- FAIL: TestAccAwsImageBuilderImage_DistributionConfigurationArn (54.05s)
```

The test configurations are updated to include limited AMI distribution configuration so testing can pass without adding container distribution support.

Output from acceptance testing in AWS Commercial:

```
--- FAIL: TestAccAwsImageBuilderImagePipeline_Schedule_PipelineExecutionStartCondition (37.70s) # #17396
--- FAIL: TestAccAwsImageBuilderImagePipeline_Schedule_ScheduleExpression (34.62s) # #17396
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_basic (30.84s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Description (51.76s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_disappears (27.33s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution (30.73s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_AmiTags (60.25s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_Description (47.60s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_KmsKeyId (66.08s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_LaunchPermission_UserGroups (48.36s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_LaunchPermission_UserIds (63.06s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_Name (72.42s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_TargetAccountIds (73.19s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_LicenseConfigurationArns (69.33s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Tags (92.68s)

--- PASS: TestAccAwsImageBuilderDistributionConfigurationDataSource_Arn (35.66s)

--- PASS: TestAccAwsImageBuilderImage_basic (1449.31s)
--- PASS: TestAccAwsImageBuilderImage_disappears (1449.08s)
--- PASS: TestAccAwsImageBuilderImage_DistributionConfigurationArn (1829.34s)
--- PASS: TestAccAwsImageBuilderImage_EnhancedImageMetadataEnabled (1207.33s)
--- PASS: TestAccAwsImageBuilderImage_ImageTestsConfiguration_ImageTestsEnabled (1095.28s)
--- PASS: TestAccAwsImageBuilderImage_ImageTestsConfiguration_TimeoutMinutes (1222.96s)
--- PASS: TestAccAwsImageBuilderImage_Tags (1661.80s)

--- PASS: TestAccAwsImageBuilderImagePipeline_basic (65.25s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Description (96.68s)
--- PASS: TestAccAwsImageBuilderImagePipeline_disappears (60.46s)
--- PASS: TestAccAwsImageBuilderImagePipeline_DistributionConfigurationArn (112.52s)
--- PASS: TestAccAwsImageBuilderImagePipeline_EnhancedImageMetadataEnabled (95.24s)
--- PASS: TestAccAwsImageBuilderImagePipeline_ImageRecipeArn (96.45s)
--- PASS: TestAccAwsImageBuilderImagePipeline_ImageTestsConfiguration_ImageTestsEnabled (88.54s)
--- PASS: TestAccAwsImageBuilderImagePipeline_ImageTestsConfiguration_TimeoutMinutes (107.57s)
--- PASS: TestAccAwsImageBuilderImagePipeline_InfrastructureConfigurationArn (100.25s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Status (96.04s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Tags (121.74s)
```

Output from acceptance testing in AWS GovCloud (US):

```
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_basic (30.27s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Description (72.88s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_disappears (37.27s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution (51.44s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_AmiTags (50.52s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_Description (57.29s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_KmsKeyId (72.36s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_LaunchPermission_UserGroups (43.11s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_LaunchPermission_UserIds (76.37s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_Name (48.78s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_TargetAccountIds (54.17s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_LicenseConfigurationArns (81.88s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Tags (82.35s)

--- PASS: TestAccAwsImageBuilderDistributionConfigurationDataSource_Arn (41.36s)

--- PASS: TestAccAwsImageBuilderImage_basic (1481.43s)
--- PASS: TestAccAwsImageBuilderImage_disappears (1354.00s)
--- PASS: TestAccAwsImageBuilderImage_DistributionConfigurationArn (1731.97s)
--- PASS: TestAccAwsImageBuilderImage_EnhancedImageMetadataEnabled (976.74s)
--- PASS: TestAccAwsImageBuilderImage_ImageTestsConfiguration_ImageTestsEnabled (976.18s)
--- PASS: TestAccAwsImageBuilderImage_ImageTestsConfiguration_TimeoutMinutes (1472.80s)
--- PASS: TestAccAwsImageBuilderImage_Tags (1287.54s)

--- PASS: TestAccAwsImageBuilderImagePipeline_basic (63.98s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Description (107.93s)
--- PASS: TestAccAwsImageBuilderImagePipeline_disappears (61.53s)
--- PASS: TestAccAwsImageBuilderImagePipeline_DistributionConfigurationArn (108.80s)
--- PASS: TestAccAwsImageBuilderImagePipeline_EnhancedImageMetadataEnabled (106.06s)
--- PASS: TestAccAwsImageBuilderImagePipeline_ImageRecipeArn (65.08s)
--- PASS: TestAccAwsImageBuilderImagePipeline_ImageTestsConfiguration_ImageTestsEnabled (65.10s)
--- PASS: TestAccAwsImageBuilderImagePipeline_ImageTestsConfiguration_TimeoutMinutes (64.33s)
--- PASS: TestAccAwsImageBuilderImagePipeline_InfrastructureConfigurationArn (107.98s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Schedule_PipelineExecutionStartCondition (63.33s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Schedule_ScheduleExpression (105.97s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Status (100.15s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Tags (129.05s)
```
@bflad
Copy link
Contributor Author

bflad commented Feb 3, 2021

Hmmm trying that in the acceptance testing still showed failures for me in the Commercial main and standalone accounts (just to verify its nothing weird with preview access) -- the error shifts from 9th character to 10th:

=== CONT  TestAccAwsImageBuilderImagePipeline_Schedule_PipelineExecutionStartCondition
    resource_aws_imagebuilder_image_pipeline_test.go:378: Step 1/3 error: Error running apply:
        Error: error creating Image Builder Image Pipeline: InvalidParameterValueException: The value supplied for parameter 'schedule.scheduleExpression' is not valid. Invalid schedule expression. Details: Invalid CRON expression: error at position 10, details: Unexpected end of expression.


--- FAIL: TestAccAwsImageBuilderImagePipeline_Schedule_PipelineExecutionStartCondition (20.42s)
=== CONT  TestAccAwsImageBuilderImagePipeline_Schedule_ScheduleExpression
    resource_aws_imagebuilder_image_pipeline_test.go:412: Step 1/3 error: Error running apply:
        Error: error creating Image Builder Image Pipeline: InvalidParameterValueException: The value supplied for parameter 'schedule.scheduleExpression' is not valid. Invalid schedule expression. Details: Invalid CRON expression: error at position 10, details: Unexpected end of expression.


--- FAIL: TestAccAwsImageBuilderImagePipeline_Schedule_ScheduleExpression (24.54s)

Do you have ideas how you got it to work?

I didn't mention it above, but the current cron syntax passes in AWS GovCloud (US). I'll keep fiddling by trying the extended CloudWatch schedule expression syntax with its year field to see if maybe that is something new but not documented. Otherwise I'll just raise an AWS Support case.

@anGie44
Copy link
Contributor

anGie44 commented Feb 3, 2021

Ohh weird it must be something partition/region related b/c i definitely see the errors you have when using us-west-2 but i retested with us-east-1/us-west-1 and got:

--- PASS: TestAccAwsImageBuilderImagePipeline_Schedule_PipelineExecutionStartCondition (35.99s)

and if you run the current version of the tests in us-east-1,for example, they pass 🙃 hmm guess it merits an AWS support case

@bflad
Copy link
Contributor Author

bflad commented Feb 3, 2021

The plot thickens with cron(0 0 * * * *) in us-west-2:

    resource_aws_imagebuilder_image_pipeline_test.go:412: Step 1/3 error: Error running apply:
        Error: error creating Image Builder Image Pipeline: InvalidParameterValueException: The value supplied for parameter 'schedule.scheduleExpression' is not valid. Invalid schedule expression. Details: Invalid CRON expression: error at position 0, details: Specifying both a day-of-week AND a day-of-month parameter is not supported.

Anddddd adjusting it to fix that error with cron(0 0 * * ? *) passes in us-west-2:

--- PASS: TestAccAwsImageBuilderImagePipeline_Schedule_PipelineExecutionStartCondition (48.05s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Schedule_ScheduleExpression (52.39s)

@anGie44
Copy link
Contributor

anGie44 commented Feb 3, 2021

🤭 🤭

@a019647
Copy link

a019647 commented Feb 5, 2021

For me it's failing in us-east-1 despite @anGie44 reporting success there. Character 9. This is a showstopper :(
I'll try the cron(0 0 * * ? *) syntax that worked for @bflad .

@bflad
Copy link
Contributor Author

bflad commented Feb 5, 2021

@a019647 thank you for the heads up, this API update may be rolling out to other AWS regions now. Confirmed just now in us-east-1 and us-east-2. If that is the case, then the Image Builder documentation updates will also likely be rolling out soon for the change (likely this afternoon). From our AWS Support case, I think I can publicly mention that the longer syntax will be expected for new pipelines going forward.

bflad added a commit that referenced this issue Feb 5, 2021
…pdates for schedule_expression API change

Reference: #17396

Output from acceptance testing in AWS Commercial:

```
--- PASS: TestAccAwsImageBuilderImagePipeline_Schedule_PipelineExecutionStartCondition (40.77s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Schedule_ScheduleExpression (42.15s)
```

Output from acceptance testing in AWS GovCloud (US):

```
--- PASS: TestAccAwsImageBuilderImagePipeline_Schedule_ScheduleExpression (52.66s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Schedule_PipelineExecutionStartCondition (53.89s)
```
@a019647
Copy link

a019647 commented Feb 5, 2021

update: whether because I used the syntax workaround, or because the fix was in place in us-east-1 already, my scenario is now working. Thanks @bflad !

@a019647
Copy link

a019647 commented Feb 8, 2021

Update: I tried to re-apply the before-workaround version of my code in a different account/base module, and it still fails in us-east-1.

bflad added a commit that referenced this issue Feb 18, 2021
…pdates for schedule_expression API change

Reference: #17396

Output from acceptance testing in AWS Commercial:

```
--- PASS: TestAccAwsImageBuilderImagePipeline_Schedule_PipelineExecutionStartCondition (40.77s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Schedule_ScheduleExpression (42.15s)
```

Output from acceptance testing in AWS GovCloud (US):

```
--- PASS: TestAccAwsImageBuilderImagePipeline_Schedule_ScheduleExpression (52.66s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Schedule_PipelineExecutionStartCondition (53.89s)
```
bflad added a commit that referenced this issue Feb 18, 2021
…pdates for schedule_expression API change (#17666)

Reference: #17396

Output from acceptance testing in AWS Commercial:

```
--- PASS: TestAccAwsImageBuilderImagePipeline_Schedule_PipelineExecutionStartCondition (40.77s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Schedule_ScheduleExpression (42.15s)
```

Output from acceptance testing in AWS GovCloud (US):

```
--- PASS: TestAccAwsImageBuilderImagePipeline_Schedule_ScheduleExpression (52.66s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Schedule_PipelineExecutionStartCondition (53.89s)
```
@github-actions github-actions bot modified the milestones: Roadmap, v3.29.0 Feb 18, 2021
@ghost
Copy link

ghost commented Feb 19, 2021

This has been released in version 3.29.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 Mar 21, 2021

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 Mar 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/imagebuilder Issues and PRs that pertain to the imagebuilder service. technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
3 participants