Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation Bug #177

Open
maxiwoj opened this issue Jan 15, 2019 · 2 comments
Open

Validation Bug #177

maxiwoj opened this issue Jan 15, 2019 · 2 comments
Assignees
Labels
Milestone

Comments

@maxiwoj
Copy link
Contributor

maxiwoj commented Jan 15, 2019

Perun throws an error:

GOROOT=/usr/local/Cellar/go/1.9.3/libexec #gosetup
GOPATH=/Users/maksymilian/go #gosetup
/usr/local/Cellar/go/1.9.3/libexec/bin/go build -i -o /private/var/folders/0d/93p3r6493yg7p0rvl_4r983m0000gn/T/___1validate /Users/maksymilian/go/src/github.com/Appliscale/perun/main.go #gosetup
/private/var/folders/0d/93p3r6493yg7p0rvl_4r983m0000gn/T/___1validate validate testTemplates/ec2-etl.yaml #gosetup
INFO: Configuration file from the following location will be used: /Users/maksymilian/.config/perun/main.yaml
INFO: Session token will expire in 32h39m5s (2019-01-16 21:57:12)
INFO: Creating new session. Profile: appliscale Region: us-east-2
panic: interface conversion: interface {} is map[string]interface {}, not string

goroutine 1 [running]:
github.com/Appliscale/perun/helpers.findFnImportValue(0xc420706f00, 0x4e2, 0x500, 0xc420084910, 0x0, 0x0)
	/Users/maksymilian/go/src/github.com/Appliscale/perun/helpers/formathelpers.go:154 +0xab9
github.com/Appliscale/perun/helpers.ParseYAML(0xc4206f6000, 0x47a, 0x67a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/maksymilian/go/src/github.com/Appliscale/perun/helpers/formathelpers.go:94 +0x663
github.com/Appliscale/perun/validator.validateTemplateFile(0x7ffeefbff8d7, 0x1a, 0x7ffeefbff8d7, 0x1a, 0xc420094c60, 0xc42028f300)
	/Users/maksymilian/go/src/github.com/Appliscale/perun/validator/localvalidator.go:91 +0x272
github.com/Appliscale/perun/validator.Validate(0xc420094c60, 0x8)
	/Users/maksymilian/go/src/github.com/Appliscale/perun/validator/localvalidator.go:63 +0x4c
main.main()
	/Users/maksymilian/go/src/github.com/Appliscale/perun/main.go:49 +0xb00
ERROR: Template testTemplates/ec2-etl.yaml is invalid!

Process finished with exit code 2

This error is thrown for such template:

AWSTemplateFormatVersion: "2010-09-09"

Parameters:
  VPCStackName:
    Type: String
  SGStackName:
    Type: String
  EC2RoleStackName:
    Type: String
  ENV:
    Type: String
    AllowedValues:
      - prod
      - staging
  InstanceType:
    Type: String
  ImageId:
    Type: String
  PublicSubnetAZ:
    Type: String

Resources:

  EC2ETL:
    Type: AWS::EC2::Instance
    Properties:
      InstanceType: !Ref InstanceType
      ImageId: !Ref ImageId
      Tags:
      - Key: Name
        Value: !Join ["-",[!Ref ENV, ETL]]
      NetworkInterfaces:
      - AssociatePublicIpAddress: True
        DeleteOnTermination: True
        GroupSet:
          - 'Fn::ImportValue': !Sub ${SGStackName}-public-icmp-sgId
          - 'Fn::ImportValue': !Sub ${SGStackName}-public-ssh-sgid
        SubnetId:
          'Fn::ImportValue': !Sub ${VPCStackName}-${PublicSubnetAZ}-public-subnetId-01
        DeviceIndex: 0
      IamInstanceProfile:
        'Fn::ImportValue': !Sub ${EC2RoleStackName}-instance-profile-name

Outputs:
  ECETLPublicIP:
    Value:
      Fn::GetAtt: [EC2ETL, PublicIp]
    Description: Instance profile name
@maxiwoj maxiwoj added the defect label Jan 15, 2019
@maxiwoj maxiwoj added this to the Stratus - 1.4 milestone Jan 15, 2019
@maxiwoj
Copy link
Contributor Author

maxiwoj commented Jan 15, 2019

Validation Bug

@maxiwoj maxiwoj assigned maxiwoj and unassigned maxiwoj Jan 17, 2019
@SylwiaGargula SylwiaGargula self-assigned this Jan 24, 2019
@SylwiaGargula
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants