terraform-provider-aws
terraform-provider-aws copied to clipboard
[Bug]: Warning about CodePipeline GitHub version 1 action provider deprecated (when in reality it's not)
Terraform Core Version
1.5.6
AWS Provider Version
5.56.0
Affected Resource(s)
aws_codepipeline
Expected Behavior
No warning about CodePipeline GitHub version 1 action provider deprecated as even though v2 is recommended, there are no plans to deprecate v1 (AWS docs and info from AWS )
Actual Behavior
Displaying below warning about CodePipeline GitHub version 1 action provider deprecated (indicating that it will stop working one day). Version 2 requires a manual step when integrating with GitHub so it isn't an option for us.
Relevant Error/Panic Output Snippet
│ Warning: The CodePipeline GitHub version 1 action provider is deprecated.
│
│ with aws_codepipeline.infra_pipeline,
│ on code_pipeline.tf line 22, in resource "aws_codepipeline" "infra_pipeline":
│ 22: provider = "GitHub"
│
│ Use a GitHub version 2 action (with a CodeStar Connection
│ `aws_codestarconnections_connection`) instead. See
│ https://docs.aws.amazon.com/codepipeline/latest/userguide/update-github-action-connections.html
Terraform Configuration Files
resource "aws_s3_bucket" "pipeline" {
bucket = "example-bucket"
}
resource "aws_codepipeline" "this" {
name = "example-pipeline"
role_arn = aws_iam_role.pipeline.arn
artifact_store {
location = aws_s3_bucket.pipeline.id
type = "S3"
}
stage {
name = "Source"
action {
name = "Source"
category = "Source"
owner = "ThirdParty"
provider = "GitHub"
version = "1"
output_artifacts = ["SourceArtifact"]
configuration = {
Owner = local.github_owner
Repo = local.github_repo
Branch = local.github_branch
OAuthToken = data.aws_secretsmanager_secret_version.github_oauth.secret_string
PollForSourceChanges = "false"
}
}
}
}
Steps to Reproduce
terraform init terraform apply -auto-approve
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
The reason why AWS haven't fully automated the app route No plans to deprecate GitHub version 1 action provider from AWS
AWS docs: both methods supported, v2 recommended
Would you like to implement a fix?
None