I am having trouble passing EnvironmentVariables from AWS Codepipeline to CodeBuild. The only documentation I can find on this topic is this AWS documentation which gives a basic example but as you see below, I require an imported sub value. All attempts give me the error: Value of property Configuration must be an object with String (or simple type) properties.
- Name: EmptyHostingBucket
Actions:
- Name: EmptyHostingBucket
RunOrder: 5
ActionTypeId:
Category: Build
Owner: AWS
Provider: CodeBuild
Version: 1
Configuration:
ProjectName: !Ref CodeBuildEmptyBucket
EnvironmentVariables:
- Name: HOSTING_BUCKET
Value:
Fn::ImportValue: !Sub "${ProjectName}-website-hosting-bucket"
InputArtifacts:
- Name: SourceArtifacts
OutputArtifacts:
- Name: BuildEmptyBucket