dannysteenman / vscode-cloudformation-snippets

This extension adds snippets for all the AWS CloudFormation resources into Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=dannysteenman.cloudformation-yaml-snippets
Apache License 2.0
27 stars 8 forks source link

Support codepipeline stage #11

Closed strowk closed 5 days ago

strowk commented 3 years ago

Is your feature request related to a problem? Please describe. When adding one more stage to codepipeline it would be handy to have a snippet for this. Current snippet for codepipeline does not contain structure of a stage and contains a lot of things not needed for this use case.

Describe the solution you'd like I would like to have a snippet to appear when I type something like codepipeline-stage with all the structure including actions structure. Also I think when cloudpipeline snippet works, it should provide stage and actions as well, currently it just makes this

            Stages: # Required
              Stages

and this is not very helpful

Describe alternatives you've considered Well I can just copy stuff from cloudformation website, but then I do not need this extension at all.

Additional context

image

dannysteenman commented 5 days ago

I've addressed the issue and it has now been fixed in version 5.10 which you can update in vscode right away. Link to changelog: https://github.com/dannysteenman/vscode-cloudformation-snippets/commit/ec44f0379f318c58d7e022842af4a04c22d8a07c

All the nested arrays should be included in the autocompletion whether you use autocomplete for json or yaml cloudformation templates.

So in this case typing codepipeline-pipeline in a yaml file will generate the following snippet:

examplepipeline:
  Type: AWS::CodePipeline::Pipeline
  Properties:
    ArtifactStore:
      EncryptionKey:
        Id: "String"
        Type: "String"
      Location: "String"
      Type: "String"
    ArtifactStores: 
      - ArtifactStore:
          EncryptionKey:
            Id: "String"
            Type: "String"
          Location: "String"
          Type: "String"
        Region: "String"
    DisableInboundStageTransitions: 
      - Reason: "String"
        StageName: "String"
    ExecutionMode: "String"
    Name: "String"
    PipelineType: "String"
    RestartExecutionOnUpdate: false
    RoleArn: "String" # Required
    Stages: # Required
      - Actions:
          - ActionTypeId:
              Category: "String"
              Owner: "String"
              Provider: "String"
              Version: "String"
            Configuration: "JSON"
            InputArtifacts:
              - Name: "String"
            Name: "String"
            Namespace: "String"
            OutputArtifacts:
              - Name: "String"
            Region: "String"
            RoleArn: "String"
            RunOrder: "Number"
            TimeoutInMinutes: "Number"
        Blockers:
          - Name: "String"
            Type: "String"
        Name: "String"
        OnFailure:
          Result: "String"
    Tags: 
      - Key: "String"
        Value: "String"
    Triggers: 
      - GitConfiguration:
          PullRequest:
            - Branches:
                Excludes:
                  - "String"
                Includes:
                  - "String"
              Events:
                - "String"
              FilePaths:
                Excludes:
                  - "String"
                Includes:
                  - "String"
          Push:
            - Branches:
                Excludes:
                  - "String"
                Includes:
                  - "String"
              FilePaths:
                Excludes:
                  - "String"
                Includes:
                  - "String"
              Tags:
                Excludes:
                  - "String"
                Includes:
                  - "String"
          SourceActionName: "String"
        ProviderType: "String"
    Variables: 
      - DefaultValue: "String"
        Description: "String"
        Name: "String"
Jun-KODAMA-SCSK commented 4 days ago

Thanks for many attention and fix!