hashicorp / terraform-provider-terraform

Terraform terraform provider
https://www.terraform.io/docs/providers/terraform/
Mozilla Public License 2.0
23 stars 22 forks source link

Upgrade vendored terraform-provider-aws to 1.0 #15

Open jekh opened 6 years ago

jekh commented 6 years ago

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 commented 6 years ago

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

apparentlymart commented 6 years ago

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.

jch254 commented 6 years ago

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.

apparentlymart commented 6 years ago

@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.

radeksimko commented 6 years ago

@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