awslabs / aws-servicebroker

AWS Service Broker
Apache License 2.0
468 stars 131 forks source link

Push to CF fails for aws service broker #208

Open shwetankverma opened 4 years ago

shwetankverma commented 4 years ago

Describe the bug Push to CF fails for aws service broker.

I am trying to deploy aws service broker to CF, But i am facing this error on cf push--

ERR I0811 11:25:53.153335   28 util.go:195] Did not find 'aws_access_key' and 'aws_secret_key' in params, using default chain.
ERR I0811 11:25:53.153399   28 aws_sdk.go:71] Parameter 'target_role_name' not set. Not assuming role.
ERR I0811 11:25:57.923718   28 awsbroker.go:183] Listing objects bucket: awsservicebroker region: eu-central-1 prefix: templates/latest
ERR failed to list objects, BucketRegionError: incorrect region, the bucket is not in 'eu-central-1' region
ERR     status code: 301, request id: , host id:

Although, all things are provided and aws_access_key and aws_secret_key were mentioned in manifest.yaml.

To Reproduce After modifying the manifest.yaml when CF push command is fired, it fails.

Expected behavior CF Push should pass

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Additional context Add any other context about the problem here.

tealeg commented 4 years ago

You need to put a "command" in manifest that looks like the one used in the packaging/cloudfoundry/tile.yml file, and make sure that all the environment variables it uses are set in your manifest too. We've literally been working on the same problem today, and it's working ;-)

shwetankverma commented 4 years ago

My manifest looks like this now for command section --

command: >
    export PARAM_OVERRIDE_${BROKER_ID}_all_all_all_region=${AWS_DEFAULT_REGION} ;
    export AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} ;
    export AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} ;
    export AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION} ;
    ./cfnsb --logtostderr --prescribeOverrides=${PRESCRIBE} --v=${VERBOSITY} --brokerId=${BROKER_ID} --enableBasicAuth=true --insecure=${INSECURE} --port=${PORT} --region=${AWS_DEFAULT_REGION} --s3Bucket=${S3_BUCKET} --s3Key=${S3_KEY} --s3Region=${S3_REGION} --tableName=${TABLE_NAME} --templateFilter=${TEMPLATE_FILTER} --tlsCert=${TLS_CERT} --tlsKey=${TLS_KEY}
  disk_quota: 1G

PS : I downloaded Source code(zip) from https://github.com/awslabs/aws-servicebroker/releases/tag/v1.0.1 it has 2 files - cfnsb and manifest. i make changes in manifest and did cf push