From 48f86f8ddb6f1a302705a7a589f4178d6061c8e4 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Wed, 15 Jul 2020 12:02:39 -0700 Subject: [PATCH] Adds Version 3 Upgrade documentation --- website/docs/guides/version-3-upgrade.html.md | 77 ++++++++++++++++++- 1 file changed, 75 insertions(+), 2 deletions(-) diff --git a/website/docs/guides/version-3-upgrade.html.md b/website/docs/guides/version-3-upgrade.html.md index 99c3bb87349..7f576f8e00d 100644 --- a/website/docs/guides/version-3-upgrade.html.md +++ b/website/docs/guides/version-3-upgrade.html.md @@ -22,7 +22,9 @@ Upgrade topics: - [Provider Authentication Updates](#provider-authentication-updates) - [Data Source: aws_availability_zones](#data-source-aws_availability_zones) - [Data Source: aws_lambda_invocation](#data-source-aws_lambda_invocation) +- [Resource: aws_acm_certificate](#resource-aws_acm_certificate) - [Resource: aws_autoscaling_group](#resource-aws_autoscaling_group) +- [Resource: aws_codepipeline](#resource-aws_codepipeline) - [Resource: aws_dx_gateway](#resource-aws_dx_gateway) - [Resource: aws_elastic_transcoder_preset](#resource-aws_elastic_transcoder_preset) - [Resource: aws_emr_cluster](#resource-aws_emr_cluster) @@ -224,6 +226,77 @@ resource "aws_autoscaling_group" "example"{ } ``` +## Resource: aws_codepipeline + +### GITHUB_TOKEN environment variable removal + +Switch your Terraform configuration to the `OAuthToken` element in the `action` `configuration` map instead. + +For example, given this previous configuration: + +```bash +$ GITHUB_TOKEN= terraform apply +``` + +```hcl +resource "aws_codepipeline" "example" { + # ... other configuration ... + + stage { + name = "Source" + + action { + name = "Source" + category = "Source" + owner = "ThirdParty" + provider = "GitHub" + version = "1" + output_artifacts = ["example"] + + configuration = { + Owner = "lifesum-terraform" + Repo = "example" + Branch = "main" + } + } + } +} +``` + +An updated configuration: + +```bash +$ TF_VAR_github_token= terraform apply +``` + +```hcl +variable "github_token" {} + +resource "aws_codepipeline" "example" { + # ... other configuration ... + + stage { + name = "Source" + + action { + name = "Source" + category = "Source" + owner = "ThirdParty" + provider = "GitHub" + version = "1" + output_artifacts = ["example"] + + configuration = { + Owner = "lifesum-terraform" + Repo = "example" + Branch = "main" + OAuthToken = var.github_token + } + } + } +} +``` + ## Resource: aws_dx_gateway ### Removal of Automatic aws_dx_gateway_association Import @@ -303,8 +376,8 @@ resource "aws_emr_cluster" "example" { # ... other configuration ... instance_group { - instance_role = "MASTER" - instance_type = "m4.large" + instance_role = "MASTER" + instance_type = "m4.large" } instance_group {