Skip to content
This repository has been archived by the owner on Apr 16, 2022. It is now read-only.

Fixing Globals > ... > Environment that could not use the Fn::Ref #223

Conversation

acolombier
Copy link
Contributor

This PR makes this global declarations valid:

...
Globals:
    Function:
        Environment:
            Variables:
                GLOB_ENV_VAR: !Ref LocalVar
...

Unfortunatelly, I could not find reference that gives details about where can you safely use the Fn::Ref function in the Globals section, and therefore, some further investigations could come on top of this PR, but the Intrinsic function Ref must work for Environment section, regarding official AWS Python cfn-lint.

I could not find any relevant test to add.

@@ -1067,11 +1067,12 @@ function recursiveDecent(ref: any){
// Check if an Intrinsic function is allowed here
let inResourceProperty = (placeInTemplate[0] == "Resources" || placeInTemplate[2] == "Properties");
let inResourceMetadata = (placeInTemplate[0] == "Resources" || placeInTemplate[2] == "Metadata");
let inGlobalEnvironment = (placeInTemplate[0] == "Globals" && placeInTemplate[2] == "Environment");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, my IDE has made some none requested cleaning, sorry about that. Changes appear here.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you clean this up before committing? It makes retrospective diff viewing unpleasant.

@acolombier
Copy link
Contributor Author

Tests are failing because of the missing package update, but as this one is already appearing in the PR#222, I haven't change package.json to avoid conflicts.

@martysweet
Copy link
Owner

Hi @acolombier,

Can you update package.json so the tests pass? If you give me permission to the branch I can then resolve any conflicts and merge for release 👍

Thanks!
Marty

@martysweet martysweet modified the milestones: v1.9.5, v1.9.6 Feb 27, 2019
@martysweet martysweet merged commit 1cd0073 into martysweet:master Feb 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants