terraform-provider-terraform icon indicating copy to clipboard operation
terraform-provider-terraform copied to clipboard

Upgrade vendored terraform-provider-aws to 1.0

Open jekh opened this issue 8 years ago • 5 comments

The vendored terraform-provider-aws is currently 0.4. The 1.0.0 release contains a change that enables the AWS provider to use ECS Task Roles. Without this change, terraform init can't interact with AWS using an ECS Task Role in order to read state, etc.

Would it be possible to bump this dependency to the latest release, terraform-provider-aws 1.0.0?

jekh avatar Oct 16 '17 05:10 jekh

Looks like terraform-provider-aws 1.1.0 is out now. I've updated the title of the issue.

jekh avatar Oct 16 '17 17:10 jekh

I attempted this upgrade today, but ran into strange compatibility issues between the AWS provider code at v1.1.0 and the AWS SDK code at v1.12.8 (the version used by AWS provider v1.1.0):

vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_file_system.go:119:23: fs.Encrypted undefined (type *efs.FileSystemDescription has no field or method Encrypted)
vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_file_system.go:120:24: fs.KmsKeyId undefined (type *efs.FileSystemDescription has no field or method KmsKeyId)
vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_policy.go:542:7: cfg.DisableScaleIn undefined (type *applicationautoscaling.TargetTrackingScalingPolicyConfiguration has no field or method DisableScaleIn)
vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_policy.go:667:8: cfg.DisableScaleIn undefined (type *applicationautoscaling.TargetTrackingScalingPolicyConfiguration has no field or method DisableScaleIn)
vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_policy.go:668:31: cfg.DisableScaleIn undefined (type *applicationautoscaling.TargetTrackingScalingPolicyConfiguration has no field or method DisableScaleIn)
vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_group.go:82:9: params.KmsKeyId undefined (type *cloudwatchlogs.CreateLogGroupInput has no field or method KmsKeyId)
vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_group.go:118:24: lg.KmsKeyId undefined (type *cloudwatchlogs.LogGroup has no field or method KmsKeyId)
vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_group.go:222:18: conn.DisassociateKmsKey undefined (type *cloudwatchlogs.CloudWatchLogs has no field or method DisassociateKmsKey)
vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_group.go:222:39: undefined: cloudwatchlogs.DisassociateKmsKeyInput
vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go:470:57: undefined: firehose.KinesisStreamSourceConfiguration
vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_group.go:222:39: too many errors

Will need to delegate this to someone who knows better what's going on with the AWS provider here.

apparentlymart avatar Oct 25 '17 20:10 apparentlymart

I'd love to remove the workaround I have in every single CodeBuild buildspec: https://github.com/terraform-providers/terraform-provider-aws/issues/259#issuecomment-312413912. Please could someone advise when this issue will be released? Thanks so much for all the hard work, truly appreciated.

jch254 avatar Oct 26 '17 03:10 jch254

@radeksimko do you know what's causing the weird build errors I saw above after upgrading? It looks like a mismatch between AWS provider version and AWS SDK version, but I tried to match what the AWS provider itself was using and still got the errors.

apparentlymart avatar Oct 26 '17 17:10 apparentlymart

@apparentlymart I think it's necessary to bump the AWS provider first, then SDK - or generally anything that looks outdated, or raises suspicion of being outdated by raising compile errors.

govendor unfortunately doesn't deal with transitive dependencies and AWS SDK is one of them.

I can take a look at this one after we cut the next version of AWS with https://github.com/terraform-providers/terraform-provider-aws/pull/2066

radeksimko avatar Oct 27 '17 14:10 radeksimko