diff --git a/changelogs/fragments/2324-fix_tags-on-msk-cluster_create-bug-2322.yml b/changelogs/fragments/2324-fix_tags-on-msk-cluster_create-bug-2322.yml new file mode 100644 index 00000000000..d2fcb012a90 --- /dev/null +++ b/changelogs/fragments/2324-fix_tags-on-msk-cluster_create-bug-2322.yml @@ -0,0 +1,3 @@ +--- +minor_changes: + - Fix tags on cluster creation (https://github.com/ansible-collections/community.aws/pull/2324). \ No newline at end of file diff --git a/plugins/modules/msk_cluster.py b/plugins/modules/msk_cluster.py index 5132ede011c..2cb4779f440 100644 --- a/plugins/modules/msk_cluster.py +++ b/plugins/modules/msk_cluster.py @@ -372,6 +372,7 @@ def prepare_create_options(module): "ClientSubnets": module.params["subnets"], "InstanceType": module.params["instance_type"], }, + "Tags": module.params["tags"], } if module.params["security_groups"] and len(module.params["security_groups"]) != 0: @@ -599,7 +600,7 @@ def create_or_update_cluster(client, module): if module.params["wait"]: wait_for_cluster_state(client, module, arn=cluster["ClusterArn"], state="ACTIVE") - changed |= update_cluster_tags(client, module, response["ClusterArn"]) + changed |= update_cluster_tags(client, module, response["ClusterArn"]) return changed, response