Code Monkey home page Code Monkey logo

Comments (14)

steffakasid avatar steffakasid commented on August 15, 2024 1

I upggraded the aws-sdk-go:
image

And it works. My template got rendered and I can see the AMI_ID is set.

from gomplate.

hairyhenderson avatar hairyhenderson commented on August 15, 2024 1

We can't move to aws-sdk-go-v2 just yet in gomplate - but when v4 is released it'll move to using go-fsimpl, which uses aws-sdk-go-v2 (see #1336).

I've been able to figure out the broken tests that were blocking me from upgrading aws-sdk-go, and so as of #1913 we're now up-to-date there.

from gomplate.

hairyhenderson avatar hairyhenderson commented on August 15, 2024

Hi @steffakasid - sorry for the delay. I presume you're setting AWS_PROFILE=test which is how it's picking up that profile?

I wonder if this is a bug with the SDK - unfortunately gomplate's using a fairly old version of it even in the main branch, due to a bug that I haven't had time to track down.

Perhaps you could build from main and see if that works?

Also - what is the full commandline? In particular, how is the ami datasource defined?

from gomplate.

steffakasid avatar steffakasid commented on August 15, 2024

HI @hairyhenderson,

I'll try to build the main branch with the latest version later and let you know if that work. I also think that this is a bug in the aws go sdk. I use it in one of my projects and there everything works fine...

The datasource and command run is the follwing:

export K8S_VERSION=$(kubectl version -o json | jq -r '.serverVersion.major+"."+.serverVersion.minor[:2]')

gomplate -f cluster.template.yaml -d config=config.yaml -d ami=aws+smp:/eks/$K8S_VERSION/image_id

Kind Regard
Steffen

from gomplate.

steffakasid avatar steffakasid commented on August 15, 2024

Do you think it would be easily possible to switch to aws-sdk-go-v2?

https://aws.github.io/aws-sdk-go-v2/docs/migrating/

looks like especially the handling of configuration changed.

from gomplate.

steffakasid avatar steffakasid commented on August 15, 2024

I was wrong. I missed to change my ~/.aws/config. I'll check if I can change gomplate to use aws-sdk-go-v2.

from gomplate.

github-actions avatar github-actions commented on August 15, 2024

This issue is stale because it has been open for 60 days with no
activity. If it is no longer relevant or necessary, please close it.
Given no action, it will be closed in 14 days.

If it's still relevant, one of the following will remove the stale
marking:

  • A maintainer can add this issue to a milestone to indicate that
    it's been accepted and will be worked on
  • A maintainer can remove the stale label
  • Anyone can post an update or other comment

from gomplate.

steffakasid avatar steffakasid commented on August 15, 2024

Not stale.

from gomplate.

hairyhenderson avatar hairyhenderson commented on August 15, 2024

@steffakasid FYI there's a 4.0 prerelease available now - can you test it out and see if that solves this issue?

from gomplate.

steffakasid avatar steffakasid commented on August 15, 2024

Sure i'll take a look tomorrow at work.

from gomplate.

steffakasid avatar steffakasid commented on August 15, 2024

It looks like this is still an issue even with aws-sdk-go-v2. I'll create an issue there: aws/aws-sdk-go#5153

from gomplate.

hairyhenderson avatar hairyhenderson commented on August 15, 2024

Hrm... One other thing you could test, which might rule out something gomplate is doing, is try with the example fscli command in go-fsimpl. Install it with go install github.com/hairyhenderson/go-fsimpl/examples/fscli@latest and then try something like:

$ fscli -base-url=aws+smp:///eks/1.27/image_id ls

from gomplate.

steffakasid avatar steffakasid commented on August 15, 2024

the aws+smp stuff is working fine. When I change back my .aws/config I can run the template with gomplat v4

from gomplate.

github-actions avatar github-actions commented on August 15, 2024

This issue is stale because it has been open for 60 days with no
activity. If it is no longer relevant or necessary, please close it.
Given no action, it will be closed in 14 days.

If it's still relevant, one of the following will remove the stale
marking:

  • A maintainer can add this issue to a milestone to indicate that
    it's been accepted and will be worked on
  • A maintainer can remove the stale label
  • Anyone can post an update or other comment

from gomplate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.