Skip to content

Unable to remove Config parameter in Redshift Serverless using CloudFormation #56

Open
@NdemeraS

Description

@NdemeraS

When Configuration Parameters are removed from the Workgroup resource definition, CloudFormation will consider the update successful but the parameters will not actually be removed from the Workgroup

Replication

Deploy the following template to your CloudFormation stack

Resources:
  Workgroup:
    Properties:
      BaseCapacity: 16
      ConfigParameters:
        - ParameterKey: max_query_execution_time
          ParameterValue: '50'
        - ParameterKey: max_query_queue_time
          ParameterValue: '50'
      WorkgroupName: xxxxxxxxxxxxxxxxxxxxxxxxxx-rft-serverless-testwg-1
      NamespaceName: !Ref NamespaceName
    Type: 'AWS::RedshiftServerless::Workgroup'

  NamespaceName:
    Properties:
      NamespaceName: xxxxxxxxxxxxxxxxxxxxxxxxxx
    Type: 'AWS::RedshiftServerless::Namespace'

Update the template to remove any or all parameters from the ConfigParameters property of the Workgroup resource, deploy updated template as a stack update

Resources:
  Workgroup:
    Properties:
      BaseCapacity: 16
    #   ConfigParameters:
    #     - ParameterKey: max_query_execution_time
    #       ParameterValue: '50'
    #     - ParameterKey: max_query_queue_time
    #       ParameterValue: '50'
      WorkgroupName: xxxxxxxxxxxxxxxxxxxxxxxxxx-rft-serverless-testwg-1
      NamespaceName: !Ref NamespaceName
    Type: 'AWS::RedshiftServerless::Workgroup'

  NamespaceName:
    Properties:
      NamespaceName: xxxxxxxxxxxxxxxxxxxxxxxxxx
    Type: 'AWS::RedshiftServerless::Namespace'

Check the properties of the Workgroup resource using the get-workgroup CLI

{
    "workgroup": {
        "baseCapacity": 16,
        "configParameters": [
...
            {
                "parameterKey": "max_query_execution_time",
                "parameterValue": "50"
            },
            {
                "parameterKey": "max_query_queue_time",
                "parameterValue": "50"
            }
        ],
...
        "enhancedVpcRouting": false,
        "namespaceName": "xxxxxxxxxxxxxxxxxxxxxxxxxx",
...
        "workgroupArn": "arn:aws:redshift-serverless:us-east-2:1111111111:workgroup/3fe7c1bd-f70c-4884-a873-7bcea39010d7",
        "workgroupId": "3fe7c1bd-f70c-4884-a873-7bcea39010d7",
        "workgroupName": "xxxxxxxxxxxxxxxxxxxxxxxxxx-rft-serverless-testwg-1",
        "workgroupVersion": "1.0.63282"
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @NdemeraS

        Issue actions

          Unable to remove Config parameter in Redshift Serverless using CloudFormation · Issue #56 · aws-cloudformation/aws-cloudformation-resource-providers-redshift-serverless