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

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

Open
NdemeraS opened this issue May 17, 2024 · 0 comments

Comments

@NdemeraS
Copy link

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"
    }
}
@prerna-p prerna-p transferred this issue from aws-cloudformation/cloudformation-cli May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant